summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorColin Tuckley <colin.tuckley@arm.com>2010-02-24 15:23:10 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-04-28 23:21:52 +0200
commitb56ba8aa6f3aeab23d3d4b1190ed1098463b2a9c (patch)
tree7b180e5ce9753a1f3c4e7958dba4b7f3446e616f /arch
parentARM: 6030/1: KS8695: enable console (diff)
downloadlinux-b56ba8aa6f3aeab23d3d4b1190ed1098463b2a9c.tar.xz
linux-b56ba8aa6f3aeab23d3d4b1190ed1098463b2a9c.zip
ARM: 5957/1: ARM: RealView SD/MMC Card detection and write-protect using GPIOLIB
The switch to using GPIOLIB broke the sd/mmc card detection on the RealView development boards if GPIO_PL061 was not selected. This patch selects GPIO_PL061 if GPIOLIB is selected. The sense of the return value from mmc_status has also changed and is corrected. Signed-off-by: Colin Tuckley <colin.tuckley@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/mach-realview/core.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c5408bf1bf43..92622eb5cc0d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -253,6 +253,7 @@ config ARCH_REALVIEW
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
select ARCH_WANT_OPTIONAL_GPIOLIB
+ select GPIO_PL061 if GPIOLIB
help
This enables support for ARM Ltd RealView boards.
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index f2dbce5f3cd4..d5a95738f85b 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -254,7 +254,7 @@ static unsigned int realview_mmc_status(struct device *dev)
else
mask = 2;
- return readl(REALVIEW_SYSMCI) & mask;
+ return !(readl(REALVIEW_SYSMCI) & mask);
}
struct mmci_platform_data realview_mmc0_plat_data = {