diff options
Diffstat (limited to 'arch/blackfin/mach-bf561/boards/cm_bf561.c')
-rw-r--r-- | arch/blackfin/mach-bf561/boards/cm_bf561.c | 66 |
1 files changed, 56 insertions, 10 deletions
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c index dfc8d5b77986..e127aedc1d7f 100644 --- a/arch/blackfin/mach-bf561/boards/cm_bf561.c +++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c | |||
@@ -72,7 +72,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
72 | }; | 72 | }; |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 75 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
76 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 76 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
77 | .enable_dma = 0, | 77 | .enable_dma = 0, |
78 | .bits_per_word = 16, | 78 | .bits_per_word = 16, |
@@ -111,7 +111,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
111 | }, | 111 | }, |
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 114 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
115 | { | 115 | { |
116 | .modalias = "ad1836", | 116 | .modalias = "ad1836", |
117 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 117 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
@@ -305,21 +305,50 @@ static struct platform_device isp1362_hcd_device = { | |||
305 | #endif | 305 | #endif |
306 | 306 | ||
307 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 307 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
308 | static struct resource bfin_uart_resources[] = { | 308 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
309 | static struct resource bfin_uart0_resources[] = { | ||
309 | { | 310 | { |
310 | .start = 0xFFC00400, | 311 | .start = BFIN_UART_THR, |
311 | .end = 0xFFC004FF, | 312 | .end = BFIN_UART_GCTL+2, |
312 | .flags = IORESOURCE_MEM, | 313 | .flags = IORESOURCE_MEM, |
313 | }, | 314 | }, |
315 | { | ||
316 | .start = IRQ_UART_RX, | ||
317 | .end = IRQ_UART_RX+1, | ||
318 | .flags = IORESOURCE_IRQ, | ||
319 | }, | ||
320 | { | ||
321 | .start = IRQ_UART_ERROR, | ||
322 | .end = IRQ_UART_ERROR, | ||
323 | .flags = IORESOURCE_IRQ, | ||
324 | }, | ||
325 | { | ||
326 | .start = CH_UART_TX, | ||
327 | .end = CH_UART_TX, | ||
328 | .flags = IORESOURCE_DMA, | ||
329 | }, | ||
330 | { | ||
331 | .start = CH_UART_RX, | ||
332 | .end = CH_UART_RX, | ||
333 | .flags = IORESOURCE_DMA, | ||
334 | }, | ||
314 | }; | 335 | }; |
315 | 336 | ||
316 | static struct platform_device bfin_uart_device = { | 337 | unsigned short bfin_uart0_peripherals[] = { |
338 | P_UART0_TX, P_UART0_RX, 0 | ||
339 | }; | ||
340 | |||
341 | static struct platform_device bfin_uart0_device = { | ||
317 | .name = "bfin-uart", | 342 | .name = "bfin-uart", |
318 | .id = 1, | 343 | .id = 0, |
319 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 344 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
320 | .resource = bfin_uart_resources, | 345 | .resource = bfin_uart0_resources, |
346 | .dev = { | ||
347 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
348 | }, | ||
321 | }; | 349 | }; |
322 | #endif | 350 | #endif |
351 | #endif | ||
323 | 352 | ||
324 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 353 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
325 | #ifdef CONFIG_BFIN_SIR0 | 354 | #ifdef CONFIG_BFIN_SIR0 |
@@ -463,7 +492,9 @@ static struct platform_device *cm_bf561_devices[] __initdata = { | |||
463 | #endif | 492 | #endif |
464 | 493 | ||
465 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 494 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
466 | &bfin_uart_device, | 495 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
496 | &bfin_uart0_device, | ||
497 | #endif | ||
467 | #endif | 498 | #endif |
468 | 499 | ||
469 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 500 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -516,3 +547,18 @@ static int __init cm_bf561_init(void) | |||
516 | } | 547 | } |
517 | 548 | ||
518 | arch_initcall(cm_bf561_init); | 549 | arch_initcall(cm_bf561_init); |
550 | |||
551 | static struct platform_device *cm_bf561_early_devices[] __initdata = { | ||
552 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
553 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
554 | &bfin_uart0_device, | ||
555 | #endif | ||
556 | #endif | ||
557 | }; | ||
558 | |||
559 | void __init native_machine_early_platform_add_devices(void) | ||
560 | { | ||
561 | printk(KERN_INFO "register early platform devices\n"); | ||
562 | early_platform_add_devices(cm_bf561_early_devices, | ||
563 | ARRAY_SIZE(cm_bf561_early_devices)); | ||
564 | } | ||