Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25294
b: refs/heads/master
c: d66e35f
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Pisa authored and Russell King committed Apr 2, 2006
1 parent 30e6f11 commit e5bf958
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 999331af456bf6fc1520ea7b68b6a3dbb4af8ff6
refs/heads/master: d66e35fab8789b5dd6f1b8e6f3871ea4f44d32a3
18 changes: 18 additions & 0 deletions trunk/arch/arm/mach-imx/mx1ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <asm/mach-types.h>

#include <asm/mach/arch.h>
#include <asm/arch/mmc.h>
#include <linux/interrupt.h>
#include "generic.h"

Expand All @@ -51,11 +52,28 @@ static struct platform_device *devices[] __initdata = {
&cs89x0_device,
};

#ifdef CONFIG_MMC_IMX
static int mx1ads_mmc_card_present(void)
{
/* MMC/SD Card Detect is PB 20 on MX1ADS V1.0.7 */
return (SSR(1) & (1 << 20) ? 0 : 1);
}

static struct imxmmc_platform_data mx1ads_mmc_info = {
.card_present = mx1ads_mmc_card_present,
};
#endif

static void __init
mx1ads_init(void)
{
#ifdef CONFIG_LEDS
imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2);
#endif
#ifdef CONFIG_MMC_IMX
/* SD/MMC card detect */
imx_gpio_mode(GPIO_PORTB | GPIO_GIUS | GPIO_IN | 20);
imx_set_mmc_info(&mx1ads_mmc_info);
#endif
platform_add_devices(devices, ARRAY_SIZE(devices));
}
Expand Down

0 comments on commit e5bf958

Please sign in to comment.