summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2015-02-06MLK-10227 video: mxsfb: Correct interrupt handlingLiu Ying
We've got a race condition bewteen the interrupt handler mxsfb_irq_handler() and the function mxsfb_wait_for_vsync() on the flag host->wait4vsync. If a CUR_FRAME_DONE interrupt comes and we just finish setting host->wait4vsync to be 1 in mxsfb_wait_for_vsync() before we go to the interrupt handler, we are likely to see the VSYNC_EDGE interrupt status bit asserted in the interrupt handler for the CUR_FRAME_DONE interrupt, disable the not yet enabled VSYNC_EDGE interrupt and finally clear host->wait4vsync. Then, we go back to mxsfb_wait_for_vsync() and enable the VSYNC_EDGE interrupt with host->wait4vsync=0. This may leave the VSYNC_EDGE interrupt enabled all the time and never get a chance to be disabled in the interrupt handler. So, we are deemed to hang up because the uncleared VSYNC_EDGE interrupt status bit will cause the CPU to be trapped forever, according to SoC designer's words. This patch corrects the interrupt handling to handle only the interrupts which are acknowledged by checking both the interrupt enablement bits and the status bits but not the status bits only. This may avoid any bogus interrupt from being handled. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit 24e1e55076b624f9dc93c1f23e14dd024bdff1c7)
2015-02-06MLK-10218-1 charger: imx6_usb: change detection timeout to 500msPeter Chen
With IC engineer confirmation, 500ms is enough to detect whether it is a standard USB connection or not. Decrease the timeout value can reduce the system suspending time if it is not a standard USB connection. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2015-02-04MLK-10196-4 usb: phy: mxs: Using regulator phy-3p0Peter Chen
It is one of PHY's power, and we need to enable it to keep signal quality good, and pass eye diagram test. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2015-02-04MLK-10196-3 regulator: anatop: Add non core enable/disablePeter Chen
Add non core enable/disable API. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2015-02-04usb: udc-core: add is_selfpowered sys entryPeter Chen
The user can read it through sys entry. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-02-04usb: chipidea: udc: add set_selfpowered gaget opsPeter Chen
The gadget power property will be used at get_status request. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-02-02MLK-10116 tty: serial: imx: fix flush buffer issue when module clock is at 4MhzFugang Duan
In general, uart module clock require it is great than 80Mhz to match 5Mbps baud rate. When test below 14Mhz module clock, software reset cause state machines off normal. And for i.MX6SL evk board low power test, it set uart module clock to 4Mhz, which cause console port print out messy code. The patch just is workaround to fix console issue. Signed-off-by: Fugang Duan <B38611@freescale.com> (cherry picked from commit d7061a8c6b17f1a0d9b7f161967d538b1a408e5c)
2015-02-02MLK-10080 serial: imx: Fix imx_flush_buffer()Fabio Estevam
When running an userspace program that does a 'tcflush(fd, TCIOFLUSH)' call we still see the last received character in the URXD register afterwards. Clear UCR2_SRST bit so that the FIFO is flushed properly. Since UCR2_SRST also resets some UART registers, we need to save and restore some of them. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> (cherry picked from commit 87a72b6a6367a714026d5f38207301e7f53b0aca)
2015-02-02MLK-10033 cpufreq: cpufreq-imx6: add cpufreq mutex for regulator enable/disableAnson Huang
System may hang if cpufreq is updated during pu enable/disable flow, add cpufreq mutex in before vddpu regulator enable/disable to make sure no any break happen. Unfortunetly, there is no better way on v3.10 since both PU management and cpufreq are based on regulator framework. Another change is increasing cpufreq to the highest setpoint and then disable cpufreq.That makes sure no any mutex OOps before reboot, such as cpufreq update thread is killed after get cpufreq mutex while xPU driver fall into PU enable/disable flow. Signed-off-by: Anson Huang <b20788@freescale.com> Signed-off-by: Robin Gong <b38343@freescale.com> (cherry picked from commit a43de999958a30a04f1df13475bc69b432c05308)
2015-02-02MLK-10084 media: mxc vout: Correct black color filling for interleaved formatsLiu Ying
In non-linear_bypass_pp and non-tiled_bypass_pp modes, the triple fbdev frame buffer would be rendered with video frames in turn. We need to fill all the three frame buffers with black color before streaming on instead of filling only one of them. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit e0155001082abc2432ec54ac86f56abbbb744fd3)
2015-02-02MLK-10111 Add error checking to the SECVIO moduleVictoria Milhoan
Add an error check after mapping the SECVIO IRQ. Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com> (cherry picked from commit 015acaecc54e6d78a2b266cf5588b974ed235a58)
2015-02-02crypto: caam - fix missing dma unmap on error pathCristian Stoica
commit 738459e3f88538f2ece263424dafe5d91799e46b upstream. If dma mapping for dma_addr_out fails, the descriptor memory is freed but the previous dma mapping for dma_addr_in remains. This patch resolves the missing dma unmap and groups resource allocations at function start. Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 77204ef5865a366573b4ee87c74daf6361039b96) (cherry picked from commit 04ed02fe44d3fbfe9e0ee0527718d7767f07d0d2)
2015-02-02MLK-9769-26 caam: fix RNG buffer cache alignmentSteve Cornelius
The hwrng output buffers (2) are cast inside of a a struct (caam_rng_ctx) allocated in one DMA-tagged region. While the kernel's heap allocator should place the overall struct on a cacheline aligned boundary, the 2 buffers contained within may not necessarily align. Consenquently, the ends of unaligned buffers may not fully flush, and if so, stale data will be left behind, resulting in small repeating patterns. This fix aligns the buffers inside the struct. Note that not all of the data inside caam_rng_ctx necessarily needs to be DMA-tagged, only the buffers themselves require this. However, a fix would incur the expense of error-handling bloat in the case of allocation failure. Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com> (cherry picked from commit 892f4439b5da36a447a16c8ea0474b51fc955274) (cherry picked from commit c948b6c2b49a1e06fa94c88154583fc718312bd5)
2015-02-02crypto: caam - remove duplicated sg copy functionsCristian Stoica
commit 307fd543f3d23f8f56850eca1b27b1be2fe71017 upstream. Replace equivalent (and partially incorrect) scatter-gather functions with ones from crypto-API. The replacement is motivated by page-faults in sg_copy_part triggered by successive calls to crypto_hash_update. The following fault appears after calling crypto_ahash_update twice, first with 13 and then with 285 bytes: Unable to handle kernel paging request for data at address 0x00000008 Faulting instruction address: 0xf9bf9a8c Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=8 CoreNet Generic Modules linked in: tcrypt(+) caamhash caam_jr caam tls CPU: 6 PID: 1497 Comm: cryptomgr_test Not tainted 3.12.19-rt30-QorIQ-SDK-V1.6+g9fda9f2 #75 task: e9308530 ti: e700e000 task.ti: e700e000 NIP: f9bf9a8c LR: f9bfcf28 CTR: c0019ea0 REGS: e700fb80 TRAP: 0300 Not tainted (3.12.19-rt30-QorIQ-SDK-V1.6+g9fda9f2) MSR: 00029002 <CE,EE,ME> CR: 44f92024 XER: 20000000 DEAR: 00000008, ESR: 00000000 GPR00: f9bfcf28 e700fc30 e9308530 e70b1e55 00000000 ffffffdd e70b1e54 0bebf888 GPR08: 902c7ef5 c0e771e2 00000002 00000888 c0019ea0 00000000 00000000 c07a4154 GPR16: c08d0000 e91a8f9c 00000001 e98fb400 00000100 e9c83028 e70b1e08 e70b1d48 GPR24: e992ce10 e70b1dc8 f9bfe4f4 e70b1e55 ffffffdd e70b1ce0 00000000 00000000 NIP [f9bf9a8c] sg_copy+0x1c/0x100 [caamhash] LR [f9bfcf28] ahash_update_no_ctx+0x628/0x660 [caamhash] Call Trace: [e700fc30] [f9bf9c50] sg_copy_part+0xe0/0x160 [caamhash] (unreliable) [e700fc50] [f9bfcf28] ahash_update_no_ctx+0x628/0x660 [caamhash] [e700fcb0] [f954e19c] crypto_tls_genicv+0x13c/0x300 [tls] [e700fd10] [f954e65c] crypto_tls_encrypt+0x5c/0x260 [tls] [e700fd40] [c02250ec] __test_aead.constprop.9+0x2bc/0xb70 [e700fe40] [c02259f0] alg_test_aead+0x50/0xc0 [e700fe60] [c02241e4] alg_test+0x114/0x2e0 [e700fee0] [c022276c] cryptomgr_test+0x4c/0x60 [e700fef0] [c004f658] kthread+0x98/0xa0 [e700ff40] [c000fd04] ret_from_kernel_thread+0x5c/0x64 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Cc: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit c9ccfcc2d0e33b3390574b41facc54cba59dbf98) (cherry picked from commit 3e2f6af66b8ad59ea1e4a47be9a3b5ba5c3e4a62)
2015-02-02MLK-10028 QSPI dynamically alloc memory for AHB readAllen Xu
QSPI may failed to alloc enough memory (256MB) for AHB read in previous implementation, especially in 3G/1G memory layout kernel. Dynamically alloc memory to avoid such issue. This implementation generally alloc 4MB memory for AHB read, it should be enough for common scenarios, and the side effect (0.6% performance drop) is minor. Previous implementation root@imx6qdlsolo:~# dd if=/dev/mtd0 of=/dev/null bs=1K count=32K 32768+0 records in 32768+0 records out 33554432 bytes (34 MB) copied, 2.16006 s, 15.5 MB/s root@imx6qdlsolo:~# dd if=/dev/mtd0 of=/dev/null bs=32M count=1 1+0 records in 1+0 records out 33554432 bytes (34 MB) copied, 1.43149 s, 23.4 MB/s After applied the patch root@imx6qdlsolo:~# dd if=/dev/mtd0 of=/dev/null bs=1K count=32K 32768+0 records in 32768+0 records out 33554432 bytes (34 MB) copied, 2.1743 s, 15.4 MB/s root@imx6qdlsolo:~# dd if=/dev/mtd0 of=/dev/null bs=32M count=1 1+0 records in 1+0 records out 33554432 bytes (34 MB) copied, 1.43158 s, 23.4 MB/s Signed-off-by: Allen Xu <b45815@freescale.com> (cherry picked from commit ebcd4437450c4f0075988ef9c8824e837546c70b)
2015-02-02MGS-304-2 [#1461] Do not leave garbase in outside pointerXianzhong
this is the enhanced fix for gpu kernel panic issue based on previous: gpu causes kernel panic when running bonnie++ with suspend/resume. Date: Jan 14, 2015 Signed-off-by: Xianzhong <b07117@freescale.com> Acked-by: Jason Liu (cherry picked from commit 5c8f06c77046e7ccca6a389af86431eb67e2b138)
2015-02-02MGS-386 [#1506] Power mutex track is buggy in gckKERNEL_DispatchZhenyong Chen
In function gckKERNEL_Dispatch, powerMutexAcquired is used to track power mutex. It is missing from gcvHAL_WRITE_REGISTER. And in some places return value of gckOS_AcquireMutex is not checked. Date: Dec 29, 2014 Signed-off-by: Zhenyong Chen <b07273@freescale.com> Acked-by: Jason Liu (cherry picked from commit ee66831d2511f80416ddee8c79893c5e7d9cbad0)
2015-02-02MLK-10054 net: fec: only restore MII bus when MAC0 PHY is not availableFugang Duan
Only restore MII bus when MAC0 PHY is not available. <fix the copyright year to 2015 by Jason Liu> Signed-off-by: Fugang Duan <B38611@freescale.com> (cherry picked from commit 60d9d8ffd950947e52b5d99967f6741734bc5b03)
2015-02-02MGS-324 [#1472] dump GPU AQAXIStatus register for AXI BUS ERRORXianzhong
AQAXiStatus register info is helpful to debug AXI BUS ERROR, need dump this GPU register when AXI BUS ERROR happen. Date: Dec 03, 2014 Signed-off-by: Xianzhong <b07117@freescale.com> Acked-by: Jason Liu (cherry picked from commit f92550c1310e339b3be4341b2032a60c1f0df280)
2014-12-24MLK-10057 PxP V4L2 output: force to call pxp_streamoff when device closesRobby Cai
By previous implementation, there's the possibility that last picture remains on screen when the program exits. This can be reproduced by not calling STREAMOFF ioctl in v4l2 output application or just trying to kill the v4l2 output program. The driver has faults to handle this case, since it depends on 'pxp->s0_vbq.streaming' variable be true in close() function to call pxp_streamoff() while the variable is set to 0 after the application calls munmap(). The driver should call pxp_streamoff() even if the application does not call STREAMOFF ioctl. This patch uses the local 'streaming' variable to track the streaming status to fix this problem. Signed-off-by: Robby Cai <r63905@freescale.com>
2014-12-23MLK-10049 csi: turn off clocks when csi module removesRobby Cai
When this module removes, turn off all csi-related clocks and also disable dummy disp-regulator in order to turn off disp-mix to save power. Signed-off-by: Robby Cai <r63905@freescale.com>
2014-12-22MLK-10036 Freescale CAAM: Add support for DSM with Mega/Fast mix onVictoria Milhoan
This patch allows CAAM to be enabled as a wakeup source for the Mega/Fast mix domain. If CAAM is enabled as a wakeup source, it will continue to be powered on across Deep Sleep Mode (DSM). This allows CAAM to be functional after the system resumes from DSM. Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com> (cherry picked from commit 290744e3b40a563319324e234fa5a65b49fd4d82)
2014-12-22MLK-9980 Modify CAAM driver to hide algorithm registered notificationsVictoria Milhoan
The CAAM driver prints a message for each algorithm it registers with the Crypto API. This patch hides the messages unless debug is enabled. Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com> (cherry picked from commit 84fcc913c4017d7c60ad19d07f277165b10e7848)
2014-12-22crypto: caam - Add new macros for building extended SEC descriptors (> 64 words)Andrei Varvara
added all supported math funtion on 8 byte boundary with immediate flag bit set automatically added MATH_SRC0_DPOVRD & MATH_SRC1_DPOVRD The function/defines above are needed for creating descriptors longer than 64 words Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Reviewed-by: Phillips Kim-R1AAHA <Kim.Phillips@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> (cherry picked from commit 3ebfa92f49a61a00e967112632ad10e92998bb75) (cherry picked from commit 0df11f0e57b83eb5fc2efb61277e57dafbb804f5)
2014-12-22MLK-9972 crypto: caam - Replace of_irq_to_resource() with irq_of_parse_and_map()Victoria Milhoan
Replace instances of of_irq_to_resource() with the simpler equivalent irq_of_parse_and_map(). A similar patch was applied previously, but lost due to later patches. Based on upstream commit f7578496a671a96e501f16a5104893275e32c33a. Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com> (cherry picked from commit 9758f15682435ed7edbc98e02c01263e9f64f3c9)
2014-12-22crypto: caam - fix addressing of struct memberCristian Stoica
commit 4451d494b1910bf7b7f8381a637d0fe6d2142467 upstream. buf_0 and buf_1 in caam_hash_state are not next to each other. Accessing buf_1 is incorrect from &buf_0 with an offset of only size_of(buf_0). The same issue is also with buflen_0 and buflen_1 Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit cad4e11a9778eee2e8c52e1df7bf1008fb49a580) (cherry picked from commit 96e048ff8c7c62e2f1fe06f0da1fea791a220c0e)
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>