04 Jan, 2015

1 commit


24 Dec, 2014

1 commit

  • 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

    Robby Cai
     

23 Dec, 2014

2 commits


22 Dec, 2014

7 commits

  • 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
    (cherry picked from commit 290744e3b40a563319324e234fa5a65b49fd4d82)

    Victoria 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
    (cherry picked from commit 84fcc913c4017d7c60ad19d07f277165b10e7848)

    Victoria Milhoan
     
  • 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
    Reviewed-by: Phillips Kim-R1AAHA
    Reviewed-by: Fleming Andrew-AFLEMING
    Signed-off-by: Herbert Xu
    (cherry picked from commit 3ebfa92f49a61a00e967112632ad10e92998bb75)
    (cherry picked from commit 0df11f0e57b83eb5fc2efb61277e57dafbb804f5)

    Andrei Varvara
     
  • 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
    (cherry picked from commit 9758f15682435ed7edbc98e02c01263e9f64f3c9)

    Victoria Milhoan
     
  • 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
    Signed-off-by: Herbert Xu
    Signed-off-by: Greg Kroah-Hartman

    (cherry picked from commit cad4e11a9778eee2e8c52e1df7bf1008fb49a580)
    (cherry picked from commit 96e048ff8c7c62e2f1fe06f0da1fea791a220c0e)

    Cristian Stoica
     
  • - 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
    (cherry picked from commit b5ed6b9a8bf5ba7ce4dfe3a3aacdec9634397b6c)

    Richard 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
    (cherry picked from commit e9796dfbae2a8b732022a6c96b3d7803099a70b5)

    Richard Zhu
     

20 Dec, 2014

1 commit


19 Dec, 2014

9 commits

  • 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
    Signed-off-by: Peter Chen

    Peter Chen
     
  • Implement reset_resume callback so that the mixer values are properly
    restored. Still no boot quirks are called, so it might not work well
    on some devices.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • 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
    (cherry picked from commit 16043ad0ad96aa04a90614e473aa17980af4b8af)

    Robin 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
    (cherry picked from commit 17f472aa698aba0af5da4566df447e23306f4289)

    Robin Gong
     
  • Add new ecspi tx sdma script in the head file.

    Signed-off-by: Robin Gong
    (cherry picked from commit 9ca3cf4f301dc6d4130624814e689b676125fd36)

    Robin 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
    (cherry picked from commit 61fec9e4511e7626a2c5299f37c12cca95d12e88)

    Robin Gong
     
  • Change dma timeout value with the transfer length if the length bigger than
    1 MB.

    Signed-off-by: Robin Gong
    (cherry picked from commit fb12a91a9ce6cd99d4c08483627ea0c94363ee08)

    Robin Gong
     
  • 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
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org
    (cherry picked from commit c1aefbdd050e1fb15e92bcaf34d95b17ea952097)
    (cherry picked from commit bf9cdf03f8d30db8e5c14645e1be9b49b0e945da)

    Charles Keepax
     
  • For the QSPI byte address not aligned in ROM code and kernel, we have to reset
    power cycle to workaroud this issue. Use WDOG_B pin to trigger PWRON of pfuze.

    Signed-off-by: Robin Gong
    (cherry picked from commit 86f82eadc612a746ab57760f78754e0619aa48b1)

    Robin Gong
     

18 Dec, 2014

1 commit

  • 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:

    [] (gckKERNEL_FindDatabase+0x8/0xec) from [] (vidmem_show+0x2c/0x60)
    [] (vidmem_show+0x2c/0x60) from [] (seq_read+0x1dc/0x47c)
    [] (seq_read+0x1dc/0x47c) from [] (vfs_read+0x98/0x144)
    [] (vfs_read+0x98/0x144) from [] (SyS_read+0x3c/0x78)
    [] (SyS_read+0x3c/0x78) from [] (ret_fast_syscall+0x0/0x30)

    Date: Dec 18, 2014
    Signed-off-by: Xianzhong
    Acked-by: Jason Liu
    (cherry picked from commit 5b59e9d67ee1ce25e43fcb8934fcf0c75abfd0e3)

    Xianzhong
     

17 Dec, 2014

8 commits


12 Dec, 2014

3 commits


11 Dec, 2014

2 commits

  • The kernel log is

    [] (__dabt_svc+0x38/0x60) from [] (mutex_lock+0xc/0x4c)
    [] (mutex_lock+0xc/0x4c) from [] (snd_soc_dapm_stream_event+0x20/0xe4)
    [] (snd_soc_dapm_stream_event+0x20/0xe4) from [] (close_delayed_work+0x3c/0x48)
    [] (close_delayed_work+0x3c/0x48) from [] (process_one_work+0xfc/0x34c)
    [] (process_one_work+0xfc/0x34c) from [] (worker_thread+0x144/0x3a4)
    [] (worker_thread+0x144/0x3a4) from [] (kthread+0xa4/0xb0)
    [] (kthread+0xa4/0xb0) from [] (ret_from_fork+0x14/0x3c)

    The alsa driver use shedule_delayed_work when close pcm in remove module.
    But after remove module the resource is released, so there will be kernel dump.
    So here use ignore_pmdown_time to avoid to use shedule_delayed_work, then this
    issue can be avoided.

    Signed-off-by: Shengjiu Wang

    Shengjiu Wang
     
  • 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

    Sandor Yu
     

10 Dec, 2014

3 commits

  • NAND scans the bad blocks during kernel boots up, which invokes the
    gpmi_ecc_read_oob function to check the badblock mark for each block. In
    this function the oob data was raw read from NAND chip without ECC, so
    it hardly to guarantee the consistency of the data considering the
    possible bitflips. It found that in some MLC NAND the oob data changed
    and consequently the BBT changed in different power cycles. This issue
    may cause the UBIFS mount failed.

    To fix this issue, add "nand_on_flash_bbt" option in dts to store the BBT
    in NAND flash. On the first time kernel boot up, all bad blocks and
    probably some fake bad block would be recognized and be recorded in
    on-nand bad block table. From the second time boot, kernel will read BBT
    from NAND Flash rather than calling gpmi_ecc_read_oob function to check
    bad block.

    No bad block would be missed when create BBT since the probability that
    16bit bad block mark filps from 0x00 to 0xFF is extremely low.

    Signed-off-by: Allen Xu
    (cherry picked from commit d957353768a1b6d39b340b9d10b22fc42b0aa8e2)

    Allen Xu
     
  • stream off should be called by pxp_close when stream is on.

    Signed-off-by: Liu Xiaowen
    (cherry picked from commit 481208f831519db30b3e33ddabefdd1fc66417d9)

    Liu Xiaowen
     
  • use the string "okay" instead to enable backlight

    Signed-off-by: Robby Cai
    (cherry picked from commit 5468fd8a98086ec68347f92c4a525ea4c1b71c5f)

    Robby Cai
     

09 Dec, 2014

1 commit

  • 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
    (cherry picked from commit 857a52585c92cad8d851751f859e8e23ea4ae250)

    Robby Cai
     

06 Dec, 2014

1 commit

  • 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
    (cherry picked from commit 6050d7faf2d0c063195aa9454c130548a9f8058f)

    Victoria Milhoan