Merge branch 'for-rmk-next' of git://git.pengutronix.de/git/imx/linux-2.6 into devel...
[pandora-kernel.git] / arch / arm / plat-mxc / devices / platform-esdhc.c
1 /*
2  * Copyright (C) 2010 Pengutronix, Wolfram Sang <w.sang@pengutronix.de>
3  *
4  * This program is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU General Public License version 2 as published by the
6  * Free Software Foundation.
7  */
8
9 #include <mach/devices-common.h>
10 #include <mach/esdhc.h>
11
12 struct platform_device *__init imx_add_esdhc(int id,
13                 resource_size_t iobase, resource_size_t iosize,
14                 resource_size_t irq,
15                 const struct esdhc_platform_data *pdata)
16 {
17         struct resource res[] = {
18                 {
19                         .start = iobase,
20                         .end = iobase + iosize - 1,
21                         .flags = IORESOURCE_MEM,
22                 }, {
23                         .start = irq,
24                         .end = irq,
25                         .flags = IORESOURCE_IRQ,
26                 },
27         };
28
29         return imx_add_platform_device("sdhci-esdhc-imx", id, res,
30                         ARRAY_SIZE(res), pdata, sizeof(*pdata));
31 }