diff options
author | Pavel Pisa <ppisa@pikron.com> | 2006-04-02 11:58:38 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-04-02 11:58:38 -0400 |
commit | d66e35fab8789b5dd6f1b8e6f3871ea4f44d32a3 (patch) | |
tree | bea7bc594169246998ea7d4074fd3d535620b608 /arch/arm | |
parent | 999331af456bf6fc1520ea7b68b6a3dbb4af8ff6 (diff) |
[ARM] 3446/1: i.MX: MMC/SD SDHC controller registration for i.MX/MX1 MX1ADS board
Patch from Pavel Pisa
From: Stefano Fedrigo <aleph@develer.com>
This adds to the MX1ADS platform the needed code to detect
insertion/removal of an MMC/SD card. Tested on a v1.1 board.
Signed-off-by: Stefano Fedrigo <aleph@develer.com>
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-imx/mx1ads.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mx1ads.c b/arch/arm/mach-imx/mx1ads.c index 8ab1b040288c..e34d0df90aed 100644 --- a/arch/arm/mach-imx/mx1ads.c +++ b/arch/arm/mach-imx/mx1ads.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
26 | 26 | ||
27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | #include <asm/arch/mmc.h> | ||
28 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
29 | #include "generic.h" | 30 | #include "generic.h" |
30 | 31 | ||
@@ -51,12 +52,29 @@ static struct platform_device *devices[] __initdata = { | |||
51 | &cs89x0_device, | 52 | &cs89x0_device, |
52 | }; | 53 | }; |
53 | 54 | ||
55 | #ifdef CONFIG_MMC_IMX | ||
56 | static int mx1ads_mmc_card_present(void) | ||
57 | { | ||
58 | /* MMC/SD Card Detect is PB 20 on MX1ADS V1.0.7 */ | ||
59 | return (SSR(1) & (1 << 20) ? 0 : 1); | ||
60 | } | ||
61 | |||
62 | static struct imxmmc_platform_data mx1ads_mmc_info = { | ||
63 | .card_present = mx1ads_mmc_card_present, | ||
64 | }; | ||
65 | #endif | ||
66 | |||
54 | static void __init | 67 | static void __init |
55 | mx1ads_init(void) | 68 | mx1ads_init(void) |
56 | { | 69 | { |
57 | #ifdef CONFIG_LEDS | 70 | #ifdef CONFIG_LEDS |
58 | imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2); | 71 | imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2); |
59 | #endif | 72 | #endif |
73 | #ifdef CONFIG_MMC_IMX | ||
74 | /* SD/MMC card detect */ | ||
75 | imx_gpio_mode(GPIO_PORTB | GPIO_GIUS | GPIO_IN | 20); | ||
76 | imx_set_mmc_info(&mx1ads_mmc_info); | ||
77 | #endif | ||
60 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 78 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
61 | } | 79 | } |
62 | 80 | ||