Krzysztof Kozlowski
bf3023e6e8
mmc: sdhci-st: drop of_match_ptr from of_device_id table
...
The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it is not relevant here). This fixes
compile warning (!CONFIG_OF on x86_64):
drivers/mmc/host/sdhci-st.c:512:34: warning:
‘st_sdhci_match’ defined but not used [-Wunused-const-variable=]
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org >
Link: https://lore.kernel.org/r/20201120162344.485921-2-krzk@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-24 11:26:55 +01:00
Krzysztof Kozlowski
a96e6523d0
mmc: sdhci-sprd: drop of_match_ptr from of_device_id table
...
The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it is not relevant here). This fixes
compile warning (!CONFIG_OF on x86_64):
drivers/mmc/host/sdhci-sprd.c:723:34: warning:
‘sdhci_sprd_of_match’ defined but not used [-Wunused-const-variable=]
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org >
Acked-by: Chunyan Zhang <zhang.lyra@gmail.com >
Link: https://lore.kernel.org/r/20201120162344.485921-1-krzk@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-24 11:26:55 +01:00
Wenbin Mei
c0a2074ac5
mmc: mediatek: Fix system suspend/resume support for CQHCI
...
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 <wenbin.mei@mediatek.com >
Link: https://lore.kernel.org/r/20201118063405.24906-1-wenbin.mei@mediatek.com
Fixes: 88bd652b3c ("mmc: mediatek: command queue support")
Cc: stable@vger.kernel.org
[Ulf: Renamed functions]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-23 14:42:56 +01:00
Masaharu Hayakawa
40e49564e1
mmc: tmio: Fix command error processing
...
If some errors are detected at the same time as the access end
interrupt, the access end interrupt was not cleared. Especially with
DMA, because then the access end interrupt was never enabled and, thus,
never cleared. Clear the interrupt register always when a command error
occurs.
Signed-off-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com >
[saito: rebase to v5.4]
Signed-off-by: Takeshi Saito <takeshi.saito.xv@renesas.com >
[wsa: rebase and extension of the commit message]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Link: https://lore.kernel.org/r/20201117131337.35307-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-23 14:22:14 +01:00
Fabio Estevam
854a22997a
mmc: sdhci-esdhc-imx: Convert the driver to DT-only
...
Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code
by removing the unused non-DT support.
Signed-off-by: Fabio Estevam <festevam@gmail.com >
Reviewed-by: Haibo Chen <haibo.chen@nxp.com >
Link: https://lore.kernel.org/r/20201117113750.25053-1-festevam@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-23 14:20:03 +01:00
Ulf Hansson
506f43994d
Merge branch 'fixes' into next
2020-11-17 12:48:34 +01:00
Krzysztof Kozlowski
ade8e9d3fb
mmc: tmio: do not print real IOMEM pointer
...
Printing kernel pointers is discouraged because they might leak kernel
memory layout. This fixes smatch warning:
drivers/mmc/host/tmio_mmc.c:177 tmio_mmc_probe() warn: argument 3 to %08lx specifier is cast from pointer
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org >
Link: https://lore.kernel.org/r/20201116164252.44078-1-krzk@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-17 12:46:39 +01:00
Wolfram Sang
fcc541fea3
mmc: sdhci: tegra: fix wrong unit with busy_timeout
...
'busy_timeout' is in msecs, not in jiffies. Use the correct factor.
Fixes: 5e958e4aac ("sdhci: tegra: Implement Tegra specific set_timeout callback")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Acked-by: Sowjanya Komatineni <skomatineni@nvidia.com >
Acked-by: Thierry Reding <treding@nvidia.com >
Link: https://lore.kernel.org/r/20201116132206.23518-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-17 12:45:27 +01:00
Manish Narani
d06d60d52e
mmc: sdhci-of-arasan: Issue DLL reset explicitly
...
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: a5c8b2ae2e ("mmc: sdhci-of-arasan: Add support for ZynqMP Platform Tap Delays Setup")
Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com >
Signed-off-by: Manish Narani <manish.narani@xilinx.com >
Acked-by: Michal Simek <michal.simek@xilinx.com >
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 <ulf.hansson@linaro.org >
2020-11-17 12:44:44 +01:00
Manish Narani
d338c6d01d
mmc: sdhci-of-arasan: Use Mask writes for Tap delays
...
Mask the ITAP and OTAP delay bits before updating with the new
tap value for Versal platform.
Fixes: 1a470721c8 ("sdhci: arasan: Add support for Versal Tap Delays")
Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com >
Signed-off-by: Manish Narani <manish.narani@xilinx.com >
Acked-by: Michal Simek <michal.simek@xilinx.com >
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 <ulf.hansson@linaro.org >
2020-11-17 12:44:40 +01:00
Manish Narani
9e95343293
mmc: sdhci-of-arasan: Allow configuring zero tap values
...
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: a5c8b2ae2e ("mmc: sdhci-of-arasan: Add support for ZynqMP Platform Tap Delays Setup")
Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com >
Signed-off-by: Manish Narani <manish.narani@xilinx.com >
Acked-by: Michal Simek <michal.simek@xilinx.com >
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 <ulf.hansson@linaro.org >
2020-11-17 12:43:47 +01:00
Colin Ian King
fde71a3eed
mmc: host: Kconfig: fix spelling mistake "hardare" -> "hardware"
...
There is a spelling mistake in the Kconfig file. Fix it.
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Link: https://lore.kernel.org/r/20201114120819.416311-1-colin.king@canonical.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-17 12:36:06 +01:00
Dmitry Baryshkov
8ffbfe43e9
mmc: sdhci-msm: detect if tassadar_dll is used by using core version
...
Detect if tassadar_dll is required by using core version rather than
just specifying it in the sdhci_msm_variant_info.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Veerabhadrarao Badiganti <vbadigan@codeaurora.org >
Reviewed-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org >
Link: https://lore.kernel.org/r/20201112173636.360186-1-dmitry.baryshkov@linaro.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-17 12:35:35 +01:00
Adrian Hunter
60d5356610
mmc: sdhci-pci: Prefer SDR25 timing for High Speed mode for BYT-based Intel controllers
...
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 2fefc7c5f7 ("mmc: sdhci-brcmstb: Fix incorrect switch to HS
mode"). Several other drivers also do this.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com >
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 <ulf.hansson@linaro.org >
2020-11-17 12:33:06 +01:00
Zheng Liang
bbba85fae4
mmc: mediatek: fix mem leak in msdc_drv_probe
...
It should use mmc_free_host to free mem in error patch of
msdc_drv_probe.
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Zheng Liang <zhengliang6@huawei.com >
Reviewed-by: Chaotian Jing <chaotian.jing@mediatek.com >
Link: https://lore.kernel.org/r/20201112092530.32446-1-zhengliang6@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-17 12:30:30 +01:00
Wolfram Sang
ab07a13560
mmc: renesas_sdhi: sort includes
...
Better prevent double includes.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201111100244.15823-4-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 12:55:04 +01:00
Wolfram Sang
0e08a41158
mmc: renesas_sdhi: don't hardcode SDIF values
...
Use a macro to name the hardcoded values. Also, move the SDIF register
definition into the SDHI driver because this is an SDHI extension.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201111100244.15823-3-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 12:54:59 +01:00
Wolfram Sang
4533c3eb89
mmc: renesas_sdhi: improve HOST_MODE usage
...
HOST_MODE should have a CTL_ prefix, too. This makes the code more
readable because we immediately know what it is. Also, remove the
hardcoded values with something readable, too.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201111100244.15823-2-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 12:54:48 +01:00
Wolfram Sang
8c8310a6c2
mmc: renesas_sdhi: remove superfluous SCLKEN
...
All previously called functions handle SCLKEN on their own, no need to
enable it again in sdhi_reset().
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201110162151.37622-4-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 12:51:47 +01:00
Wolfram Sang
80d0be8110
mmc: renesas_sdhi: merge the SCC reset functions
...
There is no user of renesas_sdhi_reset_scc() anymore, only
renesas_sdhi_disable_scc() so merge these functions into one. I guess
the seperation was cruft anyhow. The BSP doesn't have it anymore and I
can't recall the reason we had it.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201110162151.37622-3-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 12:51:23 +01:00
Wolfram Sang
183edc060e
mmc: renesas_sdhi: clear TAPEN when resetting, too
...
We want to clear TAPEN in a software reset, too, to have a completely
known state. Especially when we doing the initial reset during boot to
clear previous firmware states.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201110162151.37622-2-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 12:50:41 +01:00
Wolfram Sang
9f809065d8
mmc: renesas_sdhi: simplify reset routine a little
...
The 'reset' pointer is only populated for Gen2+. So, we don't need to
check for that flag inside the routine.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201110142058.36393-5-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 12:48:24 +01:00
Wolfram Sang
d14ac691bb
mmc: renesas_sdhi: populate SCC pointer at the proper place
...
The SCC pointer is currently filled whenever the SoC is Gen2+. This is
wrong because there is a Gen2-variant without SCC (SDHI_VER_GEN2_SDR50).
We have been lucky because the writes to unintended registers have not
caused problems so far. But further refactoring work exposed the
problem. So, move the pointer initialization to the place where we know
that the SDHI instance supports tuning. And also populate the 'reset'
pointer unconditionally to make sure the interrupt enable register is
always properly set for Gen2+.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201110142058.36393-4-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 12:48:19 +01:00
Wolfram Sang
b161d87dfd
mmc: renesas_sdhi: probe into TMIO after SCC parameters have been setup
...
Setting up the SCC parameters does not need a probed TMIO device. But in
the near future, probing the TMIO device needs the SCC parameters setup.
So, fix the ordering.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201110142058.36393-3-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 12:48:14 +01:00
Wolfram Sang
45bffc371f
mmc: renesas_sdhi: only reset SCC when its pointer is populated
...
Only re-initialize SCC and tuning when an SCC was found during probe().
This is currently a noop because all R-Car Gen2+ are considered to have
an SCC. But this will change in a later patch, so we need this
preparation.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201110142058.36393-2-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 12:46:50 +01:00
Zou Wei
1f71b0bf4e
mmc: owl-mmc: use true and false for bool variables
...
Fix coccicheck warnings:
./owl-mmc.c:524:2-18: WARNING: Assignment of 0/1 to bool variable
./owl-mmc.c:528:2-18: WARNING: Assignment of 0/1 to bool variable
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Zou Wei <zou_wei@huawei.com >
Link: https://lore.kernel.org/r/1604888706-63429-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 12:44:31 +01:00
Kaixu Xia
c24aa7b160
mmc: sdhci-pic32: Make pic32_sdhci_probe_platform() void
...
pic32_sdhci_probe_platform() always returned 0, so there's no reason for
a return value. In addition, pic32_sdhci_probe() checked the return value
for possible error which is unnecessary.
Convert pic32_sdhci_probe_platform() to a void function and remove the
return value check. Fix the following Coccinelle warning:
./drivers/mmc/host/sdhci-pic32.c:127:5-8: Unneeded variable: "ret". Return "0" on line 137
Reported-by: Tosk Robot <tencent_os_robot@tencent.com >
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com >
Link: https://lore.kernel.org/r/1604847648-13036-1-git-send-email-kaixuxia@tencent.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:30 +01:00
Tian Tao
9f7d4c916c
mmc: dw_mmc: replace spin_lock_irqsave by spin_lock in hard IRQ
...
The code has been in a irq-disabled context since it is hard IRQ. There
is no necessity to do it again.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Link: https://lore.kernel.org/r/1604627813-59785-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:30 +01:00
Krzysztof Kozlowski
e2c01e9192
mmc: meson-gx: drop of_match_ptr from of_device_id table
...
The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it is not relevant here). This fixes
compile warning (!CONFIG_OF && !CONFIG_MODULES):
drivers/mmc/host/meson-gx-mmc.c:1252:34: warning:
‘meson_mmc_of_match’ defined but not used [-Wunused-const-variable=]
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org >
Acked-by: Kevin Hilman <khilman@baylibre.com >
Link: https://lore.kernel.org/r/20201103163046.14336-1-krzk@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:30 +01:00
Rui Feng
6b7b58f425
mmc: rtsx: Add test mode for RTS5261
...
This patch add test mode for RTS5261.
If test mode is set, reader will switch to SD Express mode
mandatorily, and this mode is used by factory testing only.
Signed-off-by: Rui Feng <rui_feng@realsil.com.cn >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/1604397269-2780-1-git-send-email-rui_feng@realsil.com.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:29 +01:00
Wenbin Mei
13b4e1e924
mmc: mediatek: add HS400 enhanced strobe support
...
Add support for HS400ES mode to MediaTek MMC Card Driver.
Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com >
Link: https://lore.kernel.org/r/20201102092822.5301-2-wenbin.mei@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:29 +01:00
Tian Tao
fa4c9a497c
mmc: owl-mmc: replace spin_lock_irqsave by spin_lock in hard IRQ
...
The code has been in a irq-disabled context since it is hard IRQ. There
is no necessity to do it again.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org >
Link: https://lore.kernel.org/r/1604278337-55624-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:29 +01:00
Tian Tao
291a81c3b0
mmc: meson-mx-sdio: replace spin_lock_irqsave by spin_lock in hard IRQ
...
The code has been in a irq-disabled context since it is hard IRQ. There
is no necessity to do it again.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com >
Link: https://lore.kernel.org/r/1604375323-33556-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:29 +01:00
Tian Tao
120ae805fb
mmc: moxart: replace spin_lock_irqsave by spin_lock in hard IRQ
...
The code has been in a irq-disabled context since it is hard IRQ. There
is no necessity to do it again.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Link: https://lore.kernel.org/r/1604021319-31338-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:29 +01:00
Tom Rix
86d9bf50af
mmc: davinci: remove unneeded semicolon
...
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com >
Link: https://lore.kernel.org/r/20201031152708.2146690-1-trix@redhat.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:28 +01:00
Rui Feng
9ff43c7be9
mmc: rtsx_pci: Add SD Express mode support for RTS5261
...
RTS5261 support SD mode and PCIe/NVMe mode. The workflow is as follows.
1.RTS5261 work in SD mode and set MMC_CAPS2_SD_EXP flag.
2.If card is plugged in, Host send CMD8 to ask card's PCIe availability.
3.If the card has PCIe availability and WP is not set, init_sd_express() will be invoked,
RTS5261 switch to PCIe/NVMe mode.
4.Mmc driver handover it to NVMe driver.
5.If card is unplugged, RTS5261 will switch to SD mode.
Signed-off-by: Rui Feng <rui_feng@realsil.com.cn >
Link: https://lore.kernel.org/r/1603936703-3403-1-git-send-email-rui_feng@realsil.com.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:28 +01:00
Tian Tao
9baf7c5e3a
mmc: mediatek: Replace spin_lock_irqsave by spin_lock in hard IRQ
...
The code has been in a irq-disabled context since it is hard IRQ. Therefore
there no need to do it again.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Link: https://lore.kernel.org/r/1603068193-44688-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:28 +01:00
Wenbin Mei
f5eccd94b6
mmc: mediatek: Add subsys clock control for MT8192 msdc
...
MT8192 msdc is an independent sub system, we need control more bus
clocks for it.
Add support for the additional subsys clocks to allow it to be
configured appropriately.
Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com >
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org >
Link: https://lore.kernel.org/r/20201014030846.12428-5-wenbin.mei@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:27 +01:00
Raul E Rangel
e10f480902
mmc: sdhci-acpi: AMDI0040: Allow changing HS200/HS400 driver strength
...
This change will allow platform designers better control over signal
integrity by allowing them to tune the HS200 and HS400 driver strengths.
The driver strength was previously hard coded to A to solve boot
problems with certain platforms. This driver strength does not
universally apply to all platforms so we need a knob to adjust it.
All older platforms currently have the SDR104 preset hard coded to A in
the firmware. This means that switching from the hard coded value in
the kernel to reading the SDR104 preset is a no-op for these platforms.
Newer platforms will have properly set presets. So this change will
support both new and old platforms.
Signed-off-by: Raul E Rangel <rrangel@chromium.org >
Signed-off-by: Victor Ding <victording@google.com >
Acked-by: Adrian Hunter <adrian.hunter@intel.com >
Link: https://lore.kernel.org/r/20201027084612.528301-1-victording@google.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:27 +01:00
Krzysztof Kozlowski
b733775fb6
mmc: sunxi: drop of_match_ptr from of_device_id table
...
The driver can match only via DT table so it should be always used and
the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it is not relevant for sunxi). This
fixes compile warning:
drivers/mmc/host/sunxi-mmc.c:1181:34: warning: ‘sunxi_mmc_of_match’ defined but not used [-Wunused-const-variable=]
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://lore.kernel.org/r/20201026153810.89512-3-krzk@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:27 +01:00
Krzysztof Kozlowski
1b0e4a2141
mmc: s3cmci: enable compile testing
...
The driver can be compile tested to increase build coverage.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org >
Link: https://lore.kernel.org/r/20201026153810.89512-2-krzk@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:27 +01:00
Krzysztof Kozlowski
1dc575490b
mmc: s3cmci: include GPIO descriptor consumer header
...
The driver uses GPIO Descriptor Consumer Interface so include proper
header to fix compile test errors like:
drivers/mmc/host/s3cmci.c: In function ‘s3cmci_check_sdio_irq’:
drivers/mmc/host/s3cmci.c:304:7: error:
implicit declaration of function ‘gpiod_get_value’; did you mean ‘gpio_get_value’? [-Werror=implicit-function-declaration]
drivers/mmc/host/s3cmci.c: In function ‘s3cmci_probe_pdata’:
drivers/mmc/host/s3cmci.c:1451:19: error:
implicit declaration of function ‘devm_gpiod_get_index’ [-Werror=implicit-function-declaration]
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org >
Link: https://lore.kernel.org/r/20201026153810.89512-1-krzk@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:27 +01:00
Wolfram Sang
03d80e042a
Revert "mmc: renesas_sdhi: workaround a regression when reinserting SD cards"
...
This reverts commit db1af1e971 . It was
only a workaround to hide a regression. We now have proper fixes.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201106072549.1495-4-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-10 13:58:01 +01:00
Wolfram Sang
24ce2d7b8b
mmc: tmio: bring tuning HW to a sane state with MMC_POWER_OFF
...
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: 6e7d4de108 ("mmc: renesas_sdhi: move wrong 'hw_reset' to 'reset'")
Suggested-by: Takeshi Saito <takeshi.saito.xv@renesas.com >
Reviewed-by: Takeshi Saito <takeshi.saito.xv@renesas.com >
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201106072549.1495-3-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-10 13:58:01 +01:00
Wolfram Sang
1023e290ba
mmc: tmio: when resetting, reset DMA controller, too
...
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: 34e3211e54 ("Revert "mmc: tmio: fix reset operation"")
Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Link: https://lore.kernel.org/r/20201106072549.1495-2-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-10 13:58:01 +01:00
Yangbo Lu
71b053276a
mmc: sdhci-of-esdhc: Handle pulse width detection erratum for more SoCs
...
Apply erratum workaround of unreliable pulse width detection to
more affected platforms (LX2160A Rev2.0 and LS1028A Rev1.0).
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com >
Fixes: 48e304cc19 ("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 <ulf.hansson@linaro.org >
2020-11-10 13:20:37 +01:00
Yoshihiro Shimoda
e8973201d9
mmc: renesas_sdhi_core: Add missing tmio_mmc_host_free() at remove
...
The commit 94b110aff8 ("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: 94b110aff8 ("mmc: tmio: add tmio_mmc_host_alloc/free()")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com >
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
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 <ulf.hansson@linaro.org >
2020-11-10 13:15:19 +01:00
Linus Torvalds
88098fd61b
Merge tag 'mmc-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
...
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
2020-10-30 11:04:11 -07:00
Yangbo Lu
011fde4839
mmc: sdhci-of-esdhc: make sure delay chain locked for HS400
...
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 <yangbo.lu@nxp.com >
Acked-by: Adrian Hunter <adrian.hunter@intel.com >
Link: https://lore.kernel.org/r/20201020081116.20918-1-yangbo.lu@nxp.com
Fixes: 54e08d9a95 ("mmc: sdhci-of-esdhc: add hs400 mode support")
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-10-28 11:07:01 +01:00
Linus Torvalds
e731f3146f
Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
...
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
...
2020-10-24 10:33:08 -07:00