mm: move shmem prototypes to shmem_fs.h
[linux/fpc-iii.git] / arch / arm / plat-mxc / devices / platform-sdhci-esdhc-imx.c
blob6b2940b93d943a416361202dee46dcca92d40567
1 /*
2 * Copyright (C) 2010 Pengutronix, Wolfram Sang <w.sang@pengutronix.de>
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 */
9 #include <mach/hardware.h>
10 #include <mach/devices-common.h>
11 #include <mach/esdhc.h>
13 #define imx_sdhci_esdhc_imx_data_entry_single(soc, _id, hwid) \
14 { \
15 .id = _id, \
16 .iobase = soc ## _ESDHC ## hwid ## _BASE_ADDR, \
17 .irq = soc ## _INT_ESDHC ## hwid, \
20 #define imx_sdhci_esdhc_imx_data_entry(soc, id, hwid) \
21 [id] = imx_sdhci_esdhc_imx_data_entry_single(soc, id, hwid)
23 #ifdef CONFIG_SOC_IMX25
24 const struct imx_sdhci_esdhc_imx_data
25 imx25_sdhci_esdhc_imx_data[] __initconst = {
26 #define imx25_sdhci_esdhc_imx_data_entry(_id, _hwid) \
27 imx_sdhci_esdhc_imx_data_entry(MX25, _id, _hwid)
28 imx25_sdhci_esdhc_imx_data_entry(0, 1),
29 imx25_sdhci_esdhc_imx_data_entry(1, 2),
31 #endif /* ifdef CONFIG_SOC_IMX25 */
33 #ifdef CONFIG_SOC_IMX35
34 const struct imx_sdhci_esdhc_imx_data
35 imx35_sdhci_esdhc_imx_data[] __initconst = {
36 #define imx35_sdhci_esdhc_imx_data_entry(_id, _hwid) \
37 imx_sdhci_esdhc_imx_data_entry(MX35, _id, _hwid)
38 imx35_sdhci_esdhc_imx_data_entry(0, 1),
39 imx35_sdhci_esdhc_imx_data_entry(1, 2),
40 imx35_sdhci_esdhc_imx_data_entry(2, 3),
42 #endif /* ifdef CONFIG_SOC_IMX35 */
44 #ifdef CONFIG_SOC_IMX51
45 const struct imx_sdhci_esdhc_imx_data
46 imx51_sdhci_esdhc_imx_data[] __initconst = {
47 #define imx51_sdhci_esdhc_imx_data_entry(_id, _hwid) \
48 imx_sdhci_esdhc_imx_data_entry(MX51, _id, _hwid)
49 imx51_sdhci_esdhc_imx_data_entry(0, 1),
50 imx51_sdhci_esdhc_imx_data_entry(1, 2),
51 imx51_sdhci_esdhc_imx_data_entry(2, 3),
52 imx51_sdhci_esdhc_imx_data_entry(3, 4),
54 #endif /* ifdef CONFIG_SOC_IMX51 */
56 #ifdef CONFIG_SOC_IMX53
57 const struct imx_sdhci_esdhc_imx_data
58 imx53_sdhci_esdhc_imx_data[] __initconst = {
59 #define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid) \
60 imx_sdhci_esdhc_imx_data_entry(MX53, _id, _hwid)
61 imx53_sdhci_esdhc_imx_data_entry(0, 1),
62 imx53_sdhci_esdhc_imx_data_entry(1, 2),
63 imx53_sdhci_esdhc_imx_data_entry(2, 3),
64 imx53_sdhci_esdhc_imx_data_entry(3, 4),
66 #endif /* ifdef CONFIG_SOC_IMX53 */
68 struct platform_device *__init imx_add_sdhci_esdhc_imx(
69 const struct imx_sdhci_esdhc_imx_data *data,
70 const struct esdhc_platform_data *pdata)
72 struct resource res[] = {
74 .start = data->iobase,
75 .end = data->iobase + SZ_16K - 1,
76 .flags = IORESOURCE_MEM,
77 }, {
78 .start = data->irq,
79 .end = data->irq,
80 .flags = IORESOURCE_IRQ,
84 return imx_add_platform_device("sdhci-esdhc-imx", data->id, res,
85 ARRAY_SIZE(res), pdata, sizeof(*pdata));