diff options
author | Patrice Chotard <patrice.chotard@st.com> | 2018-07-25 17:49:09 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-08-03 19:53:54 -0400 |
commit | fa9115616588770960827e9915d7a6de8f3aa616 (patch) | |
tree | 6e2dc7c12a3be4604a3adedb9e58ef659c17bb2a /drivers/mmc | |
parent | 43d36a0bae9dec70af9b3158de06f45a2dca08ed (diff) | |
download | u-boot-fa9115616588770960827e9915d7a6de8f3aa616.zip u-boot-fa9115616588770960827e9915d7a6de8f3aa616.tar.gz u-boot-fa9115616588770960827e9915d7a6de8f3aa616.tar.bz2 |
mmc: arm_pl180_mmci: Remove cd_inverted host's struct field
As platform uses GPIOs for card detection, it's
simpler and more readable to use GPIO_ACTIVE_(LOW|HIGH)
in the gpio flags instead of using the cd-inverted
property.
Reported-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/arm_pl180_mmci.c | 5 | ||||
-rw-r--r-- | drivers/mmc/arm_pl180_mmci.h | 1 |
2 files changed, 1 insertions, 5 deletions
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c index 1cd780b..f71d79e 100644 --- a/drivers/mmc/arm_pl180_mmci.c +++ b/drivers/mmc/arm_pl180_mmci.c @@ -499,11 +499,8 @@ static int dm_mmc_getcd(struct udevice *dev) struct pl180_mmc_host *host = dev->priv; int value = 1; - if (dm_gpio_is_valid(&host->cd_gpio)) { + if (dm_gpio_is_valid(&host->cd_gpio)) value = dm_gpio_get_value(&host->cd_gpio); - if (host->cd_inverted) - return !value; - } return value; } diff --git a/drivers/mmc/arm_pl180_mmci.h b/drivers/mmc/arm_pl180_mmci.h index 6b98db6..36487be 100644 --- a/drivers/mmc/arm_pl180_mmci.h +++ b/drivers/mmc/arm_pl180_mmci.h @@ -192,7 +192,6 @@ struct pl180_mmc_host { struct mmc_config cfg; #ifdef CONFIG_DM_MMC struct gpio_desc cd_gpio; - bool cd_inverted; #endif }; |