diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 13:51:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 13:51:43 -0400 |
commit | e31a94ed371c70855eb30b77c490d6d85dd4da26 (patch) | |
tree | 58d9f1a75a22319f97731db8d9ac07b78a8d8aaf /arch/mips/au1000/pb1200/platform.c | |
parent | 9d9ad4b51d2b29b5bbeb4011f5e76f7538119cf9 (diff) | |
parent | fcbd3b4b92efe29b59df16b910138cf43683be88 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (45 commits)
[MIPS] Pb1200/DBAu1200: move platform code to its proper place
[MIPS] Fix handling of trap and breakpoint instructions
[MIPS] Pb1200: do register SMC 91C111
[MIPS] DBAu1200: fix bad SMC 91C111 resource size
[NET] Kconfig: Rename MIKROTIK_RB500 -> MIKROTIK_RB532
[MIPS] IP27: Fix build bug due to missing include
[MIPS] Fix some sparse warnings on traps.c and irq-msc01.c
[MIPS] cevt-gt641xx: Kill unnecessary include
[MIPS] DS1287: Add clockevent driver
[MIPS] add DECstation I/O ASIC clocksource
[MIPS] rbtx4938: minor cleanup
[MIPS] Alchemy: kill unused PCI_IRQ_TABLE_LOOKUP macro
[MIPS] rbtx4938: misc cleanups
[MIPS] jmr3927: use generic txx9 gpio
[MIPS] rbhma4500: use generic txx9 gpio
[MIPS] generic txx9 gpio support
[MIPS] make fallback gpio.h gpiolib-friendly
[MIPS] unexport null_perf_irq() and make it static
[MIPS] unexport rtc_mips_set_time()
[MIPS] unexport copy_from_user_page()
...
Diffstat (limited to 'arch/mips/au1000/pb1200/platform.c')
-rw-r--r-- | arch/mips/au1000/pb1200/platform.c | 84 |
1 files changed, 84 insertions, 0 deletions
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); | ||