2 * This program is free software; you can redistribute it and/or modify it under
3 * the terms of the GNU General Public License version 2 as published by the
4 * Free Software Foundation.
6 #include <mach/hardware.h>
7 #include <mach/devices-common.h>
9 #define imx_pata_imx_data_entry_single(soc) \
11 .iobase = soc ## _ATA_BASE_ADDR, \
12 .irq = soc ## _MXC_INT_ATA, \
15 #ifdef CONFIG_SOC_IMX51
16 const struct imx_pata_imx_data imx51_pata_imx_data __initconst =
17 imx_pata_imx_data_entry_single(MX51);
18 #endif /* ifdef CONFIG_SOC_IMX51 */
20 struct platform_device *__init imx_add_pata_imx(
21 const struct imx_pata_imx_data *data)
23 struct resource res[] = {
25 .start = data->iobase,
26 .end = data->iobase + SZ_16K - 1,
27 .flags = IORESOURCE_MEM,
32 .flags = IORESOURCE_IRQ,
35 return imx_add_platform_device("pata_imx", -1,
36 res, ARRAY_SIZE(res), NULL, 0);