diff options
Diffstat (limited to 'arch/blackfin/mach-bf533/boards/H8606.c')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/H8606.c | 66 |
1 files changed, 56 insertions, 10 deletions
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c index 4adceb0bdb6d..175371af0692 100644 --- a/arch/blackfin/mach-bf533/boards/H8606.c +++ b/arch/blackfin/mach-bf533/boards/H8606.c | |||
@@ -171,7 +171,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
171 | }; | 171 | }; |
172 | #endif | 172 | #endif |
173 | 173 | ||
174 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 174 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
175 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 175 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
176 | .enable_dma = 0, | 176 | .enable_dma = 0, |
177 | .bits_per_word = 16, | 177 | .bits_per_word = 16, |
@@ -206,7 +206,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
206 | }, | 206 | }, |
207 | #endif | 207 | #endif |
208 | 208 | ||
209 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 209 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
210 | { | 210 | { |
211 | .modalias = "ad1836", | 211 | .modalias = "ad1836", |
212 | .max_speed_hz = 16, | 212 | .max_speed_hz = 16, |
@@ -257,21 +257,50 @@ static struct platform_device bfin_spi0_device = { | |||
257 | #endif /* spi master and devices */ | 257 | #endif /* spi master and devices */ |
258 | 258 | ||
259 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 259 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
260 | static struct resource bfin_uart_resources[] = { | 260 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
261 | static struct resource bfin_uart0_resources[] = { | ||
261 | { | 262 | { |
262 | .start = 0xFFC00400, | 263 | .start = BFIN_UART_THR, |
263 | .end = 0xFFC004FF, | 264 | .end = BFIN_UART_GCTL+2, |
264 | .flags = IORESOURCE_MEM, | 265 | .flags = IORESOURCE_MEM, |
265 | }, | 266 | }, |
267 | { | ||
268 | .start = IRQ_UART0_RX, | ||
269 | .end = IRQ_UART0_RX + 1, | ||
270 | .flags = IORESOURCE_IRQ, | ||
271 | }, | ||
272 | { | ||
273 | .start = IRQ_UART0_ERROR, | ||
274 | .end = IRQ_UART0_ERROR, | ||
275 | .flags = IORESOURCE_IRQ, | ||
276 | }, | ||
277 | { | ||
278 | .start = CH_UART0_TX, | ||
279 | .end = CH_UART0_TX, | ||
280 | .flags = IORESOURCE_DMA, | ||
281 | }, | ||
282 | { | ||
283 | .start = CH_UART0_RX, | ||
284 | .end = CH_UART0_RX, | ||
285 | .flags = IORESOURCE_DMA, | ||
286 | }, | ||
287 | }; | ||
288 | |||
289 | unsigned short bfin_uart0_peripherals[] = { | ||
290 | P_UART0_TX, P_UART0_RX, 0 | ||
266 | }; | 291 | }; |
267 | 292 | ||
268 | static struct platform_device bfin_uart_device = { | 293 | static struct platform_device bfin_uart0_device = { |
269 | .name = "bfin-uart", | 294 | .name = "bfin-uart", |
270 | .id = 1, | 295 | .id = 0, |
271 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 296 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
272 | .resource = bfin_uart_resources, | 297 | .resource = bfin_uart0_resources, |
298 | .dev = { | ||
299 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
300 | }, | ||
273 | }; | 301 | }; |
274 | #endif | 302 | #endif |
303 | #endif | ||
275 | 304 | ||
276 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 305 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
277 | #ifdef CONFIG_BFIN_SIR0 | 306 | #ifdef CONFIG_BFIN_SIR0 |
@@ -394,7 +423,9 @@ static struct platform_device *h8606_devices[] __initdata = { | |||
394 | #endif | 423 | #endif |
395 | 424 | ||
396 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 425 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
397 | &bfin_uart_device, | 426 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
427 | &bfin_uart0_device, | ||
428 | #endif | ||
398 | #endif | 429 | #endif |
399 | 430 | ||
400 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 431 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
@@ -424,3 +455,18 @@ static int __init H8606_init(void) | |||
424 | } | 455 | } |
425 | 456 | ||
426 | arch_initcall(H8606_init); | 457 | arch_initcall(H8606_init); |
458 | |||
459 | static struct platform_device *H8606_early_devices[] __initdata = { | ||
460 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
461 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
462 | &bfin_uart0_device, | ||
463 | #endif | ||
464 | #endif | ||
465 | }; | ||
466 | |||
467 | void __init native_machine_early_platform_add_devices(void) | ||
468 | { | ||
469 | printk(KERN_INFO "register early platform devices\n"); | ||
470 | early_platform_add_devices(H8606_early_devices, | ||
471 | ARRAY_SIZE(H8606_early_devices)); | ||
472 | } | ||