summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2014-12-22MLK-9994 PCI: pcie to usb suspend resume issues on imx6sxRichard Zhu
- phenomena: the name of the dev node of the thumb disk inserted in the port of the pcie2usb device, would be changed randomly after suspend resume on imx6sx. - rootcause: PRST shouldn't be triggered during the suspend resume on imx6sx pcie port. Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com> (cherry picked from commit b5ed6b9a8bf5ba7ce4dfe3a3aacdec9634397b6c)
2014-12-22MLK-10017 PCI: save power when pcie is not usedRichard Zhu
In order to save power consumption, do the following actions when pcie is not used. - turn off clocks on imx6q/dl. - turn off clocks and power on imx6sx Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com> (cherry picked from commit e9796dfbae2a8b732022a6c96b3d7803099a70b5)
2014-12-20MLK-10041 : vadc: poweroff vadc analog when vadc removeSandor Yu
Poweroff vadc analog and ext power when module remove. Signed-off-by: Sandor Yu <R01008@freescale.com>
2014-12-19MLK-10039 usb: chipidea: enable usb as wakeup source if the device is connectedPeter Chen
Enable USB as wakeup source if it is imx6sx and the usb device is connected. We do this tricky thing for disable megafix off, since megafix control code depends on wakeup source. If the usb device is connected, we want the connection is not broken, and to support HSIC device since HSIC controller does not support hot plug. It will not produce un-intended usb wakeup since the usb wakeup is controlled by WIE bit in usb ctrl register, it is only enabled through /sys entry. Acked-by: Li Jun <jun.li@freescale.com> Signed-off-by: Peter Chen <peter.chen@freescale.com>
2014-12-19MLK-9986-5 spi: spi-imx: decrease tx fifo wartermark levelRobin Gong
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)
2014-12-19MLK-9986-4 dma: imx-sdma: add new ecspi tx scriptRobin Gong
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)
2014-12-19MLK-9986-2 spi: spi-imx: use pio mode for the tail data in DMA modeRobin Gong
Sometimes the tail data can't trigger SDMA to read from rxfifo, or SDMA miss the last dma request, in this case, DMA report RX timeout and the rest tail data kept in rxfifo. Whatever, use pio read for the tail rx data. Signed-off-by: Robin Gong <b38343@freescale.com> (cherry picked from commit 61fec9e4511e7626a2c5299f37c12cca95d12e88)
2014-12-19MLK-9986-1 spi: spi-imx: change dma timeout value with transfer lengthRobin Gong
Change dma timeout value with the transfer length if the length bigger than 1 MB. Signed-off-by: Robin Gong <b38343@freescale.com> (cherry picked from commit fb12a91a9ce6cd99d4c08483627ea0c94363ee08)
2014-12-19spi: Fix mapping from vmalloc-ed buffer to scatter listCharles Keepax
We can only use page_address on memory that has been mapped using kmap, when the buffer passed to the SPI has been allocated by vmalloc the page has not necessarily been mapped through kmap. This means sometimes page_address will return NULL causing the pointer we pass to sg_set_buf to be invalid. As we only call page_address so that we can pass a virtual address to sg_set_buf which will then immediately call virt_to_page on it, fix this by calling sg_set_page directly rather then relying on the sg_set_buf helper. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org (cherry picked from commit c1aefbdd050e1fb15e92bcaf34d95b17ea952097) (cherry picked from commit bf9cdf03f8d30db8e5c14645e1be9b49b0e945da)
2014-12-18MGS-374 [#1500] fix GPU kernel debugfs crash issueXianzhong
this crash issue is caused by kernel NULL pointer when access GPU database, GPU database is shared by all kernels, it can be queried with any valid kernel. this patch will find the valid kernel pointer to avoid GPU kernel crash. the crash backtrace with 'cat /sys/kernel/debug/gc/vidmem' on i.mx6sl: [<80480600>] (gckKERNEL_FindDatabase+0x8/0xec) from [<80478db0>] (vidmem_show+0x2c/0x60) [<80478db0>] (vidmem_show+0x2c/0x60) from [<800e4d5c>] (seq_read+0x1dc/0x47c) [<800e4d5c>] (seq_read+0x1dc/0x47c) from [<800c7164>] (vfs_read+0x98/0x144) [<800c7164>] (vfs_read+0x98/0x144) from [<800c77c4>] (SyS_read+0x3c/0x78) [<800c77c4>] (SyS_read+0x3c/0x78) from [<8000e080>] (ret_fast_syscall+0x0/0x30) Date: Dec 18, 2014 Signed-off-by: Xianzhong <b07117@freescale.com> Acked-by: Jason Liu (cherry picked from commit 5b59e9d67ee1ce25e43fcb8934fcf0c75abfd0e3)
2014-12-17MLK-9987: Input: imx_keypad: Fix suspend/resume while keypad is pressedFabio Estevam
Since commit commit 560a64749d1dd0ff ("ENGR00318936-2 input: keyboard: imx: remove usless release interrupt enabled) the following problem happens: - Keep any keypad key pressed - Enter low power mode via "echo mem > /sys/power/state" - Then we are no longer able to wake-up the system via the keypad The reason for this behaviour is that the KRIE (Release Interrupt) is not enabled. In order to fix this problem, we should enable KRIE when a key is pressed (KPKD bit is set) or enable KDIE when no key is pressed (KPKR is set). This way we will always have a valid source of keypad interrupt no matter if the system entered low power mode while a keypad key was pressed or not. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-12-17MLK-10010: vadc: can't work immediately after suspend&resumeSandor Yu
The issue only can duplicate with PAL camera. It is cause by vadc did not detect right video mode. Add 0.5s delay before mode detect to resolved the issue. Signed-off-by: Sandor Yu <R01008@freescale.com>
2014-12-12MLK-9881: mxc: asrc: fix dma task timeout issue when use 3 instance.Shengjiu Wang
1. Watermark level in sdma use byte as its unit. but asrc driver use word, there is mismatch between them. Here fix this issue and sdma can work more efficiency. 2. Enlarge the larst_period_size, when use small size, for some case, the dma task will timeout, because sdma has no much data for output. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2014-12-11MLK-9970: CSI: VADC image corruptedSandor Yu
If vadc unit test abnormal exit, such as kill -9 pid, next time run the unit test the image corrupted. In original implement, restore VADC specific register code in streamoff function. In specifical case, vadc unit test abnormal exit, the code in streamoff function will been executed in the next run. It is called from VIDIOC_REQBUFS. So csi will lose vadc configuration, and image is corrupted. Move restore VADC specific register code from streamoff function to device close function. Issue resolved. Signed-off-by: Sandor Yu <R01008@freescale.com>
2014-12-10MA-5918 pxp: v4l2: output: stream off should be called after stream on.Liu Xiaowen
stream off should be called by pxp_close when stream is on. Signed-off-by: Liu Xiaowen <b37945@freescale.com> (cherry picked from commit 481208f831519db30b3e33ddabefdd1fc66417d9)
2014-12-09MLK-9917 imx6sx: fix csi modules prevent system entering low power modeRobby Cai
The reproduce step: $ echo 8 > /proc/sys/kernel/printk $ echo 1 > /sys/class/graphics/fb0/blank $ ifconfig eth0 down $ ifconfig eth1 down $ cat /sys/kernel/debug/clk/osc/pll2_bus/pll2_pfd2_396m/periph2_pre/periph2/mmdc_podf/clk_rate 396000000 The expected result should be '24000000' and following message. Bus freq set to 24000000 start... Bus freq set to 24000000 done! This patch did the following to fix it. - Move the pm runtime handling into csi v4l2 driver, request high bus frequency when the device opens and release high bus frequency when device closes. - Add new api csisw_reset() to mainly do DMA reflash otherwise potentially meet garbage data when CSI starts to work on imx6sl. Signed-off-by: Robby Cai <r63905@freescale.com> (cherry picked from commit 857a52585c92cad8d851751f859e8e23ea4ae250)
2014-12-05MLK-9951 Update CAAM driver era interfaceVictoria Milhoan
Add more CAAM era values to the CAAM driver's caam_get_era() function. Read only 32 bits of data since the data required to identify the IP_ID and MAJ_REV is located in the first 32 bits of the register. And, update the function for use with ARM/Little Endian devices. Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com> (cherry picked from commit 6050d7faf2d0c063195aa9454c130548a9f8058f)
2014-12-05MLK-9950 Remove deprecated caam_get_jrdev() from CAAM driverVictoria Milhoan
The caam_get_jrdev() function is no longer needed. The caam_jr_alloc() function is used instead to allocate a job ring device from the CAAM driver. Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com> (cherry picked from commit bae574f498f4928ee5a42abeb419b045af5e1d91)
2014-12-05MLK-9957 mtd: NAND: fix the kernel panic issue for NAND suspend/resumeAllen Xu
The branch determined by GPMI_IS_MX6SX() should not include acquire_dma_channels() function which causes unbalanced dma request/release on other platform. Removed GPMI_IS_MX6SX() to make code simple although it is not necessary to restore GPMI/BCH registers for i.MX6Q/DL Signed-off-by: Allen Xu <b45815@freescale.com> (cherry picked from commit 54cd0fe03180dc44e3783bca1546e61d698abd2f)
2014-12-04MLK-9949: mtd: qspi: Handle QSPI probe error path correctlyAllen Xu
If QSPI probe failed in some cases, such as board rework, the error patch was not handled correctly. This issue may cause kernle dump in fec driver, since the pm_qos_remove_request() in QSPI driver was not invoked when probe failed. Signed-off-by: Allen Xu <b45815@freescale.com> (cherry picked from commit 350d532e0266a0a6918cbc6a17952ef64aef2521)
2014-12-01MLK-9924 mtd: qspi: QSPI1 cannot wake up WAIT mode workaroundAllen Xu
QSPI1 cannot wake up CCM from WAIT mode on SX ARD board, add pmqos to let CCM NOT enter WAIT mode when accessing QSPI1, refer to TKT245618. Signed-off-by: Allen Xu <b45815@freescale.com> (cherry picked from commit feb3b71bffc8afd440c0b972334f2479ebfefa1d)
2014-12-01MLK-9920 mtd: qspi: Add ddrsmp parameter to device treeYe.Li
Since QSPI internal DDR sample point is relevant with board layout, we can't use same value for all boards. Add ddrsmp parameter to device tree for i.MX6SX Sabreauto/Sabresd board. DDRSMP value: 0 ---- i.MX6SX Sabresd board (RevB and RevA) 2 ---- i.MX6SX Sabreauto board The Sabresd RevA board also needs to reduce clock to 29Mhz according to the Spansion spec. Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit c9115cc22d836b5b980ca20932a005ea61b20082)
2014-12-01MLK-9937 Use job ring 0 for secure memory accessVictoria Milhoan
By default, job ring 0 is the owner of the Secure Memory area within CAAM. This patch modifies the Secure Memory module to use job ring 0 for all accesses. Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com> (cherry picked from commit bb447bfb241d34492365bf881257b1a742a29c02)
2014-11-29MLK-9932-2 usb: gadget: g_serial: fix oops during process contextPeter Chen
We meet below oops at rare cases when we do g_serial test at SMP platform, in our cases, the g_serial will be removed after some access. It seems the tty still tries to write when the port is freed. 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: usb_f_acm u_serial g_serial libcomposite configfs ov5642_camera ov5640_camera_mipi ov5640_camera mxc_dcic mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc evbug CPU: 0 PID: 25 Comm: kworker/0:1 Not tainted 3.10.53-02612-g3ac9b04-dirty #210 Workqueue: events flush_to_ldisc task: a80ae580 ti: a80e8000 task.ti: a80e8000 PC is at _raw_spin_lock_irqsave+0x18/0x58 LR is at _raw_spin_lock_irqsave+0x18/0x58 pc : [<8068490c>] lr : [<8068490c>] psr: 800f0093 sp : a80e9da0 ip : 00000001 fp : a8d97c00 r10: a8d97e88 r9 : a8d97c00 r8 : 0000000d r7 : 0000006c r6 : a8da7400 r5 : 200f0013 r4 : 000000b0 r3 : a80e8000 r2 : 00000000 r1 : a8d97c00 r0 : 00000001 Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c53c7d Table: 38cf404a DAC: 00000015 Process kworker/0:1 (pid: 25, stack limit = 0xa80e8238) Stack: (0xa80e9da0 to 0xa80ea000) 9da0: 7f095a30 00000000 000000b0 7f095a44 a8da7400 a8d95d1f a8da7400 802d8484 9dc0: a80ae580 802d5ab0 a83a2500 a8d97e70 a8d97c00 a8da7400 a8d95d1f a8d95c1f 9de0: 0000006c 0000000d a8d97c00 00000000 a8d97c00 802d7010 a8044080 00000000 9e00: 00000000 80cc00c0 806ae500 00000000 00000000 00000002 00000000 815977d0 9e20: 00000000 00000000 00000020 00000000 80cbcc40 a8044080 ffffbe45 00000000 9e40: 00000001 81598c40 00000000 806848b8 80009038 ffffffff 00000000 8004e7c8 9e60: 80cbe000 00000002 a80e9e8c 80684b9c 00000000 80051a10 a805c780 80cbcc40 9e80: a805c780 80cbcc40 a80e9f2c 80683850 81598840 8068490c 00000000 80cceed4 9ea0: 00000000 8004e744 81598840 a8ae5400 a8da7400 a8ae5410 a93a7940 a8ae5464 9ec0: a8d95d1c 0000000f a8d95c1c 802db1f4 802db118 a8105980 a8ae5400 81598840 9ee0: 8159ba00 00000000 00000000 a80e8038 81598840 800436d4 a8105998 a80e8000 9f00: a80e8030 00000001 a80e8000 a8105980 81598854 a8105998 a80e8000 a80e8030 9f20: 00000001 a80e8000 81598840 80044358 80044220 00000000 00000000 80d15701 9f40: a80e9f64 a808fe98 00000000 a8105980 80044220 00000000 00000000 00000000 9f60: 00000000 80049730 fcbb7bfd 00000000 ffdfdbfb a8105980 00000000 00000000 9f80: a80e9f80 a80e9f80 00000000 00000000 a80e9f90 a80e9f90 a80e9fac a808fe98 9fa0: 8004967c 00000000 00000000 8000e118 00000000 00000000 00000000 00000000 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 32fdff6f 9355fcea [<8068490c>] (_raw_spin_lock_irqsave+0x18/0x58) from [<7f095a44>] (gs_write_room+0x14/0x60 [u_serial]) [<7f095a44>] (gs_write_room+0x14/0x60 [u_serial]) from [<802d8484>] (tty_write_room+0x18/0x24) [<802d8484>] (tty_write_room+0x18/0x24) from [<802d5ab0>] (process_echoes+0x48/0x2a8) [<802d5ab0>] (process_echoes+0x48/0x2a8) from [<802d7010>] (n_tty_receive_buf+0x384/0x101c) [<802d7010>] (n_tty_receive_buf+0x384/0x101c) from [<802db1f4>] (flush_to_ldisc+0xdc/0x140) [<802db1f4>] (flush_to_ldisc+0xdc/0x140) from [<800436d4>] (process_one_work+0xf8/0x360) [<800436d4>] (process_one_work+0xf8/0x360) from [<80044358>] (worker_thread+0x138/0x3d4) [<80044358>] (worker_thread+0x138/0x3d4) from [<80049730>] (kthread+0xb4/0xb8) [<80049730>] (kthread+0xb4/0xb8) from [<8000e118>] (ret_from_fork+0x14/0x3c) Code: e10f5000 f10c0080 e3a00001 ebe735b3 (e1943f9f) --[ end trace b1a6974fbb8c89dc ]-- Signed-off-by: Peter Chen <peter.chen@freescale.com>
2014-11-29MLK-9932-1 usb: gadget: g_serial: fix oops during interruptPeter Chen
We meet below oops at rare cases when we do g_serial test at SMP platform, in our cases, the g_serial will be removed after some access. gserial_disconnect may be called before the complete handler is called, in this case, the port->port_usb is NULL at gs_start_tx, it matches the below oops. PC is at gs_start_tx+0x20/0x22c [u_serial] LR is at gs_write_complete+0x60/0x88 [u_serial] pc : [<7f095628>] lr : [<7f095894>] psr: 600e0193 sp : a83adc10 ip : 00000002 fp : a8849f80 r10: a803d64c r9 : a87dfeec r8 : a8849fbc r7 : a803d64c r6 : a87dfeb0 r5 : a8849f80 r4 : a87dfe00 r3 : 00000000 r2 : 00000100 r1 : a8849c24 r0 : a87dfe00 Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c53c7d Table: 38e0404a DAC: 00000015 Process kworker/0:2 (pid: 105, stack limit = 0xa83ac238) Stack: (0xa83adc10 to 0xa83ae000) dc00: 81299260 a87dfeb0 00000002 a803d64c dc20: a8849f80 a87dfe00 a8849f80 a87dfeb0 a803d64c a8849fbc 00000002 a803d64c dc40: a8849f80 7f095894 a8849fb4 00000002 a8849fbc a8849fbc a803d6a4 803ed524 dc60: a8849fb4 a8849680 00000009 00000001 80cc64e4 a803d010 a803d014 a803d684 dc80: a803d64c 00000009 803ec908 a803d170 00100000 38a9ea00 80d15d88 a803d010 dca0: a8009958 00000000 00000000 0000004b a8009900 80d1574f 00000001 803ea2f4 dcc0: 803ea2a4 a83cd140 a8009958 80079ab4 a8849b00 a8849b00 a95f9fc0 a8009900 dce0: a8009958 a83cd140 f4a00100 80bafa3c a8807000 a8807288 a8807000 80079c18 dd00: a8009900 a8009958 00000000 8007c948 8007c8c4 0000004b 0000004b 8007927c dd20: 80cbbf00 8000e948 f4a0010c 80cc6914 a83add50 80008558 7f095ca0 8068484c dd40: 400e0013 ffffffff a83add84 8000dc80 a87dfeb0 200e0013 a83add60 0000a556 dd60: a87dfe00 00000002 a87dfeb0 200e0013 80bafa3c a8807000 a8807288 a8807000 dd80: a8991d44 a83add98 7f095ca0 8068484c 400e0013 ffffffff 00000000 7f095ca0 dda0: a8808000 00000001 a8991c00 00001fff a8809000 802d59b0 00000a00 a8808000 ddc0: 00000001 802d5bec a83addf4 a8807270 00000000 a8991c00 a96bf562 a96bf462 dde0: 0000000a 000000bb a8807000 00000000 a8807000 802d7b64 80d1574f 400e0013 de00: a88072a0 80cc00c0 806ae500 a8009900 a8009958 a83cd140 f4a00100 a87dfe64 de20: a91c481c 806845b8 a8009900 80079c24 80cbbf00 0000004b 600e0193 800815c0 de40: 80cbbf00 0000004b 00000000 f4a00100 a87dfe64 8000e94c f4a0010c 80cc6914 de60: a83ade80 80008558 802db1d8 8068484c 800e0013 ffffffff a83adeb4 8000dc80 de80: a87dfe10 200e0013 00000000 00003193 a87dfe00 a8991c00 a87dfe10 a8faa500 dea0: a87dfe64 a91c491c 00000100 a87dfe00 a8991c00 a87dfe10 a8faa500 a87dfe64 dec0: a96bf51c 00000100 a96bf41c 802db1f4 802db118 a820e600 a87dfe00 81597840 dee0: 8159aa00 00000000 00000000 a83ac038 81597840 800436d4 a820e600 81597854 df00: a820e618 a83ac000 a83ac030 a820e600 81597854 a820e618 a83ac000 a83ac030 df20: 00000001 a83ac000 81597840 8004446c 80044220 00000000 00000000 80d15701 df40: a83adf64 a808fe98 00000000 a820e600 80044220 00000000 00000000 00000000 df60: 00000000 80049730 7cff2e7d 00000000 27dddefd a820e600 00000000 00000000 df80: a83adf80 a83adf80 00000000 00000000 a83adf90 a83adf90 a83adfac a808fe98 dfa0: 8004967c 00000000 00000000 8000e118 00000000 00000000 00000000 00000000 dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 e4b9dbff e5bdd7ff [<7f095628>] (gs_start_tx+0x20/0x22c [u_serial]) from [<7f095894>] (gs_write_complete+0x60/0x88 [u_serial]) [<7f095894>] (gs_write_complete+0x60/0x88 [u_serial]) from [<803ed524>] (udc_irq+0x478/0xd20) [<803ed524>] (udc_irq+0x478/0xd20) from [<803ea2f4>] (ci_irq+0x50/0x118) [<803ea2f4>] (ci_irq+0x50/0x118) from [<80079ab4>] (handle_irq_event_percpu+0x54/0x17c) [<80079ab4>] (handle_irq_event_percpu+0x54/0x17c) from [<80079c18>] (handle_irq_event+0x3c/0x5c) [<80079c18>] (handle_irq_event+0x3c/0x5c) from [<8007c948>] (handle_fasteoi_irq+0x84/0x14c) [<8007c948>] (handle_fasteoi_irq+0x84/0x14c) from [<8007927c>] (generic_handle_irq+0x2c/0x3c) [<8007927c>] (generic_handle_irq+0x2c/0x3c) from [<8000e948>] (handle_IRQ+0x40/0x90) [<8000e948>] (handle_IRQ+0x40/0x90) from [<80008558>] (gic_handle_irq+0x2c/0x5c) [<80008558>] (gic_handle_irq+0x2c/0x5c) from [<8000dc80>] (__irq_svc+0x40/0x70) Exception stack(0xa83add50 to 0xa83add98) dd40: a87dfeb0 200e0013 a83add60 0000a556 dd60: a87dfe00 00000002 a87dfeb0 200e0013 80bafa3c a8807000 a8807288 a8807000 dd80: a8991d44 a83add98 7f095ca0 8068484c 400e0013 ffffffff [<8000dc80>] (__irq_svc+0x40/0x70) from [<8068484c>] (_raw_spin_unlock_irqrestore+0x20/0x48) [<8068484c>] (_raw_spin_unlock_irqrestore+0x20/0x48) from [<7f095ca0>] (gs_write+0x48/0x68 [u_serial]) [<7f095ca0>] (gs_write+0x48/0x68 [u_serial]) from [<802d59b0>] (do_output_char+0x148/0x1b8) [<802d59b0>] (do_output_char+0x148/0x1b8) from [<802d5bec>] (process_echoes+0x184/0x2a8) [<802d5bec>] (process_echoes+0x184/0x2a8) from [<802d7b64>] (n_tty_receive_buf+0xed8/0x101c) [<802d7b64>] (n_tty_receive_buf+0xed8/0x101c) from [<802db1f4>] (flush_to_ldisc+0xdc/0x140) [<802db1f4>] (flush_to_ldisc+0xdc/0x140) from [<800436d4>] (process_one_work+0xf8/0x360) [<800436d4>] (process_one_work+0xf8/0x360) from [<8004446c>] (worker_thread+0x24c/0x3d4) [<8004446c>] (worker_thread+0x24c/0x3d4) from [<80049730>] (kthread+0xb4/0xb8) [<80049730>] (kthread+0xb4/0xb8) from [<8000e118>] (ret_from_fork+0x14/0x3c) Code: e1a04000 e28020b0 e58d2004 e3a02c01 (e593705c) Signed-off-by: Peter Chen <peter.chen@freescale.com>
2014-11-28MLK-9931-3: usb: chipidea: call pulldown line when necessaryPeter Chen
If the controller is powered down, it may not pull down dp and dm any more, so the status of dp and dm is unknown, it will confuse the device. So for controllers which will power off its controller, we need to override pulldown feature, and pull down dp and dm by software before the sytem enters suspend, and disable override feature after system resume. Besides, it fixes issue that the low speed device will be disconnected after system resume when the controller is powered off during system suspend. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2014-11-28MLK-9931-2: usb: phy: mxs: implement .pulldown_linePeter Chen
The user can override controller's behavior for 15K pulldown resistor with this API. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2014-11-28MLK-9929 net: fec: inserts VLAN tag for AVB 1722 packetFugang Duan
For AVB 1722 non-canonical packet that don't define in linux networking, we inserts VLAN tag for application to think it as VLAN packet. (cherry-picked from commit: 6a156113269dd133ac6361dcfe8fd390cdae1e5e) Signed-off-by: Fugang Duan <B38611@freescale.com>
2014-11-27MLK-9926 net: fec: add HW VLAN ctag check for VLAN hw accelerationFugang Duan
Add HW VLAN ctag check for VLAN hw acceleration. (cherry-picked from commit: 47828ce6f54d78f173e405d732b358362aa8dd51) Signed-off-by: Fugang Duan <B38611@freescale.com>
2014-11-26MLK-9919 net: fec: reinit MAC0 MII bus for MAC1 use after resume backFugang Duan
i.MX6SX-AI board has two enet MACs (MAC0 and MAC1), they share MAC0 MII bus. When PHY0 don't connect to enet MAC0, MAC0 mii bus probe phy0 failed, and the net interface is set to unattach mode. During suspend resume test, driver don't reinit MAC0 after resume back, so MII bus don't work that causes MAC1 also cannot access PHY1. The patch just is workaround that reinit MAC0 MII bus for MAC1 using. (cherry-picked from commit: 8ab1562923ef47d523e76db06af0aa3e704c5316) Signed-off-by: Fugang Duan <B38611@freescale.com>
2014-11-26MGS-304 [#1461]GPU driver will cause kernel panic when allocate memory failedLoren Huang
-The issue is triggered by suspend/resume test when doing bonnie++ which will consume lots of memory. -The root cause is vivante didn't report the allocation failure to uplevel correctly which cause the improper free. -Correct the free logic to fix this issue. Date: Nov 26, 2014 Signed-off-by: Loren Huang <b02279@freescale.com> Acked-by: Jason Liu Tested-by: Peter Chen (cherry picked from commit 2378f1c0b48f1c632a96c1e6c1107e2773f34170)
2014-11-25MLK-9413 mmc: sdhci: fix potential unblanced regulator disableDong Aisheng
The host->vmmc will be in disabled state if there's no card detected. In that case arbitrarily disabling the host->vmmc in sdhci_remove_host() may cause the following warning due to unblanced use count of regulator. root@imx6qdlsolo:~# modprobe -r sdhci-esdhc-imx mmc3: card e624 removed ------------[ cut here ]------------ WARNING: at drivers/regulator/core.c:1727 _regulator_disable+0xe4/0x14c() unbalanced disables for VCC_SD3 Modules linked in: sdhci_esdhc_imx(-) sdhci_pltfm CPU: 0 PID: 884 Comm: modprobe Not tainted 3.10.53-02577-gd22d937 #715 [<80013b00>] (unwind_backtrace+0x0/0xf4) from [<80011524>] (show_stack+0x10/0x14) [<80011524>] (show_stack+0x10/0x14) from [<8002c290>] (warn_slowpath_common+0x54/0x6c) [<8002c290>] (warn_slowpath_common+0x54/0x6c) from [<8002c2d8>] (warn_slowpath_fmt+0x30/0x40) [<8002c2d8>] (warn_slowpath_fmt+0x30/0x40) from [<802cc054>] (_regulator_disable+0xe4/0x14c) [<802cc054>] (_regulator_disable+0xe4/0x14c) from [<802cc0ec>] (regulator_disable+0x30/0x64) [<802cc0ec>] (regulator_disable+0x30/0x64) from [<80468dfc>] (sdhci_remove_host+0x78/0x160) [<80468dfc>] (sdhci_remove_host+0x78/0x160) from [<7f005934>] (sdhci_esdhc_imx_remove+0x30/0x58 [sdhci_esdhc_imx]) [<7f005934>] (sdhci_esdhc_imx_remove+0x30/0x58 [sdhci_esdhc_imx]) from [<80313038>] (platform_drv_remove+0x18/0x1c) [<80313038>] (platform_drv_remove+0x18/0x1c) from [<803119d8>] (__device_release_driver+0x70/0xcc) [<803119d8>] (__device_release_driver+0x70/0xcc) from [<803120cc>] (driver_detach+0xac/0xb0) [<803120cc>] (driver_detach+0xac/0xb0) from [<803116c4>] (bus_remove_driver+0x7c/0xd0) [<803116c4>] (bus_remove_driver+0x7c/0xd0) from [<8006fc80>] (SyS_delete_module+0x124/0x210) [<8006fc80>] (SyS_delete_module+0x124/0x210) from [<8000e080>] (ret_fast_syscall+0x0/0x30) ---[ end trace 7bd0fb3a78254b54 ]--- root@imx6qdlsolo:~# EXT3-fs (mmcblk3p2): I/O error while writing superblock Only disable regulators if they're on when remove host controller. Signed-off-by: Dong Aisheng <b29396@freescale.com>
2014-11-25MLK-9897-2 usb: otg-fsm: check B-device state before sending polling requestLi Jun
While system resume, the connected udev as B-device may not has been resumed, if HNP polling request is sent to it, HNP polling may fail, this patch adds check of the udev state to make sure it finished resume and to be configured state before sending host request message, otherwise try next HNP polling request. Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <jun.li@freescale.com>
2014-11-25MLK-9897-1 usb: chipidea: otg: use shared queue to handle hnp pollingLi Jun
This patch moves out hnp polling from usb otg work queue to shared queue, as hnp polling call to usb_control_msg() which sends a control message and waits for it complete or timeout, so it's not proper to handle it in usb otg work queue which handles work with usb irq disabled. Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <jun.li@freescale.com>
2014-11-25MGS-298 gpu:Add new option to enable shadow memory freeLoren Huang
It's a specific requirement form customer. Environmant variable VIV_FBO_PERFER_MEM is added. When it's set, driver will free fbo shadow memory immediately when it's switch out. Original vivante patch name:cl29153.diff Date: Nov 25, 2014 Signed-off-by: Loren Huang <b02279@freescale.com> Acked-by: Jason Liu (cherry picked from commit c9d486e75fc7059050604188334ea846a25b9d13)
2014-11-25MLK-9913 net: fec: fix kernel dump when enable netdev as wakeup sourceFugang Duan
When enable CONFIG_DEBUG_SPINLOCK, kenrel boot up has kernel dump: libphy: fec_enet_mii_bus: probed BUG: spinlock bad magic on CPU#0, swapper/0/1 lock: 0xa830e2f0, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.53-02595-g68a1d76 #144 [<80014c6c>] (unwind_backtrace+0x0/0xf4) from [<80011a78>] (show_stack+0x10/0x14) [<80011a78>] (show_stack+0x10/0x14) from [<80287be0>] (do_raw_spin_lock+0x154/0x180) [<80287be0>] (do_raw_spin_lock+0x154/0x180) from [<8033b908>] (device_wakeup_enable+0x3c/0x84) [<8033b908>] (device_wakeup_enable+0x3c/0x84) from [<803cfff8>] (fec_probe+0xce8/0x1134) [<803cfff8>] (fec_probe+0xce8/0x1134) from [<80334aa0>] (platform_drv_probe+0x18/0x1c) [<80334aa0>] (platform_drv_probe+0x18/0x1c) from [<8033389c>] (driver_probe_device+0x108/0x244) [<8033389c>] (driver_probe_device+0x108/0x244) from [<80333aa8>] (__driver_attach+0x8c/0x90) [<80333aa8>] (__driver_attach+0x8c/0x90) from [<80331da0>] (bus_for_each_dev+0x60/0x94) [<80331da0>] (bus_for_each_dev+0x60/0x94) from [<80333048>] (bus_add_driver+0x1c0/0x24c) [<80333048>] (bus_add_driver+0x1c0/0x24c) from [<80334084>] (driver_register+0x78/0xf8) [<80334084>] (driver_register+0x78/0xf8) from [<8000877c>] (do_one_initcall+0x108/0x158) [<8000877c>] (do_one_initcall+0x108/0x158) from [<80d1ebe0>] (kernel_init_freeable+0x138/0x1d8) [<80d1ebe0>] (kernel_init_freeable+0x138/0x1d8) from [<806f6738>] (kernel_init+0x8/0x158) [<806f6738>] (kernel_init+0x8/0x158) from [<8000e218>] (ret_from_fork+0x14/0x3c) The warning is driver calls device_wakeup_attach() to init wakeup source, and this locks &dev->power.lock, but the lock is not initialized until register_netdev(), so we move the device_init_wakeup() to behind of register_netdev(). (cherry-picked from commit: 538271f9877c1f40c4e41f846993f964ff579908) Signed-off-by: Fugang Duan <B38611@freescale.com>
2014-11-25MLK-9741-01: ARM: IMX6SL-EVK: EPDC: add two ioctls to disable/enable EPDC ↵Fancy Fang
hardware access The two ioctls can be used to disable/enable EPDC hardware access which are required by epdc user apps to do some sync jobs. Signed-off-by: Fancy Fang <chen.fang@freescale.com> (cherry picked from commit 085c057661e7840bb5da4556a3c8844365af283a)
2014-11-25MLK-9900 mcc: tty: let mcc send recv to be symmetricRichard Zhu
- remove 1000 bytes buf size limitation - In order to be more robust, and level up the user space input/output experience. Let the mcc send and recv to be symmetrical. Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com> (cherry picked from commit e046366b78183729b8d6cbb6e35087c1d4334a4f)
2014-11-24MLK-9893 tty: serial: imx: sync the completed and cur indexFugang Duan
The current logic has one potential issue cause data buffer lost in busy system. When sdma copy data buffer count is zero, completed index also increase, which cause data buffer lost. The patch fix the issue. (cherry-picked from commit: f7b01c9263ea73b9150e8a7fa48812c1d47d0493) Signed-off-by: Fugang Duan <B38611@freescale.com>
2014-11-24MLK-9467 net: fec: init maximum receive buffer size for ring1 and ring2Fugang Duan
i.MX6SX fec support three rx ring1, the current driver lost to init ring1 and ring2 maximum receive buffer size, that cause receving frame date length error. The driver reports "rcv is not +last" error log in user case. (cherry-picked from commit: 302693524e4efed489cf1dfa676b654e2ad68088) Signed-off-by: Fugang Duan <B38611@freescale.com>
2014-11-21MLK-9889 epdc: disable the epdc pixel rate before call clk_set_rateRobby Cai
The patch "93a9e3d0b88203cb523dd92e85590683d6a85fdf ENGR00318063-6: ARM: imx6: add CLK_SET_RATE_GATE flag for PLL clocks" adds the requirement "the clock must be gated across rate change". This patch fixed it. Signed-off-by: Robby Cai <r63905@freescale.com> (cherry picked from commit 0af2848cf332ce7638a7b203279756e86d262449)
2014-11-21MLK-9870 mcc: sema4: mutex lock should be initiazledRichard Zhu
mutex lock should be initialized, otherwise there maybe kernel BUG warning. "BUG: spinlock bad magic on CPU#0, swapper/0/1" Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com> (cherry picked from commit 5db690b478afea00ca226f200ddf892b691674dd)
2014-11-19MLK-9866: mfd: si476x: FM will fail to open sometimes.Shengjiu Wang
In commit e856a0ebc23dcd2c933e3f902317652cc50f0067, we disabled wait_event_timeout for CMD_POWER_DOWN, which will cause power down failed sometimes, then FM will fail to reopen. In this patch enable the wait_event_timeout for power down. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2014-11-18ENGR00324668 mmc: core: add delay for SD3.0 UHS mode switchDong Aisheng
We may meet the following errors with a SD3.0 DDR50 cards during reboot test. mmc0: new ultra high speed DDR50 SDHC card at address aaaa mmcblk0: mmc0:aaaa SU08G 7.40 GiB mmcblk0: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00 mmcblk0: retrying using single block read mmcblk0: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0 end_request: I/O error, dev mmcblk0, sector 0 ..... Buffer I/O error on device mmcblk0, logical block 0 mmcblk0: unable to read partition table The root cause is still unknown. Since there's an errata of Sandisk eMMC card before that it requires delay for CMD6 for eMMC DDR mode to work stable, we also suspect the SD3.0 DDR requires similar delay. (Still not confirmed by Sandisk) By adding the delay, the overnight reboot test(run 2000+ times) did not show the issue anymore. Originally it can easy show the error after about 20 times of reboot test. So this patch would be the temporary workaround for Sandisk SD3.0 DDR50 mode unstable issue. Signed-off-by: Dong Aisheng <b29396@freescale.com> (cherry picked from commit ef3bce5feb2ed36c9f4483287454d35ae330dbe3)
2014-11-15MLK-9851 mtd: Change the mtd device driver build order for mfgtoolAllen Xu
i.MX6SX Sabreauto board enabled both NAND and QSPI1 drivrers, and by default, NAND driver built first in kernel compiling, and it would be load first when Kernel brought up. Since we could not guarantee all boards mounted NAND chips, we wish the Kernel could load QSPI driver first, when system mapped QSPI and NAND, the mtd device index won't change dynamically, otherwise, the mfgtool may write images to the inappropriate storage devices. The code change moved the SPI driver at the prior position of NAND driver in Makefile to solve this issue. Signed-off-by: Allen Xu <b45815@freescale.com> (cherry picked from commit 3d2d5724f7a2968b40c2ea0a70c09a3214da1496)
2014-11-14MLK-9834 mmc: sdhci-esdhc-imx: fix SD3.0 failed to resume if M/F is enabledDong Aisheng
Due to the power lost in suspend if Mega/Fast is enabled which is a new feature introduced, the static settings like tuning control in probe() function of controller will be lost which results in the later resume failed on tuning routine for SD3.0 cards(SDR50/SDR104). This patch moves the tunning setting from probe() function into register setting path before the tuning is executed. Then the tuning setting becomes dynamically and re-set again after resume for a SD3.0 card when doing tuning. Signed-off-by: Dong Aisheng <b29396@freescale.com> (cherry picked from commit 2fb6a74b8b91dad7e57d65a57eabd422a4acc25e)
2014-11-14MLK-9832-2 power: imx6_usb_charger: add sysfs_notify for "present"Peter Chen
In that case, the application can "poll" the charger "present" state. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2014-11-14MLK-9832-1 power: imx6_usb_charger: add usb_charger_is_presentPeter Chen
usb_charger_is_present is called when the usb charger is recognized or the usb charger is disconnected. Besides, it fixes a bug that the SDP does not call power_supply_changed. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2014-11-14MLK-9836-02 mcc: imx: do the error check after mcc sendRichard Zhu
add the error check after mcc_send is excuted. end the tests when there is an error during mcc_send or mcc_recv. Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com> (cherry picked from commit c549c2a5ba57a300185f815c3a1b00c875e85fb7)
2014-11-14MLK-9835 mcc: imx6sx: update the tty apis to stringRichard Zhu
- change the msg type of the mcc tty interface from unsigned int to the string, and set the limitation on the length < 1000 - let mcc test bulit-in in default - Co-operated with "MCC Virtual TTY EXAMPLE" of MQX/M4, and use the unit_test named mxc_mcc_tty_test.out, to do the unit tests. - MQX/M4 would send back the spring sent by userspace of the Linux/A9 directly. useage howto: first of all, start the "MCC Virtual TTY EXAMPLE" before the begin of the unit test at MQX/M4 side. Linux/A9: step1: use unit test to configure ttyMCC. -------------------------------------------------------- ./mxc_mcc_tty_test.out /dev/ttyMCCp0 115200 R 100 1000 & Serial port /dev/ttyMCCp0 opened step2: write string to ttyMCC from user space. and the string would be sent back by MQX/M4 and received by mxc_mcc_tty_test directly. -------------------------------------------------------- echo abcd > /dev/ttyMCCp0 root@imx6sxsabresd:~# imx mcc tty receive abcd . [1] READ finished :5 bytes abcd Log of MQX/M4: ***** MCC Virtual TTY EXAMPLE ***** Please wait : 1) A9 peer is ready Then press "S" to start the demo ******************************** Press "S" to start the demo : s Responder task started, MCC version is 002.000 Responder task received a msg from [0,0,1] endpoint Message: Size=3e8, DATA = "abcd " Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com> (cherry picked from commit e440a7331c493526ee8a1b146a6da0312bc2dc0c)