aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2014-08-07 03:37:58 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-08-11 05:42:39 -0400
commit26375b5c8449927f740ce0e837e23f45c951fb80 (patch)
treea76615e050aab124e3be2ea9e8874885fa6c8c5f
parent7878289b269d41c8e611aa6d4519feae706e49f3 (diff)
mmc: dw_mmc: Slot quirk "disable-wp" is deprecated.
Slot quirks "disable-wp" is deprecated. Instead, use the host quirk "disable-wp". (Because the slot-node is removed in dt-file.) Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Tested-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Tested-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/dw_mmc.c11
-rw-r--r--include/linux/mmc/dw_mmc.h2
2 files changed, 11 insertions, 2 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 39cf54f479d9..8f216edbdf08 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -996,7 +996,8 @@ static int dw_mci_get_ro(struct mmc_host *mmc)
996 int gpio_ro = mmc_gpio_get_ro(mmc); 996 int gpio_ro = mmc_gpio_get_ro(mmc);
997 997
998 /* Use platform get_ro function, else try on board write protect */ 998 /* Use platform get_ro function, else try on board write protect */
999 if (slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) 999 if ((slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) ||
1000 (slot->host->quirks & DW_MCI_QUIRK_NO_WRITE_PROTECT))
1000 read_only = 0; 1001 read_only = 0;
1001 else if (!IS_ERR_VALUE(gpio_ro)) 1002 else if (!IS_ERR_VALUE(gpio_ro))
1002 read_only = gpio_ro; 1003 read_only = gpio_ro;
@@ -2014,8 +2015,11 @@ static int dw_mci_of_get_slot_quirks(struct device *dev, u8 slot)
2014 2015
2015 /* get quirks */ 2016 /* get quirks */
2016 for (idx = 0; idx < ARRAY_SIZE(of_slot_quirks); idx++) 2017 for (idx = 0; idx < ARRAY_SIZE(of_slot_quirks); idx++)
2017 if (of_get_property(np, of_slot_quirks[idx].quirk, NULL)) 2018 if (of_get_property(np, of_slot_quirks[idx].quirk, NULL)) {
2019 dev_warn(dev, "Slot quirk %s is deprecated\n",
2020 of_slot_quirks[idx].quirk);
2018 quirks |= of_slot_quirks[idx].id; 2021 quirks |= of_slot_quirks[idx].id;
2022 }
2019 2023
2020 return quirks; 2024 return quirks;
2021} 2025}
@@ -2279,6 +2283,9 @@ static struct dw_mci_of_quirks {
2279 { 2283 {
2280 .quirk = "broken-cd", 2284 .quirk = "broken-cd",
2281 .id = DW_MCI_QUIRK_BROKEN_CARD_DETECTION, 2285 .id = DW_MCI_QUIRK_BROKEN_CARD_DETECTION,
2286 }, {
2287 .quirk = "disable-wp",
2288 .id = DW_MCI_QUIRK_NO_WRITE_PROTECT,
2282 }, 2289 },
2283}; 2290};
2284 2291
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index babaea93bca6..29ce014ab421 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -213,6 +213,8 @@ struct dw_mci_dma_ops {
213#define DW_MCI_QUIRK_HIGHSPEED BIT(2) 213#define DW_MCI_QUIRK_HIGHSPEED BIT(2)
214/* Unreliable card detection */ 214/* Unreliable card detection */
215#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) 215#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3)
216/* No write protect */
217#define DW_MCI_QUIRK_NO_WRITE_PROTECT BIT(4)
216 218
217/* Slot level quirks */ 219/* Slot level quirks */
218/* This slot has no write protect */ 220/* This slot has no write protect */