aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/common
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2011-08-12 05:39:45 -0400
committerRalf Baechle <ralf@linux-mips.org>2011-10-24 18:34:24 -0400
commit3766386037827fe7064f57f9aec27b3b5e9417aa (patch)
tree306a7b1ccf3100469fd711af37963801d8d387c0 /arch/mips/alchemy/common
parent50d5676ebac57c187ac347bae24290f0dc16fdbe (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/common')
-rw-r--r--arch/mips/alchemy/common/platform.c175
1 files changed, 2 insertions, 173 deletions
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
index 657ae2778374..c8e5d72a5826 100644
--- a/arch/mips/alchemy/common/platform.c
+++ b/arch/mips/alchemy/common/platform.c
@@ -189,159 +189,6 @@ static void __init alchemy_setup_usb(int ctype)
189 } 189 }
190} 190}
191 191
192/*** AU1100 LCD controller ***/
193
194#ifdef CONFIG_FB_AU1100
195static struct resource au1100_lcd_resources[] = {
196 [0] = {
197 .start = AU1100_LCD_PHYS_ADDR,
198 .end = AU1100_LCD_PHYS_ADDR + 0x800 - 1,
199 .flags = IORESOURCE_MEM,
200 },
201 [1] = {
202 .start = AU1100_LCD_INT,
203 .end = AU1100_LCD_INT,
204 .flags = IORESOURCE_IRQ,
205 }
206};
207
208static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32);
209
210static struct platform_device au1100_lcd_device = {
211 .name = "au1100-lcd",
212 .id = 0,
213 .dev = {
214 .dma_mask = &au1100_lcd_dmamask,
215 .coherent_dma_mask = DMA_BIT_MASK(32),
216 },
217 .num_resources = ARRAY_SIZE(au1100_lcd_resources),
218 .resource = au1100_lcd_resources,
219};
220#endif
221
222#ifdef CONFIG_SOC_AU1200
223
224static struct resource au1200_lcd_resources[] = {
225 [0] = {
226 .start = AU1200_LCD_PHYS_ADDR,
227 .end = AU1200_LCD_PHYS_ADDR + 0x800 - 1,
228 .flags = IORESOURCE_MEM,
229 },
230 [1] = {
231 .start = AU1200_LCD_INT,
232 .end = AU1200_LCD_INT,
233 .flags = IORESOURCE_IRQ,
234 }
235};
236
237static u64 au1200_lcd_dmamask = DMA_BIT_MASK(32);
238
239static struct platform_device au1200_lcd_device = {
240 .name = "au1200-lcd",
241 .id = 0,
242 .dev = {
243 .dma_mask = &au1200_lcd_dmamask,
244 .coherent_dma_mask = DMA_BIT_MASK(32),
245 },
246 .num_resources = ARRAY_SIZE(au1200_lcd_resources),
247 .resource = au1200_lcd_resources,
248};
249
250static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32);
251
252extern struct au1xmmc_platform_data au1xmmc_platdata[2];
253
254static struct resource au1200_mmc0_resources[] = {
255 [0] = {
256 .start = AU1100_SD0_PHYS_ADDR,
257 .end = AU1100_SD0_PHYS_ADDR + 0xfff,
258 .flags = IORESOURCE_MEM,
259 },
260 [1] = {
261 .start = AU1200_SD_INT,
262 .end = AU1200_SD_INT,
263 .flags = IORESOURCE_IRQ,
264 },
265 [2] = {
266 .start = AU1200_DSCR_CMD0_SDMS_TX0,
267 .end = AU1200_DSCR_CMD0_SDMS_TX0,
268 .flags = IORESOURCE_DMA,
269 },
270 [3] = {
271 .start = AU1200_DSCR_CMD0_SDMS_RX0,
272 .end = AU1200_DSCR_CMD0_SDMS_RX0,
273 .flags = IORESOURCE_DMA,
274 }
275};
276
277static struct platform_device au1200_mmc0_device = {
278 .name = "au1xxx-mmc",
279 .id = 0,
280 .dev = {
281 .dma_mask = &au1xxx_mmc_dmamask,
282 .coherent_dma_mask = DMA_BIT_MASK(32),
283 .platform_data = &au1xmmc_platdata[0],
284 },
285 .num_resources = ARRAY_SIZE(au1200_mmc0_resources),
286 .resource = au1200_mmc0_resources,
287};
288
289#ifndef CONFIG_MIPS_DB1200
290static struct resource au1200_mmc1_resources[] = {
291 [0] = {
292 .start = AU1100_SD1_PHYS_ADDR,
293 .end = AU1100_SD1_PHYS_ADDR + 0xfff,
294 .flags = IORESOURCE_MEM,
295 },
296 [1] = {
297 .start = AU1200_SD_INT,
298 .end = AU1200_SD_INT,
299 .flags = IORESOURCE_IRQ,
300 },
301 [2] = {
302 .start = AU1200_DSCR_CMD0_SDMS_TX1,
303 .end = AU1200_DSCR_CMD0_SDMS_TX1,
304 .flags = IORESOURCE_DMA,
305 },
306 [3] = {
307 .start = AU1200_DSCR_CMD0_SDMS_RX1,
308 .end = AU1200_DSCR_CMD0_SDMS_RX1,
309 .flags = IORESOURCE_DMA,
310 }
311};
312
313static struct platform_device au1200_mmc1_device = {
314 .name = "au1xxx-mmc",
315 .id = 1,
316 .dev = {
317 .dma_mask = &au1xxx_mmc_dmamask,
318 .coherent_dma_mask = DMA_BIT_MASK(32),
319 .platform_data = &au1xmmc_platdata[1],
320 },
321 .num_resources = ARRAY_SIZE(au1200_mmc1_resources),
322 .resource = au1200_mmc1_resources,
323};
324#endif /* #ifndef CONFIG_MIPS_DB1200 */
325#endif /* #ifdef CONFIG_SOC_AU1200 */
326
327/* All Alchemy demoboards with I2C have this #define in their headers */
328#ifdef SMBUS_PSC_BASE
329static struct resource pbdb_smbus_resources[] = {
330 {
331 .start = SMBUS_PSC_BASE,
332 .end = SMBUS_PSC_BASE + 0xfff,
333 .flags = IORESOURCE_MEM,
334 },
335};
336
337static struct platform_device pbdb_smbus_device = {
338 .name = "au1xpsc_smbus",
339 .id = 0, /* bus number */
340 .num_resources = ARRAY_SIZE(pbdb_smbus_resources),
341 .resource = pbdb_smbus_resources,
342};
343#endif
344
345/* Macro to help defining the Ethernet MAC resources */ 192/* Macro to help defining the Ethernet MAC resources */
346#define MAC_RES_COUNT 4 /* MAC regs, MAC en, MAC INT, MACDMA regs */ 193#define MAC_RES_COUNT 4 /* MAC regs, MAC en, MAC INT, MACDMA regs */
347#define MAC_RES(_base, _enable, _irq, _macdma) \ 194#define MAC_RES(_base, _enable, _irq, _macdma) \
@@ -503,33 +350,15 @@ static void __init alchemy_setup_macs(int ctype)
503 } 350 }
504} 351}
505 352
506static struct platform_device *au1xxx_platform_devices[] __initdata = {
507#ifdef CONFIG_FB_AU1100
508 &au1100_lcd_device,
509#endif
510#ifdef CONFIG_SOC_AU1200
511 &au1200_lcd_device,
512 &au1200_mmc0_device,
513#ifndef CONFIG_MIPS_DB1200
514 &au1200_mmc1_device,
515#endif
516#endif
517#ifdef SMBUS_PSC_BASE
518 &pbdb_smbus_device,
519#endif
520};
521
522static int __init au1xxx_platform_init(void) 353static int __init au1xxx_platform_init(void)
523{ 354{
524 int err, ctype = alchemy_get_cputype(); 355 int ctype = alchemy_get_cputype();
525 356
526 alchemy_setup_uarts(ctype); 357 alchemy_setup_uarts(ctype);
527 alchemy_setup_macs(ctype); 358 alchemy_setup_macs(ctype);
528 alchemy_setup_usb(ctype); 359 alchemy_setup_usb(ctype);
529 360
530 err = platform_add_devices(au1xxx_platform_devices, 361 return 0;
531 ARRAY_SIZE(au1xxx_platform_devices));
532 return err;
533} 362}
534 363
535arch_initcall(au1xxx_platform_init); 364arch_initcall(au1xxx_platform_init);