| From 53578d7dc0ddd72421c7bb5711e1147a154dc705 Mon Sep 17 00:00:00 2001 |
| From: Masahiro Yamada <yamada.masahiro@socionext.com> |
| Date: Thu, 18 Jan 2018 01:28:11 +0900 |
| Subject: [PATCH 0826/1795] mmc: tmio: deprecate "toshiba, |
| mmc-wrprotect-disable" DT property |
| |
| This property is equivalent to "disable-wp" defined in |
| Documentation/devicetree/bindings/mmc/mmc.txt |
| |
| The TMIO MMC core calls mmc_of_parse(), and it sets |
| MMC_CAP2_NO_WRITE_PROTECT if "disable-wp" property is present. |
| |
| We do not need a vendor-specific property to do the same thing. |
| |
| Let's remove the description from the dt-binding to prevent new boards |
| from using it. |
| |
| I am keeping the driver code for existing DT files, but added |
| comments that this is deprecated. |
| |
| Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> |
| Acked-by: Rob Herring <robh@kernel.org> |
| 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> |
| (cherry picked from commit 788778b0d21a6d5cd5bc6c880591119e17932327) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> |
| --- |
| Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 1 - |
| drivers/mmc/host/tmio_mmc_core.c | 5 +++++ |
| 2 files changed, 5 insertions(+), 1 deletion(-) |
| |
| diff --git a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt |
| index d8685cb83325..2d5287eeed95 100644 |
| --- a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt |
| +++ b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt |
| @@ -50,7 +50,6 @@ Required properties: |
| 2: R7S72100 |
| |
| Optional properties: |
| -- toshiba,mmc-wrprotect-disable: write-protect detection is unavailable |
| - pinctrl-names: should be "default", "state_uhs" |
| - pinctrl-0: should contain default/high speed pin ctrl |
| - pinctrl-1: should contain uhs mode pin ctrl |
| diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c |
| index 4aec461f9f28..15a6baf302dc 100644 |
| --- a/drivers/mmc/host/tmio_mmc_core.c |
| +++ b/drivers/mmc/host/tmio_mmc_core.c |
| @@ -1120,6 +1120,11 @@ static void tmio_mmc_of_parse(struct platform_device *pdev, |
| if (!np) |
| return; |
| |
| + /* |
| + * DEPRECATED: |
| + * For new platforms, please use "disable-wp" instead of |
| + * "toshiba,mmc-wrprotect-disable" |
| + */ |
| if (of_get_property(np, "toshiba,mmc-wrprotect-disable", NULL)) |
| mmc->caps2 |= MMC_CAP2_NO_WRITE_PROTECT; |
| } |
| -- |
| 2.19.0 |
| |