diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2011-08-12 05:39:45 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-10-24 18:34:24 -0400 |
commit | 3766386037827fe7064f57f9aec27b3b5e9417aa (patch) | |
tree | 306a7b1ccf3100469fd711af37963801d8d387c0 /arch/mips/alchemy/devboards | |
parent | 50d5676ebac57c187ac347bae24290f0dc16fdbe (diff) |
MIPS: Alchemy: remove all CONFIG_SOC_AU1??? defines
Now that no driver any longer depends on the CONFIG_SOC_AU1??? symbols,
it's time to get rid of them: Move some of the platform devices to the
boards which can use them, Rename a few (unused) constants in the header,
Replace them with MIPS_ALCHEMY in the various Kconfig files. Finally
delete them altogether from the Alchemy Kconfig file.
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/2707/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/devboards')
-rw-r--r-- | arch/mips/alchemy/devboards/db1200/platform.c | 78 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/db1x00/board_setup.c | 4 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/db1x00/platform.c | 32 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/pb1100/platform.c | 29 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/pb1200/platform.c | 137 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/pb1500/platform.c | 1 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/pb1550/platform.c | 33 |
7 files changed, 302 insertions, 12 deletions
diff --git a/arch/mips/alchemy/devboards/db1200/platform.c b/arch/mips/alchemy/devboards/db1200/platform.c index 1bc16f0e3651..aae08c1e876e 100644 --- a/arch/mips/alchemy/devboards/db1200/platform.c +++ b/arch/mips/alchemy/devboards/db1200/platform.c | |||
@@ -333,15 +333,77 @@ static struct led_classdev db1200_mmc_led = { | |||
333 | .brightness_set = db1200_mmcled_set, | 333 | .brightness_set = db1200_mmcled_set, |
334 | }; | 334 | }; |
335 | 335 | ||
336 | /* needed by arch/mips/alchemy/common/platform.c */ | 336 | static struct au1xmmc_platform_data db1200mmc_platdata = { |
337 | struct au1xmmc_platform_data au1xmmc_platdata[] = { | 337 | .cd_setup = db1200_mmc_cd_setup, |
338 | .set_power = db1200_mmc_set_power, | ||
339 | .card_inserted = db1200_mmc_card_inserted, | ||
340 | .card_readonly = db1200_mmc_card_readonly, | ||
341 | .led = &db1200_mmc_led, | ||
342 | }; | ||
343 | |||
344 | static struct resource au1200_mmc0_resources[] = { | ||
345 | [0] = { | ||
346 | .start = AU1100_SD0_PHYS_ADDR, | ||
347 | .end = AU1100_SD0_PHYS_ADDR + 0xfff, | ||
348 | .flags = IORESOURCE_MEM, | ||
349 | }, | ||
350 | [1] = { | ||
351 | .start = AU1200_SD_INT, | ||
352 | .end = AU1200_SD_INT, | ||
353 | .flags = IORESOURCE_IRQ, | ||
354 | }, | ||
355 | [2] = { | ||
356 | .start = AU1200_DSCR_CMD0_SDMS_TX0, | ||
357 | .end = AU1200_DSCR_CMD0_SDMS_TX0, | ||
358 | .flags = IORESOURCE_DMA, | ||
359 | }, | ||
360 | [3] = { | ||
361 | .start = AU1200_DSCR_CMD0_SDMS_RX0, | ||
362 | .end = AU1200_DSCR_CMD0_SDMS_RX0, | ||
363 | .flags = IORESOURCE_DMA, | ||
364 | } | ||
365 | }; | ||
366 | |||
367 | static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32); | ||
368 | |||
369 | static struct platform_device db1200_mmc0_dev = { | ||
370 | .name = "au1xxx-mmc", | ||
371 | .id = 0, | ||
372 | .dev = { | ||
373 | .dma_mask = &au1xxx_mmc_dmamask, | ||
374 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
375 | .platform_data = &db1200mmc_platdata, | ||
376 | }, | ||
377 | .num_resources = ARRAY_SIZE(au1200_mmc0_resources), | ||
378 | .resource = au1200_mmc0_resources, | ||
379 | }; | ||
380 | |||
381 | /**********************************************************************/ | ||
382 | |||
383 | static struct resource au1200_lcd_res[] = { | ||
338 | [0] = { | 384 | [0] = { |
339 | .cd_setup = db1200_mmc_cd_setup, | 385 | .start = AU1200_LCD_PHYS_ADDR, |
340 | .set_power = db1200_mmc_set_power, | 386 | .end = AU1200_LCD_PHYS_ADDR + 0x800 - 1, |
341 | .card_inserted = db1200_mmc_card_inserted, | 387 | .flags = IORESOURCE_MEM, |
342 | .card_readonly = db1200_mmc_card_readonly, | 388 | }, |
343 | .led = &db1200_mmc_led, | 389 | [1] = { |
390 | .start = AU1200_LCD_INT, | ||
391 | .end = AU1200_LCD_INT, | ||
392 | .flags = IORESOURCE_IRQ, | ||
393 | } | ||
394 | }; | ||
395 | |||
396 | static u64 au1200_lcd_dmamask = DMA_BIT_MASK(32); | ||
397 | |||
398 | static struct platform_device au1200_lcd_dev = { | ||
399 | .name = "au1200-lcd", | ||
400 | .id = 0, | ||
401 | .dev = { | ||
402 | .dma_mask = &au1200_lcd_dmamask, | ||
403 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
344 | }, | 404 | }, |
405 | .num_resources = ARRAY_SIZE(au1200_lcd_res), | ||
406 | .resource = au1200_lcd_res, | ||
345 | }; | 407 | }; |
346 | 408 | ||
347 | /**********************************************************************/ | 409 | /**********************************************************************/ |
@@ -442,6 +504,8 @@ static struct platform_device db1200_stac_dev = { | |||
442 | static struct platform_device *db1200_devs[] __initdata = { | 504 | static struct platform_device *db1200_devs[] __initdata = { |
443 | NULL, /* PSC0, selected by S6.8 */ | 505 | NULL, /* PSC0, selected by S6.8 */ |
444 | &db1200_ide_dev, | 506 | &db1200_ide_dev, |
507 | &db1200_mmc0_dev, | ||
508 | &au1200_lcd_dev, | ||
445 | &db1200_eth_dev, | 509 | &db1200_eth_dev, |
446 | &db1200_rtc_dev, | 510 | &db1200_rtc_dev, |
447 | &db1200_nand_dev, | 511 | &db1200_nand_dev, |
diff --git a/arch/mips/alchemy/devboards/db1x00/board_setup.c b/arch/mips/alchemy/devboards/db1x00/board_setup.c index 2b2178f3f30b..7cd36e631f6c 100644 --- a/arch/mips/alchemy/devboards/db1x00/board_setup.c +++ b/arch/mips/alchemy/devboards/db1x00/board_setup.c | |||
@@ -134,9 +134,7 @@ void __init board_setup(void) | |||
134 | /* initialize board register space */ | 134 | /* initialize board register space */ |
135 | bcsr_init(bcsr1, bcsr2); | 135 | bcsr_init(bcsr1, bcsr2); |
136 | 136 | ||
137 | /* Not valid for Au1550 */ | 137 | #if defined(CONFIG_IRDA) && defined(CONFIG_AU1000_FIR) |
138 | #if defined(CONFIG_IRDA) && \ | ||
139 | (defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100)) | ||
140 | { | 138 | { |
141 | u32 pin_func; | 139 | u32 pin_func; |
142 | 140 | ||
diff --git a/arch/mips/alchemy/devboards/db1x00/platform.c b/arch/mips/alchemy/devboards/db1x00/platform.c index 990367f8401d..8704865306a5 100644 --- a/arch/mips/alchemy/devboards/db1x00/platform.c +++ b/arch/mips/alchemy/devboards/db1x00/platform.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/dma-mapping.h> | ||
22 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
23 | 24 | ||
24 | #include <asm/mach-au1x00/au1000.h> | 25 | #include <asm/mach-au1x00/au1000.h> |
@@ -208,6 +209,34 @@ static int __init db15x0_pci_init(void) | |||
208 | arch_initcall(db15x0_pci_init); | 209 | arch_initcall(db15x0_pci_init); |
209 | #endif | 210 | #endif |
210 | 211 | ||
212 | #ifdef CONFIG_MIPS_DB1100 | ||
213 | static struct resource au1100_lcd_resources[] = { | ||
214 | [0] = { | ||
215 | .start = AU1100_LCD_PHYS_ADDR, | ||
216 | .end = AU1100_LCD_PHYS_ADDR + 0x800 - 1, | ||
217 | .flags = IORESOURCE_MEM, | ||
218 | }, | ||
219 | [1] = { | ||
220 | .start = AU1100_LCD_INT, | ||
221 | .end = AU1100_LCD_INT, | ||
222 | .flags = IORESOURCE_IRQ, | ||
223 | } | ||
224 | }; | ||
225 | |||
226 | static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32); | ||
227 | |||
228 | static struct platform_device au1100_lcd_device = { | ||
229 | .name = "au1100-lcd", | ||
230 | .id = 0, | ||
231 | .dev = { | ||
232 | .dma_mask = &au1100_lcd_dmamask, | ||
233 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
234 | }, | ||
235 | .num_resources = ARRAY_SIZE(au1100_lcd_resources), | ||
236 | .resource = au1100_lcd_resources, | ||
237 | }; | ||
238 | #endif | ||
239 | |||
211 | static int __init db1xxx_dev_init(void) | 240 | static int __init db1xxx_dev_init(void) |
212 | { | 241 | { |
213 | #ifdef DB1XXX_HAS_PCMCIA | 242 | #ifdef DB1XXX_HAS_PCMCIA |
@@ -231,6 +260,9 @@ static int __init db1xxx_dev_init(void) | |||
231 | DB1XXX_PCMCIA_CARD1, DB1XXX_PCMCIA_CD1, | 260 | DB1XXX_PCMCIA_CARD1, DB1XXX_PCMCIA_CD1, |
232 | /*DB1XXX_PCMCIA_STSCHG1*/0, 0, 1); | 261 | /*DB1XXX_PCMCIA_STSCHG1*/0, 0, 1); |
233 | #endif | 262 | #endif |
263 | #ifdef CONFIG_MIPS_DB1100 | ||
264 | platform_device_register(&au1100_lcd_device); | ||
265 | #endif | ||
234 | db1x_register_norflash(BOARD_FLASH_SIZE, BOARD_FLASH_WIDTH, F_SWAPPED); | 266 | db1x_register_norflash(BOARD_FLASH_SIZE, BOARD_FLASH_WIDTH, F_SWAPPED); |
235 | return 0; | 267 | return 0; |
236 | } | 268 | } |
diff --git a/arch/mips/alchemy/devboards/pb1100/platform.c b/arch/mips/alchemy/devboards/pb1100/platform.c index 8a4e733f0f9f..9c57c01a68c4 100644 --- a/arch/mips/alchemy/devboards/pb1100/platform.c +++ b/arch/mips/alchemy/devboards/pb1100/platform.c | |||
@@ -19,12 +19,40 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/dma-mapping.h> | ||
23 | #include <linux/platform_device.h> | ||
22 | 24 | ||
23 | #include <asm/mach-au1x00/au1000.h> | 25 | #include <asm/mach-au1x00/au1000.h> |
24 | #include <asm/mach-db1x00/bcsr.h> | 26 | #include <asm/mach-db1x00/bcsr.h> |
25 | 27 | ||
26 | #include "../platform.h" | 28 | #include "../platform.h" |
27 | 29 | ||
30 | static struct resource au1100_lcd_resources[] = { | ||
31 | [0] = { | ||
32 | .start = AU1100_LCD_PHYS_ADDR, | ||
33 | .end = AU1100_LCD_PHYS_ADDR + 0x800 - 1, | ||
34 | .flags = IORESOURCE_MEM, | ||
35 | }, | ||
36 | [1] = { | ||
37 | .start = AU1100_LCD_INT, | ||
38 | .end = AU1100_LCD_INT, | ||
39 | .flags = IORESOURCE_IRQ, | ||
40 | } | ||
41 | }; | ||
42 | |||
43 | static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32); | ||
44 | |||
45 | static struct platform_device au1100_lcd_device = { | ||
46 | .name = "au1100-lcd", | ||
47 | .id = 0, | ||
48 | .dev = { | ||
49 | .dma_mask = &au1100_lcd_dmamask, | ||
50 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
51 | }, | ||
52 | .num_resources = ARRAY_SIZE(au1100_lcd_resources), | ||
53 | .resource = au1100_lcd_resources, | ||
54 | }; | ||
55 | |||
28 | static int __init pb1100_dev_init(void) | 56 | static int __init pb1100_dev_init(void) |
29 | { | 57 | { |
30 | int swapped; | 58 | int swapped; |
@@ -42,6 +70,7 @@ static int __init pb1100_dev_init(void) | |||
42 | 70 | ||
43 | swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT; | 71 | swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT; |
44 | db1x_register_norflash(64 * 1024 * 1024, 4, swapped); | 72 | db1x_register_norflash(64 * 1024 * 1024, 4, swapped); |
73 | platform_device_register(&au1100_lcd_device); | ||
45 | 74 | ||
46 | return 0; | 75 | return 0; |
47 | } | 76 | } |
diff --git a/arch/mips/alchemy/devboards/pb1200/platform.c b/arch/mips/alchemy/devboards/pb1200/platform.c index d7915b054be7..54f7f7b0676e 100644 --- a/arch/mips/alchemy/devboards/pb1200/platform.c +++ b/arch/mips/alchemy/devboards/pb1200/platform.c | |||
@@ -90,7 +90,7 @@ static int pb1200mmc1_card_inserted(void *mmc_host) | |||
90 | return (bcsr_read(BCSR_SIGSTAT) & BCSR_INT_SD1INSERT) ? 1 : 0; | 90 | return (bcsr_read(BCSR_SIGSTAT) & BCSR_INT_SD1INSERT) ? 1 : 0; |
91 | } | 91 | } |
92 | 92 | ||
93 | const struct au1xmmc_platform_data au1xmmc_platdata[2] = { | 93 | static struct au1xmmc_platform_data pb1200mmc_platdata[2] = { |
94 | [0] = { | 94 | [0] = { |
95 | .set_power = pb1200mmc0_set_power, | 95 | .set_power = pb1200mmc0_set_power, |
96 | .card_inserted = pb1200mmc0_card_inserted, | 96 | .card_inserted = pb1200mmc0_card_inserted, |
@@ -107,6 +107,79 @@ const struct au1xmmc_platform_data au1xmmc_platdata[2] = { | |||
107 | }, | 107 | }, |
108 | }; | 108 | }; |
109 | 109 | ||
110 | static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32); | ||
111 | |||
112 | static struct resource au1200_mmc0_res[] = { | ||
113 | [0] = { | ||
114 | .start = AU1100_SD0_PHYS_ADDR, | ||
115 | .end = AU1100_SD0_PHYS_ADDR + 0xfff, | ||
116 | .flags = IORESOURCE_MEM, | ||
117 | }, | ||
118 | [1] = { | ||
119 | .start = AU1200_SD_INT, | ||
120 | .end = AU1200_SD_INT, | ||
121 | .flags = IORESOURCE_IRQ, | ||
122 | }, | ||
123 | [2] = { | ||
124 | .start = AU1200_DSCR_CMD0_SDMS_TX0, | ||
125 | .end = AU1200_DSCR_CMD0_SDMS_TX0, | ||
126 | .flags = IORESOURCE_DMA, | ||
127 | }, | ||
128 | [3] = { | ||
129 | .start = AU1200_DSCR_CMD0_SDMS_RX0, | ||
130 | .end = AU1200_DSCR_CMD0_SDMS_RX0, | ||
131 | .flags = IORESOURCE_DMA, | ||
132 | } | ||
133 | }; | ||
134 | |||
135 | static struct platform_device pb1200_mmc0_dev = { | ||
136 | .name = "au1xxx-mmc", | ||
137 | .id = 0, | ||
138 | .dev = { | ||
139 | .dma_mask = &au1xxx_mmc_dmamask, | ||
140 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
141 | .platform_data = &pb1200mmc_platdata[0], | ||
142 | }, | ||
143 | .num_resources = ARRAY_SIZE(au1200_mmc0_res), | ||
144 | .resource = au1200_mmc0_res, | ||
145 | }; | ||
146 | |||
147 | static struct resource au1200_mmc1_res[] = { | ||
148 | [0] = { | ||
149 | .start = AU1100_SD1_PHYS_ADDR, | ||
150 | .end = AU1100_SD1_PHYS_ADDR + 0xfff, | ||
151 | .flags = IORESOURCE_MEM, | ||
152 | }, | ||
153 | [1] = { | ||
154 | .start = AU1200_SD_INT, | ||
155 | .end = AU1200_SD_INT, | ||
156 | .flags = IORESOURCE_IRQ, | ||
157 | }, | ||
158 | [2] = { | ||
159 | .start = AU1200_DSCR_CMD0_SDMS_TX1, | ||
160 | .end = AU1200_DSCR_CMD0_SDMS_TX1, | ||
161 | .flags = IORESOURCE_DMA, | ||
162 | }, | ||
163 | [3] = { | ||
164 | .start = AU1200_DSCR_CMD0_SDMS_RX1, | ||
165 | .end = AU1200_DSCR_CMD0_SDMS_RX1, | ||
166 | .flags = IORESOURCE_DMA, | ||
167 | } | ||
168 | }; | ||
169 | |||
170 | static struct platform_device pb1200_mmc1_dev = { | ||
171 | .name = "au1xxx-mmc", | ||
172 | .id = 1, | ||
173 | .dev = { | ||
174 | .dma_mask = &au1xxx_mmc_dmamask, | ||
175 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
176 | .platform_data = &pb1200mmc_platdata[1], | ||
177 | }, | ||
178 | .num_resources = ARRAY_SIZE(au1200_mmc1_res), | ||
179 | .resource = au1200_mmc1_res, | ||
180 | }; | ||
181 | |||
182 | |||
110 | static struct resource ide_resources[] = { | 183 | static struct resource ide_resources[] = { |
111 | [0] = { | 184 | [0] = { |
112 | .start = IDE_PHYS_ADDR, | 185 | .start = IDE_PHYS_ADDR, |
@@ -168,9 +241,69 @@ static struct platform_device smc91c111_device = { | |||
168 | .resource = smc91c111_resources | 241 | .resource = smc91c111_resources |
169 | }; | 242 | }; |
170 | 243 | ||
244 | static struct resource au1200_psc0_res[] = { | ||
245 | [0] = { | ||
246 | .start = AU1550_PSC0_PHYS_ADDR, | ||
247 | .end = AU1550_PSC0_PHYS_ADDR + 0xfff, | ||
248 | .flags = IORESOURCE_MEM, | ||
249 | }, | ||
250 | [1] = { | ||
251 | .start = AU1200_PSC0_INT, | ||
252 | .end = AU1200_PSC0_INT, | ||
253 | .flags = IORESOURCE_IRQ, | ||
254 | }, | ||
255 | [2] = { | ||
256 | .start = AU1200_DSCR_CMD0_PSC0_TX, | ||
257 | .end = AU1200_DSCR_CMD0_PSC0_TX, | ||
258 | .flags = IORESOURCE_DMA, | ||
259 | }, | ||
260 | [3] = { | ||
261 | .start = AU1200_DSCR_CMD0_PSC0_RX, | ||
262 | .end = AU1200_DSCR_CMD0_PSC0_RX, | ||
263 | .flags = IORESOURCE_DMA, | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | static struct platform_device pb1200_i2c_dev = { | ||
268 | .name = "au1xpsc_smbus", | ||
269 | .id = 0, /* bus number */ | ||
270 | .num_resources = ARRAY_SIZE(au1200_psc0_res), | ||
271 | .resource = au1200_psc0_res, | ||
272 | }; | ||
273 | |||
274 | static struct resource au1200_lcd_res[] = { | ||
275 | [0] = { | ||
276 | .start = AU1200_LCD_PHYS_ADDR, | ||
277 | .end = AU1200_LCD_PHYS_ADDR + 0x800 - 1, | ||
278 | .flags = IORESOURCE_MEM, | ||
279 | }, | ||
280 | [1] = { | ||
281 | .start = AU1200_LCD_INT, | ||
282 | .end = AU1200_LCD_INT, | ||
283 | .flags = IORESOURCE_IRQ, | ||
284 | } | ||
285 | }; | ||
286 | |||
287 | static u64 au1200_lcd_dmamask = DMA_BIT_MASK(32); | ||
288 | |||
289 | static struct platform_device au1200_lcd_dev = { | ||
290 | .name = "au1200-lcd", | ||
291 | .id = 0, | ||
292 | .dev = { | ||
293 | .dma_mask = &au1200_lcd_dmamask, | ||
294 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
295 | }, | ||
296 | .num_resources = ARRAY_SIZE(au1200_lcd_res), | ||
297 | .resource = au1200_lcd_res, | ||
298 | }; | ||
299 | |||
171 | static struct platform_device *board_platform_devices[] __initdata = { | 300 | static struct platform_device *board_platform_devices[] __initdata = { |
172 | &ide_device, | 301 | &ide_device, |
173 | &smc91c111_device | 302 | &smc91c111_device, |
303 | &pb1200_i2c_dev, | ||
304 | &pb1200_mmc0_dev, | ||
305 | &pb1200_mmc1_dev, | ||
306 | &au1200_lcd_dev, | ||
174 | }; | 307 | }; |
175 | 308 | ||
176 | static int __init board_register_devices(void) | 309 | static int __init board_register_devices(void) |
diff --git a/arch/mips/alchemy/devboards/pb1500/platform.c b/arch/mips/alchemy/devboards/pb1500/platform.c index 9f0b5a0b4795..1e52a01bac00 100644 --- a/arch/mips/alchemy/devboards/pb1500/platform.c +++ b/arch/mips/alchemy/devboards/pb1500/platform.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/dma-mapping.h> | ||
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
23 | #include <asm/mach-au1x00/au1000.h> | 24 | #include <asm/mach-au1x00/au1000.h> |
diff --git a/arch/mips/alchemy/devboards/pb1550/platform.c b/arch/mips/alchemy/devboards/pb1550/platform.c index 0c5711fa0734..a4604b8a349e 100644 --- a/arch/mips/alchemy/devboards/pb1550/platform.c +++ b/arch/mips/alchemy/devboards/pb1550/platform.c | |||
@@ -18,9 +18,11 @@ | |||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/dma-mapping.h> | ||
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
23 | #include <asm/mach-au1x00/au1000.h> | 24 | #include <asm/mach-au1x00/au1000.h> |
25 | #include <asm/mach-au1x00/au1xxx_dbdma.h> | ||
24 | #include <asm/mach-pb1x00/pb1550.h> | 26 | #include <asm/mach-pb1x00/pb1550.h> |
25 | #include <asm/mach-db1x00/bcsr.h> | 27 | #include <asm/mach-db1x00/bcsr.h> |
26 | 28 | ||
@@ -69,6 +71,36 @@ static struct platform_device pb1550_pci_host = { | |||
69 | .resource = alchemy_pci_host_res, | 71 | .resource = alchemy_pci_host_res, |
70 | }; | 72 | }; |
71 | 73 | ||
74 | static struct resource au1550_psc2_res[] = { | ||
75 | [0] = { | ||
76 | .start = AU1550_PSC2_PHYS_ADDR, | ||
77 | .end = AU1550_PSC2_PHYS_ADDR + 0xfff, | ||
78 | .flags = IORESOURCE_MEM, | ||
79 | }, | ||
80 | [1] = { | ||
81 | .start = AU1550_PSC2_INT, | ||
82 | .end = AU1550_PSC2_INT, | ||
83 | .flags = IORESOURCE_IRQ, | ||
84 | }, | ||
85 | [2] = { | ||
86 | .start = AU1550_DSCR_CMD0_PSC2_TX, | ||
87 | .end = AU1550_DSCR_CMD0_PSC2_TX, | ||
88 | .flags = IORESOURCE_DMA, | ||
89 | }, | ||
90 | [3] = { | ||
91 | .start = AU1550_DSCR_CMD0_PSC2_RX, | ||
92 | .end = AU1550_DSCR_CMD0_PSC2_RX, | ||
93 | .flags = IORESOURCE_DMA, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | static struct platform_device pb1550_i2c_dev = { | ||
98 | .name = "au1xpsc_smbus", | ||
99 | .id = 0, /* bus number */ | ||
100 | .num_resources = ARRAY_SIZE(au1550_psc2_res), | ||
101 | .resource = au1550_psc2_res, | ||
102 | }; | ||
103 | |||
72 | static int __init pb1550_dev_init(void) | 104 | static int __init pb1550_dev_init(void) |
73 | { | 105 | { |
74 | int swapped; | 106 | int swapped; |
@@ -101,6 +133,7 @@ static int __init pb1550_dev_init(void) | |||
101 | swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_PB1550_SWAPBOOT; | 133 | swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_PB1550_SWAPBOOT; |
102 | db1x_register_norflash(128 * 1024 * 1024, 4, swapped); | 134 | db1x_register_norflash(128 * 1024 * 1024, 4, swapped); |
103 | platform_device_register(&pb1550_pci_host); | 135 | platform_device_register(&pb1550_pci_host); |
136 | platform_device_register(&pb1550_i2c_dev); | ||
104 | 137 | ||
105 | return 0; | 138 | return 0; |
106 | } | 139 | } |