12 Dec, 2020

1 commit


04 Dec, 2020

3 commits

  • The #ifdef check for the suspend/resume functions is wrong:

    drivers/mmc/host/mtk-sd.c:2765:12: error: unused function 'msdc_suspend' [-Werror,-Wunused-function]
    static int msdc_suspend(struct device *dev)
    drivers/mmc/host/mtk-sd.c:2779:12: error: unused function 'msdc_resume' [-Werror,-Wunused-function]
    static int msdc_resume(struct device *dev)

    Remove the #ifdef and mark all four as __maybe_unused to aovid the
    problem.

    Fixes: c0a2074ac575 ("mmc: mediatek: Fix system suspend/resume support for CQHCI")
    Cc: stable@vger.kernel.org
    Signed-off-by: Arnd Bergmann
    Link: https://lore.kernel.org/r/20201203222922.1067522-1-arnd@kernel.org
    Signed-off-by: Ulf Hansson

    Arnd Bergmann
     
  • The CMD13 polling is needed for commands with R1B responses. In commit
    a0d4c7eb71dd ("mmc: block: Add CMD13 polling for MMC IOCTLS with R1B
    response"), the intent was to introduce this for requests targeted to the
    RPMB partition. However, the condition to trigger the polling loop became
    wrong, leading to unnecessary polling. Let's fix the condition to avoid
    this.

    Fixes: a0d4c7eb71dd ("mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response")
    Cc: stable@vger.kernel.org
    Reported-by: Zhan Liu
    Signed-off-by: Zhan Liu
    Signed-off-by: Bean Huo
    Link: https://lore.kernel.org/r/20201202202320.22165-1-huobean@gmail.com
    Signed-off-by: Ulf Hansson

    Bean Huo
     
  • Further testing of error cases revealed that downgrade is not enough, so
    we need to reset the SCC which is done by calling the custom reset
    function. This reset function can distinguish between the various SDHI
    variants, so protecting the call with MIN_RCAR2 is enough here.

    Fixes: 24ce2d7b8bea ("mmc: tmio: bring tuning HW to a sane state with MMC_POWER_OFF")
    Reported-by: Yoshihiro Shimoda
    Signed-off-by: Wolfram Sang
    Reviewed-by: Yoshihiro Shimoda
    Tested-by: Yoshihiro Shimoda
    Link: https://lore.kernel.org/r/20201125204953.3344-1-wsa+renesas@sang-engineering.com
    Signed-off-by: Ulf Hansson

    Wolfram Sang
     

24 Nov, 2020

2 commits

  • The commit 16ada730a759 ("mmc: sdhci-of-arasan: Modify clock operations
    handling") introduced support for platform specific clock operations.
    Around the same point in time the commit 36c6aadaae86 ("mmc:
    sdhci-of-arasan: Add support for Intel Keem Bay") was also merged.
    Unfortunate it was not really tested on top of the previously mentioned
    commit, which causes clock registration failures for Keem Bay SOC devices.

    Let's fix this, by properly declaring the clock operation for Keem Bay SOC
    devices.

    Fixes: 36c6aadaae86 ("mmc: sdhci-of-arasan: Add support for Intel Keem Bay")
    Signed-off-by: Muhammad Husaini Zulkifli
    Reviewed-by: Adrian Hunter
    Link: https://lore.kernel.org/r/20201118120120.24908-2-muhammad.husaini.zulkifli@intel.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Ulf Hansson

    Muhammad Husaini Zulkifli
     
  • The SDIO recheck fix is required for more of the supported variants. Let's
    add it to those that needs it.

    Reported-by: Fabien Parent
    Reported-by: Mattijs Korpershoek
    Signed-off-by: Yong Mao
    Link: https://lore.kernel.org/r/20201119030237.9414-1-yong.mao@mediatek.com
    Fixes: 9e2582e57407 ("mmc: mediatek: fix SDIO irq issue")
    Cc: stable@vger.kernel.org
    [Ulf: Clarified commitmsg ]
    Signed-off-by: Ulf Hansson

    yong mao
     

23 Nov, 2020

1 commit

  • Before we got these errors on MT8192 platform:
    [ 59.153891] Restarting tasks ...
    [ 59.154540] done.
    [ 59.159175] PM: suspend exit
    [ 59.218724] mtk-msdc 11f60000.mmc: phase: [map:fffffffe] [maxlen:31]
    [final:16]
    [ 119.776083] mmc0: cqhci: timeout for tag 9
    [ 119.780196] mmc0: cqhci: ============ CQHCI REGISTER DUMP ===========
    [ 119.786709] mmc0: cqhci: Caps: 0x100020b6 | Version: 0x00000510
    [ 119.793225] mmc0: cqhci: Config: 0x00000101 | Control: 0x00000000
    [ 119.799706] mmc0: cqhci: Int stat: 0x00000000 | Int enab: 0x00000000
    [ 119.806177] mmc0: cqhci: Int sig: 0x00000000 | Int Coal: 0x00000000
    [ 119.812670] mmc0: cqhci: TDL base: 0x00000000 | TDL up32: 0x00000000
    [ 119.819149] mmc0: cqhci: Doorbell: 0x003ffc00 | TCN: 0x00000200
    [ 119.825656] mmc0: cqhci: Dev queue: 0x00000000 | Dev Pend: 0x00000000
    [ 119.832155] mmc0: cqhci: Task clr: 0x00000000 | SSC1: 0x00001000
    [ 119.838627] mmc0: cqhci: SSC2: 0x00000000 | DCMD rsp: 0x00000000
    [ 119.845174] mmc0: cqhci: RED mask: 0xfdf9a080 | TERRI: 0x0000891c
    [ 119.851654] mmc0: cqhci: Resp idx: 0x00000000 | Resp arg: 0x00000000
    [ 119.865773] mmc0: cqhci: : ===========================================
    [ 119.872358] mmc0: running CQE recovery
    From these logs, we found TDL base was back to the default value.

    After suspend, the mmc host is powered off by HW, and bring CQE register
    to the default value, so we add system suspend/resume interface, then bring
    CQE to deactivated state before suspend, it will be enabled by CQE first
    request after resume.

    Signed-off-by: Wenbin Mei
    Link: https://lore.kernel.org/r/20201118063405.24906-1-wenbin.mei@mediatek.com
    Fixes: 88bd652b3c74 ("mmc: mediatek: command queue support")
    Cc: stable@vger.kernel.org
    [Ulf: Renamed functions]
    Signed-off-by: Ulf Hansson

    Wenbin Mei
     

22 Nov, 2020

1 commit


17 Nov, 2020

4 commits

  • In the current implementation DLL reset will be issued for
    each ITAP and OTAP setting inside ATF, this is creating issues
    in some scenarios and this sequence is not inline with the TRM.
    To fix the issue, DLL reset should be removed from the ATF and
    host driver will request it explicitly.
    This patch update host driver to explicitly request for DLL reset
    before ITAP (assert DLL) and after OTAP (release DLL) settings.

    Fixes: a5c8b2ae2e51 ("mmc: sdhci-of-arasan: Add support for ZynqMP Platform Tap Delays Setup")
    Signed-off-by: Sai Krishna Potthuri
    Signed-off-by: Manish Narani
    Acked-by: Michal Simek
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/1605515565-117562-4-git-send-email-manish.narani@xilinx.com
    Signed-off-by: Ulf Hansson

    Manish Narani
     
  • Mask the ITAP and OTAP delay bits before updating with the new
    tap value for Versal platform.

    Fixes: 1a470721c8f5 ("sdhci: arasan: Add support for Versal Tap Delays")
    Signed-off-by: Sai Krishna Potthuri
    Signed-off-by: Manish Narani
    Acked-by: Michal Simek
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/1605515565-117562-3-git-send-email-manish.narani@xilinx.com
    Signed-off-by: Ulf Hansson

    Manish Narani
     
  • Allow configuring the Output and Input tap values with zero to avoid
    failures in some cases (one of them is SD boot mode) where the output
    and input tap values may be already set to non-zero.

    Fixes: a5c8b2ae2e51 ("mmc: sdhci-of-arasan: Add support for ZynqMP Platform Tap Delays Setup")
    Signed-off-by: Sai Krishna Potthuri
    Signed-off-by: Manish Narani
    Acked-by: Michal Simek
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/1605515565-117562-2-git-send-email-manish.narani@xilinx.com
    Signed-off-by: Ulf Hansson

    Manish Narani
     
  • A UHS setting of SDR25 can give better results for High Speed mode.
    This is because there is no setting corresponding to high speed. Currently
    SDHCI sets no value, which means zero which is also the setting for SDR12.
    There was an attempt to change this in sdhci.c but it caused problems for
    some drivers, so it was reverted and the change was made to sdhci-brcmstb
    in commit 2fefc7c5f7d16e ("mmc: sdhci-brcmstb: Fix incorrect switch to HS
    mode"). Several other drivers also do this.

    Signed-off-by: Adrian Hunter
    Cc: stable@vger.kernel.org # v5.4+
    Link: https://lore.kernel.org/r/20201112133656.20317-1-adrian.hunter@intel.com
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     

14 Nov, 2020

1 commit


10 Nov, 2020

5 commits

  • This reverts commit db1af1e9712920f47b5dc6a995fca3eec05ea85e. It was
    only a workaround to hide a regression. We now have proper fixes.

    Signed-off-by: Wolfram Sang
    Tested-by: Niklas Söderlund
    Reviewed-by: Yoshihiro Shimoda
    Tested-by: Yoshihiro Shimoda
    Link: https://lore.kernel.org/r/20201106072549.1495-4-wsa+renesas@sang-engineering.com
    Signed-off-by: Ulf Hansson

    Wolfram Sang
     
  • When powering off a card, we need to disable the tuning HW (like SCC for
    the Renesas SDHI) to get to a sane state and allow for re-tuning new
    cards. This was hidden before because we wrongly did that in hw_reset()
    before which was an unintended use of hw_reset(). Now that we corrected
    the use of hw_reset() meanwhile, we revealed this shortcoming and need
    to fix it properly by explicitly calling the downgrade callback.

    Fixes: 6e7d4de10890 ("mmc: renesas_sdhi: move wrong 'hw_reset' to 'reset'")
    Suggested-by: Takeshi Saito
    Reviewed-by: Takeshi Saito
    Signed-off-by: Wolfram Sang
    Tested-by: Niklas Söderlund
    Reviewed-by: Yoshihiro Shimoda
    Tested-by: Yoshihiro Shimoda
    Link: https://lore.kernel.org/r/20201106072549.1495-3-wsa+renesas@sang-engineering.com
    Signed-off-by: Ulf Hansson

    Wolfram Sang
     
  • When applying a revert, the assumption that DMA only needs to be cleared
    in specific cases was wrong. We want to reset the DMA controller every
    time the rest of the HW gets reset, too.

    Fixes: 34e3211e5492 ("Revert "mmc: tmio: fix reset operation"")
    Reported-by: Yoshihiro Shimoda
    Signed-off-by: Wolfram Sang
    Tested-by: Niklas Söderlund
    Reviewed-by: Yoshihiro Shimoda
    Tested-by: Yoshihiro Shimoda
    Link: https://lore.kernel.org/r/20201106072549.1495-2-wsa+renesas@sang-engineering.com
    Signed-off-by: Ulf Hansson

    Wolfram Sang
     
  • Apply erratum workaround of unreliable pulse width detection to
    more affected platforms (LX2160A Rev2.0 and LS1028A Rev1.0).

    Signed-off-by: Yangbo Lu
    Fixes: 48e304cc1970 ("mmc: sdhci-of-esdhc: workaround for unreliable pulse width detection")
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20201110071314.3868-1-yangbo.lu@nxp.com
    Signed-off-by: Ulf Hansson

    Yangbo Lu
     
  • The commit 94b110aff867 ("mmc: tmio: add tmio_mmc_host_alloc/free()")
    added tmio_mmc_host_free(), but missed the function calling in
    the sh_mobile_sdhi_remove() at that time. So, fix it. Otherwise,
    we cannot rebind the sdhi/mmc devices when we use aliases of mmc.

    Fixes: 94b110aff867 ("mmc: tmio: add tmio_mmc_host_alloc/free()")
    Signed-off-by: Yoshihiro Shimoda
    Reviewed-by: Wolfram Sang
    Tested-by: Wolfram Sang
    Reviewed-by: Niklas Söderlund
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/1604654730-29914-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
    Signed-off-by: Ulf Hansson

    Yoshihiro Shimoda
     

02 Nov, 2020

1 commit


31 Oct, 2020

1 commit

  • Pull MMC host fixes from Ulf Hansson:

    - sdhci: Fix performance regression with auto CMD auto select

    - sdhci-of-esdhc: Fix initialization for eMMC HS400 mode

    - sdhci-of-esdhc: Fix timeout bug for tuning commands

    * tag 'mmc-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
    mmc: sdhci-of-esdhc: make sure delay chain locked for HS400
    mmc: sdhci-of-esdhc: set timeout to max before tuning
    mmc: sdhci: Use Auto CMD Auto Select only when v4_mode is true

    Linus Torvalds
     

28 Oct, 2020

1 commit

  • For eMMC HS400 mode initialization, the DLL reset is a required step
    if DLL is enabled to use previously, like in bootloader.
    This step has not been documented in reference manual, but the RM will
    be fixed sooner or later.

    This patch is to add the step of DLL reset, and make sure delay chain
    locked for HS400.

    Signed-off-by: Yangbo Lu
    Acked-by: Adrian Hunter
    Link: https://lore.kernel.org/r/20201020081116.20918-1-yangbo.lu@nxp.com
    Fixes: 54e08d9a95ca ("mmc: sdhci-of-esdhc: add hs400 mode support")
    Cc: stable@vger.kernel.org
    Signed-off-by: Ulf Hansson

    Yangbo Lu
     

27 Oct, 2020

1 commit


25 Oct, 2020

1 commit

  • Pull ARM SoC platform updates from Olof Johansson:
    "SoC changes, a substantial part of this is cleanup of some of the
    older platforms that used to have a bunch of board files.

    In particular:

    - Remove non-DT i.MX platforms that haven't seen activity in years,
    it's time to remove them.

    - A bunch of cleanup and removal of platform data for TI/OMAP
    platforms, moving over to genpd for power/reset control (yay!)

    - Major cleanup of Samsung S3C24xx and S3C64xx platforms, moving them
    closer to multiplatform support (not quite there yet, but getting
    close).

    There are a few other changes too, smaller fixlets, etc. For new
    platform support, the primary ones are:

    - New SoC: Hisilicon SD5203, ARM926EJ-S platform.

    - Cpufreq support for i.MX7ULP"

    * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (121 commits)
    ARM: mstar: Select MStar intc
    ARM: stm32: Replace HTTP links with HTTPS ones
    ARM: debug: add UART early console support for SD5203
    ARM: hisi: add support for SD5203 SoC
    ARM: omap3: enable off mode automatically
    clk: imx: imx35: Remove mx35_clocks_init()
    clk: imx: imx31: Remove mx31_clocks_init()
    clk: imx: imx27: Remove mx27_clocks_init()
    ARM: imx: Remove unused definitions
    ARM: imx35: Retrieve the IIM base address from devicetree
    ARM: imx3: Retrieve the AVIC base address from devicetree
    ARM: imx3: Retrieve the CCM base address from devicetree
    ARM: imx31: Retrieve the IIM base address from devicetree
    ARM: imx27: Retrieve the CCM base address from devicetree
    ARM: imx27: Retrieve the SYSCTRL base address from devicetree
    ARM: s3c64xx: bring back notes from removed debug-macro.S
    ARM: s3c24xx: fix Wunused-variable warning on !MMU
    ARM: samsung: fix PM debug build with DEBUG_LL but !MMU
    MAINTAINERS: mark linux-samsung-soc list non-moderated
    ARM: imx: Remove remnant board file support pieces
    ...

    Linus Torvalds
     

24 Oct, 2020

1 commit


23 Oct, 2020

2 commits

  • On rare occations there is the following error:

    mmc0: Tuning timeout, falling back to fixed sampling clock

    There are SD cards which takes a significant longer time to reply to the
    first CMD19 command. The eSDHC takes the data timeout value into account
    during the tuning period. The SDHCI core doesn't explicitly set this
    timeout for the tuning procedure. Thus on the slow cards, there might be
    a spurious "Buffer Read Ready" interrupt, which in turn triggers a wrong
    sequence of events. In the end this will lead to an unsuccessful tuning
    procedure and to the above error.

    To workaround this, set the timeout to the maximum value (which is the
    best we can do) and the SDHCI core will take care of the proper timeout
    handling.

    Fixes: ba49cbd0936e ("mmc: sdhci-of-esdhc: add tuning support")
    Signed-off-by: Michael Walle
    Acked-by: Adrian Hunter
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20201022222337.19857-1-michael@walle.cc
    Signed-off-by: Ulf Hansson

    Michael Walle
     
  • …/kernel/git/ulfh/mmc") into android-mainline

    Steps on the way to 5.10-rc1

    Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
    Change-Id: I7ef0b81d31025e256bd85102013ed3ad038a54b1

    Greg Kroah-Hartman
     

15 Oct, 2020

1 commit

  • sdhci-of-dwcmshc meets an eMMC read performance regression with below
    command after commit 427b6514d095 ("mmc: sdhci: Add Auto CMD Auto
    Select support"):

    dd if=/dev/mmcblk0 of=/dev/null bs=8192 count=100000

    Before the commit, the above command gives 120MB/s
    After the commit, the above command gives 51.3 MB/s

    So it looks like sdhci-of-dwcmshc expects Version 4 Mode for Auto
    CMD Auto Select. Fix the performance degradation by ensuring v4_mode
    is true to use Auto CMD Auto Select.

    Fixes: 427b6514d095 ("mmc: sdhci: Add Auto CMD Auto Select support")
    Signed-off-by: Jisheng Zhang
    Acked-by: Adrian Hunter
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20201015174115.4cf2c19a@xhacker.debian
    Signed-off-by: Ulf Hansson

    Jisheng Zhang
     

14 Oct, 2020

1 commit

  • Pull block updates from Jens Axboe:

    - Series of merge handling cleanups (Baolin, Christoph)

    - Series of blk-throttle fixes and cleanups (Baolin)

    - Series cleaning up BDI, seperating the block device from the
    backing_dev_info (Christoph)

    - Removal of bdget() as a generic API (Christoph)

    - Removal of blkdev_get() as a generic API (Christoph)

    - Cleanup of is-partition checks (Christoph)

    - Series reworking disk revalidation (Christoph)

    - Series cleaning up bio flags (Christoph)

    - bio crypt fixes (Eric)

    - IO stats inflight tweak (Gabriel)

    - blk-mq tags fixes (Hannes)

    - Buffer invalidation fixes (Jan)

    - Allow soft limits for zone append (Johannes)

    - Shared tag set improvements (John, Kashyap)

    - Allow IOPRIO_CLASS_RT for CAP_SYS_NICE (Khazhismel)

    - DM no-wait support (Mike, Konstantin)

    - Request allocation improvements (Ming)

    - Allow md/dm/bcache to use IO stat helpers (Song)

    - Series improving blk-iocost (Tejun)

    - Various cleanups (Geert, Damien, Danny, Julia, Tetsuo, Tian, Wang,
    Xianting, Yang, Yufen, yangerkun)

    * tag 'block-5.10-2020-10-12' of git://git.kernel.dk/linux-block: (191 commits)
    block: fix uapi blkzoned.h comments
    blk-mq: move cancel of hctx->run_work to the front of blk_exit_queue
    blk-mq: get rid of the dead flush handle code path
    block: get rid of unnecessary local variable
    block: fix comment and add lockdep assert
    blk-mq: use helper function to test hw stopped
    block: use helper function to test queue register
    block: remove redundant mq check
    block: invoke blk_mq_exit_sched no matter whether have .exit_sched
    percpu_ref: don't refer to ref->data if it isn't allocated
    block: ratelimit handle_bad_sector() message
    blk-throttle: Re-use the throtl_set_slice_end()
    blk-throttle: Open code __throtl_de/enqueue_tg()
    blk-throttle: Move service tree validation out of the throtl_rb_first()
    blk-throttle: Move the list operation after list validation
    blk-throttle: Fix IO hang for a corner case
    blk-throttle: Avoid tracking latency if low limit is invalid
    blk-throttle: Avoid getting the current time if tg->last_finish_time is 0
    blk-throttle: Remove a meaningless parameter for throtl_downgrade_state()
    block: Remove redundant 'return' statement
    ...

    Linus Torvalds
     

12 Oct, 2020

1 commit


09 Oct, 2020

3 commits

  • Add a MODULE_DEVICE_TABLE() entry so that the driver is autoloaded
    when built as a module.

    Signed-off-by: Faiz Abbas
    Link: https://lore.kernel.org/r/20201008100129.13917-1-faiz_abbas@ti.com
    Signed-off-by: Ulf Hansson

    Faiz Abbas
     
  • Ulf Hansson
     
  • In mmc_queue_setup_discard() the mmc driver queue's discard_granularity
    might be set as 0 (when card->pref_erase > max_discard) while the mmc
    device still declares to support discard operation. This is buggy and
    triggered the following kernel warning message,

    WARNING: CPU: 0 PID: 135 at __blkdev_issue_discard+0x200/0x294
    CPU: 0 PID: 135 Comm: f2fs_discard-17 Not tainted 5.9.0-rc6 #1
    Hardware name: Google Kevin (DT)
    pstate: 00000005 (nzcv daif -PAN -UAO BTYPE=--)
    pc : __blkdev_issue_discard+0x200/0x294
    lr : __blkdev_issue_discard+0x54/0x294
    sp : ffff800011dd3b10
    x29: ffff800011dd3b10 x28: 0000000000000000 x27: ffff800011dd3cc4 x26: ffff800011dd3e18 x25: 000000000004e69b x24: 0000000000000c40 x23: ffff0000f1deaaf0 x22: ffff0000f2849200 x21: 00000000002734d8 x20: 0000000000000008 x19: 0000000000000000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000394 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 00000000000008b0 x9 : ffff800011dd3cb0 x8 : 000000000004e69b x7 : 0000000000000000 x6 : ffff0000f1926400 x5 : ffff0000f1940800 x4 : 0000000000000000 x3 : 0000000000000c40 x2 : 0000000000000008 x1 : 00000000002734d8 x0 : 0000000000000000 Call trace:
    __blkdev_issue_discard+0x200/0x294
    __submit_discard_cmd+0x128/0x374
    __issue_discard_cmd_orderly+0x188/0x244
    __issue_discard_cmd+0x2e8/0x33c
    issue_discard_thread+0xe8/0x2f0
    kthread+0x11c/0x120
    ret_from_fork+0x10/0x1c
    ---[ end trace e4c8023d33dfe77a ]---

    This patch fixes the issue by setting discard_granularity as SECTOR_SIZE
    instead of 0 when (card->pref_erase > max_discard) is true. Now no more
    complain from __blkdev_issue_discard() for the improper value of discard
    granularity.

    This issue is exposed after commit b35fd7422c2f ("block: check queue's
    limits.discard_granularity in __blkdev_issue_discard()"), a "Fixes:" tag
    is also added for the commit to make sure people won't miss this patch
    after applying the change of __blkdev_issue_discard().

    Fixes: e056a1b5b67b ("mmc: queue: let host controllers specify maximum discard timeout")
    Fixes: b35fd7422c2f ("block: check queue's limits.discard_granularity in __blkdev_issue_discard()").
    Reported-and-tested-by: Vicente Bergas
    Signed-off-by: Coly Li
    Acked-by: Adrian Hunter
    Cc: Ulf Hansson
    Link: https://lore.kernel.org/r/20201002013852.51968-1-colyli@suse.de
    Signed-off-by: Ulf Hansson

    Coly Li
     

08 Oct, 2020

1 commit

  • After the conversions of the reset routines, re-inserting SD cards
    didn't work anymore. Apply this temporary workaround to have working SD
    cards during the merge window. The issue will be fixed properly until
    the final release.

    Signed-off-by: Wolfram Sang
    Link: https://lore.kernel.org/r/20201008092533.76588-1-wsa+renesas@sang-engineering.com
    Signed-off-by: Ulf Hansson

    Wolfram Sang
     

07 Oct, 2020

1 commit

  • Add CQHCI initialization and implement CQHCI operations for GL9763E.
    Use bit19 of the register (0x888) to decide whether to disable command
    queuing. If the bit is set, the command queuing will be disabled.

    Signed-off-by: Ben Chuang
    Link: https://lore.kernel.org/r/20201005105509.11343-1-ben.chuanggli@gmail.com
    Signed-off-by: Ulf Hansson

    Ben Chuang
     

06 Oct, 2020

1 commit


05 Oct, 2020

1 commit

  • This change fixes HS400 tuning for devices with invalid presets.

    SDHCI presets are not currently used for eMMC HS/HS200/HS400, but are
    used for DDR52. The HS400 retuning sequence is:

    HS400->DDR52->HS->HS200->Perform Tuning->HS->HS400

    This means that when HS400 tuning happens, we transition through DDR52
    for a very brief period. This causes presets to be enabled
    unintentionally and stay enabled when transitioning back to HS200 or
    HS400. Some firmware has invalid presets, so we end up with driver
    strengths that can cause I/O problems.

    Fixes: 34597a3f60b1 ("mmc: sdhci-acpi: Add support for ACPI HID of AMD Controller with HS400")
    Signed-off-by: Raul E Rangel
    Acked-by: Adrian Hunter
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200928154718.1.Icc21d4b2f354e83e26e57e270dc952f5fe0b0a40@changeid
    Signed-off-by: Ulf Hansson

    Raul E Rangel
     

28 Sep, 2020

4 commits

  • According to the SW tuning App note[1], tuning is required for all
    UHS speed modes. Tuning for SDR50 is not enabled in Capabilities by
    default so enable it from the CTL_CFG registers.

    [1] https://www.ti.com/lit/pdf/spract9

    Signed-off-by: Faiz Abbas
    Link: https://lore.kernel.org/r/20200923105206.7988-7-faiz_abbas@ti.com
    Signed-off-by: Ulf Hansson

    Faiz Abbas
     
  • With the new SW tuning App note[1], a custom tuning algorithm is
    required for eMMC HS200, HS400 and SD card UHS modes. The algorithm
    involves running through the 32 possible input tap delay values and
    sending the appropriate tuning command (CMD19/21) for each of them
    to get a fail or pass result for each of the values. Typically, the
    range will have a small contiguous failing window. Considering the
    tuning range as a circular buffer, the algorithm then sets a final
    tuned value directly opposite to the failing window.

    [1] https://www.ti.com/lit/pdf/spract9

    Signed-off-by: Faiz Abbas
    Reviewed-by: Kishon Vijay Abraham I
    Link: https://lore.kernel.org/r/20200923105206.7988-6-faiz_abbas@ti.com
    Signed-off-by: Ulf Hansson

    Faiz Abbas
     
  • DLL need only be enabled for speed modes and clock frequencies at or
    above 50 MHz. For speed modes that don't enable the DLL, we need to
    configure a static input delay value. This involves reading an optional
    itap-del-sel-* value from the device tree and configuring it for the
    appropriate speed mode.

    With this addition, make sure that DLL is always switched off at the
    beginning of the set_clock() call to simplify configuration. This also
    removes the need for the dll_on member in struct sdhci_am654_data.

    Signed-off-by: Faiz Abbas
    Link: https://lore.kernel.org/r/20200923105206.7988-5-faiz_abbas@ti.com
    Signed-off-by: Ulf Hansson

    Faiz Abbas
     
  • Change hard coded array size value to depend on struct timing_data
    array size.

    Signed-off-by: Faiz Abbas
    Link: https://lore.kernel.org/r/20200923105206.7988-4-faiz_abbas@ti.com
    Signed-off-by: Ulf Hansson

    Faiz Abbas