Ye.Li [Fri, 10 Jul 2015 11:13:53 +0000 (19:13 +0800)]
MLK-11236 mtd: gpmi-nand: Fix nand runtime PM issue
Because of the delay of auto suspend, the nand clocks are delayed to
disable when calling the clk_set_rate. This causes the clk_set_rate
failed on some platforms like 6q/6qp, and finally lead the NAND not
working.
Signed-off-by: Ye.Li <Ye.Li@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit:
1334dd236d4401d6635accb6c8472d8a5ed088b5)
Han Xu [Thu, 18 Jun 2015 21:35:37 +0000 (16:35 -0500)]
MLK-11133: mtd:gpmi: support runtime pm for gpmi nand
support runtime PM on gpmi nand to save the cost to enable/disable clock
in each NAND IO. The driver also claim high-freq bus when resumed.
Signed-off-by: Han Xu <b45815@freescale.com>
(cherry picked from commit:
5b72b3388d1399420f3b49a0ca937ca5792e2d7d)
Han Xu [Thu, 4 Jun 2015 16:48:23 +0000 (11:48 -0500)]
MLK-11044: mtd:nand: enable per1_bch for NAND on all i.MX6 platform
The per1_bch was moved in patch below since it was never mentioned in
any GPMI/BCH/APBH documents, but actually it is necessary for BCH module
since BCH use AXI bus transfer data through fabric, need to enable this
clock for BCH at fabric side.
This patch enabled this clock for all i.MX6 platforms and has been
tested on i.MX6Q/i.MX6QP/i.MX6SX and i.MX6UL.
commit
9aa0fb0a606a583e2b6e19892ac2cab1b0e726c4
Author: Han Xu <b45815@freescale.com>
Date: Thu May 28 16:49:18 2015 -0500
mtd: nand: support NAND on i.MX6UL
support i.MX6UL GPMI NAND driver and removed the unecessary clock
per1_bch.
Signed-off-by: Han Xu <b45815@freescale.com>
(cherry picked from commit:
53c5964a104f71c061d95bd98599fbf050644ddb)
Han Xu [Thu, 28 May 2015 21:49:18 +0000 (16:49 -0500)]
MLK-10985: mtd: nand: support NAND on i.MX6UL
support i.MX6UL GPMI NAND driver and removed the unecessary clock
per1_bch.
Signed-off-by: Han Xu <b45815@freescale.com>
(cherry picked from commit:
9aa0fb0a606a583e2b6e19892ac2cab1b0e726c4)
Han Xu [Wed, 15 Apr 2015 20:19:43 +0000 (15:19 -0500)]
MLK-10664: mtd: nand: change the maxchips for i.MX7D
change the maximum chips for i.MX7D, this part was missed when adding
i.MX7D NAND support.
Signed-off-by: Han Xu <b45815@freescale.com>
(cherry picked from commit:
313d4d5e701dd6a28dc7d2bd84094b8fbdb7f9ca)
Han Xu [Wed, 15 Apr 2015 19:54:46 +0000 (14:54 -0500)]
MLK-10471: mtd: nand: use maximum ecc strength controller can support
when the maximum ecc NAND oob can afford exceed the ecc strength
controller can provide, use the maximum ecc strength controller can
support instead of the minimum ecc NAND spec required.
kobs-ng will also use the same ecc strength to align with kernel to make
sure all NAND chips can boot.
Signed-off-by: Han Xu <b45815@freescale.com>
(cherry picked from commit:
958a2c5b07524f3502cfdefe66724a9a1f8ad608)
Han Xu [Tue, 14 Apr 2015 15:29:15 +0000 (10:29 -0500)]
MLK-10657: mtd: NAND: correct bitflip for erased NAND page
i.MX6QP and i.MX7D BCH module integrated a new feature to detect the
bitflip number for erased NAND page. So for these two platform, set the
erase threshold to gf/2 and if bitflip detected, GPMI driver will
correct the data to all 0xFF.
Also updated the imx6qp dts file to ditinguish the GPMI module for i.MX6Q
with the one for i.MX6QP.
Signed-off-by: Han Xu <b45815@freescale.com>
(cherry picked from commit:
4302ab74a301626e7e0b9cb398a23b2e488cfa6b)
Han Xu [Tue, 31 Mar 2015 19:48:06 +0000 (14:48 -0500)]
MLK-10521-2: mtd: gpmi: Add NAND support on i.MX7D
Support NAND on i.MX7D
Signed-off-by: Han Xu <b45815@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked and merged from commit:
39af0df85dcbcb2ebd677ec5d2a2a4e6a61ed826)
Bai Ping [Thu, 13 Aug 2015 10:52:08 +0000 (18:52 +0800)]
MLK-11365-02 ARM: imx: add M/F mix support on imx6ul
Add M/F mix support on i.MX6UL.
Signed-off-by: Bai Ping <b51503@freescale.com>
Bai Ping [Mon, 17 Aug 2015 09:01:03 +0000 (17:01 +0800)]
MLK-11365-01 ARM: imx: correct the code indent
fix the typo of code indent.
Signed-off-by: Bai Ping <b51503@freescale.com>
Bai Ping [Wed, 12 Aug 2015 13:55:49 +0000 (21:55 +0800)]
MLK-11343-03 ARM: dts: imx: add clocks in cpu mode
Add pll1, pll1_bypass and pll1_bypass_src clock
reference define in dts file.
Signed-off-by: Bai Ping <b51503@freescale.com>
Bai Ping [Wed, 12 Aug 2015 13:55:08 +0000 (21:55 +0800)]
MLK-11343-02 cpufreq: imx: add more clk used by cpufreq
This patch adds pll1, pll_bypass and pll1_bypass_src that
will be used in ARM clock switching code.
Signed-off-by: Bai Ping <b51503@freescale.com>
Bai Ping [Wed, 5 Aug 2015 15:05:46 +0000 (23:05 +0800)]
MLK-11343-01 cpufreq: imx: replace clk_get & regulator_get will devm ones
Replace the clk_get and regulator_get will the devm ones to free the
resources automatically when probe failed or driver is removed.
Signed-off-by: Bai Ping <b51503@freescale.com>
Fugang Duan [Wed, 5 Aug 2015 10:33:49 +0000 (18:33 +0800)]
MLK-11326 dma: mxs-dma: remove the runtime pm dummy code
Currently, the dma engine driver don't support runtime pm,
and it is not necessary to support the feature since it support
slave sg and cyclic mode, and clock enable/disable during dma
chans allocate and release.
The patch remove the runtime pm dummy code.
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit:
2c8f8e3e6a21184e6cf8b8e5ba3ec8e76794c951)
Fugang Duan [Wed, 5 Aug 2015 10:21:04 +0000 (18:21 +0800)]
MLK-11325 dma: mxs-dma: fix dma_io clock enable count mismatch issue
After dma init by calling .mxs_dma_init(), disable dma_io and
dma_bch clocks. When dma chans are requested by devices, clocks
are enabled in .device_alloc_chan_resources(). The patch is to
fix clock enable count mismatch issue.
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit:
4868cf5e39a0aeb1ad12c5c1a453d233c0f472ce)
Adrian Alonso [Fri, 29 May 2015 20:23:55 +0000 (15:23 -0500)]
MLK-11019-2: mxs-sdma: add im7d dma-apbh clock
* iMX7D dma-apbh support add additional clock dependency
* Add clock for mxs-dma support dma_apbh_bch dma_apbh_io
Signed-off-by: Adrian Alonso <aalonso@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit:
aea75669daac9101592de2cfbadc7aaacbc7d887)
Huang Shijie [Wed, 7 May 2014 06:04:09 +0000 (14:04 +0800)]
MLK-9810 dma: mxs-dma: add power management support
this patch adds power management support for mxs-dma driver.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Allen Xu <b45815@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit
7a59828eeda36457e6e60383705a0bc5831ffbf7)
Fugang Duan [Tue, 18 Aug 2015 01:53:45 +0000 (09:53 +0800)]
MLK-10806 ARM: dts: imx7d-12x12-lpddr3-arm2: add BT pin config
Add uart3 node and BT reg on pin config.
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit:
76a0d0595a15346ec954c14e0d4f777d218c0b15)
Fugang Duan [Tue, 9 Jun 2015 06:38:28 +0000 (14:38 +0800)]
MLK-11281-16 ARM: dts: enable fec1 and fec2 for lpsr mode
Enable fec1 and fec2 for lpsr mode.
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit:
1fe7e098efc52abecdd3cf4a2ed8add5582393dc)
Fugang Duan [Tue, 18 Aug 2015 01:44:00 +0000 (09:44 +0800)]
MLK-10835-4 ARM: dts: imx7d-sdb: enable mpl3115,fxas2100x,fxos8700 sensor
Enable mpl3115, fxas2100x, fxos8700 sensor.
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit:
85e2a3f268ce315ea67ef8805f11a1a1266a3e33)
Fugang Duan [Tue, 18 Aug 2015 01:36:46 +0000 (09:36 +0800)]
MLK-10462 ARM: dts: imx7d-sdb: enable uart5 and uart6 nodes
Enable uart5 for GPS, uart6 for BCM4339 BT module.
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit:
4e43a07e6a80c5366e744455f5dc9f9c5a2bde57)
Fugang Duan [Fri, 17 Jul 2015 03:43:31 +0000 (11:43 +0800)]
MLK-11258 tty: serial: imx: disable overrun interrupt during uart port shutdown
Also disable rx fifo overrun interrupt during uart port shutdown.
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit:
39eb703f6c9f9359723f3fa22e798b1d21b44c67)
Fugang Duan [Wed, 11 Mar 2015 11:07:42 +0000 (19:07 +0800)]
MLK-10406 ARM: imx: check the clk_set_rate() return value
Add return value check for clk_set_rate() to avoid set clock
rate fail.
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit:
bcd9d743ef534cf58d2d007e6333270be12c9f06)
Fugang Duan [Wed, 4 Mar 2015 07:26:59 +0000 (15:26 +0800)]
MLK-10367 tty: serial: imx: set uart module clock to 80Mhz
When UART module clock is great than 80Mhz, there may have risk after
confirming with IC owner. So set the maximum module clock to 80Mhz.
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit:
330a1245cb91583d9bc916bbb6d8c7d2c86b26f3)
Fugang Duan [Fri, 31 Jul 2015 04:27:05 +0000 (12:27 +0800)]
MLK-11307 net: fec: disable timer interrupt when link down and suspend
There exists one issue in Android environment when do power key on/off
test that cause system hang. Because suspend function disable enet all
clocks while timer interrupt comming that introduces registers access.
When link down and suspend, the timer interrupt is not necessary
to enable, so disable it.
Signed-off-by: Fugang Duan <B38611@freescale.com>
Tested-by: Fugang Duan <B38611@freescale.com>
Tested-by: Chen Guoyin <B07211@freescale.com>
Tested-by: Zhu Wenbo <B52619@freescale.com>
(cherry picked from commit:
048f62891bc4936991fd58dbaf4a606a30282404)
Fancy Fang [Fri, 14 Aug 2015 06:56:32 +0000 (14:56 +0800)]
MLK-11363-2 ARM: dts: imx7d-sdb: enable epxp in device node
Enable epxp in device node by default on imx7d-sdb board.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Fancy Fang [Fri, 14 Aug 2015 06:55:58 +0000 (14:55 +0800)]
MLK-11363-1 ARM: dts: imx7d-12x12-lpddr3-arm2: enable epxp in device node
Enable epxp in device node by default on imx7d-12x12-lpddr3-arm2
board.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Fancy Fang [Fri, 14 Aug 2015 06:28:31 +0000 (14:28 +0800)]
MLK-11362 video: mxsfb: add busfreq support for this module
Add busfreq support for this framebuffer driver.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Gao Pan [Fri, 14 Aug 2015 02:06:21 +0000 (10:06 +0800)]
MLK-11359 ARM: dts: imx7d-sdb.dts: add sim1
Add dts support for sim1 on imx_4.1.y branch.
Signed-off-by: Gao Pan <b54642@freescale.com>
Gao Pan [Fri, 7 Aug 2015 07:36:19 +0000 (15:36 +0800)]
MLK-11356 ARM: imx_v7_defconfig: add sim
Enable CONFIG_MXC_SIM to imx_v7_defconfig.
Signed-off-by: Gao Pan <b54642@freescale.com>
Gao Pan [Fri, 7 Aug 2015 07:13:56 +0000 (15:13 +0800)]
MLK-11355 driver/mxc: add mxc special driver
Add mxc in driver/Konfig and driver/Makefile.
Signed-off-by: Gao Pan <b54642@freescale.com>
Gao Pan [Fri, 7 Aug 2015 06:41:00 +0000 (14:41 +0800)]
MLK-11354 sim: imx: relapce devm_request_and_ioremap with devm_ioremap_resource
The API devm_request_and_ioremap meets compile error
on branch imx_4.1.y. It is recommend to replace the api
with devm_ioremap_resource.
Signed-off-by: Gao Pan <b54642@freescale.com>
Gao Pan [Fri, 7 Aug 2015 06:32:26 +0000 (14:32 +0800)]
MLK-11353 ARM: dts: imx6ul-14x14-evk.dts: add sim1
Add dts support for sim1 on imx_4.1.y branch.
Signed-off-by: Gao Pan <b54642@freescale.com>
Luwei Zhou [Wed, 8 Apr 2015 06:44:51 +0000 (14:44 +0800)]
MLK-10600-2: mxc: sim: Add an option to enable SIM driver build.
Add the option to enable SIM driver build.
Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Gao Pan <b45643@freescale.com>
(cherry picked from
0f7a6fa3c141bfc7333d9056639b7a5b1154ed1d)
Luwei Zhou [Tue, 26 May 2015 08:49:06 +0000 (16:49 +0800)]
MLK-10976: mxc: sim: Using timer interrupt to implement precise timing.
The EMV4.3 has strict requirement about the reset sequence. The old code use the mdelay, udelay to
achievet, which is not precise enough. Replace it with the timer interrupt. The EMV4.3 requires
40000~45000 clock cycles duration when reset is low.
Signed-off-by: Luwei Zhou <b45643@freescale.com>
(cherry picked from
a006fe283c8b97f0a711cb0829bfbdaaf4a5f31f)
Luwei Zhou [Mon, 25 May 2015 07:16:34 +0000 (15:16 +0800)]
MLK-10968: mxc: sim: Add the init delay detection function in the driver.
In EMV4.3 after warm/cold reset, there would be a receiving window. The receiving
window would be 42000 clock length.If the receiving window expires without receiving
one byte, IFD need to take actions as EMV4.3 spec. The driver need to support this
to identify the sequence of the receiving window expiring event and the receiving event.
Since theinterrupt latency in linux OS is not certain, we need to tune this setting to
pass the cases. Current tuning parameter can work.
Signed-off-by: Luwei Zhou <b45643@freescale.com>
(cherry picked from
faf1d8d881a6ad2c6b88fdf312cef142996937c1)
Luwei Zhou [Thu, 21 May 2015 08:56:22 +0000 (16:56 +0800)]
MLK-10959: mxc: sim: Disable cwt timer when tx and enable in rx.
The CWT timer is used to detect the the character interval in the data traffic.
When tx, SIM IP can guarantee the interval based our setting. When RX, we need
to enalbe the CWT timer to check whether the interval is in the range. This patch
fix this.
Signed-off-by: Luwei Zhou <b45643@freescale.com>
(cherry picked from
9c92dfd070e7427eb1e0166f368b89b4a7ac1bff)
Luwei Zhou [Mon, 18 May 2015 06:16:26 +0000 (14:16 +0800)]
MLK-10913-1: mxc: sim: Add the SIM driver support for i.MX6UL-EVK platform.
Modify the driver to support the SIM on i.MX6UL-EVK platform. The main modification is:
1. Add port index to support different port on platform.
2. Add POS-CARD support. The POS card has external IC to assert when SVEN to low. Add support.
3. Using a function to calculate the strict timing delay.
Signed-off-by: Luwei Zhou <b45643@freescale.com>
(cherry picked from
17d1315b0704e2db63ee6bd7aaefa0c796f53104)
Luwei Zhou [Wed, 8 Apr 2015 06:05:52 +0000 (14:05 +0800)]
MLK-10600-1: mxc: sim: Add SIM IP driver support on the i.MX7d-12x12-arm2 platform.
This driver is based on the current code which runs the the EMV test on the i.MX258 platform.
Since there are still many cases that can't pass on the i.MX258 and i.MX7d platform. The
driver will need to be improved after per-test work. Just check in as a base code. There
would be definitly some timing improvement work to do in the future.
Signed-off-by: Luwei Zhou <b45643@freescale.com>
(cherry picked from
3ac1ad5b2a68ecb052ccacca4ac7459ead04415e)
Anson Huang [Wed, 12 Aug 2015 06:18:37 +0000 (14:18 +0800)]
MLK-11357-2 ARM: imx: add cpuidle support for imx7d
Enable cpuidle for i.MX7D, total 3 level idle supported:
1. ARM WFI;
2. WAIT mode;
3. Low power idle with ARM/SCU platform power off.
Only when system in low bus freq mode, system is able to
enter low power idle, and only when both of 2 cores are
in low power idle, ARM/SCU platform will be powered off.
DDR will be put into low power mode when low power idle
is entered.
Signed-off-by: Anson Huang <b20788@freescale.com>
Anson Huang [Fri, 14 Aug 2015 03:09:38 +0000 (11:09 +0800)]
MLK-11357-1 ARM: dts: imx7d: debug uart clk better to be from OSC
To achieve low power, debug uart clk should be from OSC, so that
it does NOT need to keep PLL on, especially for low power idle
case.
Signed-off-by: Anson Huang <b20788@freescale.com>
Robin Gong [Thu, 13 Aug 2015 08:39:06 +0000 (16:39 +0800)]
MLK-11344-11: spi: spi-imx: enable dma support for i.mx6dl
There is official workaound for TKT238285, so remove the limitation
for i.mx6dl.
Signed-off-by: Robin Gong <b38343@freescale.com>
Robin Gong [Thu, 13 Aug 2015 08:14:42 +0000 (16:14 +0800)]
MLK-11344-10: ARM: dts: imx7d-12x12-lpddr3-arm2-ecspi: add ecspi support
Enable ecspi dtb for imx7d-12x12-lpddr3-arm2 board.
Signed-off-by: Robin Gong <b38343@freescale.com>
Robin Gong [Thu, 18 Dec 2014 04:51:28 +0000 (12:51 +0800)]
MLK-9986-5 spi: spi-imx: decrease tx fifo wartermark level
We set both wartermark of txfifo and rxfifo 32 as half of fifo length 64.
That will cause easy rxfifo overflow:
If there is 31 bytes in rxfifo, rx script will wait the next dma request
(the 32th data come into the rxfifo) and schedule out to tx script. Once
tx script start to run, the rx script need to wait tx script finish even
if its priority higher than tx. Meanwhile, spi slave device may input
data continous, plus the rx data which triggered by new tx script(32 bytes).
That will quickly consume whole 64 bytes fifo, so we keep 16bytes availbale
even in the worst case new tx script triggered during two rx transfer. That
may slow down tx slightly, but better than overflow and RX DMA timeout.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit
16043ad0ad96aa04a90614e473aa17980af4b8af)
(cherry picked from commit
819efee83b7b1f47685dca6fad6bbe17f1c42092)
(cherry picked from commit
5c4c7d05bbba0ea2b26ef2f3ae83119d5eada235)
Shengjiu Wang [Mon, 13 Jul 2015 11:19:15 +0000 (19:19 +0800)]
MLK-11248: dmaengine: imx-sdma: add new api for sync with dma and substream
There is occasion that dma callback come late after the substream is released.
Then there will be kernel dump.
[<
805866b0>] (imx_pcm_dma_complete) from [<
802fad9c>] (sdma_handle_channel_loop.isra.25+0x48/0x54)
[<
802fad9c>] (sdma_handle_channel_loop.isra.25) from [<
802fae48>] (sdma_tasklet+0xa0/0x1d4)
[<
802fae48>] (sdma_tasklet) from [<
800356e0>] (tasklet_action+0x64/0xf8)
[<
800356e0>] (tasklet_action) from [<
80034ea0>] (__do_softirq+0x104/0x218)
[<
80034ea0>] (__do_softirq) from [<
80035220>] (irq_exit+0xa8/0xec)
[<
80035220>] (irq_exit) from [<
8000ed44>] (handle_IRQ+0x3c/0x90)
[<
8000ed44>] (handle_IRQ) from [<
80008578>] (gic_handle_irq+0x28/0x5c)
[<
80008578>] (gic_handle_irq) from [<
80012100>] (__irq_svc+0x40/0x70)
The reason is the sdma tasklet is async with audio substream release. ALSA
think when terminate dma, the dma should be stopped and no callback be called.
This patch is to add new api dma_sync_wait_tasklet(), which is called in
snd_dmaengine_pcm_close(). It will make sure the callback not be called
after this funtion. Tasklet_kill is to wait scheduled tasklet end.
Tasklet_kill can't be added to terminate dma function, because terminate dma
function may be called in interrupt, but tasklet_kill can't be called in
interrupt context.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit
9815881b6acaa72a705e1fa3c26a852fc81bfce5)
Shengjiu Wang [Fri, 17 Jul 2015 05:52:37 +0000 (13:52 +0800)]
MLK-11259-1: dmaengine: imx-sdma: support dual fifo for DEV_TO_DEV
As SSI has dual fifo, add src_dualfifo and dst_dualfifo in imx_dma_data
to support dual fifo in DMA_DEV_TO_DEV.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit
cfde1308f170166a0099ca39ee8733895f9626f0)
Robin Gong [Thu, 18 Jun 2015 01:40:58 +0000 (09:40 +0800)]
MLK-11122: dma: imx-sdma: use late system sleep pm ops
Use SET_LATE_SYSTEM_SLEEP_PM_OPS rather than the common sleep pm ops to ensure
sdma has resumed back before all other module drivers which use sdma resume
back.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit
a7f8725509b494c3073b1bcca63252d5c61bb80d)
Robin Gong [Fri, 20 Mar 2015 07:05:55 +0000 (15:05 +0800)]
MLK-10450: dma: imx-sdma: enable Mega/Fast support for i.mx7d
Enable Mega/Fast support for i.mx7d. Need save and restore SDMA registers.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit
4e1ea64c5d360ebc4f8168c1fcdee314b547bd13)
Robin Gong [Wed, 11 Mar 2015 07:39:11 +0000 (15:39 +0800)]
MLK-10405 dma: imx-sdma: fix uart6 rx not working
The SDMA driver not consider the case of event_id0 is 0. That make uart6 rx
not working.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit
dbcacbcb3a885d7569e9e415035b1dd06c4a117b)
(cherry picked from commit
6dfdbe41a7d6ab7e6fae5d6fb4d73435839beff3)
Robin Gong [Thu, 18 Dec 2014 04:41:16 +0000 (12:41 +0800)]
MLK-9986-4 dma: imx-sdma: add new ecspi tx script
Current ecspi rom script didn't take care of rxfifo overflow risk. Add new
ecspi tx script to check the rxfifo status, if it is near to full(>=48 bytes),
do not copy data to txfifo which will trigger data push into rxfifo. Because
rx script may not read rxfifo in time, we have to consider it.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit
17f472aa698aba0af5da4566df447e23306f4289)
(cherry picked from commit
90c929d7d1a3f8e196641b5ed7a33d2ee03bd63c)
(cherry picked from commit
6d76bdcf2097e4198217edf27363cf6ba2e6542a)
Robin Gong [Tue, 6 May 2014 07:18:26 +0000 (15:18 +0800)]
MLK-11344-8: dma: imx-sdma: support sdma restore from mega/fast power down status
cherry-pick below patch from v3.14.y:
ENGR00319473: dma: imx-sdma: support sdma restore from
mega/fast power down status
Support sdma suspend and resume interface to restore from mega/fast power down.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit
682fd1f47ab9cb69382fa0e8d20a830ae99c26fc)
(cherry picked from commit
dd17fa18b9a0c11f8bce3b87f792775d96e461c1)
Robin Gong [Tue, 23 Dec 2014 05:39:23 +0000 (13:39 +0800)]
MLK-10050 dma: imx-sdma: add support for sdma memory copy
This patch is just created by so many confilict while cherry-pick
from v3.10
a6a6cf911f85a3a09f763195478d422c571b9565.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit
c070364148de0331152700850f5cb5577dbb504e)
Shengjiu Wang [Fri, 5 Sep 2014 10:51:36 +0000 (18:51 +0800)]
MLK-11344-7: dma: imx-sdma: Add hdmi audio support in sdma
cherry-pick below patch from v3.14.y:
ENGR00329948-3: dma: imx-sdma: Add hdmi audio support
in sdma
There's a missing script for hdmi audio support in current sdma driver,
thus add it.
This HDMI script doesn't use bd to copy memory like a normal one does
but only to update the memory address for HDMI internal AHB DMA and
then trigger its procedure automatically.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit
dafddac916a03ae4477e2de7c1b7ad291f956f68)
Nicolin Chen [Tue, 5 Nov 2013 11:19:07 +0000 (19:19 +0800)]
MLK-11344-6: dma: imx-sdma: allocate memory from iram
ENGR00286273-1 dma: imx-sdma: allocate memory from iram
We try to allocate memory from SoC internal SRAM so that we can turn off
voltage of external DDR to save power. Surely, if we failed to get the
iram DT node or allocate memory due to no enough SRAM space, we would
allow SDMA driver to allocate memory in a traditional way.
Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit
f6924fbdb90d1f01266fc018caff953457e04d34)
(cherry picked from commit
7b643e5c9119ac43b937816fd1b785d2b859b05f)
Robin Gong [Mon, 8 Dec 2014 09:30:40 +0000 (17:30 +0800)]
MLK-9768: dma: imx-sdma: fix UART loopback random failed
For UART, we need use old chn_real_count to know the real rx count even in
cylic dma mode, because UART driver use cyclic mode to increase performance
without any data loss.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit
398cee2ad110c4f183e553af0564fbdcbe8548cb)
Fugang Duan [Fri, 10 Oct 2014 07:31:11 +0000 (15:31 +0800)]
MLK-11344-5: dmaengine: imx: fix loop mode issue
cherry-pick below patch from v3.14.y:
ENGR00329822-01 dmaengine: imx: fix loop mode issue
Fix loop mode issue that calling dmaengine_tx_status() can get
right state.residue value.
Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit
37e17f10b35c34317def08704e4b4edf5aa23894)
(cherry picked from commit
00cc7021317ac6efb460eb1b9bc3bd8aa6ad73c2)
Robin Gong [Tue, 11 Aug 2015 07:57:11 +0000 (15:57 +0800)]
MLK-11344-3: platform_data: dma-imx-sdma: add new scripts
Add new ecspi and qspi script.
Signed-off-by: Robin Gong <b38343@freescale.com>
Robin Gong [Tue, 11 Aug 2015 07:55:00 +0000 (15:55 +0800)]
MLK-11344-2: firmware: imx: sdma: add sdma firmware for i.mx6 and i.mx7d
add sdma firmware for i.mx6 and i.mx7d
Signed-off-by: Robin Gong <b38343@freescale.com>
Robin Gong [Tue, 11 Aug 2015 06:37:00 +0000 (14:37 +0800)]
MLK-11344-1: ARM: dts: imx7d-12x12-lpddr3-arm2: correct "cpu0" node
Correct "cpu0" node in alphabetical sequence.
Signed-off-by: Robin Gong <b38343@freescale.com>
Bai Ping [Wed, 25 Mar 2015 10:14:40 +0000 (18:14 +0800)]
MLK-10461: arm: imx7: set the PFD override bit before system entering low power mode
the PFD override bit must be set before system entering any low power mode.
Signed-off-by: Bai Ping <b51503@freescale.com>
Anson Huang [Thu, 13 Aug 2015 09:57:03 +0000 (17:57 +0800)]
MLK-11349-4 ARM: imx: need to make sure GPT1 clk root enabled
GPT1 clk root must be enabled, as GPT1 is system's clk
source.
Signed-off-by: Anson Huang <b20788@freescale.com>
Anson Huang [Thu, 13 Aug 2015 06:35:32 +0000 (14:35 +0800)]
MLK-11349-3 ARM: imx: update clk driver for imx7d
This patch updates all clk driver from L3.14.y, as
cherry-pick all clk related patch needs to handle
about 40 patches conflicts, so just copy it from
L3.14.y as it is an independent driver, for commit
log, please refer to L3.14.y.
Signed-off-by: Anson Huang <b20788@freescale.com>
Fabio Estevam [Tue, 18 Oct 2016 00:29:14 +0000 (22:29 -0200)]
clk: imx6: 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. The glitchy muxes are then registered as read-only. The clock
parent can be selected using the assigned-clocks and
assigned-clock-parents properties of the ccm device tree node:
&clks {
assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
<&clks IMX6QDL_CLK_LDB_DI1_SEL>;
assigned-clock-parents = <&clks IMX6QDL_CLK_MMDC_CH1_AXI>,
<&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>;
};
The issue is explained in detail in EB821 ("LDB Clock Switch Procedure &
i.MX6 Asynchronous Clock Switching Guidelines") [1].
[1] http://www.nxp.com/files/32bit/doc/eng_bulletin/EB821.pdf
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Akshay Bhat <akshay.bhat@timesys.com>
Tested-by Joshua Clayton <stillcompiling@gmail.com>
Tested-by: Charles Kang <Charles.Kang@advantech.com.tw>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Philipp Zabel [Tue, 18 Oct 2016 00:29:13 +0000 (22:29 -0200)]
clk: imx6: Make the LDB_DI0 and LDB_DI1 clocks read-only
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. As this can not be guaranteed by
the clock framework during runtime, make the ldb_di[x]_sel muxes read-only.
A workaround to set the muxes once during boot could be added to the
kernel or bootloader.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Philipp Zabel [Tue, 18 Oct 2016 00:29:12 +0000 (22:29 -0200)]
clk: imx6: Mask mmdc_ch1 handshake for periph2_sel and mmdc_ch1_axi_podf
MMDC CH1 is not used on i.MX6Q, so the handshake needed to change the
parent of periph2_sel or the divider of mmdc_ch1_axi_podf will never
succeed.
Disable the handshake mechanism to allow changing the frequency of
mmdc_ch1_axi, allowing to use it as a possible source for the LDB DI
clock.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Anson Huang [Thu, 13 Aug 2015 06:35:18 +0000 (14:35 +0800)]
MLK-11349-2 ARM: dts: disable apbh dma on imx7d
APBH DMA needs NAND clk to be enabled, its driver
does NOT handle this clk very well, so kernel
will boot up fail without NAND clk enabled, so
disable APBH DMA by default.
Signed-off-by: Anson Huang <b20788@freescale.com>
Anson Huang [Wed, 12 Aug 2015 05:41:51 +0000 (13:41 +0800)]
MLK-11349-1 ARM: imx: add busfreq support for imx7d lpddr3 board
This patch adds busfreq support for i.MX7D 12x12-lpddr3-arm2
board, the busfreq setpoint definition is same as imx7d-sdb
board.
Signed-off-by: Anson Huang <b20788@freescale.com>
Fancy Fang [Wed, 12 Aug 2015 08:23:03 +0000 (16:23 +0800)]
MLK-11352-3 media: pxp-v4l2-output: porting the driver to imx_4.1.y
Porting the pxp-v4l2 output driver to imx_4.1.y branch.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Fancy Fang [Wed, 12 Aug 2015 08:21:01 +0000 (16:21 +0800)]
MLK-11352-2 ARM: dts: imx7d-sdb: add dts support for pxp-v4l2-output
Add dts support for pxp-v4l2-output module for
imx7d-sdb board.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Fancy Fang [Wed, 12 Aug 2015 08:20:42 +0000 (16:20 +0800)]
MLK-11352-1 ARM: dts: imx7d-12x12-lpddr3: add dts support for pxp-v4l2-output
Add dts support for pxp-v4l2-output module for
imx7d-12x12-lpddr3 board.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Haibo Chen [Wed, 12 Aug 2015 07:02:28 +0000 (15:02 +0800)]
MLK-11350 ARM: dts: imx7d/imx6ul: fix sd card gpio polarity specified in device tree
cd-gpios polarity should be changed to GPIO_ACTIVE_LOW and wp-gpios
should be changed to GPIO_ACTIVE_HIGH.
Otherwise, the SD may not work properly due to wrong polarity inversion
specified in DT after switch to common parsing function mmc_of_parse().
Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
Fugang Duan [Tue, 4 Nov 2014 05:23:34 +0000 (13:23 +0800)]
MLK-9786 net: fec: Add busfreq support to the driver
Add request_bus_freq() and release_bus_freq() calls to the
various drivers to ensure that the DDR and AHB are the requested
frequency before the driver starts its task.
Signed-off-by: Fugang Duan <B38611@freescale.com>
Anson Huang [Mon, 20 Apr 2015 03:25:54 +0000 (11:25 +0800)]
MLK-10699 ARM: imx: correct ahb clk parent select
Design team change the ahb's clk parent options but
did NOT update the DOC accordingly in time, so the
AHB/IPG's clk rate in clk tree is incorrect, AHB is
67.5MHz and IPG is 33.75MHz, but using scope to
monitor them, they are actually 135MHz and 67.5MHz,
update the clk parent option to make clk tree info
correct.
Signed-off-by: Anson Huang <b20788@freescale.com>
Anson Huang [Mon, 10 Aug 2015 05:42:57 +0000 (13:42 +0800)]
MLK-11338-2 ARM: imx: add busfreq support for imx7d sdb board
This patch adds busfreq support for i.MX7D SDB
board with DDR3 memory, 3 setpoints supported:
HIGH: DRAM CLK = 533MHz, AXI = 332MHz, AHB = 135MHz;
AUDIO: DRAM CLK = 100MHz; AXI = 24MHz, AHB = 24MHz;
LOW: DRAM CLK = 24MHz; AXI = 24MHz, AHB = 24MHz;
Signed-off-by: Anson Huang <b20788@freescale.com>
Adrian Alonso [Mon, 30 Mar 2015 21:11:53 +0000 (16:11 -0500)]
MLK-10500: arm: imx: clk-pllv3: fix AV pll num denom offsets
* Fix PLL Audio/Video Numerator/Denominator register offsets
* In imx7d pll register CCM_ANALOG_PLL_VIDEO_NUM and
CCM_ANALOG_PLL_VIDEO_DENOM offset is different with imx6.
For imx7D the correct setting should be:
PLL_NUM_OFFSET 0x20
PLL_DENOM_OFFSET 0x30
* Add additional macros to handle imx7d audio/video
pll num/demom offset settings.
Signed-off-by: Adrian Alonso <aalonso@freescale.com>
[Octavian: use IMX_PLLV3_AV_IMX7 instead of cpu_is_imx7d()]
Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
Anson Huang [Thu, 2 Apr 2015 02:51:55 +0000 (10:51 +0800)]
MLK-10547-2 ARM: imx: correct dram pll type
DRAM PLL is a audio/video type PLL, need to correct
it to get correct ops of PLL.
There is a test_div placed before DRAM PLL's gate, so
add this test div clk.
Signed-off-by: Anson Huang <b20788@freescale.com>
Andy Shevchenko [Wed, 24 Jun 2015 11:32:21 +0000 (14:32 +0300)]
mmc: block: don't use parameter prefix if built as module
It's excessive to use prefix for the parameters when you do
modprobe mmc-block mmcblk.perdev_minors=16
Make this available only for built-in case.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit
5b67cd9c5ee0722022cba7d20552320325457434)
Li Jun [Tue, 11 Aug 2015 07:52:10 +0000 (15:52 +0800)]
MLK-11340-43 usb: chipidea: imx: fix usb charger detection init NULL pointer
Dereference the charger->psy after the power_supply is created to fix the
null pointer issue.
Signed-off-by: Li Jun <b47624@freescale.com>
Fancy Fang [Tue, 11 Aug 2015 07:16:00 +0000 (15:16 +0800)]
MLK-11345 ARM: dts: imx7d-12x12-lpddr3-arm2: correct lcdif pinctrl settings
Correct the lcdif pinctrl settings to make it work
correctly.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Bai Ping [Tue, 11 Aug 2015 10:48:03 +0000 (18:48 +0800)]
MLK-11342 cpufreq: imx: remove a duplicated pm notify
remove a duplicated pm notify.
Signed-off-by: Bai Ping <b51503@freescale.com>
Li Jun [Wed, 22 Jul 2015 05:59:50 +0000 (13:59 +0800)]
MLK-11272 usb: chipidea: otg: data pulse detection work around for imx7d
i.MX7D has a silicon issue on full speed termination after A device ends
a session, which causes it can not detect data pulse from B device if
A device isn't in low power mode, this patch work around it by override
Termsel bit to be 1 for FS mode termination. After A device detects data
pulse or turns on vbus, this override will be cleared and disabled.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
1ec37968c892efbb1925784446a75d35e8bda228)
Li Jun [Mon, 10 Aug 2015 08:35:08 +0000 (16:35 +0800)]
MLK-11319-5 usb: chipidea: usbmisc_imx: add imx7d usb charger detection support
Adds imx7d usb charger detection support.
Signed-off-by: Li Jun <jun.li@freescale.com>
Li Jun [Fri, 3 Jul 2015 06:14:00 +0000 (14:14 +0800)]
MLK-11123-31 ARM: dts: disable otg features for imx7d-sdb board
Disable all otg features for otg1 port of imx7d-sdb board, then
the otg port can only do role swtich by ID pin state.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
3c59511b7eac99da8c9bd373b82ddcbf61d1ef8a)
Li Jun [Fri, 3 Jul 2015 06:13:30 +0000 (14:13 +0800)]
MLK-11123-30 ARM: dts: disable otg features for imx7d-12x12-lpddr3-arm2 board
Disable all otg features for otg1 port of imx7d-12x12-lpddr3-arm2 board, then
the otg port can only do role swtich by ID pin state.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
8d19fb5979522032cf4d96909d609aceac0dde85)
Li Jun [Fri, 3 Jul 2015 06:12:25 +0000 (14:12 +0800)]
MLK-11123-28 ARM: dts: disable otg features for imx6sx-sdb board
Disable all otg features for otg1 port of imx6sx-sdb board, then
the otg port can only do role swtich by ID pin state.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
e8d32c2cc5daab7e22f6190a02c88981aa14df7e)
Li Jun [Fri, 3 Jul 2015 06:11:53 +0000 (14:11 +0800)]
MLK-11123-27 ARM: dts: add usb support for for imx6sx-sabreauto board
Add usb otg1 and otg2 port for imx6sx-sabreauto board, and disable all otg
features for otg1 port of imx6sx-sabreauto board, then the otg port can only
do role swtich by ID pin state.
Signed-off-by: Li Jun <jun.li@freescale.com>
Li Jun [Fri, 3 Jul 2015 06:09:48 +0000 (14:09 +0800)]
MLK-11123-24 ARM: dts: disable otg features for imx6sl-evk board
Disable all otg features for otg1 port of imx6sl-evk board, then
the otg port can only do role swtich by ID pin state.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
855c996b52317760e114e7884810a0b438b6e3ee)
Li Jun [Fri, 3 Jul 2015 06:09:08 +0000 (14:09 +0800)]
MLK-11123-23 ARM: dts: disable otg features for imx6qdl-sabresd board
Disable all otg features for otg1 port of imx6qdl-sabresd board, then
the otg port can only do role swtich by ID pin state.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
71ed636ea10843cc2aac46711adf2350a34fa7b0)
Li Jun [Fri, 3 Jul 2015 06:08:21 +0000 (14:08 +0800)]
MLK-11123-22 ARM: dts: disable otg features for imx6qdl-sabreauto board
Disable all otg features for otg1 port of imx6qdl-sabreauto board, then
the otg port can only do role swtich by ID pin state.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
b4082a9456f735b664fd125e2e6964963ac9c8d0)
Li Jun [Mon, 10 Aug 2015 07:35:45 +0000 (15:35 +0800)]
MLK-11123-21 ARM: dts: disable otg features for imx6qdl-sabrelite board
Disable all otg features for otg1 port of imx6q-sabrelite board, then
the otg port can only do role swtich by ID pin state.
Signed-off-by: Li Jun <jun.li@freescale.com>
Li Jun [Fri, 3 Jul 2015 06:03:53 +0000 (14:03 +0800)]
MLK-11123-20 ARM: dts: disable otg features for imx6q-arm2 board
Disable all otg features for otg1 port of imx6q-arm2 board, then
the otg port can only do role swtich by ID pin state.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
70c4fe93ac7064f5128ae2275b766fb00c4cd6ef)
Peter Chen [Tue, 21 Jul 2015 06:41:59 +0000 (14:41 +0800)]
MLK-11269-2 usb: chipidea: host: avoid check PORT_SUSPEND wrongly
At some situations, the ehci_bus_suspend may not set PORT_SUSPEND
due to port is not enabled, so add flag ehci->bus_suspended to
check if ehci_bus_suspend set PORT_SUSPEND or not.
We see "ci_hdrc ci_hdrc.0: timeout waiting for SUSPEND" wrongly when
plug in an unsupported usb device, in that case, the PORT_PE is cleared
and bus_suspend is called.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit
82cfe6c31ee55e5aab1a057a5aaf853b7bb6cd07)
(cherry picked from commit
a4fe7e55e84944962d6a7be7bd404865d376811e)
Peter Chen [Tue, 21 Jul 2015 05:32:23 +0000 (13:32 +0800)]
MLK-11269-1 ARM: imx_v7_defconfig: update USB certification configurations
- Add CONFIG_USB_OTG_WHITELIST and CONFIG_USB_HCD_TEST_MODE
- Change CONFIG_USB_EHSET_TEST_FIXTURE from 'm' to 'y'
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit
40f0d728339fb460a108bc8b133207dd5a17dda8)
(cherry picked from commit
d6d4e687fb65cddf3343806424e51e9fdc31c140)
Peter Chen [Thu, 2 Jul 2015 01:41:04 +0000 (09:41 +0800)]
MLK-11183-2 usb: chipidea: otg: disable otg interrupt before flush_workqueue
We do not want (care) the interrupt during we remove the otg function,
so move it beforehand.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit
9ae22c687fd161dfff2e81512b50143fa154b9bb)
Peter Chen [Thu, 2 Jul 2015 01:41:03 +0000 (09:41 +0800)]
MLK-11183-1 usb: chipidea: host: fix NULL pointer problem for fast load/unload module
The interrupt may occur (due to remove process may block interrupt)
after we remove hcd, in that case, we should not call hcd's interrupt
handler, otherwise, below NULL pointer dereference will occur, the reason
for this is we call free_irq later than hcd's. So after hcd has been
removed, we should not call hcd interrupt handler.
ci_hdrc ci_hdrc.0: remove, state 1
usb usb1: USB disconnect, device number 1
ci_hdrc ci_hdrc.0: USB bus 1 deregistered
[<
800691e8>] (handle_irq_event) from [<
8006c02c>] (handle_fasteoi_irq+0x84/0x14c)
[<
8006c02c>] (handle_fasteoi_irq) from [<
800687f4>] (generic_handle_irq+0x2c/0x3c)
[<
800687f4>] (generic_handle_irq) from [<
8000ed4c>] (handle_IRQ+0x40/0x90)
[<
8000ed4c>] (handle_IRQ) from [<
8000856c>] (gic_handle_irq+0x2c/0x5c)
[<
8000856c>] (gic_handle_irq) from [<
80012240>] (__irq_svc+0x40/0x70)
Exception stack(0x80db1f18 to 0x80db1f60)
1f00:
80db1f60 3b9aca00
1f20:
06f86934 0000000d 80dbe1c8 80dbe1c8 ee71e0d0 00000000 06f5bb01 0000000d
1f40:
80db0000 00000000 00000017 80db1f60 00000009 8049c19c 000d0013 ffffffff
[<
80012240>] (__irq_svc) from [<
8049c19c>] (cpuidle_enter_state+0x54/0xe4)
[<
8049c19c>] (cpuidle_enter_state) from [<
8049c2e0>] (cpuidle_idle_call+0xb4/0x14c)
[<
8049c2e0>] (cpuidle_idle_call) from [<
8000f07c>] (arch_cpu_idle+0x8/0x44)
[<
8000f07c>] (arch_cpu_idle) from [<
8006876c>] (cpu_startup_entry+0x100/0x14c)
[<
8006876c>] (cpu_startup_entry) from [<
80d52b10>] (start_kernel+0x350/0x35c)
--[ end trace
1160f590a7b228b3 ]--
Unable to handle kernel NULL pointer dereference at virtual address
000000b0
pgd =
80004000
[
000000b0] *pgd=
00000000
Internal error: Oops: 17 1 PREEMPT SMP ARM
Modules linked in: ci_hdrc_imx usbmisc_imx ci_hdrc udc_core ehci_hcd phy_mxs_usb mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still ipu_prp_enc adv7180_tvin ipu_csi_enc v4l2_int_device ipu_fg_overlay_sdc mxc_mlb mxc_dcic evbug [last unloaded: phy_mxs_usb]
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W
3.14.38-usb-host-otg-02047-ga4dec77 #13
task:
80dbbae8 ti:
80db0000 task.ti:
80db0000
PC is at usb_hcd_irq+0x4/0x38
LR is at handle_irq_event_percpu+0x50/0x180
pc : [<
8040eed8>] lr : [<
8006907c>] psr:
a00d0193
sp :
80db1e98 ip :
fffffffa fp :
00000000
r10:
80e1f13f r9 :
d8009900 r8 :
0000004b
r7 :
00000000 r6 :
00000000 r5 :
d800995c r4 :
d8f2dec0
r3 :
d2234010 r2 :
d2234010 r1 :
00000000 r0 :
0000004b
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control:
10c53c7d Table:
6920004a DAC:
00000015
Process swapper/0 (pid: 0, stack limit = 0x80db0238)
Stack: (0x80db1e98 to 0x80db2000)
1e80:
d2234010 8006907c
1ea0:
0000004b ee71da00 d8009900 d800995c d8f2dec0 f4a00100 06f5bb01 0000000d
1ec0:
80db0000 800691e8 d8009900 d800995c 00000000 8006c02c 8006bfa8 0000004b
1ee0:
0000004b 800687f4 80dace54 8000ed4c f4a0010c 80db8970 80db1f18 8000856c
1f00:
00000009 8049c19c 000d0013 ffffffff 80db1f4c 80012240 80db1f60 3b9aca00
1f20:
06f86934 0000000d 80dbe1c8 80dbe1c8 ee71e0d0 00000000 06f5bb01 0000000d
1f40:
80db0000 00000000 00000017 80db1f60 00000009 8049c19c 000d0013 ffffffff
1f60:
06f86934 0000000d 80dc4a54 ee71e0d0 80db8574 ee71e0d0 00000000 00000000
1f80:
00000000 80e797f8 80dbe1c8 8049c2e0 00000000 80db0000 80db8574 806fe48c
1fa0:
80db0038 80e1f13d 80e1f13d 8000f07c 00000000 8006876c ffffffff 80d52b10
1fc0:
ffffffff ffffffff 80d5258c 00000000 00000000 80d9ef30 00000000 10c53c7d
1fe0:
80db84fc 80d9ef2c 80dbcb80 1000406a 412fc09a 10008074 00000000 00000000
[<
8040eed8>] (usb_hcd_irq) from [<
8006907c>] (handle_irq_event_percpu+0x50/0x180)
[<
8006907c>] (handle_irq_event_percpu) from [<
800691e8>] (handle_irq_event+0x3c/0x5c)
[<
800691e8>] (handle_irq_event) from [<
8006c02c>] (handle_fasteoi_irq+0x84/0x14c)
[<
8006c02c>] (handle_fasteoi_irq) from [<
800687f4>] (generic_handle_irq+0x2c/0x3c)
[<
800687f4>] (generic_handle_irq) from [<
8000ed4c>] (handle_IRQ+0x40/0x90)
[<
8000ed4c>] (handle_IRQ) from [<
8000856c>] (gic_handle_irq+0x2c/0x5c)
[<
8000856c>] (gic_handle_irq) from [<
80012240>] (__irq_svc+0x40/0x70)
Exception stack(0x80db1f18 to 0x80db1f60)
1f00:
80db1f60 3b9aca00
1f20:
06f86934 0000000d 80dbe1c8 80dbe1c8 ee71e0d0 00000000 06f5bb01 0000000d
1f40:
80db0000 00000000 00000017 80db1f60 00000009 8049c19c 000d0013 ffffffff
[<
80012240>] (__irq_svc) from [<
8049c19c>] (cpuidle_enter_state+0x54/0xe4)
[<
8049c19c>] (cpuidle_enter_state) from [<
8049c2e0>] (cpuidle_idle_call+0xb4/0x14c)
[<
8049c2e0>] (cpuidle_idle_call) from [<
8000f07c>] (arch_cpu_idle+0x8/0x44)
[<
8000f07c>] (arch_cpu_idle) from [<
8006876c>] (cpu_startup_entry+0x100/0x14c)
[<
8006876c>] (cpu_startup_entry) from [<
80d52b10>] (start_kernel+0x350/0x35c)
Code:
11a002a0 03a00001 e12fff1e e92d4008 (
e59130b0)
--[ end trace
1160f590a7b228b4 ]--
Kernel panic - not syncing: Fatal exception in interrupt
CPU2: stopping
CPU: 2 PID: 1483 Comm: modprobe Tainted: G D W
3.14.38-usb-host-otg-02047-ga4dec77 #13
[<
80014a68>] (unwind_backtrace) from [<
80011758>] (show_stack+0x10/0x14)
[<
80011758>] (show_stack) from [<
806f5fe8>] (dump_stack+0x7c/0xbc)
[<
806f5fe8>] (dump_stack) from [<
800139f0>] (handle_IPI+0x144/0x158)
[<
800139f0>] (handle_IPI) from [<
80008598>] (gic_handle_irq+0x58/0x5c)
[<
80008598>] (gic_handle_irq) from [<
80012240>] (__irq_svc+0x40/0x70)
Exception stack(0xd96c5dc0 to 0xd96c5e08)
5dc0:
d800995c 0000004b 00000000 00072004 d8f2dec0 d8009900 d800995c 0000004b
5de0:
d800995c a00f0013 00000000 010f2280 fffffffa d96c5e08 00000000 8006926c
5e00:
000f0013 ffffffff
[<
80012240>] (__irq_svc) from [<
8006926c>] (synchronize_irq+0x18/0xa8)
[<
8006926c>] (synchronize_irq) from [<
800696dc>] (__free_irq+0xfc/0x1c4)
[<
800696dc>] (__free_irq) from [<
80069838>] (free_irq+0x4c/0xa4)
[<
80069838>] (free_irq) from [<
8034b760>] (release_nodes+0x16c/0x1cc)
[<
8034b760>] (release_nodes) from [<
803487ec>] (__device_release_driver+0x78/0xcc)
[<
803487ec>] (__device_release_driver) from [<
8034885c>] (device_release_driver+0x1c/0x28)
[<
8034885c>] (device_release_driver) from [<
8034827c>] (bus_remove_device+0xdc/0x108)
[<
8034827c>] (bus_remove_device) from [<
80345788>] (device_del+0x100/0x1a4)
[<
80345788>] (device_del) from [<
8034a218>] (platform_device_del+0x18/0x9c)
[<
8034a218>] (platform_device_del) from [<
8034a2a8>] (platform_device_unregister+0xc/0x20)
[<
8034a2a8>] (platform_device_unregister) from [<
7f61932c>] (ci_hdrc_remove_device+0xc/0x20 [ci_hdrc])
[<
7f61932c>] (ci_hdrc_remove_device [ci_hdrc]) from [<
7f631260>] (ci_hdrc_imx_remove+0x2c/0xdc [ci_hdrc_imx])
[<
7f631260>] (ci_hdrc_imx_remove [ci_hdrc_imx]) from [<
8034a350>] (platform_drv_remove+0x18/0x30)
[<
8034a350>] (platform_drv_remove) from [<
803487e4>] (__device_release_driver+0x70/0xcc)
[<
803487e4>] (__device_release_driver) from [<
80348ef4>] (driver_detach+0xac/0xb0)
[<
80348ef4>] (driver_detach) from [<
803484e4>] (bus_remove_driver+0x4c/0xa0)
[<
803484e4>] (bus_remove_driver) from [<
80084158>] (SyS_delete_module+0x11c/0x17c)
[<
80084158>] (SyS_delete_module) from [<
8000e460>] (ret_fast_syscall+0x0/0x30)
CPU3: stopping
CPU: 3 PID: 0 Comm: swapper/3 Tainted: G D W
3.14.38-usb-host-otg-02047-ga4dec77 #13
[<
80014a68>] (unwind_backtrace) from [<
80011758>] (show_stack+0x10/0x14)
[<
80011758>] (show_stack) from [<
806f5fe8>] (dump_stack+0x7c/0xbc)
[<
806f5fe8>] (dump_stack) from [<
800139f0>] (handle_IPI+0x144/0x158)
[<
800139f0>] (handle_IPI) from [<
80008598>] (gic_handle_irq+0x58/0x5c)
[<
80008598>] (gic_handle_irq) from [<
80012240>] (__irq_svc+0x40/0x70)
Exception stack(0xd80b1f50 to 0xd80b1f98)
1f40:
d80b1f98 3b9aca00 256aed09 0000000d
1f60:
80dbe1c8 80dbe1c8 ee7360d0 00000000 25477984 0000000d d80b0000 00000000
1f80:
00000017 d80b1f98 00000009 8049c19c 00070013 ffffffff
[<
80012240>] (__irq_svc) from [<
8049c19c>] (cpuidle_enter_state+0x54/0xe4)
[<
8049c19c>] (cpuidle_enter_state) from [<
8049c2e0>] (cpuidle_idle_call+0xb4/0x14c)
[<
8049c2e0>] (cpuidle_idle_call) from [<
8000f07c>] (arch_cpu_idle+0x8/0x44)
[<
8000f07c>] (arch_cpu_idle) from [<
8006876c>] (cpu_startup_entry+0x100/0x14c)
[<
8006876c>] (cpu_startup_entry) from [<
10008624>] (0x10008624)
CPU1: stopping
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
402f2d38e22007e931dc3dd52a69c0fed88452bf)
Li Jun [Thu, 2 Jul 2015 00:13:39 +0000 (08:13 +0800)]
MLK-11183 usb: chipidea: otg: complete state machine before cancel hrtimer
When do usb driver module load and unload loop test for A-device, the
hrtimer may be cancelled during otg state machine running, so after
the hrtimer is cancelled, the otg state machine may start it again by
adding a new timer, this will cause the hrtimer will be active after
its function memory is freed by module unload. This patch is to fix it
by trying to hold the fsm mutex lock before setting otg state to be
undefined, then otg hrtimer will be cancelled after current otg fsm
transition completes, and no new timer will be added.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
8c3ab4f22bc34675aeb8f9c62e69b450a179be0f)
(cherry picked from commit
95c8590c5232eeb9d054ac7504455a90a133f05a)
Li Jun [Tue, 23 Jun 2015 02:46:44 +0000 (10:46 +0800)]
MLK-11147 usb: chipidea: otg: keep irq enabled if otg work had been queued
If the otg work had been queued, current code will disable irq again
but the otg work will be done only once, so the irq enable and disable
cannot be balanced, this patch is to fix this.
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit
0d5c0888eaec17289e40968d7d15b92b781ed34f)
Peter Chen [Tue, 23 Jun 2015 08:04:57 +0000 (16:04 +0800)]
MLK-11151 usb: chipidea: otg: drive vbus off if fsm.drv_vbus is true
The current condition may not true even we have driven vbus on already.
The vbus drive operation may be async, eg through i2c gpio expendor,
so the vbus may not be valid when we unload usb module.
We meet this issue when we do fast load/unload usb module test.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit
c0cdff8472c38e0fc39c597148d5534a5e9cc9b1)
Li Jun [Fri, 19 Jun 2015 09:18:48 +0000 (17:18 +0800)]
MLK-11132 usb: chipidea: otg: delay suspend for a_wait_vfall
While A device as peripheral ends session by a_bus_drop, it will go
back to host role by transition to a_wait_vfall state, then ehci
host driver may access portsc status after controller enters suspend
, this will result in system hang since its clock is gated off.
This patch use existing autosuspend to delay the controller suspend
if it comes to a_wait_vfall state.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
b140fa6803ef6ececec17e435212a960a3169cc2)
Peter Chen [Wed, 3 Jun 2015 11:36:29 +0000 (19:36 +0800)]
MLK-10994-5 usb: chipidea: otg: fix NULL pointer dereference when unload module
With commit "
95b62fe MLK-10750 usb: chipidea: otg: remove otg fsm
before destroy gdaget and host", the otg fsm will be removed first,
but when the host is removing, it will trigger pcd interrupt, and otg
work is still queued to ci_otg workqueue(otg state is OTG_STATE_A_HOST),
but at that time, ci_otg workqueue has been destroyed.
In this commit, we make sure the otg work is not queued if ci->wq is NULL,
and keep otg state is OTG_STATE_UNDEFINED after otg fsm has been removed.
The NULL pointer deference error like belows:
Unable to handle kernel NULL pointer dereference at virtual address
00000000
pgd =
a873c000
[
00000000] *pgd=
a90f9831, *pte=
00000000, *ppte=
00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in: usb_f_ecm u_ether libcomposite configfs ci_hdrc_imx(-) ci_hdrc udc_core ehci_hcd mxc_vadc mx6s_capture mxc_dcic ov5640_camera usbmisc_imx phy_mxs_usb evbug [last unloaded: usb_f_rndis]
CPU: 0 PID: 162 Comm: udevd Not tainted
3.14.38-02187-g5639985-dirty #160
task:
a863e880 ti:
a872e000 task.ti:
a872e000
PC is at __queue_work+0x68/0x268
LR is at __queue_work+0x68/0x268
pc : [<
80045060>] lr : [<
80045060>] psr:
600e0193
sp :
a872fed0 ip :
00000000 fp :
00000000
r10:
00000004 r9 :
a872e000 r8 :
0000004b
r7 :
80e4c804 r6 :
a9295000 r5 :
a87f8294 r4 :
00000000
r3 :
a80690e0 r2 :
00000000 r1 :
a8069108 r0 :
a8003400
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
Control:
10c53c7d Table:
a873c04a DAC:
00000015
Process udevd (pid: 162, stack limit = 0xa872e238)
Stack: (0xa872fed0 to 0xa8730000)
fec0:
00ff3d34 80743750 00000000 600e0193
fee0:
a87f8294 a9295000 00000004 0000004b a8008900 80eb51ff 00ff3d34 800452a8
ff00:
00000000 a87f8010 00000000 00000000 00000000 7f060ac0 a8dfced0 a87f8010
ff20:
00002e20 7f059730 a8e7e2c0 a800895c 00000000 8006c1b4 80e46080 80e40458
ff40:
a8008900 a800895c a8e7e2c0 c0802100 00fc40e8 00000000 00000048 8006c320
ff60:
a8008900 a800895c 00000000 8006f1c4 8006f140 0000004b 0000004b 8006b92c
ff80:
80e40e54 8000f9cc c080210c 80e4c970 a872ffb0 8000856c 00fc4308 76d9c890
ffa0:
600e0010 ffffffff 7edef480 800130bc 00fc4308 00ff3d70 00000000 000000ff
ffc0:
00000671 00000000 00ff3b90 7edef480 00fc40e8 00000000 00000048 00ff3d34
ffe0:
000321b8 7edef140 000240a0 76d9c890 600e0010 ffffffff abf5e821 abf5ec21
[<
80045060>] (__queue_work) from [<
800452a8>] (queue_work_on+0x48/0x54)
[<
800452a8>] (queue_work_on) from [<
7f060ac0>] (ci_otg_fsm_irq+0x108/0x310 [ci_hdrc])
[<
7f060ac0>] (ci_otg_fsm_irq [ci_hdrc]) from [<
7f059730>] (ci_irq+0x94/0x158 [ci_hdrc])
[<
7f059730>] (ci_irq [ci_hdrc]) from [<
8006c1b4>] (handle_irq_event_percpu+0x50/0x180)
[<
8006c1b4>] (handle_irq_event_percpu) from [<
8006c320>] (handle_irq_event+0x3c/0x5c)
[<
8006c320>] (handle_irq_event) from [<
8006f1c4>] (handle_fasteoi_irq+0x84/0x14c)
[<
8006f1c4>] (handle_fasteoi_irq) from [<
8006b92c>] (generic_handle_irq+0x2c/0x3c)
[<
8006b92c>] (generic_handle_irq) from [<
8000f9cc>] (handle_IRQ+0x40/0x90)
[<
8000f9cc>] (handle_IRQ) from [<
8000856c>] (gic_handle_irq+0x2c/0x5c)
[<
8000856c>] (gic_handle_irq) from [<
800130bc>] (__irq_usr+0x3c/0x60)
Exception stack(0xa872ffb0 to 0xa872fff8)
ffa0:
00fc4308 00ff3d70 00000000 000000ff
ffc0:
00000671 00000000 00ff3b90 7edef480 00fc40e8 00000000 00000048 00ff3d34
ffe0:
000321b8 7edef140 000240a0 76d9c890 600e0010 ffffffff
Code:
e5964084 e0844003 e1a00005 ebfffa14 (
e5943000)
---[ end trace
53dc25e918ff7216 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit
c5b8111e4178387e1a6e9c700fdf887a944a5129)