]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoENGR00281859-1 mxc: asrc: Add debug message for asrc_isr()
Nicolin Chen [Tue, 8 Oct 2013 04:41:08 +0000 (12:41 +0800)]
ENGR00281859-1 mxc: asrc: Add debug message for asrc_isr()

asrc_isr() is mainly used to detect and record overload error,
so we add some print massage to make it easy to debug.

Also fixed an incorrect function name -- dev_debug() by using
the correct one -- dev_dbg() in dump_regs().

Signed-off-by: Nicolin Chen <B42378@freescale.com>
11 years agoENGR00281017 [MX6SL]Low power IDLE mode optimizations
Ranjani Vaidyanathan [Fri, 20 Sep 2013 15:36:00 +0000 (10:36 -0500)]
ENGR00281017 [MX6SL]Low power IDLE mode optimizations

Added a new bus freq mode - ultra_low_bus_freq_mode.
In this mode the ARM is the only bus master that is active and
the system is already in low power idle mode.
And when ARM executes WFI in this mode, we do some aggressive
power savings techinques like:
1. Drop DDR freq to 1MHz
2. Drop AHB freq to 3MHz
3. Float the DDR IO pads
4. If all PLLs are in bypass (which should be the case), do
some analog power saving options like reducing the OSC-bias current,
turning off the regular bandgap, disabling the regular 2P5, enabling
the weak 2p5 etc.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00281804 ARM: imx6: init enet MAC address
Fugang Duan [Sun, 29 Sep 2013 09:40:31 +0000 (17:40 +0800)]
ENGR00281804 ARM: imx6: init enet MAC address

Enet get MAC address order:
From module parameters or kernel command line -> device tree ->
pfuse -> mac registers set by bootloader -> random mac address.

When there have no "fec.macaddr" parameters set in kernel command
line, enet driver get MAC address from device tree. And then if
the MAC address set in device tree and is valid, enet driver get
MAC address from device tree. Otherwise,enet get MAC address from
pfuse. So, in the condition, update the MAC address (read from pfuse)
to device tree.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00279948 net: fec: add clock control to save power
Fugang Duan [Sun, 29 Sep 2013 06:56:16 +0000 (14:56 +0800)]
ENGR00279948 net: fec: add clock control to save power

- After probe, disable all clocks incluing ipg, ahb, enet_out, ptp clock.
- Open ethx interface enable necessary clocks.
  Close ethx interface disable all clocks.
- Correct the MDIO clock source.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00281789-02 ARM: dts: imx6sl: correct the enet ipg clock
Fugang Duan [Sun, 29 Sep 2013 06:52:43 +0000 (14:52 +0800)]
ENGR00281789-02 ARM: dts: imx6sl: correct the enet ipg clock

Current imx6sl dts define enet_ref clock as ipg clock, which is not
right. The ipg clock is "IMX6SL_CLK_ENET" defined at imx6sl-clock.h.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00281789-01 imx6sl: add missing enet clock for imx6sl
Fugang Duan [Sun, 29 Sep 2013 06:48:06 +0000 (14:48 +0800)]
ENGR00281789-01 imx6sl: add missing enet clock for imx6sl

There's a enet clock gate missing in clock tree, thus add it.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00280852 ASoC: fsl: Use generic function dmaengine_prep_dma_cyclic()
Nicolin Chen [Fri, 27 Sep 2013 09:04:53 +0000 (17:04 +0800)]
ENGR00280852 ASoC: fsl: Use generic function dmaengine_prep_dma_cyclic()

Use generic dmaengine_prep_dma_cyclic() in imx-hdmi-dma.c and fsl-asrc.c

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00280852-9 mxc: asrc: Use threshold to clear dma request
Nicolin Chen [Thu, 26 Sep 2013 10:22:00 +0000 (18:22 +0800)]
ENGR00280852-9 mxc: asrc: Use threshold to clear dma request

Previously, we used sdma's event pending to forcibly re-schedule sdma
for work round, because sdma channel for ASRC input task would fail to
be opened due to its dma request always keeping high after ASRC opens
the pair, which cause sdma miss the trigger point of dma request.

Now, instead of using event pending, we clear the dma request on ASRC
driver side by setting its thresholds to an impossible trigger area
during its stall state. Since ASRC would stall its process when input
fifo is near empty or output fifo is near full, during the stall state,
the specific thresholds, 0 for input fifo and 63 for output fifo, would
never let asrc meet this condition. So dma request can be cleared and
raised again after we restore the true required thresholds.

Accordingly, since we don't need event pending any more, we dropped the
code from the sdma driver.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00280852-8 mxc: asrc: Add polling mode working without dma for debugging
Nicolin Chen [Wed, 25 Sep 2013 11:10:58 +0000 (19:10 +0800)]
ENGR00280852-8 mxc: asrc: Add polling mode working without dma for debugging

Add polling mode for data transmitting without dma support for debugging when
sdma may have issue.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00280852-7 mxc: asrc: Only set ASRC to STALL level in start_conv()
Nicolin Chen [Wed, 25 Sep 2013 10:22:33 +0000 (18:22 +0800)]
ENGR00280852-7 mxc: asrc: Only set ASRC to STALL level in start_conv()

We don't need to set ASRC to STALL level everytime, instead we only need
to do that at the beginning. If we insert null data into input fifo during
the sequence of valid datas, there would be a noise occur to it.

By doing this, we can assure ASRC would keep each period's perturbation of
output dma task within 8 sample sizes, which is the default value for last
period number. Thus we don't need to expand the last period number any more.

This patch also dropped some unused functions since the driver no long needs
them and replaced wrapped function for channel number configuration with direct
regmap_update_bits() to make the driver clean.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00280852-6 mxc: asrc: Use devtype instead of specific DT properties
Nicolin Chen [Wed, 25 Sep 2013 07:16:44 +0000 (15:16 +0800)]
ENGR00280852-6 mxc: asrc: Use devtype instead of specific DT properties

We can determine the IP version from DT compatible name to decide which
clock map and channel bits should be used.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00280852-5 mxc: asrc: Simplify code
Nicolin Chen [Tue, 24 Sep 2013 11:41:35 +0000 (19:41 +0800)]
ENGR00280852-5 mxc: asrc: Simplify code

* Dropped unused header files.
* Use pair-explicit error massage.
* Fixed some coding style issue.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00280852-4 mxc: asrc: Use completion instead of counter
Nicolin Chen [Tue, 24 Sep 2013 10:27:34 +0000 (18:27 +0800)]
ENGR00280852-4 mxc: asrc: Use completion instead of counter

Use completion instead of counter to make driver clean and drop
implicit mdelay by using wait_for_completion().

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00280852-3 mxc: asrc: Use regmap to control register accessing
Nicolin Chen [Tue, 24 Sep 2013 10:13:41 +0000 (18:13 +0800)]
ENGR00280852-3 mxc: asrc: Use regmap to control register accessing

Dropped the legency readl/writel() and use regmap instead. Also removed
core clock's clk_prepare() and spin_lock()/unlock() outside regmap due to
regmap already has these features.

This patch also added a missing writable register to the regmap in order
to assure the regsiter updating success.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00280852-2 arm: dtsi: imx6qdl: Set sdma priority of ASRC to medium
Nicolin Chen [Tue, 24 Sep 2013 03:05:50 +0000 (11:05 +0800)]
ENGR00280852-2 arm: dtsi: imx6qdl: Set sdma priority of ASRC to medium

Set the priority as what kernel 3.0.35 does to keep it safe.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00280852-1 mxc: asrc: Add spba clock control for sdma shp script
Nicolin Chen [Tue, 24 Sep 2013 03:01:37 +0000 (11:01 +0800)]
ENGR00280852-1 mxc: asrc: Add spba clock control for sdma shp script

ASRC is using shp_2_mcu and mcu_2_shp sdma scripts that use spba bus to
transfer data, while the driver hasn't include the control code of spba
clock.

This would cause multiple pair conversion failed in most of time. Thus
we need to add its support.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoregmap: Make regmap-mmio usable from atomic contexts
Lars-Peter Clausen [Fri, 24 May 2013 08:29:22 +0000 (10:29 +0200)]
regmap: Make regmap-mmio usable from atomic contexts

regmap-mmio uses a spinlock with spin_lock() and spin_unlock() for locking.
To be able to use the regmap API from different contexts (atomic vs non-atomic),
without the risk of race conditions, we need to use spin_lock_irqsave() and
spin_lock_irqrestore() instead. A new field, the spinlock_flags field, is added
to regmap struct to store the flags between regmap_{,un}lock_spinlock(). The
spinlock_flags field itself is also protected by the spinlock.

Thanks to Stephen Warren for the suggestion of this particular solution.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00281613 imx_v7_defconfig: enable net VLAN 802.1Q
Fugang Duan [Fri, 27 Sep 2013 07:33:36 +0000 (15:33 +0800)]
ENGR00281613 imx_v7_defconfig: enable net VLAN 802.1Q

Enable net VLAN 8021Q in imx_v7_defconfig.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00281611 i2c: imx: update i2c clock divider for each transaction
Fugang Duan [Fri, 27 Sep 2013 07:13:19 +0000 (15:13 +0800)]
ENGR00281611 i2c: imx: update i2c clock divider for each transaction

i.MX6 I2C clk is from IPG_PERCLK which is sourced from IPG_CLK.
Under normal operation, IPG_CLK is 66MHz, ipg_perclk is at 22MHz.
In low bus freq mode, IPG_CLK is at 12MHz and IPG_PERCLK is down
to 4MHz. So the I2C driver must update the divider register for
each transaction when the current IPG_PERCLK is not equal to the
clock of previous transaction.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00281446 ARM: dts: imx6: correct the power supply node name for epdc
Robby Cai [Thu, 26 Sep 2013 09:57:18 +0000 (17:57 +0800)]
ENGR00281446 ARM: dts: imx6: correct the power supply node name for epdc

The naming convention for power supply node in DTS is "%s-supply".
With this patch regulator_get() will process in the DT way rather than
traditional way. This patch has no functional impact.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00279204-2 mxc vout: reconfig overlay fb correctly
Liu Ying [Thu, 26 Sep 2013 06:11:08 +0000 (14:11 +0800)]
ENGR00279204-2 mxc vout: reconfig overlay fb correctly

The overlay framebuffer's position and resolution are
set with two different APIs. They depend on each other to
make sure the overlay framebuffer window will not go out
of the background framebuffer window. Potentially, this
causes the overlay framebuffer's position or resolution
of the current video pipeline be impacted by the settings
of the last time. To setup the overlay fb from scratch
correctly, this patch takes the following steps:
- blank framebuffer
- set framebuffer position to the starting point
- reconfigure framebuffer
- set framebuffer position to a specific point
- unblank framebuffer
This procedure applies to non-overlay framebuffers as well.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoENGR00279204-1 mxc vout: reconfig fb when necessary
Liu Ying [Thu, 26 Sep 2013 05:41:17 +0000 (13:41 +0800)]
ENGR00279204-1 mxc vout: reconfig fb when necessary

Users may call VIDIOC_S_CTRL or VIDIOC_S_CROP ioctrls
to update streaming parameters on-the-fly after video
has been streamed on, such as for rotation/output
resolution/overlay output position change. Any
unnecessary frame buffer reconfiguration would cause
a pair of frame buffer blank/unblank events happen and
even makes the background framebuffer show up for a
short period of time if the video is rendered on an
overlay framebuffer. This patch compares the last time
video output pipe line settings with the current ones
to determine whether frame buffer reconfiguration is
necessary or not.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoENGR00279946 dts: imx6qdl-sabreauto: add baseboard sd card slot support
Dong Aisheng [Wed, 25 Sep 2013 12:04:43 +0000 (20:04 +0800)]
ENGR00279946 dts: imx6qdl-sabreauto: add baseboard sd card slot support

NOTE since SD Card in main board takes a long route hence with
Drive Speed High 80 OHMS causing error on high speed cards.
Per suggestion DSE 40 OHMS is used.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00280140 pxp/v4l2: restore the display content after video playback finishes
Robby Cai [Sun, 22 Sep 2013 09:31:06 +0000 (17:31 +0800)]
ENGR00280140 pxp/v4l2: restore the display content after video playback finishes

After finish video playback, the last frame remains on the display.
It's because the UI display start address (smem_start) has been changed when
do video playback but not changed back again after the playback finishes.
From the function call point of view,

 pxp_set_fbinfo()         // pxp->fb.base tracks right addr for UI framebuffer
 pxp_show_buf(toshow)     // smem_start changed to v4l2 display addr
 pxp_set_fbinfo()         // pxp->fb.base changed to v4l2 display addr
 pxp_show_buf(not toshow) // smem_start still equal to v4l2 display addr
                          // for pan_display

This patch fixes it by calling pxp_set_fbinfo once in open function.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00281036: [MX6SL]Align LPDDR2 freq change code to 8-byte boundary
Ranjani Vaidyanathan [Tue, 24 Sep 2013 21:06:34 +0000 (16:06 -0500)]
ENGR00281036: [MX6SL]Align LPDDR2 freq change code to 8-byte boundary

This patch fixes 4 issues:
1. Add the .align 8 directive to the LPDDR2 freq change code,
else the fncpy() function fails and the kernel does not boot.
2. Loads the correct L2_BASE_ADDR into register in lpddr2 freq change code
3. Fix the warning in clk_imx6sl.c
4. Change dev_WARN to dev_info in busfreq-imx6.c.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00280689-02 i.MX6 HDMI: Remove HDCP register define from driver
Sandor Yu [Mon, 23 Sep 2013 06:21:23 +0000 (14:21 +0800)]
ENGR00280689-02 i.MX6 HDMI: Remove HDCP register define from driver

Remove HDCP register define from HDMI kernel driver.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00280689-01 i.MX6 HDMI: Remove HDCP register access from driver
Sandor Yu [Mon, 23 Sep 2013 06:20:11 +0000 (14:20 +0800)]
ENGR00280689-01 i.MX6 HDMI: Remove HDCP register access from driver

Remove HDCP register access from HDMI driver.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00280000 ARM: dts: imx6qdl-sabreauto: add dts files for ECSPI support
Huang Shijie [Mon, 23 Sep 2013 08:45:48 +0000 (16:45 +0800)]
ENGR00280000 ARM: dts: imx6qdl-sabreauto: add dts files for ECSPI support

The ecspi1 has pin conflict with the i2c3.
This patch adds two dts files for the ECSPI support.

Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoENGR00280663-3 mxc vout: handle downsize ratio overflow
Liu Ying [Sun, 22 Sep 2013 04:45:29 +0000 (12:45 +0800)]
ENGR00280663-3 mxc vout: handle downsize ratio overflow

This patch handles downsize ratio overflow error by doing
input cropping with 8 pixel step.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoENGR00280663-2 IPUv3 device: check downsize ratio overflow
Liu Ying [Sun, 22 Sep 2013 04:37:39 +0000 (12:37 +0800)]
ENGR00280663-2 IPUv3 device: check downsize ratio overflow

IPUv3 IC task downsize scaling ratio cannot exceed or be
equal to 8:1. This patch makes the code return error code
if the ratio overflows.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoENGR00280663-1 IPUv3: improve IC scale check logic
Liu Ying [Sun, 22 Sep 2013 02:34:24 +0000 (10:34 +0800)]
ENGR00280663-1 IPUv3: improve IC scale check logic

This patch improves IPU IC task scale check logic
so that we may return with error code if the calculation
for scale coefficients fails.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoENGR00280101-3 [iMX6x] Add support for bypass mode rates
Ranjani Vaidyanathan [Tue, 17 Sep 2013 22:14:05 +0000 (17:14 -0500)]
ENGR00280101-3 [iMX6x] Add support for bypass mode rates

Fix the code to report correct PFD and PLL clock rates when
the PLL is in bypass state.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00280101-2 [iMX6SL/iMX6DL] Add busfreq support
Ranjani Vaidyanathan [Tue, 17 Sep 2013 22:13:05 +0000 (17:13 -0500)]
ENGR00280101-2 [iMX6SL/iMX6DL] Add busfreq support

Change dtsi files to enable busfreq support.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00280101-1 [iMX6SL] Add busfreq support
Ranjani Vaidyanathan [Tue, 17 Sep 2013 22:09:48 +0000 (17:09 -0500)]
ENGR00280101-1 [iMX6SL] Add busfreq support

Add support to scale the DDR frequency between 400MHz and 24MHz.
Add support to scale AHB between 132MHz and 24MHz.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00280115 videobuf-dma-contig: make mmapped video buffer bufferable
Liu Ying [Wed, 18 Sep 2013 02:15:34 +0000 (10:15 +0800)]
ENGR00280115 videobuf-dma-contig: make mmapped video buffer bufferable

This patch makes mmapped video buffers bufferable so that software
decoders may render the video buffers efficiently.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoARM: dts: imx6q: fix the wrong offset of the Pad Mux register
Huang Shijie [Mon, 16 Sep 2013 08:45:18 +0000 (16:45 +0800)]
ARM: dts: imx6q: fix the wrong offset of the Pad Mux register

The patch "0b7a76a ARM: dts: imx6q{dl}: add DTE pads for uart"
adds the DTE pads for uart. For PAD_EIM_D29, the offset of the
Pad Mux register should be 0x0c8, not 0x0c4.

This patch fixes it.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: dts: enable the uart2 for imx6q-arm2
Huang Shijie [Mon, 8 Jul 2013 09:14:22 +0000 (17:14 +0800)]
ARM: dts: enable the uart2 for imx6q-arm2

enable the uart2 for imx6q-arm2 board.
The uart2 works in the DTE mode, with the RTS/CTS and DMA enabled.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoENGR00279545 [MX6x:Cpufreq] Initialize mutex before driver registration
Ranjani Vaidyanathan [Thu, 12 Sep 2013 19:44:20 +0000 (14:44 -0500)]
ENGR00279545 [MX6x:Cpufreq] Initialize mutex before driver registration

The mutex, set_cpufreq_lock, should be initialized before the driver is
registered. Else if the default governor is set to performance or ondemand,
the cpufreq driver will try to set the freq to the max freq supported and
this will cause a crash during boot.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00279413 pxp/v4l2: get the right framebuffer start address at run time
Robby Cai [Thu, 12 Sep 2013 11:11:54 +0000 (19:11 +0800)]
ENGR00279413 pxp/v4l2: get the right framebuffer start address at run time

Previously the driver gets the framebuffer start address at probe time.
But this address might be changed if the framebuffer drivers re-allocate
the frame buffers due to the application changes the yres_virtual.
As a result, some garbage data can be observed on display.
This patch adjusts the way to detect the start address at run time to
fix this problem.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00279402-2 ARM: imx6q: imx6sl: System reset by checking the source setting
Robin Gong [Thu, 12 Sep 2013 08:34:01 +0000 (16:34 +0800)]
ENGR00279402-2 ARM: imx6q: imx6sl: System reset by checking the source setting

Check the source setting in dts file to support different WDOG reset event.
Correct imx6sl_restart instead of mxc_restart.

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00279402-1 ARM: dts: imx6: add wdog reset source seclect in dts
Robin Gong [Thu, 12 Sep 2013 08:22:26 +0000 (16:22 +0800)]
ENGR00279402-1 ARM: dts: imx6: add wdog reset source seclect in dts

Some boards use another WDOG reset source to reboot system in ldo-bypass mode.
We need add the property in board dts file so that we can easily know the
WDOG reset source currently.

For Sabresd, WDOG1 for ldo-enable mode(WDOG event), WDOG2 for ldo-bypass mode
(reset external pmic to trigger POR event).
For sl-evk board, there is no WDOG pin connected with external pmic as Sabresd
, because mx6sl boot at 400Mhz. Then both ldo-enable and ldo-bypass mode use
the common WDOG1 as reset source.

Signed-off-by: Robin Gong <b38343@freescale.com>
11 years agoENGR00279436 input: touchscreen: egalax: enable multitouch
Fugang Duan [Thu, 12 Sep 2013 09:39:27 +0000 (17:39 +0800)]
ENGR00279436 input: touchscreen: egalax: enable multitouch

Disable single-touch support in imx_v7_defconfig to enable
multitouch feature for egalax.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00279368-3 mxc: asrc: Add missing clock control
Nicolin Chen [Thu, 12 Sep 2013 06:56:36 +0000 (14:56 +0800)]
ENGR00279368-3 mxc: asrc: Add missing clock control

* Add missing clock control
* Set ASRC clock to 7.5MHz as 3.0.35 does
* Use the same divisor for ideal ratio mode as 3.0.35 does

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00279368-2 ASoC: fsl: Add missing snd_soc_pm_ops to all machine drivers
Nicolin Chen [Thu, 12 Sep 2013 06:32:24 +0000 (14:32 +0800)]
ENGR00279368-2 ASoC: fsl: Add missing snd_soc_pm_ops to all machine drivers

Alsa machine drivers need snd_soc_pm_ops to support normal suspend/resume
feature, thus add this to all machine drivers.

Also add missing SUSPEND and RESUME cases to trigger() in fsl_ssi.c

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00279368-1 ASoC: fsl: Drop useless resume function in WM8962 machine driver
Nicolin Chen [Thu, 12 Sep 2013 06:24:20 +0000 (14:24 +0800)]
ENGR00279368-1 ASoC: fsl: Drop useless resume function in WM8962 machine driver

The resume function is useless for the driver because registered jack pin has
already handled suspend/resume cases, thus drop it.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00279401 mxc v4l2 capture: use flush_work instead of flush_work_sync
Liu Ying [Thu, 12 Sep 2013 07:50:13 +0000 (15:50 +0800)]
ENGR00279401 mxc v4l2 capture: use flush_work instead of flush_work_sync

Since commit 43829731d (workqueue: deprecate flush[_delayed]_work_sync()),
flush_work() should be used instead of flush_work_sync().

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoENGR00279373 epdc: add GFP_KERNEL flag to make dma memory allocated from cma
Robby Cai [Thu, 12 Sep 2013 06:39:57 +0000 (14:39 +0800)]
ENGR00279373 epdc: add GFP_KERNEL flag to make dma memory allocated from cma

Add GFP_KERNEL flag for dma_alloc_writecombine() and dma_alloc_coherent()
to make dma memory allocated via cma. Otherwise it's from dma pool whose
size is too small by default (256KB) and will cause allocation failure unless
use 'coherent_pool=xxM' in cmdline. We prefer cma now.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00278941-3: arm: imx: add necessary flow for standby mode
Anson Huang [Wed, 11 Sep 2013 14:05:56 +0000 (10:05 -0400)]
ENGR00278941-3: arm: imx: add necessary flow for standby mode

Need to ensure that the ARM:IPG clock ratio is maintained at
12:5 when WFI is executed. This is the fix for the low power mode
issue on i.MX6SL.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00278941-2: arm: imx: correct LDO bypass flow logic
Anson Huang [Tue, 10 Sep 2013 20:23:26 +0000 (16:23 -0400)]
ENGR00278941-2: arm: imx: correct LDO bypass flow logic

The LDO analog bypass switch is necessary before entering DSM when LDO
is working at digital bypass mode, previous coding logic is incorrect,
fix it.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00278941-1: arm: imx: Fix suspend/resume unstable issue
Anson Huang [Tue, 10 Sep 2013 20:22:20 +0000 (16:22 -0400)]
ENGR00278941-1: arm: imx: Fix suspend/resume unstable issue

As we need to float DDR IO when entering DSM, so those registers
we need to access after DDR IO is floated must be contained in TLB,
otherwise, the TLB update may case DDR access and lead to
system hang. To make sure these registers' address is in TLB,
we need to flush TLB first then access them manually.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00279226 media: ov5642: correct io_regulator sanity check
Liu Ying [Wed, 11 Sep 2013 10:25:44 +0000 (18:25 +0800)]
ENGR00279226 media: ov5642: correct io_regulator sanity check

The following commit introduced a wrong sanity check for
the io_regulator which is intended to be got from device tree.
a364635a535705a8c16df49ff9bc7b9362b083ec

This patch corrects the sanity check.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit a0ff4d112dcd8a71547f2b95731f2fedb21a77e4)

11 years agoENGR00278667-3 [ARM]: imx_v7_defconfig enable adv7180 TV decoder
Oliver Brown [Tue, 10 Sep 2013 08:53:26 +0000 (03:53 -0500)]
ENGR00278667-3 [ARM]: imx_v7_defconfig enable adv7180 TV decoder

Enable the ADV7180 TV Decoder to imx_v7_defconfig

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278667-2 [ARM]: dtsi: imx6qdl-sabreauto: add adv7180 driver
Oliver Brown [Sun, 8 Sep 2013 20:38:50 +0000 (15:38 -0500)]
ENGR00278667-2 [ARM]: dtsi: imx6qdl-sabreauto: add adv7180 driver

Changes added to support adv7180 TV Decoder in the SabreAuto 3.10.9
Kernel device tree:
-Added adv7180 support
-Added reg_3p3v.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278667-1 [mxc_v4l2_capture]: Add adv7180 driver in 3.10.9 Kernel
Oliver Brown [Sun, 8 Sep 2013 20:05:28 +0000 (15:05 -0500)]
ENGR00278667-1 [mxc_v4l2_capture]: Add adv7180 driver in 3.10.9 Kernel

Copied file from 3.5.7 Kernel
commit de6459732a23402cbe520812bf4202299330fd68
Author: Oliver Brown <oliver.brown@freescale.com>
Date:   Mon Jun 24 16:41:17 2013 -0500

Added missing call to clk_disable_unprepare() in adv7180_probe.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278665-3 [ARM]: imx_v7_defconfig enable ov5640_mipi support
Oliver Brown [Tue, 10 Sep 2013 08:19:53 +0000 (03:19 -0500)]
ENGR00278665-3 [ARM]: imx_v7_defconfig enable ov5640_mipi support

Enable the ov5640 camera driver in the imx_v7_defconfig.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278665-2 [ARM]: dtsi: imx6qdl-sabresd: add ov5640_mipi camera support
Oliver Brown [Sun, 8 Sep 2013 19:46:13 +0000 (14:46 -0500)]
ENGR00278665-2 [ARM]: dtsi: imx6qdl-sabresd: add ov5640_mipi camera support

Enabled ov5640_mipi in the SabreSD device tree.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278665-1 [mxc_v4l2_capture]: Add ov5640_mipi driver files
Oliver Brown [Sun, 8 Sep 2013 19:41:02 +0000 (14:41 -0500)]
ENGR00278665-1 [mxc_v4l2_capture]: Add ov5640_mipi driver files

Copied file from 3.5.7 Kernel:
commit 0682e12bf9a3b5085fe5dd70574fe856340894d0
Author: Liu Ying <Ying.Liu@freescale.com>
Date:   Thu May 16 12:02:14 2013 +0800

-Added function and file name to some error messages that are
in multiple places.
-Added calls to clk_prepare_enable() and clk_disable_unprepare()
 in ov5640_probe() to manage the sensor clock.
-Added missing sanity check for "io_regulator"
-Fixed several whitespace errors

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278646-11 mmc: sdhci-esdhc-imx: improve sd3.0 stability
Dong Aisheng [Fri, 6 Sep 2013 15:10:55 +0000 (23:10 +0800)]
ENGR00278646-11 mmc: sdhci-esdhc-imx: improve sd3.0 stability

We observed on some sd3.0 cards(Toshiba SDHC U1) that it may require
to reset host controller before sending the next tuning command
or the tuning may fail and cause the card can not work on uhs mode.
The root cause why the card fails on tuning without reset is still unknow.
This could be treated as a workaround before finding root cause.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00278646-10 ARM: dts: imx6qdl: add uhs pinctrl state for usdhc3
Dong Aisheng [Fri, 6 Sep 2013 13:09:52 +0000 (21:09 +0800)]
ENGR00278646-10 ARM: dts: imx6qdl: add uhs pinctrl state for usdhc3

This is needed for supporting ultra high speed cards like SD3.0 cards.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00278646-9 mmc: sdhci-esdhc: set actual_clock in clock setting
Dong Aisheng [Fri, 6 Sep 2013 12:58:25 +0000 (20:58 +0800)]
ENGR00278646-9 mmc: sdhci-esdhc: set actual_clock in clock setting

This enables access the actual_clock via sys.
root@imx6qsabreauto:~# cat /sys/kernel/debug/mmc0/ios
clock:          198000000 Hz
actual clock:   198000000 Hz
vdd:            17 (2.9 ~ 3.0 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      2 (4 bits)
timing spec:    6 (sd uhs SDR104)
signal voltage: 0 (1.80 V)

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00278646-8 mmc: sdhci-esdhc: correct pre_div for imx6q
Dong Aisheng [Wed, 4 Sep 2013 12:25:47 +0000 (20:25 +0800)]
ENGR00278646-8 mmc: sdhci-esdhc: correct pre_div for imx6q

According to spec, the pre_div for imx6q should be 1, or the biggest clock
rate we can get is a half of host clock rate.
This may cause we can not get the proper clock rate as we want.
e.g. if the desired clock is 200Mhz, however, the host clock is 200Mhz too,
then it causes the actual clock we get is 100Mhz due to pre_div is 2.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00278646-7 sdhci-esdhc-imx: change pinctrl state according to uhs mode
Dong Aisheng [Fri, 6 Sep 2013 12:56:12 +0000 (20:56 +0800)]
ENGR00278646-7 sdhci-esdhc-imx: change pinctrl state according to uhs mode

Without proper pinctrl state, the card may not be able to work
on high speed stablely. e.g. SDR104.

This patch add pinctrl state switch code according to different
uhs mode include 100mhz sate, 200mhz sate and normal state
(50Mhz and below).

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00278646-6 sdhci: sdhci-esdhci-imx: add sd3.0 clock tuning support
Dong Aisheng [Wed, 4 Sep 2013 10:35:42 +0000 (18:35 +0800)]
ENGR00278646-6 sdhci: sdhci-esdhci-imx: add sd3.0 clock tuning support

Freescale i.MX6Q/DL uSDHC clock tuning progress is a little different from
the standard tuning process defined in host controller spec v3.0.
Thus we use platform_execute_tuning instead of standard sdhci tuning.

The main difference are:
1) not only generate Buffer Read Ready interrupt when tuning is performing.
It generates all other DATA interrupts like the normal data command.
2) SDHCI_CTRL_EXEC_TUNING is not automatically cleared by HW,
instead it's controlled by SW.
3) SDHCI_CTRL_TUNED_CLK is not automatically set by HW,
it's controlled by SW.
4) the clock delay for every tuning is set by SW.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00278646-5 ARM: dts: imx6qdl-sabresd: add no-1-8-v property for usdhc
Dong Aisheng [Fri, 6 Sep 2013 11:57:30 +0000 (19:57 +0800)]
ENGR00278646-5 ARM: dts: imx6qdl-sabresd: add no-1-8-v property for usdhc

The sabresd board does not have external 1.8v/3.3v signal voltage switch
support for usdhc.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00278646-4 sdhci: sdhci-esdhc-imx: support real clock on and off for imx6q
Dong Aisheng [Fri, 6 Sep 2013 12:53:19 +0000 (20:53 +0800)]
ENGR00278646-4 sdhci: sdhci-esdhc-imx: support real clock on and off for imx6q

The signal voltage switch follow requires to shutdown and output
clock in a specific sequence according to standard host controller
v3.0 spec. In that timing, the card must really receive clock or not.

However, for i.MX6Q, the uSDHC will not output clock even the clock
is enabled until there is command or data in transfer on the bus,
which will then cause singal voltage switch always to fail.

For i.MX6Q, we clear ESDHC_VENDOR_SPEC_FRC_SDCLK_ON bit to let
controller to gate off clock automatically and set that bit
to force clock output if clock is on.

This is required by SD3.0 support.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00278646-3 mmc: sdhci-esdhci: move common esdhc_set_clock to platform driver
Dong Aisheng [Fri, 6 Sep 2013 12:48:38 +0000 (20:48 +0800)]
ENGR00278646-3 mmc: sdhci-esdhci: move common esdhc_set_clock to platform driver

We need a lot of imx6 specific things into common esdhc_set_clock
for support SD3.0 and eMMC DDR mode which is not needed for power pc
platforms, so esdhc_set_clock seems not so common anymore.

Instead of keeping add platform specfics things into this common API,
we choose to move that code into platform driver itself to handle.
This can also exclude the dependency between imx and power pc on this
headfile and is easy for maintain in the future.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00278646-2 mmc: sdhci: allow platform access of sdhci_send_command
Dong Aisheng [Wed, 4 Sep 2013 07:46:24 +0000 (15:46 +0800)]
ENGR00278646-2 mmc: sdhci: allow platform access of sdhci_send_command

It helps for platform code to use it send tuning commands.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00278646-1 mmc: sdhci: add hooks for platform specific tuning
Dong Aisheng [Wed, 4 Sep 2013 07:32:31 +0000 (15:32 +0800)]
ENGR00278646-1 mmc: sdhci: add hooks for platform specific tuning

The tuning of some platforms may not follow the standard host control
spec v3.0, e.g. Freescale uSDHC on i.MX6Q/DL.
Add a hook here to allow execute platform specific tuning instead of
standard host controller tuning.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
11 years agoENGR00279150 ARM: Kconfig: increase FORCE_MAX_ZONEORDER for ARCH_MXC
Jason Liu [Wed, 11 Sep 2013 02:50:09 +0000 (10:50 +0800)]
ENGR00279150 ARM: Kconfig: increase FORCE_MAX_ZONEORDER for ARCH_MXC

Need increase the FORCE_MAX_ZONEORDER to 14 for high resolution camera
(GPU 2D user case). The default value 11(4MB) is not enough now.

Signed-off-by: Jason Liu <r64343@freescale.com>
11 years agoENGR00279087-2 csi_v4l2_capture: move int_dev_init() to open function
Robby Cai [Wed, 11 Sep 2013 05:27:59 +0000 (13:27 +0800)]
ENGR00279087-2 csi_v4l2_capture: move int_dev_init() to open function

By later initialization for camera dev (to call int_dev_init), the driver
works well whether the master (csi_v4l2_capture) or the slave (ov5640)
has been attached first. In this way, the driver can stick to the philosophy
for the V4L2_INT_DEVICE framework (the attach sequence shouldn't matter).

The following way to insert modules should work:

$ insmod fsl_csi.ko
$ insmod ov5640_camera.ko
$ insmod csi_v4l2_capture.ko

or,

$ insmod fsl_csi.ko
$ insmod csi_v4l2_capture.ko
$ insmod ov5640_camera.ko

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00279087-1 camera: enable mclk before read the camera ID
Robby Cai [Wed, 11 Sep 2013 02:37:07 +0000 (10:37 +0800)]
ENGR00279087-1 camera: enable mclk before read the camera ID

When the camera driver is built as module and done 'insmod' command,
the camera will not be detected. The error message is as follows.

$ insmod ov5640_camera.ko
ov5640 2-003c: cannot get io voltage
ov5640_read_reg:write reg error:reg=300a
camera ov5640 is not found

The reason is the mclk need to be enabled before read camera registers.
This patch fixes it.

To balance the usecount for the mclk, we need disable the mclk afterwards.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00278666-3 [ARM]: Add ov5642 driver to imx_v7_defconfig
Oliver Brown [Tue, 10 Sep 2013 06:44:33 +0000 (01:44 -0500)]
ENGR00278666-3 [ARM]: Add ov5642 driver to imx_v7_defconfig

Enable the ov5640 camera driver in the imx_v7_defconfig.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278666-2 ARM: dtsi: imx6qdl-sabresd: add ov564x camera support
Oliver Brown [Sun, 8 Sep 2013 19:21:14 +0000 (14:21 -0500)]
ENGR00278666-2 ARM: dtsi: imx6qdl-sabresd: add ov564x camera support

Enabled ov5642 in the SabreSD device tree.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278666-1 [mxc_v4l2_capture]: Add ov5642 driver files in 3.10.9 Kernel
Oliver Brown [Sun, 8 Sep 2013 19:11:09 +0000 (14:11 -0500)]
ENGR00278666-1 [mxc_v4l2_capture]: Add ov5642 driver files in 3.10.9 Kernel

Copied file from 3.5.7 Kernel:
commit 0682e12bf9a3b5085fe5dd70574fe856340894d0
Author: Liu Ying <Ying.Liu@freescale.com>
Date:   Thu May 16 12:02:14 2013 +0800

-Added calls to clk_prepare_enable() and clk_disable_unprepare()
in ov5642_probe() to manage the sensor clock.
-Fixed whitespace errors

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278970 fix build error when build capture driver as module
Robby Cai [Tue, 10 Sep 2013 08:38:48 +0000 (16:38 +0800)]
ENGR00278970 fix build error when build capture driver as module

fix error for 'make modules':
ENROR: "csi_dmareq_rff_enable"
[drivers/media/platform/mxc/capture/csi_v4l2_capture.ko] undefined!
ERROR: "csi_dmareq_rff_disable"
[drivers/media/platform/mxc/capture/csi_v4l2_capture.ko] undefined!
ERROR: "csi_regbase"
[drivers/media/platform/mxc/capture/csi_v4l2_capture.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00278920 [ARM] - dts update MIPI CSI2 node on SabreAuto
Oliver Brown [Tue, 10 Sep 2013 06:04:49 +0000 (01:04 -0500)]
ENGR00278920 [ARM] - dts update MIPI CSI2 node on  SabreAuto

Correct the SabreAuto DTS.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278663-4 [ARM]: imx_v7_defconfig add IPU v4l2
Oliver Brown [Mon, 9 Sep 2013 20:11:52 +0000 (15:11 -0500)]
ENGR00278663-4 [ARM]: imx_v7_defconfig add IPU v4l2

Enable V4L2 capture driver in imx_v7_defconfig.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278663-3 [ARM]: dts add IPU v4l2 capture driver
Oliver Brown [Sun, 8 Sep 2013 16:01:49 +0000 (11:01 -0500)]
ENGR00278663-3 [ARM]: dts add IPU v4l2 capture driver

Add V4L2 Capture support to device tree for SabreSD and SabreAuto
Boards.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278663-2 [ARM]: documentation for IPU v4l2 capture driver
Oliver Brown [Fri, 6 Sep 2013 19:40:39 +0000 (14:40 -0500)]
ENGR00278663-2 [ARM]: documentation for IPU v4l2 capture driver

-Copied Documentation from 3.5.7 Kernel
-Updated pinctrl node names.
-Corrected vendor fields in compatible fields

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278663-1 [mxc_v4l2_capture]: Add IPU v4l2 capture driver files
Oliver Brown [Fri, 6 Sep 2013 19:22:07 +0000 (14:22 -0500)]
ENGR00278663-1 [mxc_v4l2_capture]: Add IPU v4l2 capture driver files

Copied files from
commit 0339bfd7164324c5c0208cf6467ef244f714c43a
Author: Liu Ying <Ying.Liu@freescale.com>
Date:   Wed Sep 4 13:21:21 2013 +0800

-Added function and file names to error messages that are similar
-Changed mxc_v4l_open to use clk_prepare_enable()
-Changed mxc_v4l_open to use clk_disable_unprepare()

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278652-4 [ARM]: enable MIPI CSI2 in imx_v7_defconfig
Oliver Brown [Tue, 10 Sep 2013 04:06:38 +0000 (23:06 -0500)]
ENGR00278652-4 [ARM]: enable MIPI CSI2 in imx_v7_defconfig

Enable  MIPI CSI2 as builtin in imx_v7_defconfig

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278652-3 [ARM]: documentation for MIPI CSI2 driver
Oliver Brown [Fri, 6 Sep 2013 18:23:51 +0000 (13:23 -0500)]
ENGR00278652-3 [ARM]: documentation for MIPI CSI2 driver

Added documentation for MIPI CSI2.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278652-2 [ARM]: dts add MIPI CSI support for sabresd and sabreauto
Oliver Brown [Mon, 9 Sep 2013 18:58:14 +0000 (13:58 -0500)]
ENGR00278652-2 [ARM]: dts add MIPI CSI support for sabresd and sabreauto

Added MIPI CIS2 Device Tree support for SabreSD and SabreAuto.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278652-1 [Media]: Add MIPI CSI2 driver files
Oliver Brown [Fri, 6 Sep 2013 16:42:12 +0000 (11:42 -0500)]
ENGR00278652-1 [Media]: Add MIPI CSI2 driver files

Copied mipi_csi.h from:
commit 50ca92f4010a93be265de7aad501b4dcae095a63
Author: Sheng Nan <b38800@freescale.com>
Date:   Thu Mar 7 13:39:54 2013 +0800
ARM: include: remove definition of mipi-csi2 platform data

Other files copied files from:
commit 1fb93870965b7d8d67b4db6233a30c06d82f84fc
Author: Liu Ying <Ying.Liu@freescale.com>
Date:   Thu Mar 21 12:15:52 2013 +0800
     MIPI-CSI2:Fix a build warning

- Changed includes files for 3.10
- Dropped deprecated __devexit
- Added generic error message if probe fails
- Added configuration and set default to 'n'

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278683-1 [iMX6DLQ]: Add IOMUX configuration for IPU1 CSI0
Oliver Brown [Sun, 8 Sep 2013 16:37:14 +0000 (11:37 -0500)]
ENGR00278683-1 [iMX6DLQ]: Add IOMUX configuration for IPU1 CSI0

Add IOMUX configuration for IPU1 CSI0 for SabreSD and SabreAuto. This
enables parallel CSI port required for OV564x on SabreSD and ADV7180
on SabreAuto.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
11 years agoENGR00278967 ASoC: fsl: Fix null pointer when rmmod snd-soc-imx-hdmi
Nicolin Chen [Tue, 10 Sep 2013 09:25:52 +0000 (17:25 +0800)]
ENGR00278967 ASoC: fsl: Fix null pointer when rmmod snd-soc-imx-hdmi

When rmmod snd-soc-imx-hdmi if loadable module feature of HDMI audio
is being used, there would be a kernel dump promt:
Unable to handle kernel NULL pointer dereference at virtual address

This was caused by inappropriate priv pointer fetching, thus fix it.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00278822 ARM: imx_v7_defconfig: disable CONFIG_SWP_EMULATE
Shengjiu Wang [Mon, 9 Sep 2013 10:54:25 +0000 (18:54 +0800)]
ENGR00278822 ARM: imx_v7_defconfig: disable CONFIG_SWP_EMULATE

According to the help text in the config SWP_EMULATE in arch/arm/mm/Kconfig:

"In some older versions of glibc [<=2.8] SWP is used during futex trylock()
operations with the assumption that the code will not be preempted. This
invalid assumption may be more likely to fail with SWP emulation enabled,
leading to deadlock of the user application."

The audio codec toolchain version is gcc-4.1.1-glibc-2.4, we need turn off
the CONFIG_SWP_EMULATE in the imx_v7_defconfig.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
11 years agoENGR00278672-3 ARM: imx_v7_defconfig: add the defconfig support for crypto/caam
Jason Liu [Sat, 7 Sep 2013 05:12:42 +0000 (13:12 +0800)]
ENGR00278672-3 ARM: imx_v7_defconfig: add the defconfig support for crypto/caam

This patch add the defconfig support for crypto/caam

Signed-off-by: Kudrick Jeffery <B37172@freescale.com>
11 years agoENGR00278672-2 ARM: dts: add the imx6qdl.dtsi dts support for crypto/caam
Jason Liu [Sat, 7 Sep 2013 05:11:22 +0000 (13:11 +0800)]
ENGR00278672-2 ARM: dts: add the imx6qdl.dtsi dts support for crypto/caam

This patch add the imx6qdl.dtsi dts support for crypto/caam

Signed-off-by: Kudrick Jeffery <B37172@freescale.com>
11 years agoENGR00278672-1 crypto/caam: add the crypto/caam driver support
Jason Liu [Sat, 7 Sep 2013 05:09:59 +0000 (13:09 +0800)]
ENGR00278672-1 crypto/caam: add the crypto/caam driver support

This patch add the crypto/caam driver support

Signed-off-by: Kudrick Jeffery <B37172@freescale.com>
11 years agoENGR00277382-2 [MX6SL] Add WaIT mode support for MX6SL.
Ranjani Vaidyanathan [Mon, 26 Aug 2013 18:50:03 +0000 (13:50 -0500)]
ENGR00277382-2 [MX6SL] Add WaIT mode support for MX6SL.

Enable WAIT mode support for MX6SL. Need to ensure that the
ARM:IPG clock ratio is maintained at 12:5 when WFI is executed.
This is the fix for the WAIT mode issue on MX6SL.

Set AHB to 132Mhz at boot, which is the recommended freq for AHB.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00277382-1 [MX6SL] Ensure that PLL1 and PLL2 are always enabled.
Ranjani Vaidyanathan [Tue, 27 Aug 2013 22:57:55 +0000 (17:57 -0500)]
ENGR00277382-1 [MX6SL] Ensure that PLL1 and PLL2 are always enabled.

Need to ensure that PLL1 and PLL2 have the enabled bit set even when
the PLL is powered down and disabled.

1. Modifications to the ARM_PODF bits in the CCM require PLL1 to be enabled.
2. PLL2 will be set to bypass and enabled state (can be powered down) in low
power IDLE mode.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00278432 [MX6x:Busfreq] Fix build warning.
Ranjani Vaidyanathan [Thu, 5 Sep 2013 22:06:10 +0000 (17:06 -0500)]
ENGR00278432 [MX6x:Busfreq] Fix build warning.

Fix build warning in arch/arm/mach-imx/busfreq_ddr3.c.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00269945: ARM: imx6: add the secondary sabreauto dts for pin conflict
Shawn Guo [Fri, 6 Sep 2013 06:12:24 +0000 (14:12 +0800)]
ENGR00269945: ARM: imx6: add the secondary sabreauto dts for pin conflict

The patch is to solve the pin conflicts between devices that are
currently added in imx6qdl-sabreauto dts file.  It has ecspi1, i2c3, and
uart3 enabled while gpmi and weim disabled in the primary
imx6qdl-sabreauto.dtsi, and creates the secondary
imx6q/dl-sabreauto dts to have gpmi and weim enabled while others
disabled.  Since usbh1 and usbotg depend on GPIO from max7310 on i2c3,
they have to be disabled as well in the secondary sabreauto dts files.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
11 years agoENGR00269945: ARM: imx6: add sabresd hdcp dts files
Shawn Guo [Thu, 5 Sep 2013 11:42:50 +0000 (19:42 +0800)]
ENGR00269945: ARM: imx6: add sabresd hdcp dts files

It's basically a revert of commit fc52e42 (ENGR00269945: ARM: imx6:
remove sabresd hdcp dts files).

As we agree that maintaining multiple dts files for internal tree should
not be a problem, let's add the hdcp dts files back as the solution to
hdcp pin conflict.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
11 years agoENGR00278489 imx: i.mx6d/q: disable the double linefill feature of PL310
Jason Liu [Thu, 5 Sep 2013 23:36:10 +0000 (07:36 +0800)]
ENGR00278489 imx: i.mx6d/q: disable the double linefill feature of PL310

The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0
The L2 cache controller(PL310) version on the i.MX6DL/SOLO/SL is r3p2
But according to ARM PL310 errata: 752271
ID: 752271: Double linefill feature can cause data corruption
Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in r3p2
Workaround: The only workaround to this erratum is to disable the
double linefill feature. This is the default behavior.

without this patch, you will meet the following error when run the
memtester application at: http://pyropus.ca/software/memtester/

FAILURE: 0x00100000 != 0x00200000 at offset 0x01365664.
FAILURE: 0x00100000 != 0x00200000 at offset 0x01365668.
FAILURE: 0x00100000 != 0x00200000 at offset 0x0136566c.
FAILURE: 0x00100000 != 0x00200000 at offset 0x01365670.
FAILURE: 0x00100000 != 0x00200000 at offset 0x01365674.
FAILURE: 0x00100000 != 0x00200000 at offset 0x01365678.
FAILURE: 0x00100000 != 0x00200000 at offset 0x0136567c.

Signed-off-by: Jason Liu <r64343@freescale.com>
11 years agoENGR00275034-5 ARM: imx_v7_defconfig: enable camera and v4l2 capture support
Robby Cai [Tue, 3 Sep 2013 09:42:22 +0000 (17:42 +0800)]
ENGR00275034-5 ARM: imx_v7_defconfig: enable camera and v4l2 capture support

Enable the following options on imx6sl
CONFIG_VIDEO_V4L2_INT_DEVICE=y
CONFIG_VIDEO_MXC_CAPTURE=y
CONFIG_VIDEO_MXC_CSI_CAMERA=y
CONFIG_MXC_CAMERA_OV5640=y

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00275034-4 ARM: dts: add camera ov5640 support on imx6sl-evk
Robby Cai [Mon, 2 Sep 2013 08:29:13 +0000 (16:29 +0800)]
ENGR00275034-4 ARM: dts: add camera ov5640 support on imx6sl-evk

Add ov5640 camera support on imx6sl-evk
Add binding document for csi/csi-v4l2-capture/ov5640

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00275034-3 camera: ov5640: port the driver from 3.5.7
Robby Cai [Thu, 5 Sep 2013 09:55:15 +0000 (17:55 +0800)]
ENGR00275034-3 camera: ov5640: port the driver from 3.5.7

from commit 9293d3aaef4886eae9a500f0dabdcd2b679422b4
and commit cb1d78fc935fa00be03ae1a7b66477ad518a09dc, branch imx_3.5.7

This patch also does
- use module_i2c_driver() instead of module_init/exit.
- set the regulator reference pointer to NULL if it's not found in DT.
  Otherwise call regulator_enable/disable() on it will cause dump
  since the codes only check the regulator against NULL before the call
  and it's not NULL but still invalid.
- drop gpo regulator definition and operations since it's of no use

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00275034-2 ARM: dts: add csi and v4l2 capture support on imx6sl-evk
Robby Cai [Thu, 5 Sep 2013 14:50:39 +0000 (22:50 +0800)]
ENGR00275034-2 ARM: dts: add csi and v4l2 capture support on imx6sl-evk

Add CSI module and v4l2 capture support on imx6sl-evk board

Note: CSI has pin conflict with EPDC on imx6sl-evk board.
To use CSI, we can use 'fdt' command in U-Boot to disable EPDC:

fdt addr ${fdt_addr}
fdt set /soc/aips-bus@02000000/epdc@020f4000 status disable

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