23 Feb, 2017

40 commits

  • Some special SDIO devices like Broadcom WiFi driver will keep handling
    SDIO irq even after the driver is already suspended.
    This weird behavior will block the MMC host suspend during its irq
    synchronize operation in free_irq(), then the system suspend is blocked
    too and hanged.

    We add back sdio thread irq support for such WiFi driver to handle
    SDIO irqs since the sdio thread is kernel thread which does not
    block the process freeze operation during suspend.

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • BCM WiFi driver needs to take care of card detect by itself.
    Using cd-post property to tell MMC core not detect card automatically
    during host driver probe and post it untill client driver tells it to
    do it.

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • bcmdhd can't support removing host during suspend and
    driver crash when detect card after resume due to no response
    to CMD7.
    It looks bcmdhd has a special requirement to enumerate card
    by itself which is incompatible with current MMC core.
    So implement post-cd feature to allow driver to detect card
    as it wants, then we add back non-removable capability
    to avoid MMC core to redetect card after resume.

    root@imx6qdlsolo:~# echo standby > /sys/power/state
    PM: Syncing filesystems ... done.
    PM: Preparing system for standby sleep
    Freezing user space processes ... (elapsed 0.001 seconds) done.
    Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    PM: Entering standby sleep
    evbug: Event. Dev: input3, Type: 0, Code: 0, Value: 1
    evbug: Event. Dev: input2, Type: 0, Code: 0, Value: 1
    PM: suspend of devices complete after 652.363 msecs
    PM: suspend devices took 0.660 seconds
    PM: late suspend of devices complete after 1.148 msecs
    PM: noirq suspend of devices complete after 1.043 msecs
    Disabling non-boot CPUs ...
    CPU1: shutdown
    Enabling non-boot CPUs ...
    CPU1 is up
    PM: noirq resume of devices complete after 0.534 msecs
    PM: early resume of devices complete after 0.553 msecs
    evbug: Event. Dev: input2, Type: 1, Code: 116, Value: 1
    evbug: Event. Dev: input2, Type: 0, Code: 0, Value: 0
    evbug: Event. Dev: input2, Type: 1, Code: 116, Value: 0
    evbug: Event. Dev: input2, Type: 0, Code: 0, Value: 0
    mmc1: error -110 during resume (card was removed?)
    PM: resume of devices complete after 605.525 msecs
    PM: resume devices took 0.610 seconds
    PM: Finishing wakeup.
    Restarting tasks ... done.
    WARNING: driver bcmsdh_sdmmc did not remove its interrupt handler!
    root@imx6qdlsolo:~# Unable to handle kernel NULL pointer dereference at virtual address 0000022c
    pgd = 80004000
    [0000022c] *pgd=00000000
    Internal error: Oops: 17 [#1] PREEMPT SMP ARM
    Modules linked in: bcmdhd evbug ov5647_camera_mipi mxc_mipi_csi mx6s_capture
    CPU: 1 PID: 780 Comm: kworker/u4:4 Not tainted 4.1.15-01434-g70f4b36 #1310
    Hardware name: Freescale i.MX7 Dual (Device Tree)
    Workqueue: kmmcd mmc_rescan
    task: a974af80 ti: a846e000 task.ti: a846e000
    PC is at _raw_spin_lock_irqsave+0x1c/0x5c
    LR is at get_parent_ip+0x10/0x2c
    pc : [] lr : [] psr: 60050093
    sp : a846fc20 ip : 0001001f fp : a800b000
    r10: 00000000 r9 : 00000001 r8 : 0000022c
    r7 : 00000002 r6 : 0000022c r5 : a0050013 r4 : 0000022c
    r3 : a974af80 r2 : 00000001 r1 : a846fc44 r0 : 00000000
    Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
    Control: 10c53c7d Table: a951406a DAC: 00000015
    Process kworker/u4:4 (pid: 780, stack limit = 0xa846e210)
    Stack: (0xa846fc20 to 0xa8470000)
    fc20: 00000000 a846fc50 a846fc44 80061808 00000000 000001dc 00000000 805037fc
    fc40: 8d89d5ec 00000000 a974af80 80053e88 00000000 00000000 ab7293c0 00000000
    fc60: 7f09c828 000000c9 7f09c828 a916a804 00000001 0001001f a800b000 7f0698a4
    fc80: a974afc8 00000001 00000000 00000000 00012ebc a974af80 00000001 80ad46c0
    fca0: a974af80 00000000 a8eeccc0 00000001 0001001f a846fd04 00000000 7f099440
    fcc0: a800b000 7f0699c4 a846fcdf 00000000 00000001 7f068834 a937c900 0105c688
    fce0: a846fd04 a8e20000 00000000 00000001 00000000 7f071f08 a846fd04 a80a0000
    fd00: ffffffff 00000000 ffffffff a8e20000 a8e20000 00000000 7f099440 00000000
    fd20: 00000000 7f099440 a800b000 7f072f4c a974af80 00000000 00000000 80778564
    fd40: a846fd54 a9346550 80330028 00000001 a846e000 a8e20000 7f099440 00000000
    fd60: 18005000 a8eeccc0 00000000 7f099440 a800b000 7f073744 a846fd8c 80052130
    fd80: a9273898 00000000 a800b000 a8e20000 7f099440 00000001 a8eec200 a9270000
    fda0: 00000000 7f099440 a800b000 7f07cd3c 80b81100 8040003f a800b000 00000000
    fdc0: 00000000 a8e20000 7f099440 a9270000 a9273000 a9270000 00000000 7f099440
    fde0: a800b000 7f02df4c 00000001 a8e20000 7f099440 a8eec200 00000000 a916e008
    fe00: 00000000 a90bfb00 a800b000 7f074cbc a9270000 7f099440 a8e20000 00000000
    fe20: a8f81610 7f0765ec 7f0765b0 a8eeccc0 a855df40 7f069310 a916a800 a8eec200
    fe40: 7f09b414 7f06a950 7f06a908 a8f81608 a8f81600 8050e8b8 a8f81608 7f09b414
    fe60: 80b22c70 80379744 a974af80 a8f8163c a8f81608 803797d4 00000005 a81ce930
    fe80: a8f81608 8037923c a8f81608 a8f81608 80b93cf4 80376504 a846fea0 800e0e3c
    fea0: 00000000 00000000 a8f81608 000000bd a833f000 00000000 00000000 8050ed04
    fec0: 00000001 8050dd8c 400f8c0f a833f000 ffffff92 a833f000 a81ce600 8050de30
    fee0: 8050ddbc a833f240 a833f1dc 80506048 a90bfb00 a833f240 a800b000 a81ce600
    ff00: 00000000 800462f0 a81ce600 80043c94 00000000 a800b000 a90bfb18 a800b014
    ff20: a846e000 00000088 80b39379 a90bfb00 a800b000 8004654c 80ad4100 a800b164
    ff40: a90bfb00 00000000 a84856c0 a90bfb00 80046500 00000000 00000000 00000000
    ff60: 00000000 8004b1e8 2df9acc7 00000000 b5f3ff89 a90bfb00 00000000 00000000
    ff80: a846ff80 a846ff80 00000000 00000000 a846ff90 a846ff90 a846ffac a84856c0
    ffa0: 8004b10c 00000000 00000000 8000f568 00000000 00000000 00000000 00000000
    ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 ecd61557 f82769f5
    [] (_raw_spin_lock_irqsave) from [] (add_wait_queue+0x20/0x48)
    [] (add_wait_queue) from [] (__mmc_claim_host+0x58/0x1b0)
    [] (__mmc_claim_host) from [] (sdioh_request_byte+0x1cc/0x2a4 [bcmdhd])
    [] (sdioh_request_byte [bcmdhd]) from [] (sdioh_cfg_write+0x20/0x28 [bcmdhd])
    [] (sdioh_cfg_write [bcmdhd]) from [] (bcmsdh_cfg_write+0x90/0xdc [bcmdhd])
    [] (bcmsdh_cfg_write [bcmdhd]) from [] (dhdsdio_clk_kso_enab+0x38/0x168 [bcmdhd])
    [] (dhdsdio_clk_kso_enab [bcmdhd]) from [] (dhdsdio_clk_devsleep_iovar+0xf4/0x5f4 [bcmdhd])
    [] (dhdsdio_clk_devsleep_iovar [bcmdhd]) from [] (dhdsdio_bussleep+0x2f8/0x4dc [bcmdhd])
    [] (dhdsdio_bussleep [bcmdhd]) from [] (dhd_bus_stop+0x2e8/0x3f0 [bcmdhd])
    [] (dhd_bus_stop [bcmdhd]) from [] (dhd_detach+0x2a4/0x438 [bcmdhd])
    [] (dhd_detach [bcmdhd]) from [] (dhdsdio_release+0x4c/0x1dc [bcmdhd])
    [] (dhdsdio_release [bcmdhd]) from [] (dhdsdio_disconnect+0x3c/0xa0 [bcmdhd])
    [] (dhdsdio_disconnect [bcmdhd]) from [] (bcmsdh_remove+0x3c/0x60 [bcmdhd])
    [] (bcmsdh_remove [bcmdhd]) from [] (bcmsdh_sdmmc_remove+0x48/0x60 [bcmdhd])
    [] (bcmsdh_sdmmc_remove [bcmdhd]) from [] (sdio_bus_remove+0x30/0xf8)
    [] (sdio_bus_remove) from [] (__device_release_driver+0x70/0xe4)
    [] (__device_release_driver) from [] (device_release_driver+0x1c/0x28)
    [] (device_release_driver) from [] (bus_remove_device+0xd8/0x104)
    [] (bus_remove_device) from [] (device_del+0x10c/0x210)
    [] (device_del) from [] (sdio_remove_func+0x1c/0x28)
    [] (sdio_remove_func) from [] (mmc_sdio_remove+0x40/0x70)
    [] (mmc_sdio_remove) from [] (mmc_sdio_detect+0x74/0x100)
    [] (mmc_sdio_detect) from [] (mmc_rescan+0xb8/0x314)
    [] (mmc_rescan) from [] (process_one_work+0x120/0x330)
    [] (process_one_work) from [] (worker_thread+0x4c/0x480)
    [] (worker_thread) from [] (kthread+0xdc/0xf4)
    [] (kthread) from [] (ret_from_fork+0x14/0x2c)
    Code: f10c0080 e3a00001 ebe359b1 f594f000 (e1943f9f)

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • Fix the following crash during module removing.
    root@imx6qdlsolo:~# modprobe -r bcmdhd
    dhd_prot_ioctl : bus is down. we have nothing to do
    dhd_wlfc_deinit():3271, ampdu_hostreorder get failed Err = -1
    dhd_prot_ioctl : bus is down. we have nothing to do
    dhd_wlfc_deinit():3294 failed to enable/disable bdcv2 tlv signaling Err = -1
    dhd_detach(): thread:dhd_watchdog_thread:34f terminated OK
    dhd_dpc_thread: Unexpected up_cnt 0
    dhd_detach(): thread:dhd_dpc:350 terminated OK
    CFG80211-ERROR) wl_event_handler : was terminated
    wl_destroy_event_handler(): thread:wl_event_handler:34e terminated OK
    ------------[ cut here ]------------
    Kernel BUG at 800e0f40 [verbose debug info unavailable]
    Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
    Modules linked in: bcmdhd(-) evbug ov5647_camera_mipi mxc_mipi_csi mx6s_capture [last unloaded: bcmdhd]
    CPU: 0 PID: 854 Comm: modprobe Not tainted 4.1.15-01434-g70f4b36 #1311
    Hardware name: Freescale i.MX7 Dual (Device Tree)
    task: a97fc4c0 ti: a912e000 task.ti: a912e000
    PC is at kfree+0x188/0x18c
    LR is at wiphy_unregister+0x17c/0x204
    pc : [] lr : [] psr: 400d0013
    sp : a912fe30 ip : 00080353 fp : a8647970
    r10: 7f219440 r9 : a9420140 r8 : ac75fa60
    r7 : a9420000 r6 : 00000000 r5 : 00000000 r4 : a9420140
    r3 : 00000000 r2 : 00000000 r1 : 07ffffff r0 : 00353443
    Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
    Control: 10c53c7d Table: a940c06a DAC: 00000015
    Process modprobe (pid: 854, stack limit = 0xa912e210)
    Stack: (0xa912fe30 to 0xa9130000)
    fe20: 7f219440 a9420140 00000000 00000000
    fe40: a9420000 a94203a0 a9420140 7f219440 a8647970 80712184 00000000 7f219440
    fe60: a8647970 805e1994 7f21d5d8 a8500000 a8574840 a94203a0 00000000 a8647000
    fe80: a94203a0 7f1cb9ec 00000000 00000000 a8644000 a8647000 a8644000 7f21d5d8
    fea0: 7f219440 7f1adf28 00000001 a956d000 7f219440 a9770440 00000000 8000f644
    fec0: a912e000 00000000 002691a0 7f1f4cbc a8644000 7f219440 a956d000 00000000
    fee0: 00000081 7f1f65ec 7f1f65b0 a9770b40 a9770b00 7f1e9310 a96f6000 a9770440
    ff00: 7f21b414 7f1ea950 7f1ea908 a8fdba08 a8fdba00 8050ee74 a8fdba08 7f21b414
    ff20: a8fdba3c 80379744 7f21b414 a8fdba08 7f21b414 80379ed4 7f21b414 002691dc
    ff40: 002691a0 803794a4 7f21b478 7f1ff6bc 7f1ff690 8008fec0 00000000 646d6362
    ff60: c0006468 00000000 a97fc8b8 00000000 a97fc8b8 00000000 80b41528 a97fc4c0
    ff80: 002691a0 80049c60 a8576540 a912e000 8000f644 0012ffb0 00000006 002691a0
    ffa0: 002691dc 8000f4c0 002691a0 002691dc 002691dc 00000800 76e72f78 00000000
    ffc0: 002691a0 002691dc 002691a0 00000081 00000001 00000000 00000001 002691a0
    ffe0: 76e388a0 7ec089f4 0001f008 76e388ac 600d0010 002691dc 00656e6f 635f6c77
    [] (kfree) from [] (wiphy_unregister+0x17c/0x204)
    [] (wiphy_unregister) from [] (wl_free_wdev+0x40/0x148 [bcmdhd])
    [] (wl_free_wdev [bcmdhd]) from [] (dhd_detach+0x280/0x438 [bcmdhd])
    [] (dhd_detach [bcmdhd]) from [] (dhdsdio_release+0x4c/0x1dc [bcmdhd])
    [] (dhdsdio_release [bcmdhd]) from [] (dhdsdio_disconnect+0x3c/0xa0 [bcmdhd])
    [] (dhdsdio_disconnect [bcmdhd]) from [] (bcmsdh_remove+0x3c/0x60 [bcmdhd])
    [] (bcmsdh_remove [bcmdhd]) from [] (bcmsdh_sdmmc_remove+0x48/0x60 [bcmdhd])
    [] (bcmsdh_sdmmc_remove [bcmdhd]) from [] (sdio_bus_remove+0x30/0xf8)
    [] (sdio_bus_remove) from [] (__device_release_driver+0x70/0xe4)
    [] (__device_release_driver) from [] (driver_detach+0xac/0xb0)
    [] (driver_detach) from [] (bus_remove_driver+0x4c/0xa0)
    [] (bus_remove_driver) from [] (dhd_module_cleanup+0x2c/0x3c [bcmdhd])
    [] (dhd_module_cleanup [bcmdhd]) from [] (SyS_delete_module+0x174/0x1b8)
    [] (SyS_delete_module) from [] (ret_fast_syscall+0x0/0x3c)
    Code: e1a03007 e28dd004 e8bd4ff0 eafffd59 (e7f001f2)
    ---[ end trace 49de84cadd3d030b ]---
    Segmentation fault
    root@imx6qdlsolo:~#

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • Broadcom bcmdhd engineering release for 4.1 kernel

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • For backward compatibility, kobs-ng need to know if the driver use
    legacy raw mode or new bch layout raw mode, add a new flag in debugfs to
    indicate the raw access mode.

    Signed-off-by: Han Xu

    Han Xu
     
  • support the bch layout with dedicate ecc for meta

    Signed-off-by: Han Xu

    Han Xu
     
  • This reverts commit 76babd7d075c9c22a27e6bc272bb57b6327cfbd3.

    Signed-off-by: Han Xu

    Han Xu
     
  • Fix build error if CONFIG_SMP is disabled:

    arch/arm/mach-imx/busfreq_lpddr2.c: In function ‘update_lpddr2_freq_smp’:
    arch/arm/mach-imx/busfreq_lpddr2.c:236:67: error: ‘me’ undeclared (first
    use in this function)
    printk(KERN_DEBUG "Bus freq set to %d done! cpu=%d\n", ddr_rate, me);

    Signed-off-by: Adrian Alonso
    Signed-off-by: Frank Li

    Adrian Alonso
     
  • When audio stop, it will first stop dma, then stop cpu_dai.
    If there is delay between dma stop and cpu dai stop, there
    will be underrun error, the print will cost time, then will
    cause another underrun error, it is a infinite loop.
    Which will cause the cpu dai can't stop.

    Signed-off-by: Shengjiu Wang

    Shengjiu Wang
     
  • Add imx6q lpddr2 busfreq support for single channel memory
    types, perform ddr frequency scaling taking into account if
    ddr uses single or dual channel mode by checking
    MMDC0_MDMISC[LPDDR2_2CH] state.

    Signed-off-by: Adrian Alonso
    Signed-off-by: Anson Huang

    Adrian Alonso
     
  • Set usable memory to 2 channel fixed mode
    MMDC0 0x80000000 512M
    MMDC1 0x10000000 512M
    MMDC 2 channel fixed mode is enabled by setting
    BOOT_CFG3[5:4] = 01 for Fixed 2x32 map

    Signed-off-by: Adrian Alonso

    Adrian Alonso
     
  • Add lpddr2 two channel suspend support
    - save/restore mmdc io pads for channel 2
    - Set mmdc channe 2 on self refresh and auto power saving mode
    only if mmdc channel 2 is enabled
    - Perform a reset fifo on resume_io when restoring mmdc io pads

    Signed-off-by: Adrian Alonso
    Signed-off-by: Anson Huang
    (cherry picked from commit 2e5982e82edc8fc7de0aebc8894a9f0a41e01965)

    Adrian Alonso
     
  • Add busfreq support for imx6q lpddr2 pop target platform
    DDR scaling support for low bus frequency and high bus
    frequency mode (24Mhz/400Mhz)
    Update Copyrigth year info

    Signed-off-by: Adrian Alonso
    Signed-off-by: Anson Huang
    (cherry picked from commit 91cff834d4f5d065fe8e7e60c1c1799f00990654)

    Adrian Alonso
     
  • Refactor wfe_ddr3_freq_change to wfe_smp_freq_change in order
    to reuse enter/exit wfe standby low power mode.

    Signed-off-by: Adrian Alonso
    Signed-off-by: Anson Huang
    (cherry picked from commit 4d92e1f5bab3480cb145821dce27960887e7a3ea)

    Adrian Alonso
     
  • Add busfreq device node label to allow override busfreq
    properties on machine device tree descriptor

    Signed-off-by: Adrian Alonso
    Signed-off-by: Anson Huang
    (cherry picked from commit fd8faeb7a40fc2f9fb331d6ca6a60b64c95d7ee6)

    Adrian Alonso
     
  • Add device tree for imx6q arm2 lpddr2 pop target platform
    Enable common imx6q features, uart, usb, usdhc, fec.
    Set DDR max frequency to 400Mhz which is the clock rate
    for MT42L128M64D2-25

    Signed-off-by: Adrian Alonso
    Signed-off-by: Anson Huang
    (cherry picked from commit 06783aba18bda32f25107485891fc4bafc609abf)

    Adrian Alonso
     
  • Add low power suspend mode support for imx6q lpddr2
    Save/restore mmdc iomux pads relevant to dual channel
    lpddr2 memory when enter/exit low power suspend mode.
    Remove unused macros in suspend-imx6.

    Signed-off-by: Adrian Alonso
    Signed-off-by: Anson Huang
    (cherry picked from commit 5ebac6d425b859c51d570489d03684e0c976ef60)

    Adrian Alonso
     
  • A patch(set imx6qp eim_slow to 132Mh) was pushed to eliminate
    the weim nor read performance drop cause by the IP difference
    between imx6q & imx6qp.

    However, the patch impacted the performance of imx6dl-ard.
    In succession, AXI clk is set to 270M which exceeds the max
    value(264M).

    This patch sets eim_slow to 132M only for MXC_CPU_IMX6Q. So
    the performance difference between imx6q & imx6qp decreases
    while no impact for imx6dl-ard.

    please see the following summary of weim nor read performance.

    clk(performance) 6q-sabreauto 6qp-sabreauto 6dl-ard
    imx_3.10 132M(18.9MB/s) —— 135M(19.1MB/s)
    imx_3.14.y 132M(18.9MB/s) 132M(16.8MB/s) 135M(19.1MB/s)

    Signed-off-by: Gao Pan
    (cherry picked from commit f19e9899eacddb5343e7a7d476a500cd4551dffe)

    Gao Pan
     
  • Change when A7 signal M4 to make sure busfreq is
    always up when the M4 send high bus release.
    This prevents race condition for Low Power Demo

    Signed-off-by: Teo Hall

    Teo Hall
     
  • commit 743cead0f8c4ac6311ffb500efd6146c40124310 is not a complete fix.
    There is low possibility that this issue still occur.

    Last commit add init_completion() in the suspend function, but if the
    dma callback function is called after convert error, the complete is
    done, the init_completion will not be called, so the complete state is
    not correct in the next conversion.

    This patch is to move init_completion to the beginning of conversion
    to fix the issue.

    Signed-off-by: Shengjiu Wang

    Shengjiu Wang
     
  • The sim1 has pin conflicts with flexcan1,flexcan2 and sai1.
    By default, imx7d 12x12 lpddr3 arm2 default dts enable sim1 node
    and disable flexcan1, flexcan2, sai1 nodes.

    The patch do two things:
    - disable sim1 node in extended flexcan dts file
    - remove redundant sim1 node in default dts file

    Signed-off-by: Fugang Duan

    Fugang Duan
     
  • ENGR00292341 imx6sl hwrng

    Add hwrng support for i.MX6SL.

    1. Add RNG driver. This driver originated as fsl-rngc.c. It
    has been modified to support device tree. The name has been
    changed since it supports both b and c variants of RNG.
    2. Added clock and compatible info to the device tree data.
    3. Added the entry in the options in the Kconfig for hwrng.

    (cherry picked from commit 1f3f2c0647b7319c4e23293a61512e4191593513)
    [: Edited to apply to 3.14]

    Signed-off-by: Dan Douglass
    Signed-off-by: Victoria Milhoan

    Dan Douglass
     
  • Add pmic 5v supply to i.MX6qdl sabresd dts.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • Add HDMI power supply management in hdmi driver.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • - Disable the sim1 on imx7d val board, because that there
    are pin conflictions between sim1 and flexcan2 used by M4.
    - Disable can2 is not enough, since the reg_can2_3v3 will be
    turned off by the regulator framework and that will impact
    can2 in m4 side even if can2 driver disabled in A7 side.

    Signed-off-by: Richard Zhu
    Tested-by: Ge Wang

    Richard Zhu
     
  • To eliminate the power number, need turn off PU regulator before suspend
    since it's turned on always on i.mx6qp.

    Signed-off-by: Robin Gong

    Robin Gong
     
  • For standby mode, RBC workaround is NOT necessary as ARM platform
    is NOT powered down;

    Correct GIC register offset(0x1000) for disabling distributor.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • In order to save power assumption, turn off the pcie clks
    when there is no pcie link up at all.
    add the option CONFIG_PCI_IMX6_COMPLIANCE_TEST, enable it
    when the image is used to do the pcie compliance tests

    Signed-off-by: Richard Zhu

    Richard Zhu
     
  • Added CAAM to the device tree for imx6sx in imx6sx.dtsi.

    Signed-off-by: Dan Douglass

    Dan Douglass
     
  • Enable memory power down for i.MX7D TO1.1 to save power, TO1.0
    has issue of entering DSM by mistake, so it is disabled as a
    solution, now that this issue is fixed on TO1.1, enable it.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • Same as low power idle, during GPC shutting down ARM core,
    interrupts must be hold until the process done, apply RBC
    workaround and disable GIC during GPC powering down ARM
    core.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • For low power idle with ARM power gated, per hardware requirement,
    there must be no interrupt coming during the power down
    process of ARM core, so RBC counter is enabled to hold interrupts
    and GIC must be disabled at the moment;

    The hardware design team recommends ~240us is required during ARM
    core power down, so we update the RBC counter value to 8(~240us);

    Update GPC SCU and CPU power up/down timing according to design
    team's recommendation.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • i.MX7D TO1.1 only supports DDR3 running at max frequency of 400MHz,
    update busfreq driver accordingly.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • LPDDR2 frequency scale flow needs to be updated for i.MX7D
    TO1.1 due to the CKE timing change.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • Enable DDR auto self-refresh for i.MX7D, when doing DDR
    frequency scale or suspend/resume, DDR self-refresh will
    be disabled, this is incorrect for saving power, enable it
    for all these scenarios.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • The cpufreq_cpu_get() and cpufreq_cpu_put() should be called in
    pairs. Otherwise, system will dump when enabling lock debug config.

    Signed-off-by: Bai Ping

    Bai Ping
     
  • Fix two below bugs in script:
    -- check error flag in FIFO data, thus dma will stop once the error happen
    when real HW error triggered by switch boundrate, overun,etc. Actrually,
    no need to check in script since UART driver will handle this.
    -- clear other status bit in USR1.

    Signed-off-by: Robin Gong

    Robin Gong
     
  • When M4 is enabled, Linux has to do save/restore for M4 TCM during
    suspend/resume, dtb should pass the TCM address for kernel, without
    this TCM info, kernel will boot up fail:

    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 1 at arch/arm/mach-imx/pm-imx7.c:1030 imx7d_pm_init+0x58/0)
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.52-02791-g1babdb1-dirty #2093
    [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
    [] (show_stack) from [] (dump_stack+0x7c/0xbc)
    [] (dump_stack) from [] (warn_slowpath_common+0x6c/0x88)
    [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/)
    [] (warn_slowpath_null) from [] (imx7d_pm_init+0x58/0x67c)
    [] (imx7d_pm_init) from [] (imx7d_init_machine+0x3c/0xe4)
    [] (imx7d_init_machine) from [] (customize_machine+0x20/0x4)
    [] (customize_machine) from [] (do_one_initcall+0xf8/0x144)
    [] (do_one_initcall) from [] (kernel_init_freeable+0x138/0x)
    [] (kernel_init_freeable) from [] (kernel_init+0x8/0xf0)
    [] (kernel_init) from [] (ret_from_fork+0x14/0x34)
    ---[ end trace fdb0885876d7ac0b ]---
    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = 80004000
    [00000000] *pgd=00000000
    Internal error: Oops: 5 [#1] PREEMPT SMP ARM
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 3.14.52-02791-g1babdb1-dir3
    task: a8084000 ti: a8090000 task.ti: a8090000
    PC is at memcpy+0x48/0x330
    LR is at imx7d_pm_init+0xd0/0x67c
    pc : [] lr : [] psr: 20000013
    sp : a8091e8c ip : 00000000 fp : 00000000
    r10: a8090030 r9 : 0000010b r8 : 809e52c4
    r7 : 80ab9380 r6 : 80ab9380 r5 : 80abb5a4 r4 : 80a411cc
    r3 : 00080000 r2 : 00007f80 r1 : 00000000 r0 : a8140000
    Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
    Control: 10c53c7d Table: 8000406a DAC: 00000015
    Process swapper/0 (pid: 1, stack limit = 0xa8090238)

    Signed-off-by: Anson Huang
    (cherry picked from commit c3dc7c16660200f3de8cbbdd1f215ae6a779a039)

    Anson Huang
     
  • Fix cherry-picked from 5ec908319ab53072d3a2188e62ed2e5d7b846951

    crypto: caam - only export the state we really need to export

    Avoid exporting lots of state by only exporting what we really require,
    which is the buffer containing the set of pending bytes to be hashed,
    number of pending bytes, the context buffer, and the function pointer
    state. This reduces down the exported state size to 216 bytes from
    576 bytes.

    Signed-off-by: Russell King
    Signed-off-by: Herbert Xu

    Russell King