diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/au1000/common/platform.c | 54 | ||||
-rw-r--r-- | arch/mips/au1000/pb1200/Makefile | 1 | ||||
-rw-r--r-- | arch/mips/au1000/pb1200/platform.c | 84 |
3 files changed, 85 insertions, 54 deletions
diff --git a/arch/mips/au1000/common/platform.c b/arch/mips/au1000/common/platform.c index 83ad422e8aca..31d2a2270878 100644 --- a/arch/mips/au1000/common/platform.c +++ b/arch/mips/au1000/common/platform.c | |||
@@ -233,19 +233,6 @@ static struct resource au1200_lcd_resources[] = { | |||
233 | } | 233 | } |
234 | }; | 234 | }; |
235 | 235 | ||
236 | static struct resource au1200_ide0_resources[] = { | ||
237 | [0] = { | ||
238 | .start = AU1XXX_ATA_PHYS_ADDR, | ||
239 | .end = AU1XXX_ATA_PHYS_ADDR + AU1XXX_ATA_PHYS_LEN - 1, | ||
240 | .flags = IORESOURCE_MEM, | ||
241 | }, | ||
242 | [1] = { | ||
243 | .start = AU1XXX_ATA_INT, | ||
244 | .end = AU1XXX_ATA_INT, | ||
245 | .flags = IORESOURCE_IRQ, | ||
246 | } | ||
247 | }; | ||
248 | |||
249 | static u64 au1200_lcd_dmamask = ~(u32)0; | 236 | static u64 au1200_lcd_dmamask = ~(u32)0; |
250 | 237 | ||
251 | static struct platform_device au1200_lcd_device = { | 238 | static struct platform_device au1200_lcd_device = { |
@@ -259,20 +246,6 @@ static struct platform_device au1200_lcd_device = { | |||
259 | .resource = au1200_lcd_resources, | 246 | .resource = au1200_lcd_resources, |
260 | }; | 247 | }; |
261 | 248 | ||
262 | |||
263 | static u64 ide0_dmamask = ~(u32)0; | ||
264 | |||
265 | static struct platform_device au1200_ide0_device = { | ||
266 | .name = "au1200-ide", | ||
267 | .id = 0, | ||
268 | .dev = { | ||
269 | .dma_mask = &ide0_dmamask, | ||
270 | .coherent_dma_mask = 0xffffffff, | ||
271 | }, | ||
272 | .num_resources = ARRAY_SIZE(au1200_ide0_resources), | ||
273 | .resource = au1200_ide0_resources, | ||
274 | }; | ||
275 | |||
276 | static u64 au1xxx_mmc_dmamask = ~(u32)0; | 249 | static u64 au1xxx_mmc_dmamask = ~(u32)0; |
277 | 250 | ||
278 | static struct platform_device au1xxx_mmc_device = { | 251 | static struct platform_device au1xxx_mmc_device = { |
@@ -292,29 +265,6 @@ static struct platform_device au1x00_pcmcia_device = { | |||
292 | .id = 0, | 265 | .id = 0, |
293 | }; | 266 | }; |
294 | 267 | ||
295 | #if defined(CONFIG_MIPS_DB1200) || defined(CONFIG_MIPS_PB1200) | ||
296 | static struct resource smc91x_resources[] = { | ||
297 | [0] = { | ||
298 | .name = "smc91x-regs", | ||
299 | .start = AU1XXX_SMC91111_PHYS_ADDR, | ||
300 | .end = AU1XXX_SMC91111_PHYS_ADDR + 0xf, | ||
301 | .flags = IORESOURCE_MEM, | ||
302 | }, | ||
303 | [1] = { | ||
304 | .start = AU1XXX_SMC91111_IRQ, | ||
305 | .end = AU1XXX_SMC91111_IRQ, | ||
306 | .flags = IORESOURCE_IRQ, | ||
307 | }, | ||
308 | }; | ||
309 | |||
310 | static struct platform_device smc91x_device = { | ||
311 | .name = "smc91x", | ||
312 | .id = -1, | ||
313 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
314 | .resource = smc91x_resources, | ||
315 | }; | ||
316 | #endif /* defined(CONFIG_MIPS_DB1200) || defined(CONFIG_MIPS_PB1200) */ | ||
317 | |||
318 | /* All Alchemy demoboards with I2C have this #define in their headers */ | 268 | /* All Alchemy demoboards with I2C have this #define in their headers */ |
319 | #ifdef SMBUS_PSC_BASE | 269 | #ifdef SMBUS_PSC_BASE |
320 | static struct resource pbdb_smbus_resources[] = { | 270 | static struct resource pbdb_smbus_resources[] = { |
@@ -345,12 +295,8 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = { | |||
345 | &au1xxx_usb_gdt_device, | 295 | &au1xxx_usb_gdt_device, |
346 | &au1xxx_usb_otg_device, | 296 | &au1xxx_usb_otg_device, |
347 | &au1200_lcd_device, | 297 | &au1200_lcd_device, |
348 | &au1200_ide0_device, | ||
349 | &au1xxx_mmc_device, | 298 | &au1xxx_mmc_device, |
350 | #endif | 299 | #endif |
351 | #if defined(CONFIG_MIPS_DB1200) || defined(CONFIG_MIPS_PB1200) | ||
352 | &smc91x_device, | ||
353 | #endif | ||
354 | #ifdef SMBUS_PSC_BASE | 300 | #ifdef SMBUS_PSC_BASE |
355 | &pbdb_smbus_device, | 301 | &pbdb_smbus_device, |
356 | #endif | 302 | #endif |
diff --git a/arch/mips/au1000/pb1200/Makefile b/arch/mips/au1000/pb1200/Makefile index 970b1b1d5cda..4fe02ea65a60 100644 --- a/arch/mips/au1000/pb1200/Makefile +++ b/arch/mips/au1000/pb1200/Makefile | |||
@@ -3,5 +3,6 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y := init.o board_setup.o irqmap.o | 5 | lib-y := init.o board_setup.o irqmap.o |
6 | obj-y += platform.o | ||
6 | 7 | ||
7 | EXTRA_CFLAGS += -Werror | 8 | EXTRA_CFLAGS += -Werror |
diff --git a/arch/mips/au1000/pb1200/platform.c b/arch/mips/au1000/pb1200/platform.c new file mode 100644 index 000000000000..5930110b9b6d --- /dev/null +++ b/arch/mips/au1000/pb1200/platform.c | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * Pb1200/DBAu1200 board platform device registration | ||
3 | * | ||
4 | * Copyright (C) 2008 MontaVista Software Inc. <source@mvista.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/platform_device.h> | ||
23 | |||
24 | #include <asm/mach-au1x00/au1xxx.h> | ||
25 | |||
26 | static struct resource ide_resources[] = { | ||
27 | [0] = { | ||
28 | .start = IDE_PHYS_ADDR, | ||
29 | .end = IDE_PHYS_ADDR + IDE_PHYS_LEN - 1, | ||
30 | .flags = IORESOURCE_MEM | ||
31 | }, | ||
32 | [1] = { | ||
33 | .start = IDE_INT, | ||
34 | .end = IDE_INT, | ||
35 | .flags = IORESOURCE_IRQ | ||
36 | } | ||
37 | }; | ||
38 | |||
39 | static u64 ide_dmamask = ~(u32)0; | ||
40 | |||
41 | static struct platform_device ide_device = { | ||
42 | .name = "au1200-ide", | ||
43 | .id = 0, | ||
44 | .dev = { | ||
45 | .dma_mask = &ide_dmamask, | ||
46 | .coherent_dma_mask = 0xffffffff, | ||
47 | }, | ||
48 | .num_resources = ARRAY_SIZE(ide_resources), | ||
49 | .resource = ide_resources | ||
50 | }; | ||
51 | |||
52 | static struct resource smc91c111_resources[] = { | ||
53 | [0] = { | ||
54 | .name = "smc91x-regs", | ||
55 | .start = SMC91C111_PHYS_ADDR, | ||
56 | .end = SMC91C111_PHYS_ADDR + 0xf, | ||
57 | .flags = IORESOURCE_MEM | ||
58 | }, | ||
59 | [1] = { | ||
60 | .start = SMC91C111_INT, | ||
61 | .end = SMC91C111_INT, | ||
62 | .flags = IORESOURCE_IRQ | ||
63 | }, | ||
64 | }; | ||
65 | |||
66 | static struct platform_device smc91c111_device = { | ||
67 | .name = "smc91x", | ||
68 | .id = -1, | ||
69 | .num_resources = ARRAY_SIZE(smc91c111_resources), | ||
70 | .resource = smc91c111_resources | ||
71 | }; | ||
72 | |||
73 | static struct platform_device *board_platform_devices[] __initdata = { | ||
74 | &ide_device, | ||
75 | &smc91c111_device | ||
76 | }; | ||
77 | |||
78 | static int __init board_register_devices(void) | ||
79 | { | ||
80 | return platform_add_devices(board_platform_devices, | ||
81 | ARRAY_SIZE(board_platform_devices)); | ||
82 | } | ||
83 | |||
84 | arch_initcall(board_register_devices); | ||