Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
platform-pata_imx.c
Go to the documentation of this file.
1 /*
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.
5  */
6 #include <mach/hardware.h>
7 #include <mach/devices-common.h>
8 
9 #define imx_pata_imx_data_entry_single(soc, _size) \
10  { \
11  .iobase = soc ## _ATA_BASE_ADDR, \
12  .iosize = _size, \
13  .irq = soc ## _INT_ATA, \
14  }
15 
16 #ifdef CONFIG_SOC_IMX27
19 #endif /* ifdef CONFIG_SOC_IMX27 */
20 
21 #ifdef CONFIG_SOC_IMX31
22 const struct imx_pata_imx_data imx31_pata_imx_data __initconst =
24 #endif /* ifdef CONFIG_SOC_IMX31 */
25 
26 #ifdef CONFIG_SOC_IMX35
27 const struct imx_pata_imx_data imx35_pata_imx_data __initconst =
29 #endif /* ifdef CONFIG_SOC_IMX35 */
30 
31 #ifdef CONFIG_SOC_IMX51
32 const struct imx_pata_imx_data imx51_pata_imx_data __initconst =
34 #endif /* ifdef CONFIG_SOC_IMX51 */
35 
36 #ifdef CONFIG_SOC_IMX53
37 const struct imx_pata_imx_data imx53_pata_imx_data __initconst =
39 #endif /* ifdef CONFIG_SOC_IMX53 */
40 
42  const struct imx_pata_imx_data *data)
43 {
44  struct resource res[] = {
45  {
46  .start = data->iobase,
47  .end = data->iobase + data->iosize - 1,
48  .flags = IORESOURCE_MEM,
49  },
50  {
51  .start = data->irq,
52  .end = data->irq,
53  .flags = IORESOURCE_IRQ,
54  },
55  };
56  return imx_add_platform_device("pata_imx", -1,
57  res, ARRAY_SIZE(res), NULL, 0);
58 }
59