aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf533/boards/ezkit.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf533/boards/ezkit.c')
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c102
1 files changed, 92 insertions, 10 deletions
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index d4689dcc198e..739773cb7fc6 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -222,7 +222,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
222}; 222};
223#endif 223#endif
224 224
225#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 225#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE)
226static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 226static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
227 .enable_dma = 0, 227 .enable_dma = 0,
228 .bits_per_word = 16, 228 .bits_per_word = 16,
@@ -261,7 +261,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
261 }, 261 },
262#endif 262#endif
263 263
264#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 264#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE)
265 { 265 {
266 .modalias = "ad1836", 266 .modalias = "ad1836",
267 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 267 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -320,21 +320,50 @@ static struct platform_device bfin_spi0_device = {
320#endif /* spi master and devices */ 320#endif /* spi master and devices */
321 321
322#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 322#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
323static struct resource bfin_uart_resources[] = { 323#ifdef CONFIG_SERIAL_BFIN_UART0
324static struct resource bfin_uart0_resources[] = {
324 { 325 {
325 .start = 0xFFC00400, 326 .start = BFIN_UART_THR,
326 .end = 0xFFC004FF, 327 .end = BFIN_UART_GCTL+2,
327 .flags = IORESOURCE_MEM, 328 .flags = IORESOURCE_MEM,
328 }, 329 },
330 {
331 .start = IRQ_UART0_RX,
332 .end = IRQ_UART0_RX + 1,
333 .flags = IORESOURCE_IRQ,
334 },
335 {
336 .start = IRQ_UART0_ERROR,
337 .end = IRQ_UART0_ERROR,
338 .flags = IORESOURCE_IRQ,
339 },
340 {
341 .start = CH_UART0_TX,
342 .end = CH_UART0_TX,
343 .flags = IORESOURCE_DMA,
344 },
345 {
346 .start = CH_UART0_RX,
347 .end = CH_UART0_RX,
348 .flags = IORESOURCE_DMA,
349 },
350};
351
352unsigned short bfin_uart0_peripherals[] = {
353 P_UART0_TX, P_UART0_RX, 0
329}; 354};
330 355
331static struct platform_device bfin_uart_device = { 356static struct platform_device bfin_uart0_device = {
332 .name = "bfin-uart", 357 .name = "bfin-uart",
333 .id = 1, 358 .id = 0,
334 .num_resources = ARRAY_SIZE(bfin_uart_resources), 359 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
335 .resource = bfin_uart_resources, 360 .resource = bfin_uart0_resources,
361 .dev = {
362 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
363 },
336}; 364};
337#endif 365#endif
366#endif
338 367
339#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 368#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
340#ifdef CONFIG_BFIN_SIR0 369#ifdef CONFIG_BFIN_SIR0
@@ -444,6 +473,30 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
444#endif 473#endif
445}; 474};
446 475
476#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
477static struct platform_device bfin_i2s = {
478 .name = "bfin-i2s",
479 .id = CONFIG_SND_BF5XX_SPORT_NUM,
480 /* TODO: add platform data here */
481};
482#endif
483
484#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
485static struct platform_device bfin_tdm = {
486 .name = "bfin-tdm",
487 .id = CONFIG_SND_BF5XX_SPORT_NUM,
488 /* TODO: add platform data here */
489};
490#endif
491
492#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
493static struct platform_device bfin_ac97 = {
494 .name = "bfin-ac97",
495 .id = CONFIG_SND_BF5XX_SPORT_NUM,
496 /* TODO: add platform data here */
497};
498#endif
499
447static struct platform_device *ezkit_devices[] __initdata = { 500static struct platform_device *ezkit_devices[] __initdata = {
448 501
449 &bfin_dpmc, 502 &bfin_dpmc,
@@ -471,7 +524,9 @@ static struct platform_device *ezkit_devices[] __initdata = {
471#endif 524#endif
472 525
473#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 526#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
474 &bfin_uart_device, 527#ifdef CONFIG_SERIAL_BFIN_UART0
528 &bfin_uart0_device,
529#endif
475#endif 530#endif
476 531
477#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 532#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
@@ -487,6 +542,18 @@ static struct platform_device *ezkit_devices[] __initdata = {
487#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 542#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
488 &i2c_gpio_device, 543 &i2c_gpio_device,
489#endif 544#endif
545
546#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
547 &bfin_i2s,
548#endif
549
550#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
551 &bfin_tdm,
552#endif
553
554#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
555 &bfin_ac97,
556#endif
490}; 557};
491 558
492static int __init ezkit_init(void) 559static int __init ezkit_init(void)
@@ -500,3 +567,18 @@ static int __init ezkit_init(void)
500} 567}
501 568
502arch_initcall(ezkit_init); 569arch_initcall(ezkit_init);
570
571static struct platform_device *ezkit_early_devices[] __initdata = {
572#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
573#ifdef CONFIG_SERIAL_BFIN_UART0
574 &bfin_uart0_device,
575#endif
576#endif
577};
578
579void __init native_machine_early_platform_add_devices(void)
580{
581 printk(KERN_INFO "register early platform devices\n");
582 early_platform_add_devices(ezkit_early_devices,
583 ARRAY_SIZE(ezkit_early_devices));
584}