efikamx:linux-kernel.git
7 years agophylib: Properly reinitialize PHYs after hibernation
Anton Vorontsov [Wed, 30 Dec 2009 08:23:30 +0000 (08:23 +0000)]
phylib: Properly reinitialize PHYs after hibernation

Since hibernation assumes power loss, we should fully reinitialize
PHYs (including platform fixups), as if PHYs were just attached.

This patch factors phy_init_hw() out of phy_attach_direct(), then
converts mdio_bus to dev_pm_ops and adds an appropriate restore()
callback.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agophylib: Fix deadlock on resume
Anton Vorontsov [Wed, 30 Dec 2009 08:23:28 +0000 (08:23 +0000)]
phylib: Fix deadlock on resume

Sometimes kernel hangs on resume with the following trace:

 ucc_geth e0102000.ucc: resume
 INFO: task bash:1764 blocked for more than 120 seconds.
 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
 bash          D 0fecf43c     0  1764   1763 0x00000000
 Call Trace:
 [cf9a7c10] [c0012868] ret_from_except+0x0/0x14 (unreliable)
 --- Exception: cf9a7ce0 at __switch_to+0x4c/0x6c
     LR = 0xcf9a7cc0
 [cf9a7cd0] [c0008c14] __switch_to+0x4c/0x6c (unreliable)
 [cf9a7ce0] [c028bcfc] schedule+0x158/0x260
 [cf9a7d10] [c028c720] __mutex_lock_slowpath+0x80/0xd8
 [cf9a7d40] [c01cf388] phy_stop+0x20/0x70
 [cf9a7d50] [c01d514c] ugeth_resume+0x6c/0x13c
 [...]

Here is why.

On suspend:

- PM core starts suspending devices, ucc_geth_suspend gets called;

- ucc_geth calls phy_stop() on suspend. Note that phy_stop() is
  mostly asynchronous so it doesn't block ucc_geth's suspend routine,
  it just sets PHY_HALTED state and disables PHY's interrupts;

- Suddenly the state machine gets scheduled, it grabs the phydev->lock
  mutex and tries to process the PHY_HALTED state, so it calls
  phydev->adjust_link(phydev->attached_dev). In ucc_geth case
  adjust_link() calls msleep(), which reschedules the code flow back to
  PM core, which now finishes suspend and so we end up sleeping with
  phydev->lock mutex held.

On resume:

- PM core starts resuming devices (notice that nobody rescheduled
  the state machine yet, so the mutex is still held), the core calls
  ucc_geth's resume routine;

- ucc_geth_resume restarts the PHY with phy_stop()/phy_start()
  sequence, and the phy_*() calls are trying to grab the phydev->lock
  mutex. Here comes the deadlock.

This patch fixes the issue by stopping the state machine on suspend
and starting it again on resume.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoENGR00123489 Support vpu suspend/resume on mx53
Sammy He [Fri, 14 May 2010 17:12:21 +0000 (01:12 +0800)]
ENGR00123489 Support vpu suspend/resume on mx53

Support vpu suspend/resume on mx53. Don't do power gating and
firmware re-install on mx53.

Signed-off-by: Sammy He <r62914@freescale.com>
7 years agoENGR00123437 iMX28: Add nand support for updater defconfig
Peter Chen [Thu, 13 May 2010 06:33:32 +0000 (14:33 +0800)]
ENGR00123437 iMX28: Add nand support for updater defconfig

1. Add nand support for iMX28 updater defconfig, and
fix bug for compiling error for not adding cpu freq config
2. Build-in ext3 and JBD function for support sd ext3 rootfs

Signed-off-by: Peter Chen <b29397@freescale.com>
7 years agoENGR00123280 MX5x SRTC: Add ioctls for time set notification
Anish Trivedi [Fri, 7 May 2010 14:52:39 +0000 (09:52 -0500)]
ENGR00123280 MX5x SRTC: Add ioctls for time set notification

Implement RTC_READ_TIME_47BIT and RTC_WAIT_FOR_TIME_SET ioctls.
Updates based on review comments.

Signed-off-by: Anish Trivedi <anish@freescale.com>
7 years agoENGR00122216-3 Build in LDB driver for imx5 platforms
Liu Ying [Wed, 12 May 2010 23:05:23 +0000 (19:05 -0400)]
ENGR00122216-3 Build in LDB driver for imx5 platforms

Build in LDB driver for imx5 platforms.

Signed-off-by: Liu Ying <b17645@freescale.com>
7 years agoENGR00122216-2 Support LDB driver
Liu Ying [Wed, 12 May 2010 23:05:04 +0000 (19:05 -0400)]
ENGR00122216-2 Support LDB driver

This patch adds LDB driver support.

Signed-off-by: Liu Ying <b17645@freescale.com>
7 years agoENGR00122216-1 MX53 MSL:Change for LDB support
Liu Ying [Wed, 12 May 2010 23:04:42 +0000 (19:04 -0400)]
ENGR00122216-1 MX53 MSL:Change for LDB support

This patch includes IOMUX, clock change for LDB
and adds LDB platform device.

Signed-off-by: Liu Ying <b17645@freescale.com>
7 years agoENGR00123078-2 MX28: L2 Switch support
Niu Xule [Wed, 12 May 2010 07:47:41 +0000 (15:47 +0800)]
ENGR00123078-2 MX28: L2 Switch support

L2 Switch support

Signed-off-by: Niu Xule <b23300@freescale.com>
7 years agoENGR00123078-1 MX28: Add L2 Switch resources definition
Niu Xule [Wed, 12 May 2010 07:43:24 +0000 (15:43 +0800)]
ENGR00123078-1 MX28: Add L2 Switch resources definition

L2 Switch resources definition for MX28

Signed-off-by: Niu Xule <b23300@freescale.com>
7 years agoENGR00123400 imx53 arm2: set correct IOMUX for dvi
Jason Chen [Wed, 12 May 2010 08:42:39 +0000 (16:42 +0800)]
ENGR00123400 imx53 arm2: set correct IOMUX for dvi

Set the correct IOMUX for ARM2 board.

Signed-off-by: Jason Chen <b02280@freescale.com>
7 years agoENGR00122780 ipufb: rework display device setting method
Jason Chen [Wed, 12 May 2010 07:36:40 +0000 (15:36 +0800)]
ENGR00122780 ipufb: rework display device setting method

Rework the display command line options to not require new option for
every new display. Add mxcdi0fb/mxcdi1fb option <fmt> and to tell system
what kind of display device is going to use.

Use "di1_primary" to make DI1 the primary display (i.e. fb0).

The display selection is done using video= parameter.

        For example on imx51:

                  di             di_fmt      video_mode
        DVI:      0              RGB24      mxcdi0fb:800x600M-16@60 etc
        DVI-HDMI: 0              RGB24      mxcdi0fb:720P60
        LVDS:     0              LVDS666    mxcdi0fb:XGA
        WVGA lcd: 1              RGB565     mxcdi1fb:800x480M-16@55
        TVE:      1              YUV444     mxcdi1fb:TV-NTSC
                                            mxcdi1fb:TV-PAL
                                            mxcdi1fb:720P60
        For example on imx53:

                  di             di_fmt      video_mode
        DVI:      0              RGB24      mxcdi0fb:800x600M-16@60 etc
        DVI-HDMI: 0              RGB24      mxcdi0fb:720P60
        WVGA lcd: 0              RGB565     mxcdi0fb:800x480M-16@55
        TVE:      1              YUV444     mxcdi1fb:TV-NTSC
                                            mxcdi1fb:TV-PAL
                                            mxcdi1fb:720P60

If you want to set NTSC tv as primary display, and make second display
DI0 as DVI 1024x768 resolution, just add

"di1_primary video=mxcdi0fb:RGB24,1024x768M-16@60 video=mxcdi1fb:YUV444,TV-NTSC"

to cmdline.

Signed-off-by: Rob Herring <r.herring@freescale.com>
Signed-off-by: Jason Chen <b02280@freescale.com>
7 years agoENGR00123338 MX23: MTD block device support
Aisheng.Dong [Wed, 12 May 2010 06:50:09 +0000 (14:50 +0800)]
ENGR00123338 MX23: MTD block device support

Add MTD_BLOCK imx23 configuration

Signed-off-by: Aisheng.Dong <b29396@freescale.com>
7 years agoENGR00122962 ipu: don't set axi id to 1 on mx53
Rob Herring [Tue, 27 Apr 2010 22:15:07 +0000 (17:15 -0500)]
ENGR00122962 ipu: don't set axi id to 1 on mx53

Setting the AXI ID on to 1 for sync display channels on MX53 causes
display flickering when system is heavily loaded.

Signed-off-by: Rob Herring <r.herring@freescale.com>
(cherry picked from commit 30df5734fcea4146b60f35238aaf5368f3392b0d)

7 years ago ENGR00123325-2 mx5x: Change default DMA zone to 96M
Sammy He [Tue, 11 May 2010 14:11:39 +0000 (22:11 +0800)]
 ENGR00123325-2 mx5x: Change default DMA zone to 96M

Change default DMA zone to 96M on mx5x

Signed-off-by: Sammy He <r62914@freescale.com>
7 years agoENGR00123325-1 Increase DMA zone to 96M on mx5x
Sammy He [Tue, 11 May 2010 14:08:02 +0000 (22:08 +0800)]
ENGR00123325-1 Increase DMA zone to 96M on mx5x

Increase DMA zone to 96M to fix memory not enough issue with 1080p
video playback.

Signed-off-by: Sammy He <r62914@freescale.com>
7 years agoENGR00123296 MX5: Fix FEC compiling error
Xie Xiaobo [Mon, 10 May 2010 03:31:21 +0000 (11:31 +0800)]
ENGR00123296 MX5: Fix FEC compiling error

1. One variable declaration was controlled by ARCH_MXS, but it was
used by other platforms, So remove the ARCH_MXS flags controlling.
2. Added judgement for FEC 1588 interrupt enablement.

Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
7 years agoENGR00122832-2 MX28: Support for IEEE 1588 interface functionality
Xiexiaobo [Sun, 9 May 2010 08:27:06 +0000 (16:27 +0800)]
ENGR00122832-2 MX28: Support for IEEE 1588 interface functionality

Supply the 1588 support for MX28 FEC.

Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
7 years agoENGR00122832-1 MX28: Configure clock source for FEC 1588 timer
Xie Xiaobo [Thu, 6 May 2010 11:02:11 +0000 (19:02 +0800)]
ENGR00122832-1 MX28: Configure clock source for FEC 1588 timer

Select clock for Ethernet 1588 timer and set the divider.

Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
7 years agoENGR00123293 iMX23 fix ssp clock is too slow
Frank Li [Sat, 8 May 2010 03:47:40 +0000 (11:47 +0800)]
ENGR00123293 iMX23 fix ssp clock is too slow

bypass bit set to wrong possition. So ssp alays use xtal.
mmc use ssp module divider instead of ssp clock source

Signed-off-by: Frank Li <Frank.Li@freescale.com>
7 years agoENGR00123283 MX23: clock driver causes ssp_clk change timeout out of suspend
Robert Lee [Fri, 7 May 2010 20:26:59 +0000 (15:26 -0500)]
ENGR00123283 MX23: clock driver causes ssp_clk change timeout out of suspend

If you boot up and then go into suspend mode, the clk_busy_wait()
 function causes a timeout in the ssp_set_rate function because
 the rate is being set while the clock is disable
 resulting in the busy bit staying false.

Signed-off-by: Robert Lee <robert.lee@freescale.com>
7 years agoENGR00123222 MX23/MX28: Add power optimization functionality to cpufreq
Robert Lee [Fri, 7 May 2010 05:02:09 +0000 (00:02 -0500)]
ENGR00123222 MX23/MX28: Add power optimization functionality to cpufreq

MX23/MX28: Add power optimization functionality to cpufreq
Add working HCLK autoslow interface and functionality
 to cpufreq and clock driver.
Add lowering of x_clk for lowest clock speed state.
MX23: Fix 392MHz voltage value from 1475000 to 1450000.
  This lower value is all that is needed when using 130MHz hclk.
MX23: change emiclk from 120000 to 130910 for 360000 cpu entry.
 130910 allows more bandwidth and avoids momentary halting
 of sdram traffic required between emiclk changes.
MX23/28: fiix problem with previous hclk autoslow
 implementation causing a corruption of the CLKCTRL
 _HBUS register.  The regular hclk divider was getting
 set to 21 or 22 or 23 when the LCD was turned off.
  This very low speed starves the system.

Signed-off-by: Robert Lee <robert.lee@freescale.com>
7 years agoENGR00122684: imx23: add nand support for updater defconfig
Peter Chen [Thu, 6 May 2010 01:40:49 +0000 (09:40 +0800)]
ENGR00122684: imx23: add nand support for updater defconfig

imx23: add nand support for and updater defconfig

Signed-off-by: Peter Chen <b29397@freescale.com>
7 years agoENGR00123170 Preserve NAND bad block indication
Jason Liu [Thu, 6 May 2010 08:47:39 +0000 (16:47 +0800)]
ENGR00123170 Preserve NAND bad block indication

Preserve bad block indication of NAND

Signed-off-by:Jason Liu <r64343@freescale.com>

7 years agoENGR00123197 MX23: Fix CPU freq cannot be changed after LCD is off if mDDR used
Nancy Chen [Thu, 6 May 2010 16:54:34 +0000 (11:54 -0500)]
ENGR00123197 MX23: Fix CPU freq cannot be changed after LCD is off if mDDR used

MX23: Fix CPU frequency can not be changed after LCD is off if mDDR is used.

Signed-off-by: Nancy Chen <Nancy.Chen@freescale.com>
7 years agoENGR00122920: Fix failure to boot from MMC slot 0 on MX51.
Ranjani Vaidyanathan-RA5478 [Tue, 27 Apr 2010 16:04:37 +0000 (11:04 -0500)]
ENGR00122920: Fix failure to boot from MMC slot 0 on MX51.

Disabling PLL3 was causing failure to boot from MMC slot0.
Move SDHC clocks to be sourced from PLL2 instead of PLL3.

Signed-off-by: Ranjani Vaidyanathan-RA5478 <Ranjani.Vaidyanathan@freescale.com>
7 years agoENGR00122789: Fixed long-term video playback issue.
Ranjani Vaidyanathan-RA5478 [Thu, 22 Apr 2010 20:06:01 +0000 (15:06 -0500)]
ENGR00122789: Fixed long-term video playback issue.

Fixed long-term video playback issue due to incorrect increment of
clock usecount.
Fixed various bugs associated with system entering LP-APM mode.
Fixed incorrect enabling of PLL3 that was not allowing system to enter
LP-APM mode if TVE was built in.
EMI_GARB clock needs to be enabled when certain clock dividers are changed.

Signed-off-by: Ranjani Vaidyanathan-RA5478 <Ranjani.Vaidyanathan@freescale.com>
7 years ago ENGR00123128 MX25 wifi small data transfer error in DMA mode
Richard Zhu [Thu, 6 May 2010 08:03:36 +0000 (16:03 +0800)]
 ENGR00123128 MX25 wifi small data transfer error in DMA mode

 Use the DMA mode in normal, and revert to PIO mode when
 there are small data transmissions.

Signed-off-by: Richard Zhu <r65037@freescale.com>
7 years agoENGR00123168 : iMX23 SSP/MMC change clock setting
Jeremy.Yao [Thu, 6 May 2010 08:13:33 +0000 (16:13 +0800)]
ENGR00123168 : iMX23 SSP/MMC change clock setting

Change mmc clock setting to fit new clock driver

Signed-off-by: Jeremy Yao <r65161@freescale.com>
7 years agoENGR00123159: MXS AUART Unset Stick Parity Select
Jeremy.Yao [Thu, 6 May 2010 06:43:08 +0000 (14:43 +0800)]
ENGR00123159: MXS AUART Unset Stick Parity Select

Unset SPS bit, allow normal parity check

Signed-off-by: Jeremy Yao <r65161@freescale.com>
7 years agoENGR00123125 mx23: cleanup and fixes of mach-mx23/clock.c
Robert Lee [Wed, 5 May 2010 03:13:00 +0000 (22:13 -0500)]
ENGR00123125 mx23: cleanup and fixes of mach-mx23/clock.c

- add set_rate functionality for x_clk.
 Added the x_set_rate and x_round_rate functions.  A lower
 x_clk rate will be used for the lowest power 24Mhz state.
 This implementation to be added later into cpufreq but
 going ahead and providing the necessary clock driver
 functionality now.

- add enable/disable functionality to ref clocks
 Assigned the enable and disable function pointers
 of each of the *_ref_clk tables to the mx23 enable
 and disable functions.

- change lcd clock (default) parent to ref_pix
 Self explanatory.  Previously this was incorrectly
 assigned directly to the PLL which would cause
 ref_pix clock to never be gated when not being
 used which causes very small but unnecessary
 additional power usage to occur when the LCD is disabled.

- add hbus autoslow function to be used by cpufreq
 Added this function for eventual used by cpufreq driver.

- fix pll_enable() delay
This delay was changed to match delay requirements given
 in the mx23 reference manual from the definition of the
 PLLCTRL0 POWER bitfield.

- revise emi_set_rate

emi_set_rate had several small issues.
The amount of iram it was asking for was set to an
 arbitrary amount instead of being assigned to the
 size of the assembly code.  Instead, assigning it
 to the size of the assembly code.

When no changes in emiclk speed were being made, we didn't
 need to spend the time allocating iram, disabling fiqs/irqs,
 and jumping to the assembly routines  Added checks to
 minimize the time spent in emi_set_rate if then new
 clock divisors were the same as the old.

Added functionality for switching the parent between
 ref_emi_clk and ref_xtal_clk source based on the clock
 speed.

- added "set_sys_dependent_parent" functionality to allow
 the reduction some of the peripheral clocks (mainly SSP
 and GPMI) during the lowest power 24MHz cpu_clk state
 was needed to allow the PLL to turn off and achieve
 minimum power usage for that state.  The
 "set_sys_dependent_parent" functionality implements this
 functionality by checking the cpu speed and changing the
 parent as needed (but only when the ref count is zero).

- other minor cleanup

In a couple of locations, I saw the following syntax being used:

> -val &= ~(BM_CLKCTRL_FRAC_CPUFRAC << BP_CLKCTRL_FRAC_CPUFRAC);
> -val |= clkctrl_frac;

This was incorrect because the BM_ definition is already
 shifted to the correct bitfield location of the register.
  Shifting it over further by BP_ is a bug.  This bug
 didn't cause problems in these cases because the BP_
 value happended to be zero, but needed cleaning up anyway.

The mx23_raw_enable was being called without any delays
 to ensure the clock was ready for use.  Added a call
 to check the clock busy bit to ensure the clock is ready
 before being used.

-  Added clock_busy_wait function which replaced all the
 individual busy_wait handling and properly accounts for
 clocks with xtal source (which use a separate xtal
 sourced busy bit).

-  Cleaned up xtal and rtc clocks/sources functionality.

-  Added functionality to SSP and GPMI set_rate function
 to allow changing the parent clock to the xtal if the
 rate is a factor of 24MHz.

Signed-off-by: Robert Lee <robert.lee@freescale.com>
7 years agoENGR00123134-3 MX53 NAND defconfig support
Jason Liu [Thu, 6 May 2010 02:47:07 +0000 (10:47 +0800)]
ENGR00123134-3 MX53 NAND defconfig support

MX53 NAND defconfig support

Signed-off-by:Jason Liu <r64343@freescale.com>

7 years agoENGR00123134-2 MX53 NAND driver support
Jason Liu [Thu, 6 May 2010 02:46:14 +0000 (10:46 +0800)]
ENGR00123134-2 MX53 NAND driver support

MX53 NAND driver support

Signed-off-by:Jason Liu <r64343@freescale.com>

7 years agoENGR00123134-1 MX53 NAND mach support
Jason Liu [Thu, 6 May 2010 02:44:45 +0000 (10:44 +0800)]
ENGR00123134-1 MX53 NAND mach support

MX53 NAND mach support

Signed-off-by:Jason Liu <r64343@freescale.com>

7 years agoENGR00123131 NAND:Get resources from platform data
Jason Liu [Thu, 6 May 2010 02:43:35 +0000 (10:43 +0800)]
ENGR00123131 NAND:Get resources from platform data

Get resources from platform data

Signed-off-by:Jason Liu <r64343@freescale.com>

7 years agoENGR00122142-4 MX28:Dual ENET mach support
Jason [Thu, 22 Apr 2010 06:35:02 +0000 (14:35 +0800)]
ENGR00122142-4  MX28:Dual ENET mach support

MX28:Dual ENET mach support

Signed-off-by:Jason Liu <r64343@freescale.com>

7 years agoENGR00122142-3 fec: Add shared mdio bus for dual MAC
Jason [Thu, 22 Apr 2010 06:31:04 +0000 (14:31 +0800)]
ENGR00122142-3 fec: Add shared mdio bus for dual MAC

MX28 has two MAC,but External PHY can only be configed by MAC0
which means PHY1 should be configed by MAC0 according to IC spec.
This patch enable dual ENET support. If want to test rootfs from
eth1, can add ip=:::::eth1:dhcp in the command line

Signed-off-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Rob Herring <r.herring@freescale.com>
7 years agoENGR00122142-2 imx: fix platforms using fec RMII mode
Rob Herring [Wed, 7 Apr 2010 18:26:04 +0000 (13:26 -0500)]
ENGR00122142-2 imx: fix platforms using fec RMII mode

Add FEC phy interface mode platform data for platforms using RMII.

Signed-off-by: Rob Herring <r.herring@freescale.com>
7 years agoENGR00122142-1 fec: fix RMII with phylib
Rob Herring [Wed, 7 Apr 2010 18:25:33 +0000 (13:25 -0500)]
ENGR00122142-1 fec: fix RMII with phylib

This fixes RMII support which was broken by phylib support.

Signed-off-by: Rob Herring <r.herring@freescale.com>
7 years agoUBUNTU: SAUCE: (upstream) netdev/fec: fix performance impact from mdio poll operation
Bryan Wu [Thu, 22 Apr 2010 06:12:02 +0000 (14:12 +0800)]
UBUNTU: SAUCE: (upstream) netdev/fec: fix performance impact from mdio poll operation

BugLink: http://bugs.launchpad.net/bugs/546649
BugLink: http://bugs.launchpad.net/bugs/457878
After introducing phylib supporting, users experienced performace drop. That is
because of the mdio polling operation of phylib. Use msleep to replace the busy
waiting cpu_relax() and remove the warning message.

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: SAUCE: (upstream) netdev/fec: fix phy_speed caculating
Bryan Wu [Thu, 22 Apr 2010 05:49:48 +0000 (13:49 +0800)]
UBUNTU: SAUCE: (upstream) netdev/fec: fix phy_speed caculating

BugLink: http://bugs.launchpad.net/bugs/546649
BugLink: http://bugs.launchpad.net/bugs/457878
 - remove duplicated phy_speed caculation
 - fix the phy_speed caculation according to the DataSheet

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agonetdev/fec: fix compiling warning
Bryan Wu [Thu, 22 Apr 2010 05:43:33 +0000 (13:43 +0800)]
netdev/fec: fix compiling warning

BugLink: http://bugs.launchpad.net/bugs/457878
Missed to set .ndo_do_ioctl as fec_enet_ioctl, so will generate a compiling
warning due to nobody uses fec_enet_ioctl. This patch fixed that.

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-by: Amit Kucheria <amit.kucheria@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
7 years agonetdev/fec.c: add phylib supporting to enable carrier detection
Bryan Wu [Wed, 7 Apr 2010 18:24:43 +0000 (13:24 -0500)]
netdev/fec.c: add phylib supporting to enable carrier detection

netdev/fec.c: add phylib supporting to enable carrier detection

BugLink: http://bugs.launchpad.net/bugs/457878
 - removed old MII phy control code
 - add phylib supporting
 - add ethtool interface to make user space NetworkManager works

This patch is ready for upstream, it will be pushed to upstream for merge

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-by: Amit Kucheria <amit.kucheria@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
7 years agoENGR00122964 Second pass at unified i.MX23/i.MX28 NAND Flash driver
Patrick Turley [Wed, 28 Apr 2010 02:39:33 +0000 (21:39 -0500)]
ENGR00122964 Second pass at unified i.MX23/i.MX28 NAND Flash driver

Deleted the old drivers.

Broke the driver into separate files, for readability and to isolate
hardware dependencies.

Fixed bad block problems in the boot area for the i.MX23.

At this writing, UBI can't handle MTDs larger than 2GiB. If the
general use partition is larger than 2GiB, the driver will create
sub-partitions, none of which are larger than 2GiB.

Updated the default configs for the i.MX23 and i.MX28.

Other, miscellaneous changes.

Signed-off-by: Patrick Turley <patrick.turley@freescale.com>
7 years agoENGR00123129 IPUv3:Enable DMFC watermark
Liu Ying [Wed, 5 May 2010 20:51:40 +0000 (16:51 -0400)]
ENGR00123129 IPUv3:Enable DMFC watermark

Enable IDMAC WM enable bit when enable corresponding
DMFC channel's watermark.

Signed-off-by: Liu Ying <b17645@freescale.com>
7 years agoENGR00122023 MX23 Fix build error for power supply driver
Zhou Jingyu [Wed, 5 May 2010 05:10:39 +0000 (13:10 +0800)]
ENGR00122023  MX23 Fix build error for power supply driver

Fix build error debug options selected for power driver

Signed-off-by: Zhou Jingyu <Jingyu.Zhou@freescale.com>
7 years agoENGR00122474 IPUv3:Check IDMAC's EBA/UBO/VBO/ILO 8B aligned
Liu Ying [Thu, 29 Apr 2010 19:31:11 +0000 (15:31 -0400)]
ENGR00122474 IPUv3:Check IDMAC's EBA/UBO/VBO/ILO 8B aligned

IDMAC's EBA/UBO/VBO/ILO are 8-byte aligned.
This patch will check the values for EBA/UBO/VBO/ILO 8-byte aligned.
If not, the driver will give out warning information.

Signed-off-by: Liu Ying <b17645@freescale.com>
7 years agoENGR00123072-3 MX31: Add keypad mem resource
Lily Zhang [Fri, 30 Apr 2010 09:48:03 +0000 (17:48 +0800)]
ENGR00123072-3 MX31: Add keypad mem resource

Add keypad memory resource in MX31 3-stack platform

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00123072-2 MX25: Add Keypad mem resource
Lily Zhang [Fri, 30 Apr 2010 09:48:03 +0000 (17:48 +0800)]
ENGR00123072-2 MX25: Add Keypad mem resource

Add Keypad mem resource in MX25 platform

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00123072-1 Keypad: get mem from platform resource
Lily Zhang [Fri, 30 Apr 2010 09:48:03 +0000 (17:48 +0800)]
ENGR00123072-1 Keypad: get mem from platform resource

1. Get mem from platform resource in mxc keypad driver
2. Remove unnecessory header file

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00123086 MX23: CPU frequency can not be changed to 64 MHz
Nancy Chen [Fri, 30 Apr 2010 20:54:01 +0000 (15:54 -0500)]
ENGR00123086 MX23: CPU frequency can not be changed to 64 MHz

MX23: CPU frequency can not be changed to 64 MHz.

Signed-off-by: Nancy Chen <Nancy.Chen@freescale.com>
7 years agoENGR00122951 MX23 w/ mDDR: EMI 24MHz clock changes caused crashes
Robert Lee [Fri, 30 Apr 2010 23:13:30 +0000 (18:13 -0500)]
ENGR00122951 MX23 w/ mDDR: EMI 24MHz clock changes caused crashes

MX23 w/ mDDR: EMI clock change code causes crashes with 24MHz state transitions.

Signed-off-by: Robert Lee <robert.lee@freescale.com>
7 years agoENGR00123047 move atheros fw to firmware imx repository
Alan Tull [Thu, 29 Apr 2010 18:53:05 +0000 (13:53 -0500)]
ENGR00123047 move atheros fw to firmware imx repository

Firmware will be copied to the /lib/firmware/ath6k/AR6102 directory
so change the path in the driver.

Signed-off-by: Alan Tull <r80115@freescale.com>
7 years agoENGR00122838 gadget: Fix bitfield for calculating maximum packet size
Dinh Nguyen [Thu, 29 Apr 2010 19:08:33 +0000 (14:08 -0500)]
ENGR00122838 gadget: Fix bitfield for calculating maximum packet size

The max packet length bit mask used for isochronous endpoints should
be 0x7FF instead of 0x8FF. 0x8FF will actually clear higher-order bits
in the max packet length field.

Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
7 years agoENGR00123071 MX53: Remove iomux warning in boot
Lily Zhang [Fri, 30 Apr 2010 07:30:48 +0000 (15:30 +0800)]
ENGR00123071 MX53: Remove iomux warning in boot

1. Remove iomux warning in boot
2. Put I2C PIN configurations into table

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00122696 MX23: cpufreq-set can not work when fb0 is blank
Nancy Chen [Wed, 28 Apr 2010 15:50:02 +0000 (10:50 -0500)]
ENGR00122696 MX23: cpufreq-set can not work when fb0 is blank

Fixed cpufreq-set can not work when fb0 is blank.
Fixed incorrect clock dividers

Signed-off-by: Nancy Chen <Nancy.Chen@freescale.com>
7 years agoENGR00123022 MX53: Add SPI NOR support
Lily Zhang [Thu, 29 Apr 2010 02:25:37 +0000 (10:25 +0800)]
ENGR00123022 MX53: Add SPI NOR support

Add SPI NOR support in MX53 EVK

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00123017 MX53 Add support for MLB
Xinyu Chen [Thu, 29 Apr 2010 04:54:48 +0000 (12:54 +0800)]
ENGR00123017 MX53 Add support for MLB

Add support for MLB by adding MLB MSL codes.

Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
7 years agoENGR00122966 ipuv3 fb: set correct stride for nonstand fmt
Jason Chen [Wed, 28 Apr 2010 06:28:30 +0000 (14:28 +0800)]
ENGR00122966 ipuv3 fb: set correct stride for nonstand fmt

Set correct stride for non-interleave fmt, if not, will cause v4l output
play uncorrectly for ic_bypass mode.

Signed-off-by: Jason Chen <b02280@freescale.com>
7 years agoENGR00123013 mx28: build broken after commit a5421893d5
Robert Lee [Wed, 28 Apr 2010 21:51:31 +0000 (16:51 -0500)]
ENGR00123013 mx28: build broken after commit a5421893d5

mx28: build broken after commit a5421893d5.

Signed-off-by: Robert Lee <robert.lee@freescale.com>
7 years agoENGR00119077 dac mux should not affect power and clocks
Alan Tull [Mon, 26 Apr 2010 12:02:27 +0000 (07:02 -0500)]
ENGR00119077 dac mux should not affect power and clocks

Changes such that DAC Mux will only affect whether the headphone
output gets connected to the DAC or Line in.

The previous implementation of the DAC Mux allowed the dapm power
level of the sgtl5000 to be affected whether audio was playing or
not.  It also controlled the an internal osc which had no effect
since it didn't affect whether mclk was turned on.

Signed-off-by: Alan Tull <r80115@freescale.com>
7 years agoENGR00122891 MX23/MX28 DCP: Merge stmp dcp-bootstream driver
Anish Trivedi [Thu, 22 Apr 2010 16:26:47 +0000 (11:26 -0500)]
ENGR00122891 MX23/MX28 DCP: Merge stmp dcp-bootstream driver

Add functionality of using OTP key for crypto into dcp driver

Signed-off-by: Anish Trivedi <anish@freescale.com>
7 years agoENGR00122990 iMX23/28 Fix wrong clock ref type
Frank Li [Wed, 28 Apr 2010 09:24:41 +0000 (17:24 +0800)]
ENGR00122990 iMX23/28 Fix wrong clock ref type

clock ref wrong set to __s8

Signed-off-by: Frank Li <Frank.Li@freescale.com>
7 years agoENGR00120671 H264Dec: Video dithering is serious on the interlaced streams
Ran Ferderber [Wed, 28 Apr 2010 04:52:49 +0000 (07:52 +0300)]
ENGR00120671 H264Dec: Video dithering is serious on the interlaced streams

iMX53 was not in list of parts that include VDI, iMX53 was add.

Signed-off-by: Ran Ferderber r53561@freescale.com
7 years agoENGR00122851 WIFI: Faided to use WiFi SDIO card at SD slot0
r65037 [Tue, 27 Apr 2010 03:33:55 +0000 (11:33 +0800)]
ENGR00122851 WIFI: Faided to use WiFi SDIO card at SD slot0

The WP bit is set in the 4Bytes wifi write operations
accidentally.
That would cause the INT wouldn't be generated.

There is no such kind issue in SD/MMC write operations.
Since that the BUS load on wifi maybe much lighter than
that when SD/MMC is used.

Remove the 100K pull up pad configuration on the eSDHC1
WP pin can solve this issue.
Or
Remove the SION configuration can fix this issue too.
In the end, the second method is used.

Unify the platform data configurations, and enable the registers
dump when there are errors in the execution of esdhc driver.

Signed-off-by: Richard Zhu <r65037@freescale.com>
7 years agoENGR00122629 Unified i.MX23/i.MX28 NAND Flash Driver
Patrick Turley [Wed, 14 Apr 2010 01:55:17 +0000 (20:55 -0500)]
ENGR00122629 Unified i.MX23/i.MX28 NAND Flash Driver

This driver unifies the i.MX23 and i.MX28 NAND Flash drivers into a single
driver that supports both SoC's.

Signed-off-by: Patrick Turley <patrick.turley@freescale.com>
7 years agoENGR00122948 MX23: clock driver can cause cpu_clk and h_clk violations
Robert Lee [Tue, 27 Apr 2010 16:51:31 +0000 (11:51 -0500)]
ENGR00122948 MX23: clock driver can cause cpu_clk and h_clk violations

The current method of changing the cpu FRAC and integer
 dividers can cause short-term unexpectedly high frequencies.
  Also, h_clk temporarily runs higher than expected as well.

Signed-off-by: Robert Lee <robert.lee@freescale.com>
7 years agoENGR00122914-2 iMX23 Porting TVOUT from stmp3xxx to mxs.
Frank Li [Tue, 27 Apr 2010 06:37:14 +0000 (14:37 +0800)]
ENGR00122914-2 iMX23 Porting TVOUT from stmp3xxx to mxs.

Enable TVOUT of mxs.

Signed-off-by: Frank Li <frank.li@freescale.com>
7 years agoENGR00122914-1 iMX23 Porting TVOUT from stmp3xxx to mxs.
Frank Li [Tue, 27 Apr 2010 08:12:36 +0000 (16:12 +0800)]
ENGR00122914-1 iMX23 Porting TVOUT from stmp3xxx to mxs.

Add original stmp378x tvenc.c

Signed-off-by: Frank Li <Frank.Li@freescale.com>
7 years agoENGR00122915: iMX28 Fix SDIO INT Handler
Jeremy.Yao [Tue, 27 Apr 2010 08:02:34 +0000 (16:02 +0800)]
ENGR00122915: iMX28 Fix SDIO INT Handler

Fix SDIO INTR

Signed-off-by: Jeremy Yao <r65161@freescale.com>
7 years agoENGR00122899: Delete older imx23(stmp378x ) kernel default configration
Peter Chen [Tue, 27 Apr 2010 06:00:58 +0000 (14:00 +0800)]
ENGR00122899: Delete older imx23(stmp378x ) kernel default configration

Users may confuse old imx23 kernel default configration, so delete them

Signed-off-by: Peter Chen <b29397@freescale.com>
7 years agoENGR00122898 Add imx23evk updater default configration
Peter Chen [Tue, 27 Apr 2010 03:23:04 +0000 (11:23 +0800)]
ENGR00122898 Add imx23evk updater default configration

Add imx23evk updater default configration without nand support

Signed-off-by: Peter Chen <b29397@freescale.com>
7 years agoENGR00122852-6 MX5: pass mem and irq via resources
Lily Zhang [Mon, 26 Apr 2010 06:52:40 +0000 (14:52 +0800)]
ENGR00122852-6 MX5: pass mem and irq via resources

Pass memory and irq information via resources in MX5 platforms

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00122852-5 MX37: pass mem and irq via resources
Lily Zhang [Mon, 26 Apr 2010 06:51:48 +0000 (14:51 +0800)]
ENGR00122852-5 MX37: pass mem and irq via resources

Pass memory and irq information via resources in MX37 platform

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00122852-4 MX35: pass mem and irq via resources
Lily Zhang [Mon, 26 Apr 2010 06:51:01 +0000 (14:51 +0800)]
ENGR00122852-4 MX35: pass mem and irq via resources

Pass mem and irq information via resources in MX35 platform

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00122852-3 MX31: pass mem and irq via resources
Lily Zhang [Mon, 26 Apr 2010 06:49:57 +0000 (14:49 +0800)]
ENGR00122852-3 MX31: pass mem and irq via resources

Pass mem and irq information via resources for MX31

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00122852-2 MX25: pass mem and irq via resources
Lily Zhang [Mon, 26 Apr 2010 06:48:59 +0000 (14:48 +0800)]
ENGR00122852-2 MX25: pass mem and irq via resources

MX25: pass mem and irq via resources

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00122852-1 UART: get mem and irq from platform resources
Lily Zhang [Mon, 26 Apr 2010 06:47:57 +0000 (14:47 +0800)]
ENGR00122852-1 UART: get mem and irq from platform resources

Get UART mem and irq from platform resources

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00122879 ath6kl: set default ifname to wlan%d
Richard Zhao [Mon, 26 Apr 2010 10:32:43 +0000 (18:32 +0800)]
ENGR00122879 ath6kl: set default ifname to wlan%d

It's easy for ChromiumOS to use.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
7 years agoENGR00117340 Add HEADPHONE short protection feature
Frank Li [Mon, 26 Apr 2010 07:19:44 +0000 (15:19 +0800)]
ENGR00117340 Add HEADPHONE short protection feature

Add HEADPHONE short protection,when headphone short,mute the
HP vol and pwrdn the headphone,and restore them when short gone.

Signed-off-by: Frank Li <frank.li@freescale.com>
7 years agoENGR00122846-2 MX53: Restore the default GPU memory as 128M
Lily Zhang [Mon, 26 Apr 2010 02:49:43 +0000 (10:49 +0800)]
ENGR00122846-2 MX53: Restore the default GPU memory as 128M

This reverts commit cf848bba851157fb7c28ad2abd21f8210a4b0831.
Since the kernel virtual space is changed as 2G, restore the default
GPU memory as 128M to support flash 10 better.

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00122846-1 MX5: Split user and kernel space as 2G_2G
Lily Zhang [Mon, 26 Apr 2010 02:35:55 +0000 (10:35 +0800)]
ENGR00122846-1 MX5: Split user and kernel space as 2G_2G

1G kernel virtual space is not insufficent for current MX53 usages.
After the discussion, agree to split kernel/user space as 2G/2G
instead of 1G/3G.

Signed-off-by: Lily Zhang <r58066@freescale.com>
7 years agoENGR00122853 iMX23 support nfs rootfs
Frank Li [Mon, 26 Apr 2010 05:29:32 +0000 (13:29 +0800)]
ENGR00122853 iMX23 support nfs rootfs

build in NFS and support NFS  rootfs

Signed-off-by: Frank Li <Frank.Li@freescale.com>
7 years agoENGR00122687: [MX28_EVK_BSP] WIFI: Can not download files with large size
Jeremy.Yao [Fri, 23 Apr 2010 03:22:04 +0000 (11:22 +0800)]
ENGR00122687: [MX28_EVK_BSP] WIFI: Can not download files with large size

Fix SDIO quality

Signed-off-by: Jeremy Yao <r65161@freescale.com>
7 years agoENGR00122828 Fix MX23 system boot fail when 454 and enable 100mA
Frank Li [Fri, 23 Apr 2010 07:46:08 +0000 (15:46 +0800)]
ENGR00122828 Fix MX23 system boot fail when 454 and enable 100mA

Fix mx23 system boot fail when 454mhz and enable usb 100mA

Signed-off-by: Frank Li <frank.li@freescale.com>
7 years agoENGR00122754-2 Make MMC and SPI function selectable via cmdline
Robby Cai [Sun, 25 Apr 2010 12:47:28 +0000 (20:47 +0800)]
ENGR00122754-2 Make MMC and SPI function selectable via cmdline

modify defconfig to add SPI/SPI ethernet config

Signed-off-by: Robby Cai <R63905@freescale.com>
7 years agoENGR00122754-1 Make MMC and SPI function selectable via cmdline
Robby Cai [Sun, 25 Apr 2010 12:38:47 +0000 (20:38 +0800)]
ENGR00122754-1 Make MMC and SPI function selectable via cmdline

MMC and SPI shares the SSP port1.
pass "ssp1=mmc" in cmdline for MMC or,
pass "ssp1=spi1" for SPI.

Signed-off-by: Robby Cai <R63905@freescale.com>
7 years agoENGR00122783 Enable pmu brownout features for imx23 &imx28
Zhou Jingyu [Thu, 22 Apr 2010 09:57:38 +0000 (17:57 +0800)]
ENGR00122783 Enable pmu brownout features for imx23 &imx28

Enable pmu brownout features for imx23 &imx28

Signed-off-by: Zhou Jingyu <Jingyu.Zhou@freescale.com>
7 years agoENGR00122723 CAN: Enable the adaptive bitrate setting
William Lai [Wed, 21 Apr 2010 02:20:44 +0000 (10:20 +0800)]
ENGR00122723 CAN: Enable the adaptive bitrate setting

Enable the adaptive bitrate setting, according to the clock rate.
And the bitrate can be changed by the proc file.

Signed-off-by: William Lai <b04597@freescale.com>
7 years agoENGR00122399-2 MX53 CAN: MBM word access only
William Lai [Mon, 19 Apr 2010 03:20:30 +0000 (11:20 +0800)]
ENGR00122399-2 MX53 CAN: MBM word access only

The MBM can only be accessed in word, removing the potential
bit fields side effect intrudued by the different tool chain.

Signed-off-by: William Lai <b04597@freescale.com>
7 years agoENGR00122399-1 MX53 CAN: Suppprt on i.MX53 platform
William Lai [Mon, 19 Apr 2010 03:11:19 +0000 (11:11 +0800)]
ENGR00122399-1 MX53 CAN: Suppprt on i.MX53 platform

CAN support on i.MX53 platform.

Signed-off-by: William Lai <b04597@freescale.com>
7 years agoENGR00122691-2 imx5: Build ath6kl driver by default
Richard Zhao [Wed, 21 Apr 2010 05:22:15 +0000 (13:22 +0800)]
ENGR00122691-2 imx5: Build ath6kl driver by default

Enable ath6kl driver by default

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
7 years agoENGR00122691-1 Add atheros driver ath6kl
Richard Zhao [Wed, 21 Apr 2010 04:46:59 +0000 (12:46 +0800)]
ENGR00122691-1 Add atheros driver ath6kl

Integrate atheros driver package from atheros company.
It's mainly for AR6003.

Signed-off-by: Nathan Cheng <Nathan.Cheng@Atheros.com>
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
7 years agoENGR00122694 v4l2 output: set correct bits_per_pixel for fbi
Jason Chen [Wed, 21 Apr 2010 08:17:31 +0000 (16:17 +0800)]
ENGR00122694 v4l2 output: set correct bits_per_pixel for fbi

Uncorrect bits_per_pixel will make wrong fb memaloc size, which will
cause Oops for filling black color operation.

Signed-off-by: Jason Chen <b02280@freescale.com>
7 years agoENGR00122683: iMX28 Add Kernel Wifi Config in defconfig
Jeremy.Yao [Tue, 20 Apr 2010 03:32:09 +0000 (11:32 +0800)]
ENGR00122683: iMX28 Add Kernel Wifi Config in defconfig

enable wifi in defconfig for mx28/mx23

Signed-off-by : Jeremy Yao <r65161@freescale.com>

7 years agoENGR00119146 MX23 ALSA: Audioout DMA stops after play/stop many times
Lionel Xu [Tue, 20 Apr 2010 06:41:40 +0000 (14:41 +0800)]
ENGR00119146 MX23 ALSA: Audioout DMA stops after play/stop many times

DMA will stop working after playback/stop many times, especially for those
high bitrate wav sound, use another way to trigger the audioout playback
can resolve this issue.

Signed-off-by: Lionel Xu <r63889@freescale.com>
7 years agoENGR000122300 fix iMX23 auart output wrong error message
Frank Li [Mon, 19 Apr 2010 06:12:50 +0000 (14:12 +0800)]
ENGR000122300 fix iMX23 auart output wrong error message

AUART should not output error when modem status interrupt pending,
hardware does not support DSRMIS,DCDMIS and RIMIS bit.

Signed-off-by: Frank Li <Frank.Li@freescale.com>
7 years agoENGR00122636-5 [MX23] Port SPI driver to MXS
Robby Cai [Sun, 18 Apr 2010 13:45:33 +0000 (21:45 +0800)]
ENGR00122636-5 [MX23] Port SPI driver to MXS

Run ./script/Lindent for spi_mxs.[ch]

Signed-off-by: Robby Cai <R63905@freescale.com>
7 years agoENGR00122636-4 [MX23] Port SPI ethernet driver to MXS
Robby Cai [Sun, 18 Apr 2010 11:33:09 +0000 (19:33 +0800)]
ENGR00122636-4 [MX23] Port SPI ethernet driver to MXS

Port SPI ethernet( enc28j60 ) driver to MXS

Signed-off-by: Robby Cai <R63905@freescale.com>
7 years agoENGR00122636-3 [MX23] Port SPI driver to MXS
Robby Cai [Sun, 18 Apr 2010 11:30:25 +0000 (19:30 +0800)]
ENGR00122636-3 [MX23] Port SPI driver to MXS

Mainly modified part to port SPI driver to MXS

Signed-off-by: Robby Cai <R63905@freescale.com>