.set_ios() is called from .resume() as well. For SDIO device which sets
keep-power-in-suspend, nothing should be changed after resuming, as well
as sample tuning value, since this value is tuned already. So we should
not overwrite it with the default value.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I18974f28d7a2253fd151817a5a3e4105c2e976b3
This reverts part of commit 251c226c35 ("rk: revert to v4.19").
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ie2742038ee35cb4ff89ba3abc6a2e8f900461e6f
Fix the following warnings:
arch/arm64/boot/dts/rockchip/rk3566-evb2-lp4x-v10-eink.dts:274.18-285.4:
ERROR (i2c_bus_reg): /i2c@fe5c0000/wacom@09: I2C bus unit address format error, expected "9"
arch/arm64/boot/dts/rockchip/rk3566-rk817-eink.dts:551.18-562.4:
ERROR (i2c_bus_reg): /i2c@fe5b0000/wacom@09: I2C bus unit address format error, expected "9"
arch/arm64/boot/dts/rockchip/rk3566-rk817-eink.dts:678.17-690.4:
ERROR (i2c_bus_reg): /i2c@fe5e0000/kxtj3@0e: I2C bus unit address format error, expected "e"
arch/arm64/boot/dts/rockchip/rk3566-rk817-eink-w103.dts:698.18-710.4:
ERROR (i2c_bus_reg): /i2c@fe5a0000/wacom@09: I2C bus unit address format error, expected "9"
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia116424ecbb3285d77274ef19b6b93ef5f0f1480
Fixes: 1d1a1f03f3 ("mmc: dw_mmc: add xfer timer for avoid DTO without actual data payload")
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I00ae095cff35b3960e1f9189d03f9908fed0aa33
supports-* stuff were used for rockchip platforms to speed up booting
if we know what exactly the host was used for. As we have upstreamed all
these with some very similar ways, now it's the time we migrate our dts
files to use new properties.
They were converted by:
sed -i "s/supports-emmc;/no-sdio;\n\tno-sd;/g" `grep supports-emmc -rl arch/*`
sed -i "s/supports-sd;/no-sdio;\n\tno-mmc;/g" `grep supports-sd -rl arch/*`
sed -i "s/supports-sdio;/no-sd;\n\tno-mmc;/g" `grep supports-sdio -rl arch/*`
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I33e5317ee5c7305803cf18ff4a370658abf555b0
Remove unnecessary initialization process from core as possible, such
as remove some idle process, shorten delay, remove parsing ext_csd,
remove post-delay for power and so on. All these stuffs are enabled
by CONFIG_ROCKCHIP_THUNDER_BOOT.
Change-Id: I0e2326dd79d938eb82c8cfac9db09e34d6c08987
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
We observed the failure of initializing card after resume
accidentally. It's hard to reproduce but we did get report from
the suspend/resume test of our RK3399 mp test farm .Unfortunately,
we still fail to figure out what was going wrong at that time.
Also we can't achieve it by retrying the host->f_init without falling
back it. But this patch will solve the problem as we could add some log
there and see that we resume the mmc card successfully after falling
back the host->f_init. There is no obviousside effect found, so it seems
this patch will improve the stability.
[ 93.405085] mmc1: unexpected status 0x800900 after switch
[ 93.408474] mmc1: switch to bus width 1 failed
[ 93.408482] mmc1: mmc_select_hs200 failed, error -110
[ 93.408492] mmc1: error -110 during resume (card was removed?)
[ 93.408705] PM: resume of devices complete after 213.453 msecs
Change-Id: I5b24cb84a223394392450a1f10d8bbacb9e1006e
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
v2 tuning will inherit pre-stage loader's phase
settings for the first time, and do re-tune if
necessary. Re-tune will still try the rough degrees,
for instance, 90, 180, 270, 360 but continue to do the
fine tuning if sample window isn't good enough.
Change-Id: I593384ee381d09df5b9adfc29a18eb22517b2764
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
The ROM code for Rockchip platform never support detecting
SD 3.0 mode, so if the SD card contains system image running
into SD 3.0 mode in kernel, it will fails to reboot.
The problem is SD 3.0 mode is using 1.8V signal and could only
be switched back into 2.0 mode by power cycle. If the customed
board could not switch off its power rail, the ROM code can't
soft reset the SD.
Add mmc_sd_shutdown to workaround this special case and don't
bother normal SD cards used as external disk by checking the
RESTRICT_CARD_TYPE_MMC flag.
Conflicts:
drivers/mmc/core/sd.c
Change-Id: I4c3d3111c0bce0ad3cd4f0c6592ff595d7015afe
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Add support to disable cqe function if disable-cqe
is assigned by firmware.
Change-Id: Iac2826c4b986c122510af1594c971c4135bafc34
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This's what mmc_select_hs400() or mmc_select_hs() did,
since mmc_set_clock() will let sdhci_arasan_set_clock()
update the PHY clock to match the timing, otherwise
the following mmc_switch_status() will be failed.
Change-Id: Ic1a0178ec209ec71d904f7212a84da6665904007
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
It's meaningless to check the card's status which execute
the on-going flush. As the status been responded make no
any sense here.
Change-Id: I34197d1c93c01337dd2e68ec22e3ce8dd195c424
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Otherwise now the RPM core will gate the clk and power domain,
so that the hotplug will be broken.
Change-Id: I9104ff1beb2db5ef2752179eb91730f48f3089d7
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
It has proved the controller has a potention broken state with a DTO
interrupt comes while the data payload is missing, which was not
covered by current software state machine. Add a xfer timer to work
around this buggy behaviour introduced by broken design.
Change-Id: I5019c5ba0cdeb59adcdd3a5231a2000b448762bc
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This fixes uninitialized variable introduced by commit ddd2e87ad4
("dmaengine: pl330: add support for interlace size config")
Change-Id: Ib1bbec21053fbcccf85a339d8ed7eec0bbe77727
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Let's keep genpd for sdhci alive while entering deep
sleep which gte me out of yapping around.
Change-Id: I0da20b417621d277745bafd53d1ee461aae72e11
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
According to commit 736706bee3 ("get rid of legacy 'get_ds()' function")
Every in-kernel use of this function defined it to KERNEL_DS (either as
an actual define, or as an inline function). It's an entirely
historical artifact, and long long long ago used to actually read the
segment selector valueof '%ds' on x86.
Which in the kernel is always KERNEL_DS.
Inspired by a patch from Jann Horn that just did this for a very small
subset of users (the ones in fs/), along with Al who suggested a script.
I then just took it to the logical extreme and removed all the remaining
gunk.
Roughly scripted with
git grep -l '(get_ds())' -- :^tools/ | xargs sed -i 's/(get_ds())/(KERNEL_DS)/'
git grep -lw 'get_ds' -- :^tools/ | xargs sed -i '/^#define get_ds()/d'
plus manual fixups to remove a few unusual usage patterns, the couple of
inline function cases and to fix up a comment that had become stale.
The 'get_ds()' function remains in an x86 kvm selftest, since in user
space it actually does something relevant.
Change-Id: I4b8e3436c958b7745059ea7ef4367f3fd4a0ebbe
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
According to commit fad7c90209 ("err.h: remove deprecated PTR_RET for good").
Initially, commit fa9ee9c4b9 ("include/linux/err.h: add a function to
cast error-pointers to a return value") from Uwe Kleine-König introduced
PTR_RET in 03/2011. Then, in 07/2013, commit 6e8b8726ad ("PTR_RET is
now PTR_ERR_OR_ZERO") from Rusty Russell renamed PTR_RET to
PTR_ERR_OR_ZERO, and left PTR_RET as deprecated-marked alias.
After six years since the renaming and various repeated cleanups in the
meantime, it is time to finally remove the deprecated PTR_RET for good.
Change-Id: I2b5d464dc1c6bc0409e41dd9da503f14bef17dc7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
According to commit 4bdc0d676a ("remove ioremap_nocache and devm_ioremap_nocache").
ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.
Change-Id: Id62917547d7d0d838ac3785f8c2bfd2d645af034
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Enable support for PSCI firmware based cpuidle.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I746d25e8e38cac39e895d00c33e7e3ae27bf61a7
Rockchip RK860X regulators share the exact same functionality and
register layout as the Fairchild FAN53555 regulators.
Therefore extend the driver to add support for them.
Both types use the same vendor id in their ID1 register, so it's not
possible to distinguish them automatically.
Similarly, the types also do not match. Type 8 used by the RK8603
and RK8604 start at 500mV and increment in 6.25mv steps,
while the FAN53555 type 8 starts at 600mV and increments in 10mV steps.
And the en register is also differences.
Change-Id: Id93f85de91b79a1922b1efc27771f30dd7bc8bcb
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Since commit 84af7a6194 ("checkpatch: kconfig: prefer 'help' over
'---help---'"), the number of '---help---' has been gradually
decreasing, but there are still more than 2400 instances.
This commit finishes the conversion. While I touched the lines,
I also fixed the indentation.
There are a variety of indentation styles found.
a) 4 spaces + '---help---'
b) 7 spaces + '---help---'
c) 8 spaces + '---help---'
d) 1 space + 1 tab + '---help---'
e) 1 tab + '---help---' (correct indentation)
f) 1 tab + 1 space + '---help---'
g) 1 tab + 2 spaces + '---help---'
In order to convert all of them to 1 tab + 'help', I ran the
following commend:
$ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I6c1a95c0cb15b1a5a4215acba748e7023dfd4338