diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-01-18 01:28:07 +0900 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-03-05 09:07:50 +0100 |
commit | 2ad1db059b9a4874b05bac49dba22c8b8e68afd4 (patch) | |
tree | fba7cb5999f02183f223e9a5a64a273239b82e29 /init/do_mounts.c | |
parent | 7f7a385d0a7c5091a85de5b78d550f27b81dfc37 (diff) |
mmc: renesas_sdhi: use MMC_CAP2_NO_WRITE_PROTECT instead of TMIO own flag
TMIO_MMC_WRPROTECT_DISABLE is equivalent to MMC_CAP2_NO_WRITE_PROTECT.
The flag is propagated as follows:
renesas_sdhi_of_data::capabilities2
-> tmio_mmc_data::capabilities2
-> mmc_host::caps2
Only the difference is the TMIO_... makes tmio_mmc_get_ro() return 0
(i.e. it does not affect mmc_gpio_get_ro() at all), while MMC_CAP2_...
returns 0 before calling ->get_ro() hook (i.e. it affects both IP own
logic and GPIO detection).
The TMIO MMC drivers do not set-up gpio_ro by themselves. Only the
possibility, if any, would be DT specifies "wp-gpios" property, and
gpio_ro is set by mmc_gpiod_request_ro() called from mmc_of_parse().
However, it does not make sense to specify "wp-gpios" property and
TMIO_MMC_WRPROTECT_DISABLE at the same time.
I checked under arch/arm/boot/dts/ and arch/arm64/boot/dts/renesas/,
and I did not see any Renesas boards with "wp-gpios". So, this
conversion should be safe.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'init/do_mounts.c')
0 files changed, 0 insertions, 0 deletions