diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2010-10-11 12:55:21 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-10-11 15:22:05 +0200 |
commit | 203a0734709779fa40552cd9bb7c4dd325b5131f (patch) | |
tree | 7307ac5fe039ccfb2573935c802e58480593e8df /arch/arm/plat-mxc/devices | |
parent | 54dc3f4674fbaf362d6e969904bfcece3cfebef1 (diff) |
arm: imx: add generic esdhc device
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc/devices')
-rw-r--r-- | arch/arm/plat-mxc/devices/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-esdhc.c | 31 |
3 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig index d736c3d4e292..8266ecb6933e 100644 --- a/arch/arm/plat-mxc/devices/Kconfig +++ b/arch/arm/plat-mxc/devices/Kconfig @@ -1,3 +1,6 @@ +config IMX_HAVE_PLATFORM_ESDHC + bool + config IMX_HAVE_PLATFORM_FLEXCAN select HAVE_CAN_FLEXCAN bool diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile index ac7738379374..da9676e80e8d 100644 --- a/arch/arm/plat-mxc/devices/Makefile +++ b/arch/arm/plat-mxc/devices/Makefile @@ -1,3 +1,4 @@ +obj-$(CONFIG_IMX_HAVE_PLATFORM_ESDHC) += platform-esdhc.o obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o diff --git a/arch/arm/plat-mxc/devices/platform-esdhc.c b/arch/arm/plat-mxc/devices/platform-esdhc.c new file mode 100644 index 000000000000..68db2a22d2cd --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-esdhc.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2010 Pengutronix, Wolfram Sang <w.sang@pengutronix.de> + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation. + */ + +#include <mach/devices-common.h> +#include <mach/esdhc.h> + +struct platform_device *__init imx_add_esdhc(int id, + resource_size_t iobase, resource_size_t iosize, + resource_size_t irq, + const struct esdhc_platform_data *pdata) +{ + struct resource res[] = { + { + .start = iobase, + .end = iobase + iosize - 1, + .flags = IORESOURCE_MEM, + }, { + .start = irq, + .end = irq, + .flags = IORESOURCE_IRQ, + }, + }; + + return imx_add_platform_device("sdhci-esdhc-imx", id, res, + ARRAY_SIZE(res), pdata, sizeof(*pdata)); +} |