]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ARM: 5957/1: ARM: RealView SD/MMC Card detection and write-protect using GPIOLIB
authorColin Tuckley <colin.tuckley@arm.com>
Wed, 24 Feb 2010 14:23:10 +0000 (15:23 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 28 Apr 2010 21:21:52 +0000 (22:21 +0100)
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>
arch/arm/Kconfig
arch/arm/mach-realview/core.c

index c5408bf1bf43321e49f525ada25456b538f97f78..92622eb5cc0da6f651c31cdaf0ff55f8bba16977 100644 (file)
@@ -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.
 
index f2dbce5f3cd4dde9940b1efca6862a3c5a8baacc..d5a95738f85b027578e6f25ea9fffe216a023adf 100644 (file)
@@ -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 = {