]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoASoC: sgtl5000: backport driver from mainline to fix permanent failure after reboot karo-tx6-yocto-ow-devel kc/karo-tx6-yocto-ow-devel
Lothar Waßmann [Mon, 16 Jun 2014 11:33:36 +0000 (13:33 +0200)]
ASoC: sgtl5000: backport driver from mainline to fix permanent failure after reboot

9 years agonet: fec: reset PHY in the probe() function rather when opening the net device
Lothar Waßmann [Mon, 16 Jun 2014 10:28:23 +0000 (12:28 +0200)]
net: fec: reset PHY in the probe() function rather when opening the net device

This fixes an intermittent failure to detect the PHY.

9 years agoARM: dts: update Ka-Ro DTS files
Lothar Waßmann [Fri, 13 Jun 2014 13:39:34 +0000 (15:39 +0200)]
ARM: dts: update Ka-Ro DTS files

9 years agoarm: dts: imx6qdl: add clock to kpp
Lothar Waßmann [Fri, 13 Jun 2014 13:39:05 +0000 (15:39 +0200)]
arm: dts: imx6qdl: add clock to kpp

9 years agoMXC IPUv3 fb: promote error codes from called functions
Lothar Waßmann [Fri, 13 Jun 2014 13:37:47 +0000 (15:37 +0200)]
MXC IPUv3 fb: promote error codes from called functions

9 years agoMXC IPUv3 fb: convert bogus memcpy() to strlcpy()
Lothar Waßmann [Fri, 13 Jun 2014 13:37:17 +0000 (15:37 +0200)]
MXC IPUv3 fb: convert bogus memcpy() to strlcpy()

9 years agoMXC IPUv3 fb: remove bogus type casts
Lothar Waßmann [Fri, 13 Jun 2014 13:36:30 +0000 (15:36 +0200)]
MXC IPUv3 fb: remove bogus type casts

9 years agovideo: mxc_lcdif: add support for Glyn Family Concept Displays
Lothar Waßmann [Fri, 13 Jun 2014 13:35:33 +0000 (15:35 +0200)]
video: mxc_lcdif: add support for Glyn Family Concept Displays

9 years agovideo: mxc_lcdif: indentation cleanup
Lothar Waßmann [Fri, 13 Jun 2014 13:35:10 +0000 (15:35 +0200)]
video: mxc_lcdif: indentation cleanup

9 years agovideo: mxc_lcdif: convert dev_dbg() to dev_err() for error messages
Lothar Waßmann [Fri, 13 Jun 2014 13:34:49 +0000 (15:34 +0200)]
video: mxc_lcdif: convert dev_dbg() to dev_err() for error messages

9 years agoupdated Ka-Ro DTS files;LVDS display works
Lothar Waßmann [Wed, 11 Jun 2014 15:48:48 +0000 (17:48 +0200)]
updated Ka-Ro DTS files;LVDS display works

9 years agoarm: tx6:
Oliver Wendt [Wed, 11 Jun 2014 08:56:24 +0000 (10:56 +0200)]
arm: tx6:
added TX6 dts[i] files to fsl yocto kernel
edited Makefile to include tx6u-801x
mapped FSL sabresd DT structure to TX6-801x dts file

10 years agoENGR00306992 Revert "ENGR00302036-3 gpu:gpu2d may cause bus hang in some corner case" imx_3.10.17_1.0.0_ga kc/imx_3.10.17_1.0.0_ga
Loren Huang [Fri, 4 Apr 2014 05:26:22 +0000 (13:26 +0800)]
ENGR00306992 Revert "ENGR00302036-3 gpu:gpu2d may cause bus hang in some corner case"

This reverts commit 563931094bf096da2ce6f2cc40387f9e726b3342.

That patch causes wrong blitting and will block GA release

Date: Apr 04, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
10 years agoENGR00306875-2 video: mxc_hdmi: Set hdmi cable state a bit earilier
Nicolin Chen [Thu, 3 Apr 2014 12:36:55 +0000 (20:36 +0800)]
ENGR00306875-2 video: mxc_hdmi: Set hdmi cable state a bit earilier

During hdmi hotplug test, there's a possibility that X-server unblanks
the frame buffer while HDMI-audio just gets the signal to start playback.
Then audio would get an unblanked state right before the playback and
bypassed the DMA enabling code. So this issue is caused by the race
between unblank and set_cable_state().

This patch sets the hdmi cable state a bit earilier so as to let audio
play first. If unblank happens later, the hdmi core and hdmi audio would
be robust enough to handle that case as long as it's not racing with the
other parts.

Acked-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00306875-1 Revert "ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointer"
Nicolin Chen [Thu, 3 Apr 2014 07:52:14 +0000 (15:52 +0800)]
ENGR00306875-1 Revert "ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointer"

After change the pointer, ALSA lib would re-copy the initial data to
DMA buffer because the pointer is pointing the zero position at the
beginning, which results an audiable duplicated playback at the first
eight periods.

Even though dropping this patch would cause pointer being incorrectly
estimated. But to maintain the sanity of basic playback, we revert
the previous patch.

This reverts commit 5d0d4e1558fa0c235691436e1c5d26d9c8950775.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00306832 mxsfb: xres_virtual should not larger than xres
Sandor Yu [Thu, 3 Apr 2014 07:46:59 +0000 (15:46 +0800)]
ENGR00306832 mxsfb: xres_virtual should not larger than xres

eLCDIF did not support stride buffer, check the xres_virtual
in function mxfb_check_var, return false
if the value larger than xres.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00298286 arm: dts: imx6qdl: add clock to CAAM.
Dan Douglass [Wed, 2 Apr 2014 19:01:26 +0000 (14:01 -0500)]
ENGR00298286 arm: dts: imx6qdl: add clock to CAAM.

CAAM depends on the clock used by WEIM interface. This patch supplied by
Haung Shijie corrects the issue by adding the clock as a resource for
the CAAM driver.

Signed-off-by: Dan Douglass <dan.douglass@freescale.com>
10 years agoENGR00298286 arm: dts: imx6qdl: add clock to CAAM.
Dan Douglass [Wed, 2 Apr 2014 19:00:08 +0000 (14:00 -0500)]
ENGR00298286 arm: dts: imx6qdl: add clock to CAAM.

CAAM depends on the clock used by WEIM interface. This patch supplied by
Haung Shijie corrects the issue by adding the clock to the device tree
entry for CAAM.

Signed-off-by: Dan Douglass <dan.douglass@freescale.com>
10 years agoARM: 7669/1: keep __my_cpu_offset consistent with generic one
Ming Lei [Mon, 11 Mar 2013 12:52:12 +0000 (13:52 +0100)]
ARM: 7669/1: keep __my_cpu_offset consistent with generic one

Commit 14318efb(ARM: 7587/1: implement optimized percpu variable access)
introduces arm's __my_cpu_offset to optimize percpu vaiable access,
which really works well on hackbench, but will cause __my_cpu_offset
to return garbage value before it is initialized in cpu_init() called
by setup_arch, so accessing percpu variable before setup_arch may cause
kernel hang. But generic __my_cpu_offset always returns zero before
percpu area is brought up, and won't hang kernel.

So the patch tries to clear __my_cpu_offset on boot CPU early
to avoid boot hang.

At least now percpu variable is accessed by lockdep before
setup_arch(), and enabling CONFIG_LOCK_STAT or CONFIG_DEBUG_LOCKDEP
can trigger kernel hang.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit 9394c1c65e61eb6f4c1c99f342b49e451ec337b6)

10 years agoARM: 7811/1: locks: use early clobber in arch_spin_trylock
Will Deacon [Mon, 12 Aug 2013 17:03:26 +0000 (18:03 +0100)]
ARM: 7811/1: locks: use early clobber in arch_spin_trylock

commit afa31d8eb86fc2f25083e675d57ac8173a98f999 upstream.

The res variable is written before we've finished with the input
operands (namely the lock address), so ensure that we mark it as `early
clobber' to avoid unintended register sharing.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lock
Will Deacon [Mon, 12 Aug 2013 17:04:05 +0000 (18:04 +0100)]
ARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lock

commit 00efaa0250939dc148e2d3104fb3c18395d24a2d upstream.

Commit 15e7e5c1ebf5 ("ARM: 7749/1: spinlock: retry trylock operation if
strex fails on free lock") modifying our arch_spin_trylock to retry the
acquisition if the lock appeared uncontended, but the strex failed.

This patch does the same for rwlocks, which were missed by the original
patch.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Li Zefan <lizefan@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoARM: 7749/1: spinlock: retry trylock operation if strex fails on free lock
Will Deacon [Wed, 5 Jun 2013 10:27:26 +0000 (11:27 +0100)]
ARM: 7749/1: spinlock: retry trylock operation if strex fails on free lock

commit 15e7e5c1ebf556cd620c9b091e121091ac760f6d upstream.

An exclusive store instruction may fail for reasons other than lock
contention (e.g. a cache eviction during the critical section) so, in
line with other architectures using similar exclusive instructions
(alpha, mips, powerpc), retry the trylock operation if the lock appears
to be free but the strex reported failure.

Reported-by: Tony Thompson <anthony.thompson@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Li Zefan <lizefan@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoARM: 7957/1: add DSB after icache flush in __flush_icache_all()
Vinayak Kale [Wed, 12 Feb 2014 06:30:01 +0000 (07:30 +0100)]
ARM: 7957/1: add DSB after icache flush in __flush_icache_all()

commit 39544ac9df20f73e49fc6b9ac19ff533388c82c0 upstream.

Add DSB after icache flush to complete the cache maintenance operation.

Signed-off-by: Vinayak Kale <vkale@apm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU
Will Deacon [Fri, 7 Feb 2014 18:12:20 +0000 (19:12 +0100)]
ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU

commit bae0ca2bc550d1ec6a118fb8f2696f18c4da3d8e upstream.

During __v{6,7}_setup, we invalidate the TLBs since we are about to
enable the MMU on return to head.S. Unfortunately, without a subsequent
dsb instruction, the invalidation is not guaranteed to have completed by
the time we write to the sctlr, potentially exposing us to junk/stale
translations cached in the TLB.

This patch reworks the init functions so that the dsb used to ensure
completion of cache/predictor maintenance is also used to ensure
completion of the TLB invalidation.

Reported-by: Albin Tonnerre <Albin.Tonnerre@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoENGR00306309 ARM:imx:imx6qdl: Fix procedure to switch the parent of LDB_DI_CLK
Ranjani Vaidyanathan [Mon, 31 Mar 2014 18:35:45 +0000 (13:35 -0500)]
ENGR00306309 ARM:imx:imx6qdl: Fix procedure to switch the parent of LDB_DI_CLK

Due to incorrect placement of the clock gate cell in the ldb_di[x]_clk tree,
the glitchy parent mux of ldb_di[x]_clk can cause a glitch to enter the
ldb_di_ipu_div divider. If the divider gets locked up, no ldb_di[x]_clk is
generated, and the LVDS display will hang when the ipu_di_clk is sourced from
ldb_di_clk.

To fix the problem, both the new and current parent of the ldb_di_clk should
be disabled before the switch. This patch ensures that correct steps are
followed when ldb_di_clk parent is switched in the beginning of boot.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agoENGR00306276: iMX6: Add workaround for ARM errata 761320 and 794072
Nitin Garg [Sat, 29 Mar 2014 22:32:22 +0000 (17:32 -0500)]
ENGR00306276: iMX6: Add workaround for ARM errata 761320 and 794072

These are Category B, hence workaround is essential.

Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
10 years agoENGR00306257 [#1027]fix system hang up issue caused by GPU
Richard Liu [Tue, 1 Apr 2014 01:58:49 +0000 (09:58 +0800)]
ENGR00306257 [#1027]fix system hang up issue caused by GPU

This issue happens when multiple thread is trying to idle GPU at the
same time, root cause is some wrong logic related with powerMutex which
cause cpu still access GPU AHB register after GPU is suspend(clock off),
that cause the bus lockup and make the whole system hang.

Signed-off-by: Richard Liu <r66033@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit d48e52700c4177e94695cdbdb480cb38a88a5ddc)

10 years agoENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointer
Nicolin Chen [Tue, 25 Mar 2014 03:46:35 +0000 (11:46 +0800)]
ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointer

We might not be able to get appl_ptr, so we estimated it by using hw_ptr,
while the distance between then should not be 2 * priv->period_bytes
initially but 8 * priv->period_bytes as we pri-filled one entire buffer
size at the beginning. The driver's memory access might be overlapped
with ALSA's buffer updating. So this patch fixes this inaccurate distance.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00305624-1 ASoC: imx-hdmi-dma: Use neon data copy function
Nicolin Chen [Thu, 6 Mar 2014 11:04:30 +0000 (19:04 +0800)]
ENGR00305624-1 ASoC: imx-hdmi-dma: Use neon data copy function

Use neon data copy function as default to improve data copy performance so that
we can prevent some noise issue happening to HDMI audio due to the performance
issue.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00302036-3 gpu:gpu2d may cause bus hang in some corner case
Loren Huang [Thu, 27 Mar 2014 06:13:31 +0000 (14:13 +0800)]
ENGR00302036-3 gpu:gpu2d may cause bus hang in some corner case

Vivante patch name:
cl17466.17776.rls.lockup.2dhang(clear.blit)

-Updated the outstanding request limit to 12.
-Refined the 2D chip feature check.
-Refine the 2D cache flush operation
(avoid FE and PE access memory through the same port).
-Enable cache flush for filterblt.
-Dynamic enabling SPLIT_RECT by checking chip feature(disable for us)
-Use brush stretch blt for clear operation.

Date: Mar 26, 2014

Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
10 years agoENGR00303820 [#887] refine physical address check for external memory
Xianzhong [Tue, 18 Mar 2014 12:40:59 +0000 (20:40 +0800)]
ENGR00303820 [#887] refine physical address check for external memory

2G above address will cause system reboot and fixed in original patch,
error check code is added based on the original logic.

Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 7d85c98bf781eb047c2000bd82ea7559c24a2446)
(cherry picked from commit 04911cf737a4a40e7914ad94fd58bf92dcfa4a92)

10 years agoENGR00305465 MXC IPUv3 fb: Fix permissions of fsl_disp_property sysfs entry
Julien Olivain [Wed, 26 Mar 2014 17:38:02 +0000 (18:38 +0100)]
ENGR00305465 MXC IPUv3 fb: Fix permissions of fsl_disp_property sysfs entry

Set the correct permissions of the fsl_disp_property sysfs entry.

Acked-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Julien Olivain <julien.olivain@freescale.com>
(cherry picked from commit 9db2d982c90b6edb3dfebe03a68f50f381bb99bb)

10 years agoENGR00304914-1 ASoC: imx-hdmi-dma: Limit period size for 6DQ
Nicolin Chen [Fri, 21 Mar 2014 09:30:44 +0000 (17:30 +0800)]
ENGR00304914-1 ASoC: imx-hdmi-dma: Limit period size for 6DQ

The HDMI IP in i.MX6DQ has a bug that it limits the dma period size within 8K.

Patch 'ENGR00300188-1 ASoC: imx-hdmi-dma: Double the buffer and period sizes'
doubled the period size which works great with Dual Lite but broke the HDMI
audio function on DQ. Thus fix it for 6DQ case.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
10 years agoENGR00303200 [IPU Split] - Vertical line in downsaled image with ratio less 2
Oliver Brown [Wed, 12 Mar 2014 16:21:02 +0000 (11:21 -0500)]
ENGR00303200 [IPU Split] - Vertical line in downsaled image with ratio less 2

The optimal resize ratio should be used if the downscaler is not needed. This
will fix a vertical line in the center for some scaling ratios.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
10 years agoENGR00303890-3 usb: chipidea: imx: enable host quirk for imx6sl
Peter Chen [Tue, 18 Mar 2014 08:42:30 +0000 (16:42 +0800)]
ENGR00303890-3 usb: chipidea: imx: enable host quirk for imx6sl

For HSIC operation at imx6sl, it needs host quirk too.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00303890-2 usb: chipidea: imx: rename host quirk flag to reflect its real meaning
Peter Chen [Tue, 18 Mar 2014 01:15:52 +0000 (09:15 +0800)]
ENGR00303890-2 usb: chipidea: imx: rename host quirk flag to reflect its real meaning

This flag is not only used for mxs phy's bug, but also
for speical routine for other imx host operations.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00303890-1 Revert "usb: chipidea: put hw_phymode_configure before ci_usb_phy_init"
Peter Chen [Tue, 18 Mar 2014 07:58:37 +0000 (15:58 +0800)]
ENGR00303890-1 Revert "usb: chipidea: put hw_phymode_configure before ci_usb_phy_init"

This reverts commit 6cf1375d32049b7d852131d232ec97e76535a2e0
in order to avoid system hang access portsc without PHY clock.
See: http://marc.info/?l=linux-arm-kernel&m=139350618732108&w=2

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoENGR00303663 mxc v4l2 capture: Don't return error if we cannot get mipi csi2
Liu Ying [Mon, 17 Mar 2014 03:28:53 +0000 (11:28 +0800)]
ENGR00303663 mxc v4l2 capture: Don't return error if we cannot get mipi csi2

The mipi csi2 code is ugly present in the capture pipeline setup/disable
routions with '#ifdef CONFIG_MXC_MIPI_CSI2/#endif' protected.  Whenever
it finds mipi_csi2_info is not gotten correctly, it will return error to
callers.  This breaks the normally routines in which mipi csi2 is not used
and mipi csi2 driver is disabled in its devicetree node(but with the
Kconfig CONFIG_MXC_MIPI_CSI2 defined).  A real example is the capture
feature on the MX6 Sabreauto platforms.  We have only parallel CSI input
on it and the mipi csi2 driver is disabled in its devicetree node but with
the Kconfig CONFIG_MXC_MIPI_CSI2 defined.  So, a reasonable choice at present
is not to return error if mipi_csi2_info cannot be gotten, though we could
eventually re-organize the capture code for a better total solution in the
future.

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

10 years agoENGR00303308 hdmi:update default video mode setting required by xserver
Sandor Yu [Thu, 13 Mar 2014 09:44:41 +0000 (17:44 +0800)]
ENGR00303308 hdmi:update default video mode setting required by xserver

xserver will read default video mode in command line by sysfs node
/sys/class/graphics/fb0/mode, but the sysfs node is not initialized
when system bootup without hdmi cable plugin
or frame buffer register in blank state.
Fixed:
- Remove unused previous_mode
- Add default_mode, initialize in disp_init function.
- Initialize fbi->mode in disp_init function and hdmi_setup function.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00243315-4 MXC V4L2 Capture:Improve debug info for s_std
Liu Ying [Fri, 8 Mar 2013 08:55:37 +0000 (16:55 +0800)]
ENGR00243315-4 MXC V4L2 Capture:Improve debug info for s_std

commit f8e1a3bb62eecf93a31a51c4dbe08a0214fa1d57 introduced an
annoying kernel log by changing a pure debug info to error level.
This patch reverts that change.

Conflicts:

drivers/media/video/mxc/capture/mxc_v4l2_capture.c

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

10 years agoENGR00243315-3 MXC V4L2 Capture:Remove unnecessary mclk setting
Liu Ying [Fri, 8 Mar 2013 08:44:41 +0000 (16:44 +0800)]
ENGR00243315-3 MXC V4L2 Capture:Remove unnecessary mclk setting

commit f8e1a3bb62eecf93a31a51c4dbe08a0214fa1d57 added a hard
coding for csi_parma.mclk setting to 27MHz. The comment added by
that commit is totally wrong by telling that csi_param.mclk
would be a kind of 'pixel clock' set in 'csi_data_dest' register.
This patch removes the unnecessary mclk setting for csi_param.mclk
variable, since it is only valid for CSI test mode.

Conflicts:

drivers/media/video/mxc/capture/mxc_v4l2_capture.c

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

10 years agoENGR00243315-2 IPUv3 CSI:Remove test mode clock setting
Liu Ying [Fri, 8 Mar 2013 08:33:35 +0000 (16:33 +0800)]
ENGR00243315-2 IPUv3 CSI:Remove test mode clock setting

This patch removes test mode clock setting in function
ipu_csi_init_interface(), since the setting is only
necessary for function _ipu_csi_set_test_generator().
This unnecessary setting is added wrongly by commit
f8e1a3bb62eecf93a31a51c4dbe08a0214fa1d57.

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

10 years agoENGR00243315-1 IPUv3 CSI:Correct CCIR code1/2 for PAL and NTSC
Liu Ying [Fri, 8 Mar 2013 08:01:48 +0000 (16:01 +0800)]
ENGR00243315-1 IPUv3 CSI:Correct CCIR code1/2 for PAL and NTSC

We reversed CCIR code1/2 setting before, which may brings
captured frame quality issue(jaggy edge can be seen). This
patch revert that change.

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

10 years agoENGR00298127-2 ARM: dtsi: imx6qdl sabreauto: Disable mipi csi
Liu Ying [Fri, 14 Mar 2014 09:34:11 +0000 (17:34 +0800)]
ENGR00298127-2 ARM: dtsi: imx6qdl sabreauto: Disable mipi csi

As the sabreauto CPU board schematics mentions, the MIPI connector
isn't mechanically compatible with Freescale MIPI display and camera
board, then we have no way to support MIPI features currently on
this platform.  So, let's disable MIPI CSI.

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

10 years agoENGR00298127-1 ARM: dtsi: imx6qdl sabreauto: Remove v4l2_cap_1 node
Liu Ying [Fri, 14 Mar 2014 09:26:28 +0000 (17:26 +0800)]
ENGR00298127-1 ARM: dtsi: imx6qdl sabreauto: Remove v4l2_cap_1 node

As the sabreauto CPU board schematics mentions, the MIPI connector
isn't mechanically compatible with Freescale MIPI display and camera
board, then we have only the parallel CSI video input that is supported
by the v4l2_cap_0 node.  So, let's remove the orphan one - v4l2_cap_1.

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

10 years agoENGR00302869-2 ARM: imx: imx6qdl: enable cfg_clk to make MIPI CSI2 work
Robby Cai [Thu, 13 Mar 2014 12:02:34 +0000 (20:02 +0800)]
ENGR00302869-2 ARM: imx: imx6qdl: enable cfg_clk to make MIPI CSI2 work

The following error was reported.

-----------------------------------------------------------
root@imx6qdlsolo:~# /unit_tests/mxc_v4l2_capture.out -d /dev/video1 1.yuv
in_width = 176, in_height = 144
out_width = 176, out_height = 144
top = 0, left = 0
mipi csi2 can not receive sensor clk!
sensor chip is ov5640_mipi_camera
sensor supported frame size:
 640x480
 320x240
 720x480
 720x576
 1280x720
 1920x1080
 2592x1944
 176x144
 1024x768
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
mipi csi2 can not receive sensor clk!
mxc_v4l2_s_param: vidioc_int_s_parm returned an error -1
VIDIOC_S_PARM failed
get format failed

-----------------------------------------------------------

Root cause analysis:
It only happens when HDMI is not used/enabled. There is a clock named
video_27m which are needed by HDMI (as isfrclk's parent) and MIPI-CSI2 (as
cfg_clk's parent). MIPI-CSI2 driver is lack of enabling this clock before
start to work and only happen to work when HDMI driver enables this clock.

Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit a6bbc7d56f261ab84e04071487264c6a519df758)

10 years agoENGR00302869-1 ARM: dts: imx6qdl: add cfg_clk for MIPI CSI2
Robby Cai [Tue, 11 Mar 2014 10:41:45 +0000 (18:41 +0800)]
ENGR00302869-1 ARM: dts: imx6qdl: add cfg_clk for MIPI CSI2

MIPI CSI2 depends on this clock to work.
This patch also updates the binding document.

Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 67e7963f6f7ddb6c001bb34c6af71f2330fd0e3f)

10 years agoENGR00302531 Noise come out after change the HDMI resolution when video pause
Shengjiu Wang [Fri, 7 Mar 2014 09:32:41 +0000 (17:32 +0800)]
ENGR00302531 Noise come out after change the HDMI resolution when video pause

After change the resolution, the blank state will be changed, the audio will
be triggered to start. which didn't care about the audio is running or not
before changing the resolution.
Add hdmi_abort_state for this special case.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00300188-2 ASoC: imx-hdmi-dma: Clear offset in the trigger init
Nicolin Chen [Thu, 6 Mar 2014 11:14:29 +0000 (19:14 +0800)]
ENGR00300188-2 ASoC: imx-hdmi-dma: Clear offset in the trigger init

The offset reflects the current position of DMA access in the ALSA ring buffer.
So we should clear it before re-start DMA engine becasue the DMA access should
re-start its job from the 0 position. If we don't do this, the driver might get
a wrong idea about current position of DMA access. Thus fix it.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 8f265543ffda0a19e3f469967a7d61d8b344f080)

10 years agoENGR00300188-1 ASoC: imx-hdmi-dma: Double the buffer and period sizes
Nicolin Chen [Fri, 7 Mar 2014 11:59:04 +0000 (19:59 +0800)]
ENGR00300188-1 ASoC: imx-hdmi-dma: Double the buffer and period sizes

We found HDMI Audio has a performance issue when playback 8 channels 192KHz
files, CPU might lag its interrupt responsing while SDMA continues updating
HDMI internal AHB DMA's address and restarting AHB DMA, which resulted the
noise when AHB DMA access overlaps with the data copy procedures in this
driver.

Thus we here double the buffer size and period size of HDMI Audio to chop
the CPU interrupt to its half in the same span of time so that we can keep
the data copy procedures safe and provent it from overlapping access with
AHB DMA.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 04af1a351e016f52276ae002fd9f64b6b2962168)

10 years agoENGR00299939-3 USB: imx6x: Add dummy LDO2p5 regulator for VBUS wakeup
Ranjani Vaidyanathan [Tue, 4 Mar 2014 21:38:18 +0000 (15:38 -0600)]
ENGR00299939-3 USB: imx6x: Add dummy LDO2p5 regulator for VBUS wakeup

LDO2p5 cannot be disabled in low power idle mode when the USB driver
enables VBUS wakeup. To identify when LDO2p5 can be disabled add a dummy
regulator that the USB driver will enable when VBUS wakeup is required.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00299939-2 ARM: imx6sl: Add dummy LDO2p5 regulator to support VBUS wakeup
Ranjani Vaidyanathan [Tue, 4 Mar 2014 21:31:59 +0000 (15:31 -0600)]
ENGR00299939-2 ARM: imx6sl: Add dummy LDO2p5 regulator to support VBUS wakeup

LDO2p5 cannot be disabled in low power idle mode when the USB driver
enables VBUS wakeup. To identify when LDO2p5 can be disabled add a dummy
regulator that the USB driver will enable when VBUS wakeup is required.

This patch ensures that the low power idle code checks the status of the
dummy ldo2p5 regulator before disabling LDO2p5.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00299939-1 ARM: dts: imx6sl:Add dummy LDO2p5 regulator to support vbus wakeup
Ranjani Vaidyanathan [Tue, 4 Mar 2014 21:06:30 +0000 (15:06 -0600)]
ENGR00299939-1 ARM: dts: imx6sl:Add dummy LDO2p5 regulator to support vbus wakeup

LDO2p5 cannot be disabled in low power idle mode when the USB driver
enables VBUS wakeup. To identify when LDO2p5 can be disabled add a dummy
regulator that the USB driver will enable when VBUS wakeup is required.
This patch adds the dummy regulator to the dts files.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00301095 gpu:gpu hang when dma memory is used up
Loren Huang [Thu, 27 Feb 2014 07:44:49 +0000 (15:44 +0800)]
ENGR00301095 gpu:gpu hang when dma memory is used up

When dma zone memory used up, gckOS_AllocateNonPagedMemory() will try to
free non paged memory cache and allocate again. Such operation will cause
 twice memory mutex request and cause gpu driver hang.

The solution is free the memory mutex at first before trying to free non
paged memory cache.

Date: Feb 27, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 79ed8edd23f990f6c1429154c2ee773c83bfd72e)

10 years agoENGR00292341 imx6sl hwrng
Dan Douglass [Thu, 20 Feb 2014 17:25:56 +0000 (11:25 -0600)]
ENGR00292341 imx6sl hwrng

Add hwrng support for i.MX6SL.

1. Add RNG driver. This driver originated as fsl-rngc.c. It
   has been modified to support device tree. The name has been
   changed since it supports both b and c variants of RNG.
2. Added clock and compatible info to the device tree data.
3. Added the entry in the options in the Kconfig for hwrng.

Signed-off-by: Dan Douglass <dan.douglass@freescale.com>
10 years agoENGR00290659 IPUv3: Fix a flashing vert. line when downsizing 1080i to 300x400.
Oliver Brown [Wed, 19 Feb 2014 23:32:48 +0000 (17:32 -0600)]
ENGR00290659 IPUv3: Fix a flashing vert. line when downsizing 1080i to 300x400.

When split mode deinterlacing is the ipu_calc_stripes_sizes() was failing due
to an unnecessary test. Added logic to use the maximal_stripe_width only if
the flag parameter has the bit 0 clear for not equal stripe sizes.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
10 years agoENGR00299600 hdmi:yocto gui can not show to some TV on ard board
Sandor Yu [Wed, 19 Feb 2014 08:40:49 +0000 (16:40 +0800)]
ENGR00299600 hdmi:yocto gui can not show to some TV on ard board

For i.MX6 ARD board, the board not support read EDID from TV,
so HDMI driver will create a default support mode list when system
bootup.
Because yocto xserver can not get video mode information from
framebuffer now, and xserver will set default video mode XGA
to framebuffer, but XGA mode is not support by hdmi.

Remove XGA and SXGA from default support list.
HDMI driver will find a nearest match video mode in support list.
It is VGA mode. HDMI support VGA mode well.
Issue is fixed.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00299756-5 ASoC: fsl_esai: Add default init for ESAI after probe()
Nicolin Chen [Tue, 18 Feb 2014 13:08:19 +0000 (21:08 +0800)]
ENGR00299756-5 ASoC: fsl_esai: Add default init for ESAI after probe()

This patch extracts the register init code for ESAI along with the default slot
number which is more common to I2S and LEFT_J mode.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit ad9c7ab4ff75488c0cc44bcc5d87af2d5d1139cf)

10 years agoENGR00299756-4 ASoC: imx-cs42888: Use ESAI LEFT_J master mode
Nicolin Chen [Tue, 18 Feb 2014 13:06:05 +0000 (21:06 +0800)]
ENGR00299756-4 ASoC: imx-cs42888: Use ESAI LEFT_J master mode

This patch sets ESAI as LEFT_J format master so as to let ESAI provide bit
clock and frame clock for stability.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 38df16f71c95e2aa8e0b4c1ddd2ed7ec2c4fef4b)

10 years agoENGR00299756-3 ARM: imx6q: Add the clock route from external OSC to ESAI clock
Nicolin Chen [Tue, 18 Feb 2014 12:54:25 +0000 (20:54 +0800)]
ENGR00299756-3 ARM: imx6q: Add the clock route from external OSC to ESAI clock

This patch mainly adds the clock route from external 24.576MHz OSC to internal
ESAI clock via analog clock2 PADs on the SoC and pll4 so that ESAI can get an
entirely synchronous clock source against CS42888.

[ 1, We found if using pll4 to generate a 24.576MHz from inernal 24.0MHz OSC,
  we would get noise during the audio playback via ESAI->CS42888 even though
  this generated clock's rate is equal to the external one statistically. It
  might be resulted from the tiny difference between two clock source, which
  might be crucial to the sensitive CODEC we use -- CS42888. So we here apply
  the old 3.0.35 way to feed ESAI the same clock source as CS42888.

  2, Ideally, we should use bypass mode for pll4 since we only need to get
  the raw rate (24.576MHz) while currently bypass mode in clk-pllv3.c isn't
  entirely supported: The clock rate would be fixed to 24.0MHz if setting to
  bypass, which would cause child clock get an incorrect rate and the driver
  who uses the child clock fail to derive a needed clock rate, and it might
  be dangerous to involve the clk-pllv3.c driver to this fix. Thus we here
  apply 3.0.35 way provisionally. ]

Expected result:

anaclk2                 0           1            24576000
 lvds2_in               0           1            24576000
  pll4_sel              0           1            24576000
   pll4_audio           0           1            786432000
    pll4_post_div       0           1            786432000
     pll4_audio_div     0           1            786432000
      esai_sel          0           1            786432000
       esai_pred        0           1            98304000
        esai_podf       0           1            24576000
         esai           0           1            24576000

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 49584be724d4d9c7a753d2b981b3932d8d871eb4)

10 years agoENGR00299756-2 ARM: imx6q: Add missing lvds2 clock to the clock tree
Nicolin Chen [Tue, 18 Feb 2014 12:27:06 +0000 (20:27 +0800)]
ENGR00299756-2 ARM: imx6q: Add missing lvds2 clock to the clock tree

We actually have lvds2 (analog clock2), an I/O clock like lvds1, in the SoC.
And this lvds2, along with lvds1, can be used to provide external clock source
to the internal pll, such as pll4_audio and pll5_video.

So This patch mainly adds the lvds2 to the clock tree and fix its relationship
with pll4 accordingly.

[ To reduce the risk from code changing. This patch only takes care of pll4
  related part. We might later need to add the relationship with pll5 too. ]

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 5b74b6b26e4b44d265090fc6ad15b15ccb7b5cff)

10 years agoENGR00299756-1 ASoC: fsl_esai: Add missing clock enabler to ASoC interfaces
Nicolin Chen [Tue, 18 Feb 2014 10:40:33 +0000 (18:40 +0800)]
ENGR00299756-1 ASoC: fsl_esai: Add missing clock enabler to ASoC interfaces

All of these functions might be called before we enable the core clock in the
startup() by set_bias_level() or late_probe() in machine driver for example.
To make it safe, we here add pair of clock en/disabling to each function.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit e6df36df2bc8062f3d1c0a19d18acc843a77619d)

10 years agoENGR00298052-7 ARM: imx6q: remove function imx6q_lvds_cabc_init()
Liu Ying [Tue, 18 Feb 2014 04:49:32 +0000 (12:49 +0800)]
ENGR00298052-7 ARM: imx6q: remove function imx6q_lvds_cabc_init()

This patch removes the function imx6q_lvds_cabc_init() from the
machine layer since we have a dedicated Hannstar CABC driver to
control the CABC feature.

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

10 years agoENGR00298052-6 ARM: dts: imx6qdl-sabresd: remove lvds_cabc_ctrl
Liu Ying [Tue, 18 Feb 2014 04:46:30 +0000 (12:46 +0800)]
ENGR00298052-6 ARM: dts: imx6qdl-sabresd: remove lvds_cabc_ctrl

This patch removes the device tree node lvds_cabc_ctrl, since
it is replaced by hannstar_cabc_lvds0 and hannstar_cabc_lvds1.

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

10 years agoENGR00298052-5 ARM: dts: imx6qdl-sabresd: support Hannstar CABC
Liu Ying [Tue, 18 Feb 2014 04:44:35 +0000 (12:44 +0800)]
ENGR00298052-5 ARM: dts: imx6qdl-sabresd: support Hannstar CABC

This patch adds a device tree node for the Hannstar CABC function.
We currently disable the CABC feature since it makes a panel's
backlight unstable when display content varies considerably from
time to time.

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

10 years agoENGR00298052-4 ARM: dts: imx6qdl-sabreauto: support Hannstar CABC
Liu Ying [Tue, 18 Feb 2014 02:59:09 +0000 (10:59 +0800)]
ENGR00298052-4 ARM: dts: imx6qdl-sabreauto: support Hannstar CABC

This patch adds a device tree node for the Hannstar CABC function.
The LVDS0 and LVDS1 interfaces of the i.MX6dql Sabreauto platform
shares a control pin for the CABC function, but LVDS1's control
wire is invalid for the unpopulated resistor R265 on the main board.
We currently disable the CABC feature since it makes a panel's
backlight unstable when display content varies considerably from
time to time.

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

10 years agoENGR00298052-3 ARM: imx_v7_defconfig: enable Hannstar CABC driver
Liu Ying [Tue, 18 Feb 2014 02:53:36 +0000 (10:53 +0800)]
ENGR00298052-3 ARM: imx_v7_defconfig: enable Hannstar CABC driver

This patch enables the Hannstar CABC driver in imx_v7_defconfig.

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

10 years agoENGR00298052-2 Documentation: video: add Hannstar CABC dt bindings
Liu Ying [Tue, 18 Feb 2014 05:19:12 +0000 (13:19 +0800)]
ENGR00298052-2 Documentation: video: add Hannstar CABC dt bindings

This patch documents the Hannstar CABC driver's device tree bindings.

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

10 years agoENGR00298052-1 video: mxc: add Hannstar CABC driver
Liu Ying [Tue, 18 Feb 2014 02:17:59 +0000 (10:17 +0800)]
ENGR00298052-1 video: mxc: add Hannstar CABC driver

This patch adds Hannstar CABC driver support.  The CABC
function turns the backlight density of a display panel
automatically according to the content shown on the panel.
It is controlled(enabled/disabled) by a GPIO.

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

10 years agoENGR00297285-2 [MX6x] Support IRAM page table when DDR is in self-refresh.
Ranjani Vaidyanathan [Thu, 13 Feb 2014 22:51:11 +0000 (16:51 -0600)]
ENGR00297285-2 [MX6x] Support IRAM page table when DDR is in self-refresh.

The bottom 16KB of the IRAM is reserved for the IRAM page table.
Reduce the available IRAM size for the other drivers by 16KB.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00297285-1 [MX6x] Support IRAM page table when DDR is in self-refresh.
Ranjani Vaidyanathan [Thu, 13 Feb 2014 22:50:20 +0000 (16:50 -0600)]
ENGR00297285-1 [MX6x] Support IRAM page table when DDR is in self-refresh.

Whenever DDR is explicitly put into self-refresh, we need to ensure
that no access are made to the DDR. All the bus masters excpet ARM
are shutdown gracefully.
The ARM core can continue to access the DDR due to:
1. Speculative accesses
   This can be prevented by flushing the Branch Target Address Cache
2. Aggressive Prefetching
   This can be minimized by adding nops.
Apart from this the TLB architecture in ARM does not guarantee that
an entry remains in the TLB unless its explicitly locked. Even if
free slots are available an entry maybe evicted. So flushing the TLB
does not guarantee a page table walk will not happen.

The solution is to put a minimized page table in IRAM that can be used when
DDR is in self-refresh. The IRAM page tables should have entries for IRAM,
AIPS1 and AIPS2 as these entries will be needed by the code that puts DDR
into self-refresh. It should not contain any entries that point to the DDR.

This patch set accomplishes the following:
1. Set the IRAM to be mapped as 1M sections in the high mem region.
   This makes it possible to create entries for the IRAM code in the IRAM page table.
We need to ensure that both the DDR and IRAM page table have mapping for the IRAM code.
2. Ensure the IRAM, AIPS1, AIPS2 have entries in the IRAM page table.
3. Save TTBR1
4. Set TTBR1 to point to the page tables stored in IRAM. Switch to using
TTBR1 before DDR is put into self-refresh. Ensure the following settings:
    a. TTBCR.N = 1
     This means the 0-2G virtual address space is translated using TTBR0
     and 2G-4G is translated using TTBR1.
    b. Set TTBCR.PD0 = 1
      With this setting page table walks using TTBR0 are disabled.
4. After the DDR has exited self-refresh, reset TTBCR to 0 (TTBR0 will
be used for translations now).
5. Restore TTBR1

Even though TTBR1 is only used to decode the top 2G of virtual address
space, ARM requires that we allocate the entire 16KB for the page table.
To minimize IRAM/OCRAM required, we put the code in the bottom 8K and
page table entries in the top 8K.
This requires the low power code be optimized to occupy as little space
as possible.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
10 years agoENGR00298392 pcie: imx pcie ep rc msi demo
Richard Zhu [Mon, 10 Feb 2014 06:56:46 +0000 (14:56 +0800)]
ENGR00298392 pcie: imx pcie ep rc msi demo

- add one imx pcie ep simple skeleton driver to demo
the msi trigger capability in imx6 pcie rc/ep validation
system
- in order to avoid the modification of common codes,
force the msi address to be 0x01ff8000

Test howto:
- Enable CONFIG_PCI_MSI=y, when rebuild the rc/ep images

- EP side(console command and kernel message):
root@sabresd_6dq:/ # memtool 0x1ff8000=0
Writing 32-bit value 0x0 to address 0x01FF8000
root@sabresd_6dq:/ #

- RC side(console command and kernel message):
root@sabresd_6dq:/ # cat /proc/interrupts | grep MSI
384:          1          0          0          0   PCI-MSI

- EP side(console command and kernel message):
root@sabresd_6dq:/ # memtool 0x1ff8000=0
Writing 32-bit value 0x0 to address 0x01FF8000

- RC side(console command and kernel message):
root@sabresd_6dq:/ # cat /proc/interrupts | grep MSI
384:          2          0          0          0   PCI-MSI

Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00298389 pcie: let rc can access mem of ep
Richard Zhu [Mon, 10 Feb 2014 04:34:33 +0000 (12:34 +0800)]
ENGR00298389 pcie: let rc can access mem of ep

- setup one new outbound memory region at rc side, used
to let imx6 pcie rc can access the memory of imx6 pcie ep
in imx6 pcie rc ep validation system.
- set the default address of the ddr memory to be 0x4000_0000

NOTE:
- default address 0x4000_0000 of ep side would be
accessed in this demo.
Test howto:
step1:
EP side:
1.1:
echo 0x40000000 > /sys/devices/soc0/soc.1/1ffc000.pcie/ep_bar0_addr

1.2:
memtool -32 0x40000000 4
E
Reading 0x4 count starting at address 0x40000000

0x40000000:  6FE9E9F6 7583FBB9 39EAEFEA FBDCFD78

step2:
RC side:
memtool -32 0x01000000=58D454DA
memtool -32 0x01000004=7332095B

step3:
EP side:
memtool -32 0x40000000 4
E
Reading 0x4 count starting at address 0x40000000

0x40000000:  58D454DA 7332095B 39EAEFEA FBDCFD78

Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00296547-2 ARM: dts: imx6qdl-sabreauto: add a new pinctrl for ECSPI1
Huang Shijie [Sun, 26 Jan 2014 02:58:14 +0000 (10:58 +0800)]
ENGR00296547-2 ARM: dts: imx6qdl-sabreauto: add a new pinctrl for ECSPI1

The ECSPI1 needs the GPIO3_19 to select/de-select the SPI NOR chip.

This patch adds a new pinctrl for this GPIO, and select this pinctrl
when we enable the ECSPI1.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00296547-1 ARM: dts: imx6qdl-sabreauto-ecspi: use the gpio5_4 to enable the EIM_D18
Huang Shijie [Fri, 24 Jan 2014 10:26:54 +0000 (18:26 +0800)]
ENGR00296547-1 ARM: dts: imx6qdl-sabreauto-ecspi: use the gpio5_4 to enable the EIM_D18

The ECSPI needs the pin EIM_D18 which is controlled by the steering.
So we have to configurate the EIM_A24 to GPIO, and select the GPIO to LOW
status.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00296519 USB: EHCI: wait more than 3ms until the device enters full-speed idle
Peter Chen [Fri, 24 Jan 2014 06:59:30 +0000 (14:59 +0800)]
ENGR00296519 USB: EHCI: wait more than 3ms until the device enters full-speed idle

If the high-speed device does not enter full-speed idle after
wakeup on disconnect logic has effected, there will be an
unexpected disconnect wakeup interrupt due to the bus is still SE0.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
10 years agoARM: 7873/1: vfp: clear vfp_current_hw_state for dying cpu
Yuanyuan Zhong [Wed, 30 Oct 2013 16:31:49 +0000 (17:31 +0100)]
ARM: 7873/1: vfp: clear vfp_current_hw_state for dying cpu

The CPU_DYING notifier is called by cpu stopper task which
does not own the context held in the VFP hardware. Calling
vfp_force_reload() has no effect.
Replace it with clearing vfp_current_hw_state.

Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit 384b38b66947b06999b3e39a596d4f2fb94f77e4)

10 years agoENGR00296510 ARM: dts: imx6qdl-sabreauto: use the gpio5_4 to enable the EIM_D18
Huang Shijie [Fri, 24 Jan 2014 07:49:26 +0000 (15:49 +0800)]
ENGR00296510 ARM: dts: imx6qdl-sabreauto: use the gpio5_4 to enable the EIM_D18

The WEIN NOR needs the pin EIM_D18 which is controlled by the steering.
So we have to configurate the EIM_A24 to GPIO, and select the GPIO to LOW
status.

Signed-off-by: Huang Shijie <b32955@freescale.com>
10 years agoENGR00284938 sata: cr-rst workaround sata phy link issues
Richard Zhu [Fri, 10 Jan 2014 07:54:26 +0000 (15:54 +0800)]
ENGR00284938 sata: cr-rst workaround sata phy link issues

- add sata phy cr(offset:0x7f3f) reset in sata resume to
workaround imx6q sata kinds of suspend resume link
issues.
- add sata phy cr reset during imx6q sata initialization,
to initialize the sata phy to be an initialized state.
- add about 100us delay between mpll_clk enable and cr-rst,
make sure that the mpll_clk is stable.
- add about 100us delay between cr-rst and waiting for rx_pll
stable too, make sure that the cr-rst is finished.
- change the tx level setting from 1.025v to be the default
value 1.104v
- make sure the sata phy internal pll ref clk enable is
cleared before it is set, otherwise, the sata phy link
maybe failed when some devices are used.

Signed-off-by: Richard Zhu <r65037@freescale.com>
10 years agoENGR00296212 ARM: imx_v7_defconfig: Select CONFIG_HIGHMEM
Anson Huang [Thu, 23 Jan 2014 02:36:51 +0000 (10:36 +0800)]
ENGR00296212 ARM: imx_v7_defconfig: Select CONFIG_HIGHMEM

Select HIGHMEM config to avoid the vmalloc region overlap on
boards that have big RAM.

Previous imx_v7_defconfig change(CONFIG_CRYPTO_TEST) did NOT follow
the savedefconfig rule, fix it as well.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00296050 mxsfb: fb failed to work after suspend in console mode
Sandor Yu [Wed, 22 Jan 2014 07:09:37 +0000 (15:09 +0800)]
ENGR00296050 mxsfb: fb failed to work after suspend in console mode

When device boot into console, frame buffer failed to work after
suspend/resume.
That is caused by LCDIF IP lost all registers configuration
in suspend mode, and console didn't reconfiguration fb after resume.
Same issue didn't found with Yocto UI.
Reinitialize frame buffer driver after resume to fix the issue.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00295201 ipuv3: vdic: kernel dump when run deinterlace stress test
Sandor Yu [Wed, 15 Jan 2014 08:50:04 +0000 (16:50 +0800)]
ENGR00295201 ipuv3: vdic: kernel dump when run deinterlace stress test

Kernel will dump when run deinterlace stress test.
It is caused by vditmpbuf being reallocated by another thread
when one thread accesses it.
Issue is fixed by putting these code in mutex.

Kernel dump log:
[Playing  ][Vol=01][00:00:10/00:00:30][fps:32]Unable to handle kernel
paging request at virtual address 607d6085
pgd = 80004000
[607d6085] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 50 Comm: ipu2_task Not tainted 3.10.17-02308-g3700819 #28
task: ac1dc700 ti: ac1ba000 task.ti: ac1ba000
PC is at __kmalloc+0x40/0x114
LR is at __kmalloc+0x14/0x114
pc : [<800bbd40>]    lr : [<800bbd14>]    psr: 200f0013
sp : ac1bbbc8  ip : 008cc000  fp : 00001e40
r10: ac772e00  r9 : 0057b255  r8 : 000000d0
r7 : 00000790  r6 : ac773800  r5 : 607d6085  r4 : ac001b00
r3 : 00000000  r2 : 814f92a0  r1 : 000000d0  r0 : 000398c9
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: 3c4c004a  DAC: 00000015
Process ipu2_task (pid: 50, stack limit = 0xac1ba238)
Stack: (0xac1bbbc8 to 0xac1bc000)

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00293488 ipu: vdi: Support more memory type
Sandor Yu [Fri, 27 Dec 2013 09:10:03 +0000 (17:10 +0800)]
ENGR00293488 ipu: vdi: Support more memory type

__va function only can handle frame buffer from low memory.
Use page_address function to replace it, that can handle
frame buffer from both lower and high memory.

Use ioremap_nocache function to handle Frame buffer
from GPU reserve memory pool.

Correct vdi data save buffer size, save both luma and chroma part for
interleaved YUV format.
For non-interleaved and partial-interleaved YUV format,
save luma part data, chroma part is not covered in the patch.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00295892-2: ARM: dts: imx6qdl-sabresd: add retain-state-suspended property in dts
Robin Gong [Tue, 21 Jan 2014 02:44:12 +0000 (10:44 +0800)]
ENGR00295892-2: ARM: dts: imx6qdl-sabresd: add retain-state-suspended property in dts

Add property "retain-state-suspended" in dts.

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 7fa74454e8fb857b050901097bf78167ac3c04cd)

10 years agoENGR00295892-1: leds: leds-gpio: keep charger led state while system suspended
Robin Gong [Tue, 21 Jan 2014 02:41:46 +0000 (10:41 +0800)]
ENGR00295892-1: leds: leds-gpio: keep charger led state while system suspended

gpio-leds driver common framework didn't take care of this case if use CONFIG_OF
, add property "retain-state-suspended" in dts and check it while gpio-leds
device created.

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 118c650de0bb518d377b0e6427b38fc101fe31aa)

10 years agoENGR00295814 ARM: dts: imx6qdl: correct gpio key's active state
Anson Huang [Mon, 20 Jan 2014 11:30:09 +0000 (19:30 +0800)]
ENGR00295814 ARM: dts: imx6qdl: correct gpio key's active state

From schematic, below GPIO keys' active state is low, so we need
to set correct active state in dts.

i.MX6Q/DL-SABRESD board: power, vol+ and vol-.
i.MX6Q/DL-SABREAUTO board: home, back, prog, vol+ and vol-.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00295752: watchdog: imx2_wdt: disable watchdog timer during low power mode
Anson Huang [Mon, 13 Jan 2014 08:17:05 +0000 (16:17 +0800)]
ENGR00295752: watchdog: imx2_wdt: disable watchdog timer during low power mode

We should set watchdog timer to be disabled in low power mode,
as there is no service running in background, otherwise, system
will reset unexpected.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00291086 crypto kernel module speed test in single fail
Jay Monkman [Fri, 17 Jan 2014 19:06:46 +0000 (13:06 -0600)]
ENGR00291086 crypto kernel module speed test in single fail

The tcrypt module is used to test the crypto API by being passed a
mode=<value> during module load. The test runs to completion before
insmod/modprobe returns. That makes the RCU stall detection in newer
kernels unhappy.

The simple fix is to add CONFIG_PREEMPT to the kernel config. That's
what this patch does. If that introduces other problems,
crypto/tcrypt.c can be modified to call schedule() in the correct
places. Here's a patch that should work if this one has to be
reverted:

diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 66d254c..b771f7d 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -33,6 +33,7 @@
 #include <linux/jiffies.h>
 #include <linux/timex.h>
 #include <linux/interrupt.h>
+#include <linux/sched.h>
 #include "tcrypt.h"
 #include "internal.h"

@@ -182,6 +183,7 @@ static void test_cipher_speed(const char *algo, int enc, unsigned int sec,
                                goto out;
                        }

+                        schedule();
                        printk("test %u (%d bit key, %d byte blocks): ", i,
                                        *keysize * 8, *b_size);

@@ -448,6 +450,7 @@ static void test_hash_speed(const char *algo, unsigned int sec,
                if (speed[i].klen)
                        crypto_hash_setkey(tfm, tvmem[0], speed[i].klen);

+                schedule();
                printk(KERN_INFO "test%3u "
                       "(%5u byte blocks,%5u bytes per update,%4u updates): ",
                       i, speed[i].blen, speed[i].plen, speed[i].blen / speed[i].plen);
@@ -688,12 +691,12 @@ static void test_ahash_speed(const char *algo, unsigned int sec,
                        break;
                }

+                schedule();
                pr_info("test%3u "
                        "(%5u byte blocks,%5u bytes per update,%4u updates): ",
                        i, speed[i].blen, speed[i].plen, speed[i].blen / speed[i].plen);

                ahash_request_set_crypt(req, sg, output, speed[i].plen);
-
                if (sec)
                        ret = test_ahash_jiffies(req, speed[i].blen,
                                                 speed[i].plen, output, sec);
@@ -853,6 +856,7 @@ static void test_acipher_speed(const char *algo, int enc, unsigned int sec,
                                goto out_free_req;
                        }

+                        schedule();
                        pr_info("test %u (%d bit key, %d byte blocks): ", i,
                                *keysize * 8, *b_size);

@@ -934,6 +938,7 @@ static void test_available(void)
                printk("alg %s ", *name);
                printk(crypto_has_alg(*name, 0, 0) ?
                       "found\n" : "not found\n");
+                schedule();
                name++;
        }
 }

Signed-off-by: Jay Monkman <jay.monkman@freescale.com>
(cherry picked from commit 2dc1e6a900df2b575914a7c58fc08e4b072c0e67)

10 years agoENGR00295570 ARM: imx_v7_defconfig: enlarge the CMA size from 256MB to 320MB
Jason Liu [Fri, 17 Jan 2014 07:19:01 +0000 (15:19 +0800)]
ENGR00295570 ARM: imx_v7_defconfig: enlarge the CMA size from 256MB to 320MB

In order to support the dual video use-case, the current CMA reserved size is
not enough now, need enlarge the CMA size from 256M to 320M by default.

Signed-off-by: Jason Liu <r64343@freescale.com>
10 years agoENGR00295564 mmc: sdhci-esdhc-imx: no need busfreq for imx6qdl
Dong Aisheng [Fri, 17 Jan 2014 02:23:22 +0000 (10:23 +0800)]
ENGR00295564 mmc: sdhci-esdhc-imx: no need busfreq for imx6qdl

The usdhc of i.MX6Q/DL can work well under low power mode without
request high bus freq. So we do not need request bus freq for i.MX6Q/DL.
It can save power for i.MX6D/DL due to it saves a lot busfreq switch
cost as well as the CPU time runing on high bus freq after switch
during low power mode.

A new flag ESDHC_FLAG_BUSFREQ is added to indicated this requirement.
Currently only i.MX6SL is using it.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 075196777d00bf9507d68a76bf25f6c7e776102f)

10 years agoENGR00295423-5 Revert "ENGR00274386-1 ASoC: imx-wm8962: Fix 192KHz playback slow...
Nicolin Chen [Mon, 6 Jan 2014 09:09:27 +0000 (17:09 +0800)]
ENGR00295423-5 Revert "ENGR00274386-1 ASoC: imx-wm8962: Fix 192KHz playback slow issue"

The root cause of playback slow issue should be trying to get DSPCLK_DIV
before enabling SYSCLK of WM8962. Since we have a patch fixed it, we can
revert this work round.
This reverts commit 49a3ca545a88cdf4aa597c4dd7d904b4faaea555.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit a4d253a8ab038661f515d72a175eb11688774874)

10 years agoENGR00295423-4 ASoC: fsl_ssi: Set the default slot number in startup()
Nicolin Chen [Mon, 6 Jan 2014 09:25:09 +0000 (17:25 +0800)]
ENGR00295423-4 ASoC: fsl_ssi: Set the default slot number in startup()

Set a default slot number in startup() so that those who use I2S or other
2-channel DAI format would not need to call set_dai_tdm_slot() in their
machine drivers.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit eb22fac84c62cccb98dc4503bc9a537c435d216b)

10 years agoENGR00295423-3 ASoC: fsl_ssi: Don't disable SSIEN if SSI is already enabled
Nicolin Chen [Mon, 6 Jan 2014 08:55:07 +0000 (16:55 +0800)]
ENGR00295423-3 ASoC: fsl_ssi: Don't disable SSIEN if SSI is already enabled

If disabling SSI when SSI is already in the working state, the whole running
substream would be broken. Thus we here replace it to a safer way -- saving
the current SSIEN value and restore it afterward.

This patch also adds a slot number checking code before setting slot number.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 2f71335a5b39afec4cf976b45683e5de1baed31d)

10 years agoENGR00295423-2 ASoC: fsl_ssi: Don't set clock rate in hw_params()
Nicolin Chen [Mon, 6 Jan 2014 08:43:19 +0000 (16:43 +0800)]
ENGR00295423-2 ASoC: fsl_ssi: Don't set clock rate in hw_params()

Leaving clk_set_rate() in hw_params() is a bit dangerous when handling two
substreams. So we let set_sysclk() finish the clk_set_rate() directly.

This patch also adds spinlock to protect the baud clock configuration so
that it won't be broken during race.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit d3818ba35e4cbb6a3fa769eb83ceb7335b7c19e6)

10 years agoENGR00295423-1 ASoC: fsl_ssi: Implement full symmetry for synchronous mode
Nicolin Chen [Mon, 6 Jan 2014 08:28:51 +0000 (16:28 +0800)]
ENGR00295423-1 ASoC: fsl_ssi: Implement full symmetry for synchronous mode

Since we introduced symmetric_channels and symmetric_samplebits, we can
implement these new feature to SSI synchronous mode and drop the useless
code accordingly.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 63a818ebd8fa88d8a91faa491c4f7909e7c8bdd5)

10 years agoASoC: wm8962: Enable SYSCLK provisonally before fetching generated DSPCLK_DIV
Nicolin Chen [Wed, 4 Dec 2013 09:22:16 +0000 (17:22 +0800)]
ASoC: wm8962: Enable SYSCLK provisonally before fetching generated DSPCLK_DIV

DSPCLK_DIV can be only generated correctly after enabling SYSCLK. But if the
current bias_level hasn't reached SND_SOC_BIAS_ON, DAPM won't enable SYSCLK,
which would cause the calculation result from DSPCLK_DIV invalid since bit
DSPCLK_DIV will be finally turned to its true value after DAPM enables SYSCLK
while the driver won't calculate it again for the current instance. In this
circumstance, a playback which needs non-zero DSPCLK_DIV would be distorted
due to unexpected clock frequency resulted from an invalid DSPCLK_DIV value.

So this patch provisionally enables the SYSCLK to get a valid DSPCLK_DIV for
calculation and then disables it afterward.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 75704ecfbb4124139b78b71dd603f05d61abe689)
(cherry picked from commit 46ff60a75d0db92848913435bc345def2a2ccc5e)

10 years agoASoC: soc-pcm: Use valid condition for snd_soc_dai_digital_mute() in hw_free()
Nicolin Chen [Wed, 4 Dec 2013 03:18:36 +0000 (11:18 +0800)]
ASoC: soc-pcm: Use valid condition for snd_soc_dai_digital_mute() in hw_free()

The snd_soc_dai_digital_mute() here will be never executed because we only
decrease codec->active in snd_soc_close(). Thus correct it.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 7f62b6ee767586ee7e5d12787dbaaaf47a91979a)
(cherry picked from commit 7ff4bd4a786d049cd4bc7306920e01f348acdaca)

10 years agoASoC: soc-pcm: move DAIs parameters cleaning into hw_free()
Nicolin Chen [Wed, 20 Nov 2013 10:37:09 +0000 (18:37 +0800)]
ASoC: soc-pcm: move DAIs parameters cleaning into hw_free()

We're now applying soc_hw_params_symmetry() to reject unmatched parameters
while we clear parameters in soc_pcm_close(). So here's a use case might be
broken by this mechanism: aplay -Dhw:0 44100.wav 48000.wav 32000.wav

In this case, we call soc_pcm_open()->soc_pcm_hw_params()->soc_pcm_hw_free()
->soc_pcm_hw_params()->soc_pcm_hw_free()->soc_pcm_close() in order. As we
only clear parameters in soc_pcm_close(). The parameters would be remained
in the system even if the playback of 44100.wav is finished.

Thus, this patch is trying to move parameters cleaning into hw_free() so that
the system can continue to serve this kind of use case.

Also, since we set them in hw_params(), it should be better to clear them in
hw_free() for symmetry.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit d3383420c969c25deffd33270ebe321e8401191a)
(cherry picked from commit eb745901177ab907ee2ec2ab8c8ca9b4deb0e35a)

10 years agoASoC: soc-pcm: add symmetry for channels and sample bits
Nicolin Chen [Wed, 13 Nov 2013 10:56:24 +0000 (18:56 +0800)]
ASoC: soc-pcm: add symmetry for channels and sample bits

Some SoCs can only work in mono or stereo mode at one time. So if
we let them capture a mono stream while playing a stereo stream,
there might be a problem occur to one of these two streams: double
paced or slowed down.

In soc-pcm.c, we have soc_pcm_apply_symmetry() to apply the rate
symmetry. But we don't have one for channels.

Likewise, we can treat symmetric_rate as a solution for those SoCs
or CODECs which can not handle asymmetrical LRCLK. But it's also
impossible for them to handle asymmetrical BCLK. And accodring to
BCLK = LRCLK * channel number * slot size(fixed or sample bits),
sample bits might also be a problem if they are not using a fixed
slot size.

Thus, this patch applys symmetry for channels and sample bits.

Meanwhile, there might be a race between two substreams if starting
simultaneously. Previously, we only added warning to compalin but
still using conservative way to let it carry on. However, this patch
rejects the second stream with any unmatched parameter to make sure
the first existing stream won't be broken.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 3635bf09a89cf92b80ac44198c5c8f0989624ea6)
(cherry picked from commit bb3317659966b170d9481fad887df8808774c696)

10 years agoENGR00295218-3 gpu:Remove a potential deadlock in gpu vg kernel.
Loren Huang [Thu, 16 Jan 2014 08:28:54 +0000 (16:28 +0800)]
ENGR00295218-3 gpu:Remove a potential deadlock in gpu vg kernel.

-If _FlushMMU() return error, commitMutex and powerSemaphore will be
locked forever.
-Correct file attribute for gc_hal_base.h

Date: Jan 15, 2014

Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 0279fa8984dac78c289d264450c76e1156b3ac79)