diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-04-21 10:55:06 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-05-03 09:16:55 -0400 |
commit | a17dba8df9848c548912fbe9bf4b28c5a67c5413 (patch) | |
tree | ab699b209ec5a6b952de52c0238e01d21dc478fb /arch | |
parent | 69f4f331a0f78470f0bc42ba8db8d6cdd9cae4a9 (diff) |
[ARM] Add platform support for PATA on RiscPC
Add pata_platform device for RiscPC, thereby converting the primary
IDE channel on the machine to PATA.
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-rpc/riscpc.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c index 208a2b5dba1b..570cf937e73b 100644 --- a/arch/arm/mach-rpc/riscpc.c +++ b/arch/arm/mach-rpc/riscpc.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
19 | #include <linux/serial_8250.h> | 19 | #include <linux/serial_8250.h> |
20 | #include <linux/pata_platform.h> | ||
20 | 21 | ||
21 | #include <asm/elf.h> | 22 | #include <asm/elf.h> |
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
@@ -159,11 +160,45 @@ static struct platform_device serial_device = { | |||
159 | }, | 160 | }, |
160 | }; | 161 | }; |
161 | 162 | ||
163 | static struct pata_platform_info pata_platform_data = { | ||
164 | .ioport_shift = 2, | ||
165 | }; | ||
166 | |||
167 | static struct resource pata_resources[] = { | ||
168 | [0] = { | ||
169 | .start = 0x030107c0, | ||
170 | .end = 0x030107df, | ||
171 | .flags = IORESOURCE_MEM, | ||
172 | }, | ||
173 | [1] = { | ||
174 | .start = 0x03010fd8, | ||
175 | .end = 0x03010fdb, | ||
176 | .flags = IORESOURCE_MEM, | ||
177 | }, | ||
178 | [2] = { | ||
179 | .start = IRQ_HARDDISK, | ||
180 | .end = IRQ_HARDDISK, | ||
181 | .flags = IORESOURCE_IRQ, | ||
182 | }, | ||
183 | }; | ||
184 | |||
185 | static struct platform_device pata_device = { | ||
186 | .name = "pata_platform", | ||
187 | .id = -1, | ||
188 | .num_resources = ARRAY_SIZE(pata_resources), | ||
189 | .resource = pata_resources, | ||
190 | .dev = { | ||
191 | .platform_data = &pata_platform_data, | ||
192 | .coherent_dma_mask = ~0, /* grumble */ | ||
193 | }, | ||
194 | }; | ||
195 | |||
162 | static struct platform_device *devs[] __initdata = { | 196 | static struct platform_device *devs[] __initdata = { |
163 | &iomd_device, | 197 | &iomd_device, |
164 | &kbd_device, | 198 | &kbd_device, |
165 | &serial_device, | 199 | &serial_device, |
166 | &acornfb_device, | 200 | &acornfb_device, |
201 | &pata_device, | ||
167 | }; | 202 | }; |
168 | 203 | ||
169 | static int __init rpc_init(void) | 204 | static int __init rpc_init(void) |