diff options
author | Timo Kokkonen <timo.kokkonen@offcode.fi> | 2014-11-03 06:12:59 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-11-10 06:40:48 -0500 |
commit | 76d5556428fbbdf411504895b516272cad27127d (patch) | |
tree | d3fd33cd25ceaa1ea7d644ab20a6ebf2650bfa40 /drivers/mmc/host/atmel-mci.c | |
parent | 0654bb3cdd5142ca8bf27a4f72bf22098394fbd5 (diff) |
mmc: host: atmel-mci: Add support for non-removable slots
Add support for non-removable slots which have no card detection GPIO
and which should not be polled for a card change.
Signed-off-by: Timo Kokkonen <timo.kokkonen@offcode.fi>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/atmel-mci.c')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 0b9ddf8aed04..d9646e5ae2c8 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c | |||
@@ -560,6 +560,9 @@ atmci_of_init(struct platform_device *pdev) | |||
560 | pdata->slot[slot_id].detect_is_active_high = | 560 | pdata->slot[slot_id].detect_is_active_high = |
561 | of_property_read_bool(cnp, "cd-inverted"); | 561 | of_property_read_bool(cnp, "cd-inverted"); |
562 | 562 | ||
563 | pdata->slot[slot_id].non_removable = | ||
564 | of_property_read_bool(cnp, "non-removable"); | ||
565 | |||
563 | pdata->slot[slot_id].wp_pin = | 566 | pdata->slot[slot_id].wp_pin = |
564 | of_get_named_gpio(cnp, "wp-gpios", 0); | 567 | of_get_named_gpio(cnp, "wp-gpios", 0); |
565 | } | 568 | } |
@@ -2206,8 +2209,12 @@ static int __init atmci_init_slot(struct atmel_mci *host, | |||
2206 | } | 2209 | } |
2207 | } | 2210 | } |
2208 | 2211 | ||
2209 | if (!gpio_is_valid(slot->detect_pin)) | 2212 | if (!gpio_is_valid(slot->detect_pin)) { |
2210 | mmc->caps |= MMC_CAP_NEEDS_POLL; | 2213 | if (slot_data->non_removable) |
2214 | mmc->caps |= MMC_CAP_NONREMOVABLE; | ||
2215 | else | ||
2216 | mmc->caps |= MMC_CAP_NEEDS_POLL; | ||
2217 | } | ||
2211 | 2218 | ||
2212 | if (gpio_is_valid(slot->wp_pin)) { | 2219 | if (gpio_is_valid(slot->wp_pin)) { |
2213 | if (devm_gpio_request(&host->pdev->dev, slot->wp_pin, | 2220 | if (devm_gpio_request(&host->pdev->dev, slot->wp_pin, |