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
5eefe22d22
misc: rtsx: Fix clock timing for RTS5261
...
This patch fix clock timing for RTS5261, using 256 divide
for the version higher than version C.
Signed-off-by: Rui Feng <rui_feng@realsil.com.cn >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/1604397321-3026-1-git-send-email-rui_feng@realsil.com.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:30 +01:00
Rui Feng
1672617d51
misc: rtsx: Add hardware auto power off for RTS5261
...
This patch enable hardware auto power off when card is removed.
Signed-off-by: Rui Feng <rui_feng@realsil.com.cn >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/1604397312-2991-1-git-send-email-rui_feng@realsil.com.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:30 +01:00
Rui Feng
1da3c51512
misc: rtsx: Add CD & WP reverse support for RTS5261
...
This patch add CD & WP reverse support for RTS5261
Signed-off-by: Rui Feng <rui_feng@realsil.com.cn >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/1604397305-2956-1-git-send-email-rui_feng@realsil.com.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:30 +01:00
Rui Feng
5b0f429ede
misc: rtsx: Check mmc support for RTS5261
...
This patch check mmc support when RTS5261 initialize,
and not support mmc default.
Signed-off-by: Rui Feng <rui_feng@realsil.com.cn >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/1604397298-2921-1-git-send-email-rui_feng@realsil.com.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:30 +01:00
Rui Feng
6f61dd2844
misc: rtsx: Fix PAD driving for RTS5261
...
This patch fix PAD driving for RTS5261
Signed-off-by: Rui Feng <rui_feng@realsil.com.cn >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/1604397291-2885-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
Rui Feng
0a3bbf92df
misc: rtsx: Fix aspm for RTS5261
...
This patch fix the bug that LDO is off when aspm is enabled.
Signed-off-by: Rui Feng <rui_feng@realsil.com.cn >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/1604397285-2850-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
Rui Feng
c28e3fb28f
misc: rtsx: Fix OCP function for RTS5261
...
This patch fix the bug that when there is over current but
reader can't enable OCP.
Signed-off-by: Rui Feng <rui_feng@realsil.com.cn >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/1604397278-2815-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
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
Tom Rix
a85344d347
memstick: tifm: 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/20201031142756.2140029-1-trix@redhat.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:28 +01:00
Tom Rix
8c3c0aca1a
memstick: mspro_block: 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/20201031134818.2135446-1-trix@redhat.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:28 +01:00
Tom Rix
fb8298631b
memstick: jmb38x_ms: 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/20201031142505.2139539-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
Rui Feng
5afe802132
misc: rtsx: 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 >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/1603936668-3363-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
Ulf Hansson
ead49373d2
mmc: core: Initial support for SD express card/host
...
In the SD specification v7.10 the SD express card has been added. This new
type of removable SD card, can be managed via a PCIe/NVMe based interface,
while also allowing backwards compatibility towards the legacy SD
interface.
To keep the backwards compatibility, it's required to start the
initialization through the legacy SD interface. If it turns out that the
mmc host and the SD card, both supports the PCIe/NVMe interface, then a
switch should be allowed.
Therefore, let's introduce some basic support for this type of SD cards to
the mmc core. The mmc host, should set MMC_CAP2_SD_EXP if it supports this
interface and MMC_CAP2_SD_EXP_1_2V, if also 1.2V is supported, as to inform
the core about it.
To deal with the switch to the PCIe/NVMe interface, the mmc host is
required to implement a new host ops, ->init_sd_express(). Based on the
initial communication between the host and the card, host->ios.timing is
set to either MMC_TIMING_SD_EXP or MMC_TIMING_SD_EXP_1_2V, depending on if
1.2V is supported or not. In this way, the mmc host can check these values
in its ->init_sd_express() ops, to know how to proceed with the handover.
Note that, to manage card insert/removal, the mmc core sticks with using
the ->get_cd() callback, which means it's the host's responsibility to make
sure it provides valid data, even if the card may be managed by PCIe/NVMe
at the moment. As long as the card seems to be present, the mmc core keeps
the card powered on.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Christoph Hellwig <hch@lst.de >
Cc: Rui Feng <rui_feng@realsil.com.cn >
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/1603936636-3126-1-git-send-email-rui_feng@realsil.com.cn
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
Wenbin Mei
59a23395d8
dt-bindings: mmc: Add support for MT8192 SoC
...
MT8192 mmc host IP is compatible with MT8183, let's add support for this.
Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com >
Link: https://lore.kernel.org/r/20201014030846.12428-3-wenbin.mei@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org >
2020-11-16 11:59:27 +01:00
Wenbin Mei
c626695ecd
dt-bindings: mmc: Convert mtk-sd to json-schema
...
Convert the mtk-sd binding to DT schema format using json-schema.
Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20201014030846.12428-2-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