08 Jun, 2017

22 commits


23 Feb, 2017

18 commits

  • The pxp require two clocks to enable when it works, and
    they are 'ipg' and 'axi' clocks. Besides, the two clocks
    share the same CCGR to control clock gating.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • The general architecture of i.MX6ULL is same as i.MX6UL. So
    most of the clock driver code of i.MX6UL can be reused by
    i.MX6ULL.

    Signed-off-by: Peng Fan
    Signed-off-by: Bai Ping

    Bai Ping
     
  • During the read of NOR, the kernel actually calls the inline_map_copy_from()
    to read the data out. And inline_map_copy_from() will use the memcpy_fromio()
    to do the real job.

    The memcpy_fromio macro maps _memcpy_fromio() in the current code.
    But the _memcpy_fromio() will use readb() to do the copy work one byte
    by one byte. This makes the read performance of NOR very slow(about 2~3MB/s).

    A similiar discussion could be found in:
    http://lists.infradead.org/pipermail/linux-arm-kernel/2009-November/003860.html

    This patch replace the memcpy_fromio with memcpy which is optimized by the
    kernel.

    The following is the result from mtd_speedtest with M29W256GL7AN6E:
    =================================================
    mtd_speedtest: MTD device: 2
    mtd_speedtest: not NAND flash, assume page size is 512 bytes.
    mtd_speedtest: MTD device size 4194304, eraseblock size 131072, page size 512,
    count of eraseblocks 32, pages per eraseblock 256, OOB size 0
    mtd_speedtest: testing eraseblock write speed
    mtd_speedtest: eraseblock write speed is 845 KiB/s
    mtd_speedtest: testing eraseblock read speed
    mtd_speedtest: eraseblock read speed is 19504 KiB/s
    mtd_speedtest: testing page write speed
    mtd_speedtest: page write speed is 845 KiB/s
    mtd_speedtest: testing page read speed
    mtd_speedtest: page read speed is 19140 KiB/s
    mtd_speedtest: testing 2 page write speed
    mtd_speedtest: 2 page write speed is 846 KiB/s
    mtd_speedtest: testing 2 page read speed
    mtd_speedtest: 2 page read speed is 19320 KiB/s
    mtd_speedtest: Testing erase speed
    mtd_speedtest: erase speed is 233 KiB/s
    mtd_speedtest: Testing 2x multi-block erase speed
    mtd_speedtest: 2x multi-block erase speed is 225 KiB/s
    mtd_speedtest: Testing 4x multi-block erase speed
    mtd_speedtest: 4x multi-block erase speed is 224 KiB/s
    mtd_speedtest: Testing 8x multi-block erase speed
    mtd_speedtest: 8x multi-block erase speed is 225 KiB/s
    mtd_speedtest: Testing 16x multi-block erase speed
    mtd_speedtest: 16x multi-block erase speed is 225 KiB/s
    mtd_speedtest: Testing 32x multi-block erase speed
    mtd_speedtest: 32x multi-block erase speed is 225 KiB/s
    mtd_speedtest: Testing 64x multi-block erase speed
    mtd_speedtest: 64x multi-block erase speed is 224 KiB/s
    mtd_speedtest: finished
    =================================================

    (cherry-picked from: f1e5914ffd82d5326cbd30507d4f37d02a0da099)

    Signed-off-by: Huang Shijie

    Huang Shijie
     
  • With igore pm notify feature, MMC core will not re-detect card
    after system suspend/resume. This is needed for some special cards
    like Broadcom WiFi which can't work propertly on card re-detect
    after system resume.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 3a4a074d2ead8044afe42cd0d060fe25564b274c)

    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
     
  • Move the x86_64 idle notifiers originally by Andi Kleen and Venkatesh
    Pallipadi to generic.

    Change-Id: Idf29cda15be151f494ff245933c12462643388d5
    Acked-by: Nicolas Pitre
    Signed-off-by: Todd Poynor

    Todd Poynor
     
  • Interactive governor has lived in Android sources for a very long time
    and this commit is based on the code present in following branch:

    https://android.googlesource.com/kernel/common android-4.4

    The Interactive governor is designed for latency-sensitive workloads,
    such as interactive user interfaces like the mobile phones and tablets.
    The interactive governor aims to be significantly more responsive to
    ramp CPU quickly up when CPU-intensive activity begins.

    Existing governors sample CPU load at a particular rate, typically every
    X ms and then update the frequency from a work-handler. This can lead
    to under-powering UI threads for the period of time during which the
    user begins interacting with a previously-idle system until the next
    sample period happens.

    The 'interactive' governor uses a different approach.

    A real-time thread is used for scaling up, giving the remaining tasks
    the CPU performance benefit, unlike existing governors which are more
    likely to schedule ramp-up work to occur after your performance starved
    tasks have completed.

    The Android version of interactive governor also checks whether to scale
    the CPU frequency up soon after coming out of idle. When the CPU comes
    out of idle, the governor check if the CPU sampling is overdue or not.
    If yes, it immediately starts the sampling. Otherwise, the utilization
    hooks from the scheduler handle the sampling later. If the CPU is very
    busy from exiting idle to when the evaluation happens, then it assumes
    that the CPU is under-powered and ramps it to MAX speed.

    If the CPU was not sufficiently busy to immediately ramp to MAX speed,
    then the governor evaluates the CPU load since the last speed
    adjustment, choosing the highest value between that longer-term load or
    the short-term load since idle exit to determine the CPU speed to ramp
    to.

    Idle notifiers will be be handled later and are not included for now.

    The core of this code is written and maintained (in Android
    repositories) by Mike Chan and Todd Poyner over a long period of time.

    Vireshk has made changes to to the governor to align it with the current
    practices followed with mainline governors, like using utilization hooks
    from the scheduler and handling kobject (for governor's sysfs directory)
    in a race free manner. And of course this included general cleanup of
    the governor as well.

    Signed-off-by: Mike Chan
    Signed-off-by: Todd Poynor
    Signed-off-by: Viresh Kumar

    ---
    V1->V2:
    - Changes to fix compilation issues with updated mainline
    - Timer APIs got updated
    - s/mod_timer_pinned/mod_timer
    - s/init_timer/init_timer_pinned
    - Updated prototypes of cpufreq_frequency_table_target() and
    update_util_handler()

    Viresh Kumar
     
  • These macros can be reused by governors which don't use the common
    governor code present in cpufreq_governor.c and should be moved to the
    relevant header.

    Now that they are getting moved to the right header file, reuse them in
    schedutil governor as well (that required rename of show/store
    routines).

    Also create gov_attr_wo() macro for write-only sysfs files, this will be
    used by Interactive governor in a later patch.

    Signed-off-by: Viresh Kumar

    Viresh Kumar
     
  • The management data input/output (MDIO) bus where often high-speed,
    open-drain operation is required. i.MX7D TO1.0 ENET MDIO pin has no
    open drain as IC ticket number: TKT252980, i.MX7D TO1.1 fix the issue.

    Signed-off-by: Fugang Duan
    (cherry picked from commit: a747abd5f01d278b91d1b6ee6628e1935cb7b23c)

    Conflicts:
    arch/arm/mach-imx/mach-imx7d.c

    Fugang Duan
     
  • When HDCP running in repeater mode,
    HDCP software workaround "HW_WA_HDCP_DC0" is working in
    HDCP keepout window stop state.
    It will cause HDCP compliance test 1B-01A failed.
    So active HDCP keepout widows and 1B-01A is passed.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • 3 uapi header files(mxc_sim_interface.h, pxp_dma.h, pxp_device.h)
    cannot be installed by the command "make headers_install" because
    they are not in Kbuild list, which impacts the linux-test build.

    This patch adds the 3 header files in Kbuild list.

    Signed-off-by: Gao Pan

    Gao Pan
     
  • Fix the out of bounds write, and the dereference before
    null check.

    Signed-off-by: Richard Zhu
    (cherry picked from commit 775ff0727166535e9b1ba1f70167e6a33fee5f13)

    Richard Zhu
     
  • This patch adds the DDR(or DTR) quad read support for the Micron
    SPI NOR flash.

    Signed-off-by: Han Xu

    Han Xu
     
  • This patch adds the DDR quad read support by the following:

    [1] add SPI_NOR_DDR_QUAD read mode.

    [2] add DDR Quad read opcodes:
    SPINOR_OP_READ_1_4_4_D / SPINOR_OP_READ4_1_4_4_D

    [3] add set_ddr_quad_mode() to initialize for the DDR quad read.
    Currently it only works for Spansion NOR.

    [3] about the dummy cycles.
    We set the dummy with 8 for DDR quad read by default.
    The m25p80.c can not support the DDR quad read, but the SPI NOR controller
    can set the dummy value in its child DT node, and the SPI NOR framework
    can parse it out.

    Signed-off-by: Han Xu

    Han Xu
     
  • It's used for transceiver_switch.

    NOTE: it's newly added since it's deleted by upstream before.
    However, the driver is still using it, so have to add it.

    Signed-off-by: Dong Aisheng
    (cherry picked from commit 53109634188e672b807a7256afbf10db0d9a6574)

    Dong Aisheng
     
  • cherry-pick below patch:
    ENGR00275004-4: power: sabresd_battery: add sabresd_battery driver

    Add sabresd battery driver which based on Max8903 charger IC.

    Signed-off-by: Robin Gong
    (cherry picked from commit 19ac2dfcd1e0ea3f1ae231cfc230315eaa9a41be)
    (cherry picked from commit b9e81012c21d3318a633a4447797e4a52676c760)

    Robin Gong
     
  • Initial the mxc mipi dsi driver.
    Baseline copied from imx_3.14.y branch.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • Initial the mxc dcic driver.
    Baseline copied from imx_3.14.y branch.

    Signed-off-by: Sandor Yu

    Sandor Yu