summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2015-08-10MGS-925 [#1818] fix GPU kernel crash with 2D OpenVGrel_imx_3.14.38_6qp_gaXianzhong
OpenVG cannot go to the GPU MMU virtual mapping code, This is regression from MGS-896 fix with the coding flaw, The fix is to keep OpenVG check path as original code. Date: Aug 09, 2015 Signed-off-by: Xianzhong <b07117@freescale.com> (cherry picked from commit 112eb89c301d35fdfecb245e86f07b3fa6fec8fa)
2015-07-31regmap: Use regcache_mark_dirty() to indicate power loss or resetKevin Cernekee
Existing regmap users call regcache_mark_dirty() as part of the suspend/resume sequence, to tell regcache that non-default values need to be resynced post-resume. Add an internal "no_sync_defaults" regmap flag to remember this state, so that regcache_sync() can differentiate between these two cases: 1) HW was reset, so any cache values that match map->reg_defaults can be safely skipped. On some chips there are a lot of registers in the reg_defaults list, so this optimization speeds things up quite a bit. 2) HW was not reset (maybe it was just clock-gated), so if we cached any writes, they should be sent to the hardware regardless of whether they match the HW default. Currently this will write out all values in the regcache, since we don't maintain per-register dirty bits. Suggested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Kevin Cernekee <cernekee@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 1c79771a7270278e6ff486edf4dfeb8c4fc01ee0)
2015-07-31regmap: Add a helper function for regcache sync testKevin Cernekee
We're going to add another "does this register need syncing?" check, so rather than repeating it in three places, we'll separate all of the relevant logic into a helper function. Signed-off-by: Kevin Cernekee <cernekee@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 3969fa080661dcdf20d04392b900189086e04c2c)
2015-07-29MGS-896 [#1818] Kernel panic when run mesa_copytex on 6qp boardShawn Xiao
After enable dynamic mmu mapping, all the address should be mapped dynamically including the address located in static mapping region. Since the static mapping is linear, the upper function can use the mapped address as the physical address. However dynamic mapping break this rule and cause some issues. To keep the rule still work, limit dynamic mapping happens over the mmu dynamic start address. Date July 27, 2015 Signed-off-by: Shawn Xiao <b49994@freescale.com>
2015-07-22MGS-791 [#1818] Unmaped virtural address cause MMU exceptionShawn Xiao
In the original GPU driver, there is no way to map the virtual memory dynamically. All the MMU table is built on beginning. However, there is a chance that the system alloc the memory whoes address is beyond the original MMU table region. When such kind of virtual address is passed to GPU, there will be MMU excetion because of lacking necessary mapping. This patch adds the case of gcvFEATURE_MMU in the hardware feature check function. So that the virtual memory can be mapped dynamically. Date July 14, 2015 Signed-off-by: Shawn Xiao <b49994@freescale.com>
2015-07-21MLK-11269-2 usb: chipidea: host: avoid check PORT_SUSPEND wronglyPeter Chen
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>
2015-07-20MLK-11260 [EPDC]: Move the EPDC firmware to /lib/firmware/imx/epdcOliver Brown
Moving the EPDC firmware to /lib/firmware/imx/epdc. Signed-off-by: Oliver Brown <oliver.brown@freescale.com> (cherry picked from commit 9712d9cdd565280f8cc458af1e73e43dc677e29f)
2015-07-20mtd: nand: reduce the warning noise when the ECC is too weakThomas Petazzoni
In commit 67a9ad9b8a6f ("mtd: nand: Warn the user if the selected ECC strength is too weak"), a check was added to inform the user when the ECC used for a NAND device is weaker than the recommended ECC advertised by the NAND chip. However, the warning uses WARN_ON(), which has two undesirable side-effects: - It just prints to the kernel log the fact that there is a warning in this file, at this line, but it doesn't explain anything about the warning itself. - It dumps a stack trace which is very noisy, for something that the user is most likely not able to fix. If a certain ECC used by the kernel is weaker than the advertised one, it's most likely to make sure the kernel uses an ECC that is compatible with the one used by the bootloader, and changing the bootloader may not necessarily be easy. Therefore, normal users would not be able to do anything to fix this very noisy warning, and will have to suffer from it at every kernel boot. At least every time I see this stack trace in my kernel boot log, I wonder what new thing is broken, just to realize that it's once again this NAND ECC warning. Therefore, this commit turns: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at /home/thomas/projets/linux-2.6/drivers/mtd/nand/nand_base.c:4051 nand_scan_tail+0x538/0x780() Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 3.16.0-rc3-dirty #4 [<c000e3dc>] (unwind_backtrace) from [<c000bee4>] (show_stack+0x10/0x14) [<c000bee4>] (show_stack) from [<c0018180>] (warn_slowpath_common+0x6c/0x8c) [<c0018180>] (warn_slowpath_common) from [<c001823c>] (warn_slowpath_null+0x1c/0x24) [<c001823c>] (warn_slowpath_null) from [<c02c50cc>] (nand_scan_tail+0x538/0x780) [<c02c50cc>] (nand_scan_tail) from [<c0639f78>] (orion_nand_probe+0x224/0x2e4) [<c0639f78>] (orion_nand_probe) from [<c026da00>] (platform_drv_probe+0x18/0x4c) [<c026da00>] (platform_drv_probe) from [<c026c1f4>] (really_probe+0x80/0x218) [<c026c1f4>] (really_probe) from [<c026c47c>] (__driver_attach+0x98/0x9c) [<c026c47c>] (__driver_attach) from [<c026a8f0>] (bus_for_each_dev+0x64/0x94) [<c026a8f0>] (bus_for_each_dev) from [<c026bae4>] (bus_add_driver+0x144/0x1ec) [<c026bae4>] (bus_add_driver) from [<c026cb00>] (driver_register+0x78/0xf8) [<c026cb00>] (driver_register) from [<c026da5c>] (platform_driver_probe+0x20/0xb8) [<c026da5c>] (platform_driver_probe) from [<c00088b8>] (do_one_initcall+0x80/0x1d8) [<c00088b8>] (do_one_initcall) from [<c0620c9c>] (kernel_init_freeable+0xf4/0x1b4) [<c0620c9c>] (kernel_init_freeable) from [<c049a098>] (kernel_init+0x8/0xec) [<c049a098>] (kernel_init) from [<c00095f0>] (ret_from_fork+0x14/0x24) ---[ end trace 62f87d875aceccb4 ]--- Into the much shorter, and much more useful: nand: WARNING: MT29F2G08ABAEAWP: the ECC used on your system is too weak compared to the one required by the NAND chip Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> (cherry picked from commit 54c39e9ba3a93e3848ad8f9d082c39010cfc5e73)
2015-07-16MLK-11183-2 usb: chipidea: otg: disable otg interrupt before flush_workqueuePeter Chen
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)
2015-07-16MLK-11183-1 usb: chipidea: host: fix NULL pointer problem for fast ↵Peter Chen
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)
2015-07-16MLK-11183 usb: chipidea: otg: complete state machine before cancel hrtimerLi Jun
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)
2015-07-15MLK-11242-2 video: mxsfb: refine lcdif clock managementFancy Fang
Remove unnecessary clk enable/disable calls. This will make the driver logic clear and easier to maintaine. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
2015-07-15MLK-11242-1 video: mxsfb: delay set_par actions when fb is in blankFancy Fang
When the fb is in blank mode, do set_par has no real meaning. So delaying this action in the later unblank request. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
2015-07-15MLK-11185 video: mxc ipuv3 fb: Support setting bpp to fbi->var from dtbSandor Yu
The value bpp of fbi->var can be initialized according to kernel parameter video option. But, for some cases, there is no video option. In these cases, the bpp value should be configured according to the 'bpp' property in dtb if provided, otherwise the frame buffer will always work in bpp 16 mode Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-07-15MLK-11233 thermal: imx: disable the thermal_clk when thermal driver probe failedBai Ping
If the thermal driver probe failed after the thermal_clk has been enabled, disable the thermal_clk before return. Signed-off-by: Bai Ping <b51503@freescale.com>
2015-07-14Input: ads7846 - fix device usage within attribute showAlexander Stein
With commit e585c40ba (Input: ads7846 - convert to hwmon_device_register_with_groups()) the device passed to the attribute's show function isn't the spi device as before. So fixup the passed device to ads7846_read12_ser. Signed-off-by: Alexander Stein <alexanders83@web.de> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-13MLK-11241: vadc: Add s_mbus_fmt interfaceSandor Yu
mx6s capture driver will check the return value of s_mbus_fmt, captuer driver will failed if subdev driver no s_mbus_fmt function. so add s_mbus_fmt function to vadc subdev driver. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-07-13MLK-10732-2: mxsfb: Add FB_VMODE_YWRAP supportSandor Yu
Add FB_VMODE_YWRAP support in mxsfb driver. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-07-13MLK-10732-1 mxsfb: support FBIOPUT_VSCREENINFO update frame bufferguoyin.chen
Enable mxsfb frame buffer update by FBIOPUT_VSCREENINFO ioctl. The patch cherry pick from android branch. MA-5963-4 Upgrade kernel version from 3.10.y to 3.14.y Backport imx_3.10_y_android's mxsfb driver to add vsync timestamp Signed-off-by: guoyin.chen <guoyin.chen@freescale.com> (cherry picked from commit 8f24453e0b081f16338916f75ce73dc896f93f8e)
2015-07-13MLK-11240 video: mxsfb: refine the lcdif driver code logicFancy Fang
Do some code logic refinement for lcdif driver to make it more reasonable and strong. set_par and enable_controller calling sequences should be more exact. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
2015-07-13MLK-11235-5 usb: chipidea: imx: add HSIC support for imx7dPeter Chen
Add HSIC support for imx7d. We have not supported HSIC as system wakeup as well as HSIC remote wakeup function at DSM mode, since the 24M OSC can't be off and the SoC internal regulators can't be off at this mode, that will keep power consumption much higher. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2015-07-10MLK-11236 mtd: gpmi-nand: Fix nand runtime PM issueYe.Li
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>
2015-07-10MLK-11184 mmc: sdhci: wait data error interrupts to handle transfer error ↵Dong Aisheng
for data commands Due to the data may be still in transferring if a cmd error of data command happens, the next quick reset during data transfer may cause host controller unpridicable issues. e.g. On MX6Q/MX6QP, if reset during ADMA is busy moving data from FIFO to memory, we can observe 32 bytes lost issue sometimes in a very lower possibility especially for SD3.0 cards because the tuning command can easily fail on cmd error before data transfer complete. Let's using data error interrupts to handle transfer error of a data command instead of only checking cmd error, then can make sure the next safe reset only happens when data transfer is done. After fixing, the SD3.0 can pass 3 days reboot stress test while it could easily fail on only one night stress test before. Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
2015-07-10mmc: sdhci: fix low memory corruptionJiri Slaby
When dma mapping (dma_map_sg) fails in sdhci_pre_dma_transfer, -EINVAL is returned. There are 3 callers of sdhci_pre_dma_transfer: * sdhci_pre_req and sdhci_adma_table_pre: handle negative return * sdhci_prepare_data: handles 0 (error) and "else" (good) only sdhci_prepare_data is therefore broken. When it receives -EINVAL from sdhci_pre_dma_transfer, it assumes 1 sg mapping was mapped. Later, this non-existent mapping with address 0 is kmap'ped and written to: Corrupted low memory at ffff880000001000 (1000 phys) = 22b7d67df2f6d1cf Corrupted low memory at ffff880000001008 (1008 phys) = 63848a5216b7dd95 Corrupted low memory at ffff880000001010 (1010 phys) = 330eb7ddef39e427 Corrupted low memory at ffff880000001018 (1018 phys) = 8017ac7295039bda Corrupted low memory at ffff880000001020 (1020 phys) = 8ce039eac119074f ... So teach sdhci_prepare_data to understand negative return values from sdhci_pre_dma_transfer and disable DMA in that case, as well as for zero. It was introduced in 348487cb28e66b032bae1b38424d81bf5b444408 (mmc: sdhci: use pipeline mmc requests to improve performance). The commit seems to be suspicious also by assigning host->sg_count both in sdhci_pre_dma_transfer and sdhci_adma_table_pre. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: stable@vger.kernel.org # 4.0+ Fixes: 348487cb28e6 Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Haibo Chen <haibo.chen@freescale.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2015-07-08MLK-10452 [iMX6SL/TIC/PXP] - imxv4l2sink incorrect color for 24bpp or 32bppOliver Brown
The color is incorrect for 24bpp and 32 bpp framebuffer. Needed to add cases to support 24bpp and 32bpp. Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
2015-07-08MLK-11223 [EPDC FB V2] - Need to add support for basic epdc waveformsOliver Brown
The driver will now read the firmware header and detect whether basic or advanced alogorithms are used. Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
2015-07-08MLK-11224 hdmi: Fix fbi var overwrite issueSandor Yu
When hdmi driver rebuild a new modelist, the fbi var may overwrited by fbcon. Reinitialize fbi var when video mode same as previous to fix this issue. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-07-07MLK-10507 video: mxsfb: clear vsync and frame_done irqs immediately in ISRFancy Fang
The vsync and frame_done irqs should be cleared in the ISR. Otherwise, the unrequired irq may be triggered in a wrong moment. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
2015-07-07MLK-11123-18 usb: chipidea: otg: remove hnp_enable inputLi Jun
Since we use dt property hnp_support to decide if HNP is enabled, so remove hnp_enable input file. Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-07MLK-11123-17 usb: common: remove of_usb_otg_adp_supportLi Jun
Since we have of_usb_set_otg_caps to cover all otg related features, remove of_usb_otg_adp_support. Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-07MLK-11123-16 usb: chipidea: otg: remove adp_support from ci_hdrc_platform_dataLi Jun
Since we introduce usb_otg_caps in ci_hdrc_platform_data to cover all otg related features, remove adp_support from ci_hdrc_platform_data. Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-07MLK-11123-14 usb: gadget: serial: create otg descriptor by otg capabilitiesLi Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-07MLK-11123-13 usb: gadget: mass_storage: create otg descriptor by otg ↵Li Jun
capabilities Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-07MLK-11123-12 usb: gadget: ether: create otg descriptor by otg capabilitiesLi Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while ether unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-07MLK-11123-11 usb: gadget: configfs: create and init otg descriptor by otg ↵Li Jun
capabilities Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-07MLK-11123-10 usb: gadget: add otg descriptor allocate and init interfaceLi Jun
Allocate usb otg descriptor and initialize it according to gadget's otg capabilities, if usb_otg_caps is not set, keep settings as current gadget drivers. With this 2 new interfaces, gadget can use usb_otg_descriptor for OTG 1.x, and usb_otg20_descriptor for OTG 2.0 or above, and otg features can be decided by the combination of usb hardware property and driver config. Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-07MLK-11123-9 usb: chipidea: update ci_otg_is_fsm_mode conditionsLi Jun
After introduce usb otg properties, update ci_otg_is_fsm_mode conditions to be depending on both usb hardware properties and usb driver config, also resolve a compile issue in debug.c after the API change. Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-07MLK-11123-8 usb: chipidea: set usb gadeget's otg capabilitiesLi Jun
Set gadget's otg capabilities according to controller's capability and otg properties in device tree. Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-07MLK-11123-7 usb: common: add API to set otg features by device treeLi Jun
Check property of usb hardware to get otg version and if SRP, HNP and ADP are disabled. Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-07MLK-11123-5 usb: gadget: composite: USB_DT_OTG request handling updateLi Jun
According to gadget otg revision to setup buffer, copy usb_otg_descriptor from config's descriptor if host requests USB_DT_OTG. Signed-off-by: Li Jun <jun.li@freescale.com>
2015-07-06Revert "MLK-11080-2 bcmdhd: add WL_HOST_WAKEUP support"Dong Aisheng
WL_HOST_WAKEUP feature causes system suspend/resume break, so revert. This reverts commit 2ce8a1ad56f76a072656c0d244c3b1f72603fac0.
2015-07-03MLK-11206: input: misc: fxls8471: support ±2g/±4g/±8g dynamically selectionGao Pan
Support ±2g/±4g/±8g dynamically selection for motion sensor fxls8471. Set the sensor mode to standby mode before changing the scale range with the command "echo 0 > enable". The scale range can be changed with the command "echo 0/1/2 > range". Signed-off-by: Gao Pan <b54642@freescale.com>
2015-07-03MLK-11218: misc: fxos8700: support ±2g/±4g/±8g dynamicallyGao Pan
Support ±2g/±4g/±8g dynamically selection for motion sensor fxos8700. Set the sensor mode to standby mode before changing the scale range with the command "echo 0 > enable". The scale range can be changed with the command "echo 0/1/2 > range". Signed-off-by: Gao Pan <b54642@freescale.com>
2015-07-03MLK-11215: hdmi: Fix hdmi hang issue on some specific monitorSandor Yu
hdmi will hang when cable connect from DVI monitor to some specific hdmi monitor. The issue can duplicate as followed steps: 1. boot up device, hdmi display as second display. 2. unblank hdmi display, then connect cable to DVI monitor. 3. connect cable to HDMI monitor. After the cable connect changed, hdmi work mode will change from DVI to hdmi mode, but video mode is not changed. hdmi overflow interrupter can't been clean in such process. Check hdmi work mode, and reconfigure fb and hdmi if work mode change. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-07-02MLK-11212 iio: adc: correct the adc register read fail issueHaibo Chen
Read the register only when the adc register address is 4 byte aligned. Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
2015-07-02MLK-11147 usb: chipidea: otg: keep irq enabled if otg work had been queuedLi Jun
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>
2015-06-30MLK-11200 usb: otg: avoid DMA to kernel stack for HNP pollingLi Jun
HNP polling uses a kernel stack variable when sending the HNP polling control message, which causes dma-debug to complain, fix it by adding host_req_flag to otg_fsm struct, so it's done by kmallocing. Signed-off-by: Li Jun <jun.li@freescale.com>
2015-06-30MLK-10507: ov5640 mipi: Keep sensor in power up state after probeSandor Yu
Sometimes ov5640 can not working on iMX7D ARM2 board, ov5640 signal is not accepted by imx7d mipi csi phy. Remove power down function and keep ov5640 power up after driver probe, the issue is fixed. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-06-30MLK-11063-3: ov5647 mipi: Add ov5647 mipi driverSandor Yu
ov5647 mipi driver. Support VGA, 1280x720p30, 1920x1080p30 and 2952x1944p15 mode. Only support Raw data output. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-06-30MLK-11063-2: mipi csi: Add raw8 data supportSandor Yu
Add raw8 data support. Signed-off-by: Sandor Yu <R01008@freescale.com>