From 203a0734709779fa40552cd9bb7c4dd325b5131f Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Mon, 11 Oct 2010 12:55:21 +0200 Subject: arm: imx: add generic esdhc device Signed-off-by: Wolfram Sang Signed-off-by: Sascha Hauer --- arch/arm/plat-mxc/devices/platform-esdhc.c | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 arch/arm/plat-mxc/devices/platform-esdhc.c (limited to 'arch/arm/plat-mxc/devices/platform-esdhc.c') 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 + * + * 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 +#include + +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)); +} -- cgit v1.2.3