diff options
-rw-r--r-- | arch/arm/mach-mx5/devices-imx51.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-pata_imx.c | 38 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/devices-common.h | 7 |
5 files changed, 53 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h index e11bc0e0ec49..89fe77ffb4d4 100644 --- a/arch/arm/mach-mx5/devices-imx51.h +++ b/arch/arm/mach-mx5/devices-imx51.h | |||
@@ -52,3 +52,7 @@ extern const struct imx_mxc_pwm_data imx51_mxc_pwm_data[]; | |||
52 | extern const struct imx_imx_keypad_data imx51_imx_keypad_data; | 52 | extern const struct imx_imx_keypad_data imx51_imx_keypad_data; |
53 | #define imx51_add_imx_keypad(pdata) \ | 53 | #define imx51_add_imx_keypad(pdata) \ |
54 | imx_add_imx_keypad(&imx51_imx_keypad_data, pdata) | 54 | imx_add_imx_keypad(&imx51_imx_keypad_data, pdata) |
55 | |||
56 | extern const struct imx_pata_imx_data imx51_pata_imx_data; | ||
57 | #define imx51_add_pata_imx() \ | ||
58 | imx_add_pata_imx(&imx51_pata_imx_data) | ||
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig index bd294add932c..c55916ce3d2a 100644 --- a/arch/arm/plat-mxc/devices/Kconfig +++ b/arch/arm/plat-mxc/devices/Kconfig | |||
@@ -31,6 +31,9 @@ config IMX_HAVE_PLATFORM_IMX_I2C | |||
31 | config IMX_HAVE_PLATFORM_IMX_KEYPAD | 31 | config IMX_HAVE_PLATFORM_IMX_KEYPAD |
32 | bool | 32 | bool |
33 | 33 | ||
34 | config IMX_HAVE_PLATFORM_PATA_IMX | ||
35 | bool | ||
36 | |||
34 | config IMX_HAVE_PLATFORM_IMX_SSI | 37 | config IMX_HAVE_PLATFORM_IMX_SSI |
35 | bool | 38 | bool |
36 | 39 | ||
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile index b41bf972b54b..a093b454541d 100644 --- a/arch/arm/plat-mxc/devices/Makefile +++ b/arch/arm/plat-mxc/devices/Makefile | |||
@@ -10,6 +10,7 @@ obj-y += platform-imx-dma.o | |||
10 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FB) += platform-imx-fb.o | 10 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FB) += platform-imx-fb.o |
11 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o | 11 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o |
12 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD) += platform-imx-keypad.o | 12 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD) += platform-imx-keypad.o |
13 | obj-$(CONFIG_IMX_HAVE_PLATFORM_PATA_IMX) += platform-pata_imx.o | ||
13 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o | 14 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o |
14 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o | 15 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o |
15 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o | 16 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o |
diff --git a/arch/arm/plat-mxc/devices/platform-pata_imx.c b/arch/arm/plat-mxc/devices/platform-pata_imx.c new file mode 100644 index 000000000000..c1cbaf92e359 --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-pata_imx.c | |||
@@ -0,0 +1,38 @@ | |||
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) \ | ||
10 | { \ | ||
11 | .iobase = soc ## _ATA_BASE_ADDR, \ | ||
12 | .irq = soc ## _MXC_INT_ATA, \ | ||
13 | } | ||
14 | |||
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 */ | ||
19 | |||
20 | struct platform_device *__init imx_add_pata_imx( | ||
21 | const struct imx_pata_imx_data *data) | ||
22 | { | ||
23 | struct resource res[] = { | ||
24 | { | ||
25 | .start = data->iobase, | ||
26 | .end = data->iobase + SZ_16K - 1, | ||
27 | .flags = IORESOURCE_MEM, | ||
28 | }, | ||
29 | { | ||
30 | .start = data->irq, | ||
31 | .end = data->irq, | ||
32 | .flags = IORESOURCE_IRQ, | ||
33 | }, | ||
34 | }; | ||
35 | return imx_add_platform_device("pata_imx", -1, | ||
36 | res, ARRAY_SIZE(res), NULL, 0); | ||
37 | } | ||
38 | |||
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index 524538aabc4b..1b76c67d5d3f 100644 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h | |||
@@ -251,6 +251,13 @@ struct platform_device *__init imx_add_mxc_nand( | |||
251 | const struct imx_mxc_nand_data *data, | 251 | const struct imx_mxc_nand_data *data, |
252 | const struct mxc_nand_platform_data *pdata); | 252 | const struct mxc_nand_platform_data *pdata); |
253 | 253 | ||
254 | struct imx_pata_imx_data { | ||
255 | resource_size_t iobase; | ||
256 | resource_size_t irq; | ||
257 | }; | ||
258 | struct platform_device *__init imx_add_pata_imx( | ||
259 | const struct imx_pata_imx_data *data); | ||
260 | |||
254 | struct imx_mxc_pwm_data { | 261 | struct imx_mxc_pwm_data { |
255 | int id; | 262 | int id; |
256 | resource_size_t iobase; | 263 | resource_size_t iobase; |