]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoENGR00223249 : fix Ethernet performance downgrade issue.
Fugang Duan [Thu, 6 Sep 2012 06:13:00 +0000 (14:13 +0800)]
ENGR00223249 : fix Ethernet performance downgrade issue.

Ethernet performance is downgraded when wait mode on in
100Mbps mode.
wait mode off:
100Mbps mode: tx bandwidth is 94Mbps
      rx bandwidth is 94Mbps
wait mode on:
100Mbps mode: tx bandwidth is 30Mbps
      rx bandwidth is 94Mbps
After apply the patch:
wait mode on:
100Mbps mode: tx bandwidth is 94Mbps
      rx bandwidth is 94Mbps

Wait mode on cause enet interrupt has long latency, which
results in BD entries are full and stop tx queue, so cpus
have more chance to enter wait mode.

Incresing TX BD entries can properly accommodate the blance
between BD request before tx packets and BD release after tx
completion in interrupt process.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agomtd: gpmi-nand: fix read page when reading to vmalloced area
Sascha Hauer [Tue, 26 Jun 2012 15:26:16 +0000 (17:26 +0200)]
mtd: gpmi-nand: fix read page when reading to vmalloced area

The gpmi-nand driver uses virt_addr_valid() to check whether a buffer
is suitable for dma. If it's not, a driver allocated buffer is used
instead. Then after a page read the driver allocated buffer must be
copied to the user supplied buffer. This does not happen since commit
7725cc85932bd02dd12c23108e0ef748c551ccba.

This patch fixes the issue. The bug is encountered with UBI which uses a
vmalloced buffer for the volume table.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: snijsure@grid-net.com
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agomtd: gpmi-nand: utilize oob_requested parameter
Brian Norris [Wed, 2 May 2012 17:15:02 +0000 (10:15 -0700)]
mtd: gpmi-nand: utilize oob_requested parameter

Don't read OOB if the caller didn't request it.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agomtd: nand: pass proper 'oob_required' parameter
Huang Shijie [Wed, 5 Sep 2012 08:47:02 +0000 (16:47 +0800)]
mtd: nand: pass proper 'oob_required' parameter

We now have an interface for notifying the nand_ecc_ctrl functions when OOB
data must be returned to the upper layers and when it may be left untouched.
This patch fills in the 'oob_required' parameter properly from
nand_do_{read,write}_ops. When utilized properly in the lower layers, this
parameter can improve performance and/or reduce complexity for NAND HW and SW
that can simply avoid transferring the OOB data.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Acked-by: Jiandong Zheng <jdzheng@broadcom.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
11 years agomtd: nand: add 'oob_required' argument to NAND {read,write}_page interfaces
Huang Shijie [Wed, 5 Sep 2012 08:30:53 +0000 (16:30 +0800)]
mtd: nand: add 'oob_required' argument to NAND {read,write}_page interfaces

New NAND controllers can perform read/write via HW engines which don't expose
OOB data in their DMA mode. To reflect this, we should rework the nand_chip /
nand_ecc_ctrl interfaces that assume that drivers will always read/write OOB
data in the nand_chip.oob_poi buffer. A better interface includes a boolean
argument that explicitly tells the callee when OOB data is requested by the
calling layer (for reading/writing to/from nand_chip.oob_poi).

This patch adds the 'oob_required' parameter to each relevant {read,write}_page
interface; all 'oob_required' parameters are left unused for now. The next
patch will set the parameter properly in the nand_base.c callers, and follow-up
patches will make use of 'oob_required' in some of the callee functions.

Note that currently, there is no harm in ignoring the 'oob_required' parameter
and *always* utilizing nand_chip.oob_poi, but there can be
performance/complexity/design benefits from avoiding filling oob_poi in the
common case. I will try to implement this for some drivers which can be ported
easily.

Note: I couldn't compile-test all of these easily, as some had ARCH
dependencies.

[Huang Shijie: I remove the unused code for the other drivers.]

[dwmw2: Merge later 1/0 vs. true/false cleanup]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Acked-by: Jiandong Zheng <jdzheng@broadcom.com>
Acked-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoENGR00223344 [Thermal]Fix clk enable flow bug
Anson Huang [Fri, 7 Sep 2012 01:07:56 +0000 (09:07 +0800)]
ENGR00223344 [Thermal]Fix clk enable flow bug

We should make sure clk_enable is called after clk_get.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00223236-2 [MX6]Change the temperature range to -40C ~ 125C
Anson Huang [Thu, 6 Sep 2012 07:38:07 +0000 (15:38 +0800)]
ENGR00223236-2 [MX6]Change the temperature range to -40C ~ 125C

Previous temperature range is -25C ~ 125C, according to latest
datasheet, change it to -40C to 125C.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00222954 Enable PLL3 in GPU power up flow
Loren Huang [Thu, 6 Sep 2012 07:37:37 +0000 (15:37 +0800)]
ENGR00222954 Enable PLL3 in GPU power up flow

If GPU2D used PLL3 as root, we need enable PLL
during GPU power up flow so that we can power up
GPU2D properly.
Till now, this issue can only be duplicated on
Android.

Signed-off-by: Loren Huang <b02279@freescale.com>
11 years agoENGR00223103 ESAI ASRC: clean build warning
Chen Liangjun [Wed, 5 Sep 2012 08:45:18 +0000 (16:45 +0800)]
ENGR00223103 ESAI ASRC: clean build warning

BUILD WARNING:
WARNING: arch/arm/mach-mx6/built-in.o(.data+0x7e44): Section mismatch in
reference from the variable sab_audio_data to the (unknown reference)
.init.rodata:(unknown) The variable sab_audio_data references the
(unknown reference) __initconst (unknown) If the reference is valid then
annotate the variable with __init* or __refdata (see linux/init.h) or
name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

In this patch, remove esai_p2p struct with init attribute.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00223056 Fix HDMI build warning
Sandor Yu [Wed, 5 Sep 2012 05:26:50 +0000 (13:26 +0800)]
ENGR00223056 Fix HDMI build warning

Fix HDMI build warning.
drivers/video/mxc_hdmi.c: In function 'mxc_hdmi_set_mode':
drivers/video/mxc_hdmi.c:1659: warning: assignment discards
 qualifiers from pointer target type
drivers/video/mxc_hdmi.c: At top level:
driver/video/mxc_hdmi.c:1398: warning: 'mxc_hdmi_enable_pins'
 defined but not used

Remove unused function mxc_hdmi_enable_pins() and mxc_hdmi_disable_pins()
from code. Fix defined but unused function build warning.
Added pointer conversion from const poniter to non-const pointer.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00222078 power battery:fix charger attach detect missing after resume
Rong Dian [Mon, 3 Sep 2012 10:37:43 +0000 (18:37 +0800)]
ENGR00222078 power battery:fix charger attach detect missing after resume

1.config gpio dok for AC charger as wake up irq, config gpio uok
for USB charger as wake up irq.
2.add AC/USB charger detect in resume,fix charger detect status update
missing after attach AC/USB charger and resume system

Signed-off-by: Rong Dian <b38775@freescale.com>
11 years agoENGR00223097 sabresd pfuze:increase VDDARM_IN&VDDSOC_IN to 1.475V for 1.2G
Robin Gong [Wed, 5 Sep 2012 08:17:32 +0000 (16:17 +0800)]
ENGR00223097 sabresd pfuze:increase VDDARM_IN&VDDSOC_IN to 1.475V for 1.2G

consider ripple, IR drop and pfuze tolerance, we need incrase VDDARM_IN and
VDDSOC_IN to 1.475V.

Signed-off-by: Robin Gong <B38343@freescale.com>
11 years agoENGR00223058 [MX6]Fix build warning
Anson Huang [Wed, 5 Sep 2012 05:47:43 +0000 (13:47 +0800)]
ENGR00223058 [MX6]Fix build warning

Fix below build warning:

arch/arm/mach-mx6/irq.c: In function 'mx6_init_irq':
arch/arm/mach-mx6/irq.c:106: warning: unused variable 'reg'

arch/arm/mach-mx6/clock_mx6sl.c:1807:
warning: function declaration isn't a prototype
arch/arm/mach-mx6/clock_mx6sl.c:1535:
warning: 'tzasc1_clk' defined but not used
arch/arm/mach-mx6/clock_mx6sl.c:1576:
warning: 'mx6per2_clk' defined but not used
arch/arm/mach-mx6/clock_mx6sl.c:1708:
warning: 'ocram_clk' defined but not used

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00221854 HDMI: suspend/resume hdmi_phy fail to lock.
Sandor Yu [Wed, 5 Sep 2012 03:17:32 +0000 (11:17 +0800)]
ENGR00221854 HDMI: suspend/resume hdmi_phy fail to lock.

HDMI PHY init function will been called four times during system resume.
The first call before pixel clock enable, so it will print
PHY PLL unlock message, but the PHY PLL will locked in the next
three times called. It will not affect HDMI PHY function.

Change message print function dev_err to dev_dbg.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00222900 HDMI AUDIO: fix kernel panic when doing suspend-resume test
Chen Liangjun [Tue, 4 Sep 2012 08:51:41 +0000 (16:51 +0800)]
ENGR00222900 HDMI AUDIO: fix kernel panic when doing suspend-resume test

In MX6 series, HDMI audio driver is responsible for add IEC header to
audio samples. Driver would maintain variables to cover this work.

The old driver would cause memory access exceeding issue:
1. Resume from an playback. In this case, variable maintained by ALSA is
updated while variable maintained by HDMI driver is not updated. The
mmap copy operation would run into error state due to misalignment.
2. underrun!!! The same error would happens as the items above.

In this patch, add variable check while adding IED header.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00215870-2: board-mx6 sabreauto fix i2c3 pad settings
Adrian Alonso [Tue, 28 Aug 2012 21:35:20 +0000 (16:35 -0500)]
ENGR00215870-2: board-mx6 sabreauto fix i2c3 pad settings

* Fix i2c3 pad settings, i2c3 conflicts with weim-nor and
  spi-nor only in rev b target boards.
* For rev B targets setup extra pads.
* Fix indentation.

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00215870-1 board-mx6 sabreauto rev B add extra pads
Adrian Alonso [Tue, 28 Aug 2012 21:28:25 +0000 (16:28 -0500)]
ENGR00215870-1 board-mx6 sabreauto rev B add extra pads

* For rev_b target board add extra pads table,
  separate pad definitions from I2C3 pad array

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
11 years agoENGR00222836 Fix Kern BUG during Susp/Resu caused by SPDIF debug code
Nicolin Chen [Fri, 31 Aug 2012 05:54:45 +0000 (13:54 +0800)]
ENGR00222836 Fix Kern BUG during Susp/Resu caused by SPDIF debug code

dump_reg() in msc_spdif.c will cause kernel BUG during Suspend/Resume,
because of calling clk_enable() in an interrupt for playback.

There's also a simular issue in capture case.
Capture'd be stopped after resume for suspending.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00222855 MX6 CPUFREQ: support three VDDSOC setpoints
Robin Gong [Mon, 3 Sep 2012 07:17:01 +0000 (15:17 +0800)]
ENGR00222855 MX6 CPUFREQ: support three VDDSOC setpoints

On MX6Q/DL , there is only two set point of VDDSOC/VDDPU, one is 1.25V(1GHz),
another is 1.175V.  And in arch/arm/plat-mxc/cpufreq.c will judge whether the
current cpu frequency is the highest set point(1G) or not to set the right
VDDSOC/VDDPU. The logic is also match to dynamic ldo bypass function, since the
change point is the highest set point too. But there is three set points of
VDDSOC/VDDPU in MX6SL , so the logic in cpufreq.c need to change. Now
VDDSOC/VDDPU will track with VDDARM fully.

Signed-off-by: Robin Gong <B38343@freescale.com>
11 years agoENGR00215875-2: caam: fix descriptor buffer overrun in hash_digest_key()
Steve Cornelius [Thu, 30 Aug 2012 21:15:39 +0000 (14:15 -0700)]
ENGR00215875-2: caam: fix descriptor buffer overrun in hash_digest_key()

HMAC keys often need to be reduced to under the size of a digest to
be used. The driver does this psuedo-synchronously through the use of
hash_digest_key(), which builds a sequence pointered job descriptor to
perform this function.

When this function built the job descriptor, it correctly accounted for the
number of instructions and number of pointers that would go into its
construction. However, it failed to account for the fact that both the
sequence in and out pointers used extended lengths, adding 8 more bytes to
the required job descriptor. This caused the descriptor to overrun the
allocated buffer by that amount, resulting in memory corruptions.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00215875-1: caam: improve initalization for context state saves
Steve Cornelius [Tue, 14 Aug 2012 22:04:11 +0000 (15:04 -0700)]
ENGR00215875-1: caam: improve initalization for context state saves

Multiple function in asynchronous hashing use a saved-state block,
a.k.a. struct caam_hash_state, which holds a stash of information
between requests (init/update/final). Certain values in this state
block are loaded for processing using an inline-if, and when this
is done, the potential for uninitialized data can pose conflicts.
Therefore, this patch improves initialization of state data to
prevent false assignments using uninitialized data in the state block.

This patch addresses the following traceback, originating in
ahash_final_ctx(), although a problem like this could certainly
exhibit other symptoms:

kernel BUG at arch/arm/mm/dma-mapping.c:465!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 80004000
[00000000] *pgd=00000000
Internal error: Oops: 805 [#1] PREEMPT SMP
Modules linked in:
CPU: 0    Not tainted  (3.0.15-01752-gdd441b9-dirty #40)
PC is at __bug+0x1c/0x28
LR is at __bug+0x18/0x28
pc : [<80043240>]    lr : [<8004323c>]    psr: 60000013
sp : e423fd98  ip : 60000013  fp : 0000001c
r10: e4191b84  r9 : 00000020  r8 : 00000009
r7 : 88005038  r6 : 00000001  r5 : 2d676572  r4 : e4191a60
r3 : 00000000  r2 : 00000001  r1 : 60000093  r0 : 00000033
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: 1000404a  DAC: 00000015
Process cryptomgr_test (pid: 1306, stack limit = 0xe423e2f0)
Stack: (0xe423fd98 to 0xe4240000)
fd80:                                                       11807fd1 80048544
fda0: 88005000 e4191a00 e5178040 8039dda0 00000000 00000014 2d676572 e4191008
fdc0: 88005018 e4191a60 00100100 e4191a00 00000000 8039ce0c e423fea8 00000007
fde0: e4191a00 e4227000 e5178000 8039ce18 e419183c 80203808 80a94a44 00000006
fe00: 00000000 80207180 00000000 00000006 e423ff08 00000000 00000007 e5178000
fe20: e41918a4 80a949b4 8c4844e2 00000000 00000049 74227000 8c4844e2 00000e90
fe40: 0000000e 74227e90 ffff8c58 80ac29e0 e423fed4 8006a350 8c81625c e423ff5c
fe60: 00008576 e4002500 00000003 00030010 e4002500 00000003 e5180000 e4002500
fe80: e5178000 800e6d24 007fffff 00000000 00000010 e4001280 e4002500 60000013
fea0: 000000d0 804df078 00000000 00000000 00000000 00000000 00000000 00000000
fec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
fee0: 00000000 00000000 e4227000 e4226000 e4753000 e4752000 e40a5000 e40a4000
ff00: e41e7000 e41e6000 00000000 00000000 00000000 e423ff14 e423ff14 00000000
ff20: 00000400 804f9080 e5178000 e4db0b40 00000000 e4db0b80 0000047c 00000400
ff40: 00000000 8020758c 00000400 ffffffff 0000008a 00000000 e4db0b40 80206e00
ff60: e4049dbc 00000000 00000000 00000003 e423ffa4 80062978 e41a8bfc 00000000
ff80: 00000000 e4049db4 00000013 e4049db0 00000013 00000000 00000000 00000000
ffa0: e4db0b40 e4db0b40 80204cbc 00000013 00000000 00000000 00000000 80204cfc
ffc0: e4049da0 80089544 80040a40 00000000 e4db0b40 00000000 00000000 00000000
ffe0: e423ffe0 e423ffe0 e4049da0 800894c4 80040a40 80040a40 00000000 00000000
[<80043240>] (__bug+0x1c/0x28) from [<80048544>] (___dma_single_dev_to_cpu+0x84)
[<80048544>] (___dma_single_dev_to_cpu+0x84/0x94) from [<8039dda0>] (ahash_fina)
[<8039dda0>] (ahash_final_ctx+0x180/0x428) from [<8039ce18>] (ahash_final+0xc/0)
[<8039ce18>] (ahash_final+0xc/0x10) from [<80203808>] (crypto_ahash_op+0x28/0xc)
[<80203808>] (crypto_ahash_op+0x28/0xc0) from [<80207180>] (test_hash+0x214/0x5)
[<80207180>] (test_hash+0x214/0x5b8) from [<8020758c>] (alg_test_hash+0x68/0x8c)
[<8020758c>] (alg_test_hash+0x68/0x8c) from [<80206e00>] (alg_test+0x7c/0x1b8)
[<80206e00>] (alg_test+0x7c/0x1b8) from [<80204cfc>] (cryptomgr_test+0x40/0x48)
[<80204cfc>] (cryptomgr_test+0x40/0x48) from [<80089544>] (kthread+0x80/0x88)
[<80089544>] (kthread+0x80/0x88) from [<80040a40>] (kernel_thread_exit+0x0/0x8)
Code: e59f0010 e1a01003 eb126a8d e3a03000 (e5833000)
---[ end trace d52a403a1d1eaa86 ]---

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00222148 [MX6SL]Shrink GPU reserved memory to 32M
Loren Huang [Mon, 3 Sep 2012 01:45:04 +0000 (09:45 +0800)]
ENGR00222148 [MX6SL]Shrink GPU reserved memory to 32M

MX6SL only has 512M memory.Shrinking GPU reserved memory to 32M
can help out of memory issue on MX6SL.This patch will increase
96M system memory, so it will help the case which requests lots
of system memory.Like multiple application running, etc.

And MX6SL doesn't have 3D, 32M is recommended by vivante.

Signed-off-by: Loren Huang <b02279@freescale.com>
11 years agoENGR00222835 MX6x-Fix incorrect enabling/disabling of PLL1
Ranjani Vaidyanathan [Sun, 2 Sep 2012 02:31:02 +0000 (21:31 -0500)]
ENGR00222835 MX6x-Fix incorrect enabling/disabling of PLL1

PLL1 was enabled without incrementing the usecount, and was
thus not getting disabled under certain conditions.
This causes 2 issues:
1. Increases the power.
2. Causes crashes on MX6SL in audio mode as ARM is switched
to PLL1 assuming its in bypass when entering WAIT mode. But PLL1
is enabled and not in bypass state.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00222834 MX6x-A9 prefetcher should not access DDR before IO is restored
Ranjani Vaidyanathan [Sun, 2 Sep 2012 15:32:35 +0000 (10:32 -0500)]
ENGR00222834 MX6x-A9 prefetcher should not access DDR before IO is restored

Add enough nops to suspend code when exiting due to a pending
interrupt. This is required so that we can guarantee that the
prefetch unit will not bring DDR out of self-refresh before
all of the DDR's IO pads are restored.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00222197 MX6 SabreSD:Set pwm backlight max density to 248
Liu Ying [Fri, 31 Aug 2012 09:19:24 +0000 (17:19 +0800)]
ENGR00222197 MX6 SabreSD:Set pwm backlight max density to 248

This patch changes pwm backlight max density from 255 to 248
to workaround Hannstar LVDS panel unstable backlight issue
when density is set to 250 or 251.

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

11 years agoENGR00222157 MX6x-Fix bug in transitioning from low_bus to audio_bus mode.
Ranjani Vaidyanathan [Fri, 31 Aug 2012 03:55:14 +0000 (22:55 -0500)]
ENGR00222157 MX6x-Fix bug in transitioning from low_bus to audio_bus mode.

Ensure that the transtion from low bus freq mode to
audio bus freq mode happens instantly. Don't schedule
the delayed work in this case else there will be a pause
in the audio playback.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00222257 MX6x-Prime TLB entries before DDR enters self-refresh.
Ranjani Vaidyanathan [Sat, 1 Sep 2012 07:06:39 +0000 (02:06 -0500)]
ENGR00222257 MX6x-Prime TLB entries before DDR enters self-refresh.

Need to ensure that no page table walk occurs in DDR when it is in
self refresh and its IO pads are floated during suspend.
Hence we need to make sure that the translation of all the
addresses that the suspend code will access is in the TLB before
DDR cannot be accessed anymore.
So do a dummy read of IOMUX, MMDC, SRC and ANATOP regsiters.
Also need to add a dsb to drain all the write buffers before
DDR enters self-refresh.

Also ensure that the LDO bypass enable is reset if an interrupt
is pending before the system enters suspend.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00222134 MX6x - Fix race-conditions in low power code.
Ranjani Vaidyanathan [Thu, 30 Aug 2012 20:02:32 +0000 (15:02 -0500)]
ENGR00222134 MX6x - Fix race-conditions in low power code.

Fix couple of race-conditions associated with low power IDLE code:
1. Ensure that bus freq mutex is used in the suspend/resume function
2. Ensure that the usecount of pll2 is incremented/decremented when
ARM is switched to run from PLL2_PFD_400. And PLL2 is enabled/disabled
when necessary.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00222133 MX6SL - Fix crashes caused by Low power IDLE support
Ranjani Vaidyanathan [Thu, 30 Aug 2012 19:45:10 +0000 (14:45 -0500)]
ENGR00222133 MX6SL - Fix crashes caused by Low power IDLE support

Need to ensure that the ARM_CLK rate stays exactly the same
when moving ARM_CLK from PLL2_PFD_400 to PLL1 when system
enters 24MHz state. Also need to ensure that PLL1 is enabled
before relocking the PLL to the correct rate.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00221370 IPUv3:Clean up IPUv3 interrupt handler
Liu Ying [Thu, 30 Aug 2012 01:39:59 +0000 (09:39 +0800)]
ENGR00221370 IPUv3:Clean up IPUv3 interrupt handler

1) In the interrupt handler, we access sync interrupt
   control registers 2 times, and each time with spin
   lock being held and then released, which may cause
   potential racing on the registers. We see that
   as long as the racing happens with two displays
   enabled on the same IPU, one IPU display channel
   will lose EOF interrupt and it makes its fb's pan
   display ioctrl fail with timeout. This patch changes
   to hold the spin lock one time for the whole irq
   handler, as the handler should return quickly.
   Holding and releasing the spin lock unnecessarily
   may bring performance penalty as well.
2) We do not need to use spin_lock_irqsave() and
   spin_unlock_irqrestore() in the interrupt handler,
   as we are already in the hard irq context. Using
   spin_lock() and spin_unlock() is enough to protect
   the registers.
3) Clear an interrupt control bit as soon as its related
   handler finishes.

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

11 years agoENGR00221983 IPUv3:Correct ERR and SYNC interrupt line numbers
Liu Ying [Thu, 30 Aug 2012 01:33:01 +0000 (09:33 +0800)]
ENGR00221983 IPUv3:Correct ERR and SYNC interrupt line numbers

As we define ERR interrupt with 0 irq resource id and SYNC
interrupt with 1 irq resource id in platform-imx_ipuv3.c,
we wrongly assign them in IPUv3 driver.

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

11 years agoENGR00221218: imx6: remove redundant spi define
Robby Cai [Fri, 24 Aug 2012 09:40:59 +0000 (17:40 +0800)]
ENGR00221218: imx6: remove redundant spi define

There're two imx6q_add_ecspi() defines, remove one.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00222005 mfgtool can't work on mx6sl evk board
Tony LIU [Thu, 30 Aug 2012 06:22:30 +0000 (14:22 +0800)]
ENGR00222005 mfgtool can't work on mx6sl evk board

- add imx6s_updater_defconfig to generate mx6sl firmware
- add CONFIG_MACH_MX6SL_EVK=y
- remove SMP for mx6sl
- add CONFIG_MX6_INTER_LDO_BYPASS=y

Signed-off-by: Tony LIU <junjie.liu@freescale.com>
11 years agoENGR00221975 Fix race condition in clock code.
Ranjani Vaidyanathan [Wed, 29 Aug 2012 22:05:11 +0000 (17:05 -0500)]
ENGR00221975 Fix race condition in clock code.

Need to ensure that check for usecount in clk_set_parent
occurs within the protection of the clock mutex. Else
there is a chance that the usecount can be decremented
(and the clock disabled) after the check.
Also add back the code to maintain the correct usecount
for pll2_pfd_400.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00221974 MX6SL-Fix system hang/crash issue in low power IDLE
Ranjani Vaidyanathan [Wed, 29 Aug 2012 19:46:02 +0000 (14:46 -0500)]
ENGR00221974 MX6SL-Fix system hang/crash issue in low power IDLE

Ensure that the pull-up is enabled when the DQS line of LPDDR2
is floated when DDR freq is dropped to 24MHz. This is required
else its possible that the DDR will latch incorrect data when it
exits self-refresh.
CKE line should not be floated as it may cause DDR to incorrectly
exit self-refresh mode.

Also add 25 nops after the code that removes DDR from self-refresh.
We need this to ensure that the prefetcher block in A9 does not
access any instruction from DDR before the DDR exits self-refresh.
The A9 prefetch depth is about 23, hence 25 nops.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00221970 MX6SL:Fix suspend/resume issue on MX6SLEVK
Ranjani Vaidyanathan [Wed, 29 Aug 2012 19:38:03 +0000 (14:38 -0500)]
ENGR00221970 MX6SL:Fix suspend/resume issue on MX6SLEVK

Make sure the Pull Ups are enabled on the DQS lines of
LPDDR2 memory. Without that its possible that the data
latched by the memory will be incorrect when exiting from
self-refresh mode. So only set the drive strengths to 0
when floating the DDR IO pads before entering suspend.

Also never float the CKE pad, this pin always needs to be
driven, else the DDR may incorrectly exit self-refresh.
Hence remove the line that was setting CKE drive strength
to zero (GRP_CTLDS).

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00221902 [MX6]Fix udelay inaccurate issue during suspend/resume
Anson Huang [Wed, 29 Aug 2012 19:10:07 +0000 (03:10 +0800)]
ENGR00221902 [MX6]Fix udelay inaccurate issue during suspend/resume

When system enter suspend, we increase CPUFreq to the highest point
without update the global loops_per_jiffy, it will lead to udelay
inaccurate during the last phase of suspend/resume.

WB counter and RBC counter need at least two 32K cycles to finish,
here we add 80us for safe.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00221867 sabresd : support adjust VDDSOC if enable LDO bypass
Robin Gong [Wed, 29 Aug 2012 08:08:01 +0000 (16:08 +0800)]
ENGR00221867 sabresd : support adjust VDDSOC if enable LDO bypass

support adjust VDDSOC if enable LDO bypass on mx6_sabresd board
Signed-off-by: Robin Gong <B38343@freescale.com>
11 years agoENGR00221716-02 Mx6 USB host: add port speed define MACRO to arc_otg.h
make shi [Wed, 29 Aug 2012 09:53:38 +0000 (17:53 +0800)]
ENGR00221716-02 Mx6 USB host: add port speed define MACRO to arc_otg.h

Add port speed define MACRO to arc_otg.h.

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00221716-01 Mx6 USB host: set disconnect bit should wait for resume finished
make shi [Tue, 28 Aug 2012 09:12:07 +0000 (17:12 +0800)]
ENGR00221716-01 Mx6 USB host: set disconnect bit should wait for resume finished

For i.MX6DLTO1.1 and i.MX6DQTO1.2, the disconnection-bit can only be set after
the resume finished, otherwise, the remote-wake-up may fail. Because if the
device not switch to High-Speed 45ohm termination resistors mode, when the
disconnection  detection bit is set the disconnection detection circuit will
detect a high speed disconnection by mistake.

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00182456-3 HDMI VIDEO: abort audio when unblank and plugout
Chen Liangjun [Tue, 21 Aug 2012 09:28:50 +0000 (17:28 +0800)]
ENGR00182456-3 HDMI VIDEO: abort audio when unblank and plugout

In this patch:

1. Close audio PCM stream when video unblank and plugout event happens.
2. Set HDMI cable and blank state into HDMI core driver when
plug/unplug, blank/unblank events happens.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00182456-2 HDMI AUDIO: register/unregister when audio pcm open/close
Chen Liangjun [Tue, 21 Aug 2012 09:26:24 +0000 (17:26 +0800)]
ENGR00182456-2 HDMI AUDIO: register/unregister when audio pcm open/close

In this patch:

1. Register substream into HDMI core driver when HDMI audio PCM is open.
2. Unregister substream out of HDMI core driver when HDMI audio PCM is
close.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00182456-1 HDMI: Add interface for HDMI audio management
Chen Liangjun [Tue, 21 Aug 2012 09:25:36 +0000 (17:25 +0800)]
ENGR00182456-1 HDMI: Add interface for HDMI audio management

In this patch, add support for:

1. Interface for HDMI audio to register PCM into HDMI core driver.
2. Interface for HDMI video driver to stop HDMI audio
3. Interface for HDMI video driver to inform the state of HDMI cable and
state of HDMI blank.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00221643 [MX6]Fix race condition of pfd 400 usecount
Anson Huang [Tue, 28 Aug 2012 09:43:01 +0000 (17:43 +0800)]
ENGR00221643 [MX6]Fix race condition of pfd 400 usecount

We can't modify the usecount of pfd 400M clock when ARM freq
is changed, as when the children of pfd 400M do clock enable/disable,
they will also modify this usecount, these two modification is
out of same lock protection. And this wrong usecount may lead to
pfd 400M or pll2 disabled accidently, and it will cause system hang!

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00221438 [MX6]Adjust CPU setpoint according to datasheet
Anson Huang [Sat, 25 Aug 2012 08:39:06 +0000 (16:39 +0800)]
ENGR00221438 [MX6]Adjust CPU setpoint according to datasheet

1. Adjust ARM/SOC/PU voltage according to latest datasheet;
2. Remove Rigel's 200M setpoint to align with Arik.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00221298 Fix tuner clock frequency on SSI
Alejandro Sierra [Tue, 28 Aug 2012 15:43:53 +0000 (10:43 -0500)]
ENGR00221298 Fix tuner clock frequency on SSI

Fix clock frequency configuration on SSI
interface for the Tuner driver.

Signed-off-by: Alejandro Sierra <b18039@freescale.com>
11 years agoENGR00221689 wm8962: add wait time after enable power supply
Gary Zhang [Tue, 28 Aug 2012 09:15:42 +0000 (17:15 +0800)]
ENGR00221689 wm8962: add wait time after enable power supply

add 100ms wait time after enable power supply for
power stability

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00221302 [MX6SL_ARM2/EVK]: VDDSOC adjust if use LDO bypass
Robin Gong [Mon, 27 Aug 2012 02:47:10 +0000 (10:47 +0800)]
ENGR00221302 [MX6SL_ARM2/EVK]: VDDSOC adjust if use LDO bypass

The function has been implement in LDO enable , but not in LDO bypass.
Implement it on mx6sl.
Signed-off-by: Robin Gong <B38343@freescale.com>
11 years agoENGR00221457 MX6DL clock:Set PLL3_PFD_540M to 540MHz
Liu Ying [Mon, 27 Aug 2012 05:53:50 +0000 (13:53 +0800)]
ENGR00221457 MX6DL clock:Set PLL3_PFD_540M to 540MHz

This patch sets PLL3_PFD_540M clock frequency to 540MHz
so that IPU and VPU clock can reach 270MHz.

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

11 years agoENGR00221450 imx6 thermal: add sys_close() in cooling device
Rong Dian [Mon, 27 Aug 2012 03:27:06 +0000 (11:27 +0800)]
ENGR00221450 imx6 thermal: add sys_close() in cooling device

add sys_close() to close opened file in cooling device

Signed-off-by: Rong Dian <b38775@freescale.com>
11 years agoENGR00221197-2 Update gpu driver to check Soc temperature
Loren HUANG [Fri, 24 Aug 2012 02:05:30 +0000 (10:05 +0800)]
ENGR00221197-2 Update gpu driver to check Soc temperature

-Update gpu driver to check the SoC temperature, if the thermal_hot flag
is set by thermal driver. GPU3D clock will be slown down to the minimum
 value, the clock will be recovery when the flag is cleared by thermal driver.
-This patch depends on ENGR00220848, without it, kernel build can't pass.

Signed-off-by: Loren HUANG <b02279@freescale.com>
Acked-by: Lily Zhang
11 years agoENGR00221197-1 imx6 thermal: clear thermal hot variable in cooling device
Rong Dian [Thu, 23 Aug 2012 07:34:00 +0000 (15:34 +0800)]
ENGR00221197-1 imx6 thermal: clear thermal hot variable in cooling device

clear thermal hot variable in cooling device when thermal temperature
falls then to get out of THERMAL_TRIP_HOT state

Signed-off-by: Rong Dian <b38775@freescale.com>
11 years agoENGR00221444 HDMI: video mode wrong when bootup without HDMI cable
Sandor Yu [Mon, 27 Aug 2012 02:25:02 +0000 (10:25 +0800)]
ENGR00221444 HDMI: video mode wrong when bootup without HDMI cable

Bootup Android without HDMI cable plugin, then plugin HDMI cable,
video mode in /sys/class/graphics/fb0/mode not same as actually
HDMI work video mode.

The root cause is in video mode point to one of video mode in
original video modelist, but the modelist will be updated when
HDMI cable plug to new monitor.
If HDMI original worked video mode can work on new monitor,
the HDMI and framebuffer will not updated, so HDMI actually
work mode not same as /sys/class/graphics/fb0/mode

Updated fbi mode pointer even if video mode no changed
in case moselist is updated, the issue will fixed.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00221445 ov5642: return error number when change camera mode
Yuxi Sun [Mon, 27 Aug 2012 01:58:30 +0000 (09:58 +0800)]
ENGR00221445 ov5642: return error number when change camera mode

return error number when set camera change mode fail, if not the
driver may continue to setup the video processing with wrong parameter.

Signed-off-by: Yuxi Sun <b36102@freescale.com>
11 years agoENGR00221161 [MX6SL]- Add audio bus freq mode support.
Ranjani Vaidyanathan [Wed, 22 Aug 2012 18:26:11 +0000 (13:26 -0500)]
ENGR00221161 [MX6SL]- Add audio bus freq mode support.

Set DDR to 50MHz in low power audio playback.
AHB/AXI are at 24MHz.
Also fix correct usecount for PLL1 main clock. If not
it causes issues when pll1_sw_clk's parent is changed.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00221440 MX6x-Fix race-condition in checking bus_freq variables
Ranjani Vaidyanathan [Sat, 25 Aug 2012 05:14:51 +0000 (00:14 -0500)]
ENGR00221440 MX6x-Fix race-condition in checking bus_freq variables

Checking of the bus_freq variables and changing of the
bus/ddr frequency should be done under one mutex.
Else there is a race-condition that the variable changed
just after it was checked.
Also ensure that the bus freq is always increased before
the cpu freq is set to anything other than the lowest setpoint.
Else there is a possibility that the ARM is set to run from
PLL1 at higher frequency when bus/DDR are still at 24MHz.
This is dangerous since when system enters WAIT mode in
low bus freq state, PLL1 is set to bypass when ARM is being
sourced from it.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00221441 MX6SL - Update voltages based on the latest datasheet.
Ranjani Vaidyanathan [Sun, 26 Aug 2012 05:54:33 +0000 (00:54 -0500)]
ENGR00221441 MX6SL - Update voltages based on the latest datasheet.

Add a new working point table to MX6SL and set the voltages
according to the latest datasheet.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00220796-3: imx6sl arm2/evk: Add platform_device for V4L2 support
Robby Cai [Tue, 21 Aug 2012 05:46:43 +0000 (13:46 +0800)]
ENGR00220796-3: imx6sl arm2/evk: Add platform_device for V4L2 support

Add platform device for V4L2 support

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00220796-2: v4l2 imx6sl: Add V4L2 driver support
Robby Cai [Mon, 20 Aug 2012 12:26:17 +0000 (20:26 +0800)]
ENGR00220796-2: v4l2 imx6sl: Add V4L2 driver support

Add V4L2 support -- driver part.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00220796-1: pxp: Add stride configuration for some pixel format
Robby Cai [Fri, 24 Aug 2012 08:43:13 +0000 (16:43 +0800)]
ENGR00220796-1: pxp: Add stride configuration for some pixel format

Set correct PITCH (aka, stride) for AS, PS, Output buffer.
This is needed for V4L2.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00219933 CS42888: abort delay powerdown if codec is on
Chen Liangjun [Fri, 24 Aug 2012 04:32:36 +0000 (12:32 +0800)]
ENGR00219933 CS42888: abort delay powerdown if codec is on

CS42888 driver own 2 codec_dai for ESAI and ASRC P2P use. Due to the
delay power down mechanism, if a ASRC P2P stream is played right after
a finish of ESAI stream playback, ASRC P2P stream would be stop.

In this patch, do nothing in the delay powerdown flow if CS42888
codec is on.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00221203-2 IPU Device: replace BUG macro with error message
Wayne Zou [Thu, 23 Aug 2012 08:28:39 +0000 (16:28 +0800)]
ENGR00221203-2 IPU Device: replace BUG macro with error message

Replace BUG macro with error message

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00221203-1 IPU Device: Avoid release resource twice when timeout
Wayne Zou [Thu, 23 Aug 2012 06:54:46 +0000 (14:54 +0800)]
ENGR00221203-1 IPU Device: Avoid release resource twice when timeout

Avoid release resource twice when timeout happen.

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00221317-02 Mx6 USB host: set stop_mode_config when any USB host enabled
make shi [Fri, 24 Aug 2012 05:53:49 +0000 (13:53 +0800)]
ENGR00221317-02 Mx6 USB host: set stop_mode_config when any USB host enabled

The Mx6 phy sometimes work abnormally after system suspend/resume if the 1V1
is off. So we should keep the 1V1 active during the system suspend if any USB
host enabled.
- Add stop_mode_config to 1 with refcount
- Add mutex to protect the refcount and HW_ANADIG_ANA_MISC0 register
- If stop_mode_config is set as 1, the otg  vbus wakeup system will be supported

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00221317-01 Mx6 USB host: set stop_mode_config when any USB host enabled
make shi [Fri, 24 Aug 2012 05:52:38 +0000 (13:52 +0800)]
ENGR00221317-01 Mx6 USB host: set stop_mode_config when any USB host enabled

MSL headfile part change.

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00221277 MX6DL/S - Set AXI clock to 270MHz
Ranjani Vaidyanathan [Fri, 24 Aug 2012 03:57:50 +0000 (22:57 -0500)]
ENGR00221277 MX6DL/S - Set AXI clock to 270MHz

Change AXI_CLK to be sourced from PLL3_PFD1_540MHz, so that it
can run at 270MHz on MX6DL/S. This is required for improving
VPU performance.
Change AXI_CLK to be sourced from  periph_clk just before the DDR
freq  is going to be dropped to 24MHz/50MHz. Change it back
to PLL3_PFD1_540 when the DDR freq is back at 400MHz.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00221177 ESAI ASRC: add mutex protection between ESAI and ASRC P2P
Chen Liangjun [Thu, 23 Aug 2012 04:30:57 +0000 (12:30 +0800)]
ENGR00221177 ESAI ASRC: add mutex protection between ESAI and ASRC P2P

ESAI playback and ASRC P2P playback use difference codec_dai while using
the same codec. Thus they can't work together.

In this patch, add mutual protection between ESAI playback and ASRC P2P
playback.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00221281 [MX6X] Fix BogoMIPS value is not correct
Nancy Chen [Thu, 23 Aug 2012 21:38:48 +0000 (16:38 -0500)]
ENGR00221281 [MX6X] Fix BogoMIPS value is not correct

[MX6X] Fix BogoMIPS value is not correct

Signed-off-by: Nancy Chen <Nancy.Chen@freescale.com>
11 years agoENGR00221217 usb: device: fix usb_state incorrect problem after pc sends resume
Peter Chen [Thu, 23 Aug 2012 08:29:55 +0000 (16:29 +0800)]
ENGR00221217 usb: device: fix usb_state incorrect problem after pc sends resume

At pc sends suspend/resume case, the udc_controller->usb_state should
keep unchange during the suspend/resume process, at former code, the
fsl_udc_resume set udc_controller->usb_state to USB_STATE_ATTACHED
unconditionally. In fact, USB_STATE_ATTACHED stands for initial state
and should be set when we try to run controller.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00221131: imx6sl arm2/evk: add mma8450q accelerometer support
Robby Cai [Wed, 22 Aug 2012 13:47:59 +0000 (21:47 +0800)]
ENGR00221131: imx6sl arm2/evk: add mma8450q accelerometer support

mma8450q on E-INK DC3 boards, with i2c address 0x1c on I2C1.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00221214 MX6Q/DL SabreSD: avoid pop-noise on audio pads
Gary Zhang [Thu, 23 Aug 2012 08:04:49 +0000 (16:04 +0800)]
ENGR00221214 MX6Q/DL SabreSD: avoid pop-noise on audio pads

config audio pads to avoid pop-noise

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00221185: mmc: sdhci: change info level when data preparation is invalid
Ryan QIAN [Thu, 23 Aug 2012 05:02:29 +0000 (13:02 +0800)]
ENGR00221185: mmc: sdhci: change info level when data preparation is invalid

- invalid data preparation is a reasonable path, so no need to set to
WARNING level, change it to DEBUG level.

Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00221102-2 MX6Q: increase VPU frequence to 352Mhz
Robin Gong [Thu, 23 Aug 2012 03:45:22 +0000 (11:45 +0800)]
ENGR00221102-2 MX6Q: increase VPU frequence to 352Mhz

Increase VPU frequency to 352Mhz for TV box, use pll2_pfd_400M.To avoid impact
other code which assume ARM clock sourcing from pll2_pfd_400M, change cpu
setpoint of 396M to 352M. and disable bus freq adjust.
add CONFIG_MX6_VPU_352M to choose it, default is disabled.
Signed-off-by: Robin Gong <B38343@freescale.com>
11 years agoENGR00221102-1 MX6Q: increase VPU frequence to 352Mhz
Robin Gong [Thu, 23 Aug 2012 03:43:45 +0000 (11:43 +0800)]
ENGR00221102-1 MX6Q: increase VPU frequence to 352Mhz

Increase VPU frequency to 352Mhz for TV box, use pll2_pfd_400M.To avoid impact
other code which assume ARM clock sourcing from pll2_pfd_400M, change cpu
setpoint of 396M to 352M. and disable bus freq adjust.
add CONFIG_MX6_VPU_352M to choose it, default is disabled.

Signed-off-by: Robin Gong <B38343@freescale.com>
11 years agoENGR00221164 usb: device: fix calling mutex at atomic environment
Peter Chen [Thu, 23 Aug 2012 02:49:12 +0000 (10:49 +0800)]
ENGR00221164 usb: device: fix calling mutex at atomic environment

Move spin_unlock_irqrestore to avoid calling mutex at atomic
environment, as dr_wake_up_enable will call mutex_lock

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00220989 [MX6SL]: DDR Controller measure unit workaround
Nancy Chen [Tue, 21 Aug 2012 21:07:49 +0000 (16:07 -0500)]
ENGR00220989 [MX6SL]: DDR Controller measure unit workaround

[MX6SL]MMDC: DDR Controller's measure unit may return an incorrect
value when operating below 100 MHz

Signed-off-by: Nancy Chen <Nancy.Chen@freescale.com>
11 years agoENGR00220538 HDMI: Clock mismatch in suspend&resume when video playback
Sandor Yu [Wed, 22 Aug 2012 02:57:50 +0000 (10:57 +0800)]
ENGR00220538 HDMI: Clock mismatch in suspend&resume when video playback

In suspend/resume and HDMI plugin/plugout stress test,
sometimes fbcon will call fb_set_par with
parameter fb_var_screeninfo that xres anfd yres is zero.
MX frame buffer driver can not correct handle this casue,
it will cause IPU pixel clock gating/ungating mismatch.

Check fb_var_screeninfo parameter in mxcfb_check_var and
mxcfb_set_par function, returned if xres,yres zero.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00220696 [MX6SL]-Reduce IDLE mode power consumption.
Ranjani Vaidyanathan [Wed, 8 Aug 2012 19:56:15 +0000 (14:56 -0500)]
ENGR00220696 [MX6SL]-Reduce IDLE mode power consumption.

When ARM enters WFI in low power IDLE state, float the DDR
IO pins to drop the power on the VDDHIGH rail.
Need to run WFI code from IRAM since DDR needs to be
put into self-refresh before changing the IO pins.
Drop AHB to 8MHz and DDR to 1MHz when ARM is in WFI when
in IDLE state.
Set IPG_PERCLK to run at 3MHz, since we want to maintain a
1:2.5 ratio between PERCLK to AHB_CLK.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00221012 IPU: Clean up dead code
Wayne Zou [Wed, 22 Aug 2012 02:22:42 +0000 (10:22 +0800)]
ENGR00221012 IPU: Clean up dead code

IPU: Clean up dead code

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00219601-02: mmc: sdhci: revise pre_req & post_req to improve performance
Ryan QIAN [Tue, 7 Aug 2012 06:21:11 +0000 (14:21 +0800)]
ENGR00219601-02: mmc: sdhci: revise pre_req & post_req to improve performance

Test Env:
1. MX6DL SabreSD board.
2. On board eMMC (Sandisk: SDIN5C2-8G) running at 8-bit DDR @ 52MHz.
3. Test commands:
  3.1 Writing command:
  # dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=100 conv=fsync
  3.2 Reading command:
  # echo 1 > /proc/sys/vm/drop_caches
  # echo 1 > /proc/sys/vm/drop_caches
  # sleep 1
  # dd if=/dev/mmcblk0 of=/dev/null bs=1M count=100

Performance result with this patch:
-------------------------------------------------------
| CPU freq | SDMA (512KB) | SDMA (64KB) |    ADMA     |
|----------+--------------+-------------+-------------|
|   1Ghz   |  ~11MB/s (w) | ~5MB/s (w)  | ~11MB/s (w) |
|          |  ~25MB/s (r) | ~25MB/s (r) | ~23MB/s (r) |
|----------+--------------+-------------+-------------|
|  200Mhz  |  ~8MB/s (w)  | ~5MB/s (w)  | ~9MB/s (w)  |
|          |  ~16MB/s (r) | ~20MB/s (r) | ~13MB/s (r) |
-------------------------------------------------------

Performance result without this patch:
-------------------------------------------------------
| CPU freq | SDMA (512KB) | SDMA (64KB) |    ADMA     |
|----------+--------------+-------------+-------------|
|   1Ghz   |  ~10MB/s (w) | ~5MB/s (w)  | ~10MB/s (w) |
|          |  ~22MB/s (r) | ~23MB/s (r) | ~22MB/s (r) |
|----------+--------------+-------------+-------------|
|  200Mhz  |  ~8MB/s (w)  | ~4MB/s (w)  | ~8MB/s (w)  |
|          |  ~13MB/s (r) | ~16MB/s (r) | ~11MB/s (r) |
-------------------------------------------------------

Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00219601-01: mmc: queue: enlarge the size of bounce buffer for SDMA.
Ryan QIAN [Thu, 2 Aug 2012 01:46:53 +0000 (09:46 +0800)]
ENGR00219601-01: mmc: queue: enlarge the size of bounce buffer for SDMA.

- set bounce buffer to 512KB from 64K, which is hw max seg size for
fsl sd host controller
- by enlarging the size of bounce buffer, it will reduce the number
of irq on writing by merging small requests into a large one, which
will improve writing throughput.
- the side effect is that the reading throughput of 512KB bounce buffer
is lower than the one of 64KB bounce buffer, when cpu freq is at 200Mhz.

Test Env:
1. MX6DL SabreSD board
2. On board eMMC (Sandisk: SDIN5C2-8G) running at 8-bit DDR @ 52Mhz
3. Test commands:
  3.1 Writing test command:
  # dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=100 conv=fsync
  3.2 Reading test command:
  # echo 1 > /proc/sys/vm/drop_caches
  # echo 1 > /proc/sys/vm/drop_caches
  # sleep 1
  # dd if=/dev/mmcblk0 of=/dev/null bs=1M count=100

Performance result:
-------------------------------------------------------
| CPU freq | SDMA (512KB) | SDMA (64KB) |    ADMA     |
|----------+--------------+-------------+-------------|
|   1Ghz   |  ~10MB/s (w) | ~5MB/s (w)  | ~10MB/s (w) |
|          |  ~22MB/s (r) | ~23MB/s (r) | ~22MB/s (r) |
|----------+--------------+-------------+-------------|
|  200Mhz  |  ~8MB/s (w)  | ~4MB/s (w)  | ~8MB/s (w)  |
|          |  ~13MB/s (r) | ~16MB/s (r) | ~11MB/s (r) |
-------------------------------------------------------

Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00220734 IPUv3 fb:Rewind eof irq sync mechanism back
Liu Ying [Mon, 20 Aug 2012 05:59:40 +0000 (13:59 +0800)]
ENGR00220734 IPUv3 fb:Rewind eof irq sync mechanism back

This patch changes to use original sync mechanism for eof
irq, which may improve pan-display or alpha buffer update
performance.
1) Initialize flip_completion and alpha_flip_completion
only once when fb is initialized instead of initializing
it every time when pan display is called.
2) Clear and enable eof irq after selecting buffer ready.
In this way, we have no chance to lose an interrupt, as
selecting a new buffer ready doesn't make the eof irq
come(from the newly selected buffer) before we clear the irq
status and enable the irq. Otherwise, if we clear the irq
status and enable the irq before we doing down in pan-display
or alpha buffer update, we have chance(users call pan-display or
alpha buffer update faster than vsync frequency and blocks at
down()) to clear an unhandled irq, which may cause performance
issue.

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

11 years agoENGR00220776 mx6dl_arm2: ECSPI pin config overlaped by epdc
Robin Gong [Mon, 20 Aug 2012 11:24:28 +0000 (19:24 +0800)]
ENGR00220776 mx6dl_arm2: ECSPI pin config overlaped by epdc

ECSPI pin MX6DL_PAD_EIM_D17__ECSPI1_MISO is configured overlap by epdc
MX6DL_PAD_EIM_D17__GPIO_3_17, so that SPI-NOR flash can't work normally.
From schematic of ARM2 board, epdc and spi share this pin if plug epdc
daughter board. But SPI-NOR is on ARM2 mother board, so it should be config
well firstly. So we make sure SPI-NOR work successfully by default. But if
enable epdc , SPI-NOR on ARM2 will work fail.

Signed-off-by: Robin Gong <B38343@freescale.com>
11 years agoENGR00220913 LDB: disable LDB DI clock when suspend
Wayne Zou [Mon, 20 Aug 2012 04:50:12 +0000 (12:50 +0800)]
ENGR00220913 LDB: disable LDB DI clock when suspend

Disable LDB DI clock when suspend.

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00179425 HDMI: Sometime HDMI EDID read failed
Sandor Yu [Tue, 21 Aug 2012 08:49:28 +0000 (16:49 +0800)]
ENGR00179425 HDMI: Sometime HDMI EDID read failed

EDID read will failed sometimes on some boards.
Read EDID twice if first one failed.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00220833 mx6sl: USB hsic: enable mx6sl hsic function
make shi [Tue, 21 Aug 2012 09:51:18 +0000 (17:51 +0800)]
ENGR00220833 mx6sl: USB hsic: enable mx6sl hsic function

- Set MX6SL_PAD_HSIC_DAT and MX6SL_PAD_HSIC_STROBE pad DDR attribute as DDR3
- Add imx6sl_add_fsl_ehci_hs and imx6sl_add_fsl_usb2_hs_wakeup in usb_h2.c

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00220884 uart: quit the early uart console as late as possible
Huang Shijie [Tue, 21 Aug 2012 08:21:41 +0000 (16:21 +0800)]
ENGR00220884 uart: quit the early uart console as late as possible

If we use the late_initcall(), then there is a time slot between
the exit of early uart console and the real console:

      -->late_initcall(mxc_early_uart_console_disable)
......
      -->imx_startup()

In this time slot, the clock will be closed, so the log printed during
the time slot is buffered, this is why we can not see the NFS's log.

Change the late_initcall() to late_initcall_sync() which eliminates the
time slot.

Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoENGR00220370 [MX6]Fix BUS freq suspend/resume fail in low bus mode
Anson Huang [Sat, 18 Aug 2012 17:12:59 +0000 (01:12 +0800)]
ENGR00220370 [MX6]Fix BUS freq suspend/resume fail in low bus mode

1. BUS freq's set low bus setpoint using delat work, which
didn't have mutex lock, so in some scenarios, set high bus
freq function can be called at the same time, we need to move
mutex lock into these two routine;

2. Using pm notify to make sure bus freq set to high setpoint
before supend and restore after resume.

3. Clear build warning.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00220848 imx6 thermal: export thermal hot variable for GPU
Rong Dian [Tue, 21 Aug 2012 07:07:42 +0000 (15:07 +0800)]
ENGR00220848 imx6 thermal: export thermal hot variable for GPU

export thermal hot variable for GPU

Signed-off-by: Rong Dian <b38775@freescale.com>
11 years agoENGR00220794 imx6 thermal: add suspend and resume for thermal_sys class
Rong Dian [Mon, 20 Aug 2012 12:23:00 +0000 (20:23 +0800)]
ENGR00220794 imx6 thermal: add suspend and resume for thermal_sys class

1.Avoiding system wrong reboot caused by error temperature without
cancel_delayed_work before entering into suspend,so to cancel
thermal_zone_device temperature polling temperature delayed_work
before entering into suspend, reenable polling temperature delayed_work
after entering into resume.
2.In anatop_thermal_suspend, turn off alarm firstly

Signed-off-by: Rong Dian <b38775@freescale.com>
11 years agoENGR00218789 mx6: clock: keep PLL3 enable and power bit all the time
make shi [Tue, 14 Aug 2012 07:02:00 +0000 (15:02 +0800)]
ENGR00218789 mx6: clock: keep PLL3 enable and power bit all the time

In order to support USB remote wake up, we should keep the PLL3 enable
and power bit all the time. We use BM_ANADIG_ANA_MISC2_CONTROL0 to control
the PLL3 power off PLL3's power when PLL3 is not used by other module.

PLL3 power design logic as below:
usb1_pll_480_ctrl_power_int=hw_anadig_usb1_pll_480_ctrl_power && ((disable_480_p
ll_n && ~hw_anadig_ana_misc2_control0 )||pwrctl_otg_wakeup || utmi_otg_suspendm)
There are two basic case:
- If USB is active and USB remote wakeup happen , Pll3 will be turn on.
- If USB is not active and no remote wakeup happen, the PLL3 will be controlled
  by hw_anadig_ana_misc2_control0 bit.

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00220818 [MX6SL] - Ensure the Enable bit is set for all the PLLs.
Ranjani Vaidyanathan [Mon, 20 Aug 2012 18:35:07 +0000 (13:35 -0500)]
ENGR00220818 [MX6SL] - Ensure the Enable bit is set for all the PLLs.

The ENABLE bit is not set for all PLLs by default. Ensure
that the pll_enable() function sets this bit for all PLLs.
The pll_disable() function should not clear this bit
for PLL1, PLL2, PLL3 and PLL7. The output of these PLLs
maybe used even if they are bypassed.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00217687 [MX6SL_ARM2/EVK] Fix no perfmon directory
Eric Sun [Mon, 20 Aug 2012 12:51:25 +0000 (20:51 +0800)]
ENGR00217687 [MX6SL_ARM2/EVK] Fix no perfmon directory

The problem is caused because the board init routine don't add the
corresponding device node. Problem resolved after add them

Signed-off-by: Eric Sun <jian.sun@freescale.com>
11 years agoENGR00220732-1 Remove clk_disable in VPU driver interrupt handling
Hongzhang Yang [Mon, 20 Aug 2012 08:11:21 +0000 (16:11 +0800)]
ENGR00220732-1 Remove clk_disable in VPU driver interrupt handling

Original design is VPU lib API StartOneFrame() enables clock, and VPU
driver disables clock after codec done interrupt has been received.
However there are known issues of interrupt handling as below:
- VPU interrupt handling callback is not scheduled in time causing work
  queue overflow
- JPU done interrupt is not received because JPU issues it while JPU
  buffer empty interrupt is still being served
- VPU finishes a frame (!vpu_IsBusy) but VPU done interrupt is not
  received

All above will cause clk_disable in interrupt handling not called,
thus VPU clock count increases by 1.
So I plan to resolve clock unbalance issue first by removing
clk_disable from VPU driver interrupt handling. Interrupt problem
will not affect clock issue any longer.

1.    Driver: remove clk_disable from vpu_worker_callback
2.1.  Lib: remove clk_enable from API GetOutputInfo
2.2.  Lib: avoid disabling VPU clock when VPU is busy in SWReset
3.    Test: replace GetOutputInfo with SWReset in decoder_close /
      encoder_close

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
11 years agoENGR00220567 [MX6 SABRELite] No mxs-perfmon.0 directory
Eric Sun [Mon, 20 Aug 2012 06:05:59 +0000 (14:05 +0800)]
ENGR00220567 [MX6 SABRELite] No mxs-perfmon.0 directory

The problem is caused because "mx6_sabrelite_board_init" don't add the
corresponding device node. Problem resolved after add them.

Signed-off-by: Eric Sun <jian.sun@freescale.com>
11 years agoENGR00220446 ESAI: channel swapped occasionally when playing stereo wav
Lionel Xu [Fri, 17 Aug 2012 08:06:32 +0000 (16:06 +0800)]
ENGR00220446 ESAI: channel swapped occasionally when playing stereo wav

There is channel swap happened when playing stereo wav. According to the spec,
the initial words should be written to the ETDR register, at least one word
per enabled transmitter slot, to avoid any potential problem.

Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
11 years agoENGR00220707 MX6Q/MX6DL: Fix build break due to MX6SL LPM code
Ranjani Vaidyanathan [Sat, 18 Aug 2012 15:07:20 +0000 (10:07 -0500)]
ENGR00220707 MX6Q/MX6DL: Fix build break due to MX6SL LPM code

Fix build break due to missing extern.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00220706 IPU Add more timeout when wait for the csi end of frame
Yuxi Sun [Sat, 18 Aug 2012 06:43:26 +0000 (14:43 +0800)]
ENGR00220706 IPU Add more timeout when wait for the csi end of frame

If this timeout is too small, it can't meet the require of some large
frame such as 2592x1944 and 1080p, and the IDMAC maybe in a chaotic
state, so at last access some invalid space caused the system hang.

Signed-off-by: Yuxi Sun <b36102@freescale.com>
11 years agoENGR00220705 v4l2 overlay: Cancel the work structure schedule at overlay stop
Yuxi Sun [Sat, 18 Aug 2012 05:16:44 +0000 (13:16 +0800)]
ENGR00220705 v4l2 overlay: Cancel the work structure schedule at overlay stop

Add flush_work_sync and cancel_work_sync at the overlay stop to
prevent moving data by DMA even when the space of those data address
is freed.

Signed-off-by: Yuxi Sun <b36102@freescale.com
11 years agoENGR00220496 MX6SL:Add low power IDLE mode optimizations.
Ranjani Vaidyanathan [Thu, 26 Jul 2012 18:53:28 +0000 (13:53 -0500)]
ENGR00220496 MX6SL:Add low power IDLE mode optimizations.

Add support for DDR freq change code in IRAM.
Change PLL2 to bypass mode so that DDR is running off 24MHz OSC
directly.
ARM is now sourced from PLL1 (running at 800MHz) in this mode.
This is required for the next step in IDLE mode optmization
where all PLLs will be disabled when ARM enters WFI.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>