diff options
author | Michael-Luke Jones <mlj28@cam.ac.uk> | 2006-12-16 17:02:00 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-02-06 11:46:46 -0500 |
commit | 946acb1c70f91f07331d2b8691dfccf95c95ff3d (patch) | |
tree | 50ecccd8b3d7070487e0bc29cf76b4755be8a3f1 /arch/arm/mach-ixp4xx/avila-setup.c | |
parent | 0f1859719537acf5a611fd18be5d81c0cfd5fbf4 (diff) |
[ARM] 4032/1: Add platform resources required for CF driver
This patch adds the platform resources required to support the
ixp4xx-pata-cf libata driver on Avila Gateworks boards.
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Michael-Luke Jones <mlj28@cam.ac.uk>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ixp4xx/avila-setup.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/avila-setup.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c index 9f09f94593a6..d59b8dc7dc7a 100644 --- a/arch/arm/mach-ixp4xx/avila-setup.c +++ b/arch/arm/mach-ixp4xx/avila-setup.c | |||
@@ -104,6 +104,34 @@ static struct platform_device avila_uart = { | |||
104 | .resource = avila_uart_resources | 104 | .resource = avila_uart_resources |
105 | }; | 105 | }; |
106 | 106 | ||
107 | static struct resource avila_pata_resources[] = { | ||
108 | { | ||
109 | .flags = IORESOURCE_MEM | ||
110 | }, | ||
111 | { | ||
112 | .flags = IORESOURCE_MEM, | ||
113 | }, | ||
114 | { | ||
115 | .name = "intrq", | ||
116 | .start = IRQ_IXP4XX_GPIO12, | ||
117 | .end = IRQ_IXP4XX_GPIO12, | ||
118 | .flags = IORESOURCE_IRQ, | ||
119 | }, | ||
120 | }; | ||
121 | |||
122 | static struct ixp4xx_pata_data avila_pata_data = { | ||
123 | .cs0_bits = 0xbfff0043, | ||
124 | .cs1_bits = 0xbfff0043, | ||
125 | }; | ||
126 | |||
127 | static struct platform_device avila_pata = { | ||
128 | .name = "pata_ixp4xx_cf", | ||
129 | .id = 0, | ||
130 | .dev.platform_data = &avila_pata_data, | ||
131 | .num_resources = ARRAY_SIZE(avila_pata_resources), | ||
132 | .resource = avila_pata_resources, | ||
133 | }; | ||
134 | |||
107 | static struct platform_device *avila_devices[] __initdata = { | 135 | static struct platform_device *avila_devices[] __initdata = { |
108 | &avila_i2c_controller, | 136 | &avila_i2c_controller, |
109 | &avila_flash, | 137 | &avila_flash, |
@@ -119,6 +147,18 @@ static void __init avila_init(void) | |||
119 | IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; | 147 | IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; |
120 | 148 | ||
121 | platform_add_devices(avila_devices, ARRAY_SIZE(avila_devices)); | 149 | platform_add_devices(avila_devices, ARRAY_SIZE(avila_devices)); |
150 | |||
151 | avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1); | ||
152 | avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1); | ||
153 | |||
154 | avila_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(2); | ||
155 | avila_pata_resources[1].end = IXP4XX_EXP_BUS_END(2); | ||
156 | |||
157 | avila_pata_data.cs0_cfg = IXP4XX_EXP_CS1; | ||
158 | avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2; | ||
159 | |||
160 | platform_device_register(&avila_pata); | ||
161 | |||
122 | } | 162 | } |
123 | 163 | ||
124 | MACHINE_START(AVILA, "Gateworks Avila Network Platform") | 164 | MACHINE_START(AVILA, "Gateworks Avila Network Platform") |