summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-05-30 16:39:10 +0200
committerHans de Goede <hdegoede@redhat.com>2015-06-04 14:08:28 +0200
commit1c09fa38e0460a1498110fa418ba5900b9aef2c2 (patch)
tree954d6145941da53dc0686b304c12cd1a09393bee /drivers
parentd8abb46b37fadff0349adb376df6d3ecd09ee7d1 (diff)
downloadtalos-obmc-uboot-1c09fa38e0460a1498110fa418ba5900b9aef2c2.tar.gz
talos-obmc-uboot-1c09fa38e0460a1498110fa418ba5900b9aef2c2.zip
sunxi: mmc: Enable pull-up on card-detect gpio pin
On some boards we need to enable the internal pull-up te reliable detect that no card is inserted. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/sunxi_mmc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index bb0814706c..e7ab828a8f 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -75,8 +75,10 @@ static int mmc_resource_init(int sdc_no)
cd_pin = sunxi_mmc_getcd_gpio(sdc_no);
if (cd_pin >= 0) {
ret = gpio_request(cd_pin, "mmc_cd");
- if (!ret)
+ if (!ret) {
+ sunxi_gpio_set_pull(cd_pin, SUNXI_GPIO_PULL_UP);
ret = gpio_direction_input(cd_pin);
+ }
}
return ret;
OpenPOWER on IntegriCloud