diff options
author | Barry Song <barry.song@analog.com> | 2010-06-28 04:39:37 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-10-22 03:48:53 -0400 |
commit | 027285e86fca48f1af3ed8b86a5c03453766f5ca (patch) | |
tree | a6458e55a4a492a4fbbd870f29a2cf7448f62a36 /arch/blackfin/mach-bf561 | |
parent | 175671e75c54cf4b17c71d9c99151dd5635964b1 (diff) |
Blackfin: bf561-ezkit: add AD1836 codec resources
This board has an AD1836 codec, so make sure we have the right resources
declared for it.
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf561')
-rw-r--r-- | arch/blackfin/mach-bf561/boards/ezkit.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 51b80ec8af6f..f1e27d2c3619 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/spi/spi.h> | 14 | #include <linux/spi/spi.h> |
15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/delay.h> | ||
17 | #include <asm/dma.h> | 18 | #include <asm/dma.h> |
18 | #include <asm/bfin5xx_spi.h> | 19 | #include <asm/bfin5xx_spi.h> |
19 | #include <asm/portmux.h> | 20 | #include <asm/portmux.h> |
@@ -335,7 +336,9 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
335 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 336 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
336 | .bus_num = 0, | 337 | .bus_num = 0, |
337 | .chip_select = 4, | 338 | .chip_select = 4, |
339 | .platform_data = "ad1836", /* only includes chip name for the moment */ | ||
338 | .controller_data = &ad1836_spi_chip_info, | 340 | .controller_data = &ad1836_spi_chip_info, |
341 | .mode = SPI_MODE_3, | ||
339 | }, | 342 | }, |
340 | #endif | 343 | #endif |
341 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | 344 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) |
@@ -420,6 +423,30 @@ static struct platform_device bfin_dpmc = { | |||
420 | }, | 423 | }, |
421 | }; | 424 | }; |
422 | 425 | ||
426 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | ||
427 | static struct platform_device bfin_i2s = { | ||
428 | .name = "bfin-i2s", | ||
429 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
430 | /* TODO: add platform data here */ | ||
431 | }; | ||
432 | #endif | ||
433 | |||
434 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
435 | static struct platform_device bfin_tdm = { | ||
436 | .name = "bfin-tdm", | ||
437 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
438 | /* TODO: add platform data here */ | ||
439 | }; | ||
440 | #endif | ||
441 | |||
442 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
443 | static struct platform_device bfin_ac97 = { | ||
444 | .name = "bfin-ac97", | ||
445 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
446 | /* TODO: add platform data here */ | ||
447 | }; | ||
448 | #endif | ||
449 | |||
423 | static struct platform_device *ezkit_devices[] __initdata = { | 450 | static struct platform_device *ezkit_devices[] __initdata = { |
424 | 451 | ||
425 | &bfin_dpmc, | 452 | &bfin_dpmc, |
@@ -467,6 +494,18 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
467 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 494 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
468 | &ezkit_flash_device, | 495 | &ezkit_flash_device, |
469 | #endif | 496 | #endif |
497 | |||
498 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | ||
499 | &bfin_i2s, | ||
500 | #endif | ||
501 | |||
502 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
503 | &bfin_tdm, | ||
504 | #endif | ||
505 | |||
506 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
507 | &bfin_ac97, | ||
508 | #endif | ||
470 | }; | 509 | }; |
471 | 510 | ||
472 | static int __init ezkit_init(void) | 511 | static int __init ezkit_init(void) |
@@ -484,6 +523,17 @@ static int __init ezkit_init(void) | |||
484 | SSYNC(); | 523 | SSYNC(); |
485 | #endif | 524 | #endif |
486 | 525 | ||
526 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
527 | bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15)); | ||
528 | bfin_write_FIO0_FLAG_S(1 << 15); | ||
529 | SSYNC(); | ||
530 | /* | ||
531 | * This initialization lasts for approximately 4500 MCLKs. | ||
532 | * MCLK = 12.288MHz | ||
533 | */ | ||
534 | udelay(400); | ||
535 | #endif | ||
536 | |||
487 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 537 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
488 | return 0; | 538 | return 0; |
489 | } | 539 | } |