diff options
Diffstat (limited to 'arch/blackfin/mach-bf527/boards/ezkit.c')
| -rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 74 |
1 files changed, 72 insertions, 2 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 2cd2ff6f304..e67ac772066 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <asm/portmux.h> | 26 | #include <asm/portmux.h> |
| 27 | #include <asm/dpmc.h> | 27 | #include <asm/dpmc.h> |
| 28 | #include <linux/spi/ad7877.h> | 28 | #include <linux/spi/ad7877.h> |
| 29 | #include <asm/bfin_sport.h> | ||
| 29 | 30 | ||
| 30 | /* | 31 | /* |
| 31 | * Name the Board for the /proc/cpuinfo | 32 | * Name the Board for the /proc/cpuinfo |
| @@ -526,11 +527,69 @@ static struct bfin5xx_spi_chip spidev_chip_info = { | |||
| 526 | }; | 527 | }; |
| 527 | #endif | 528 | #endif |
| 528 | 529 | ||
| 530 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ | ||
| 531 | defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
| 532 | |||
| 533 | static const u16 bfin_snd_pin[][7] = { | ||
| 534 | {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
| 535 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0, 0}, | ||
| 536 | {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
| 537 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_TFS, 0}, | ||
| 538 | }; | ||
| 539 | |||
| 540 | static struct bfin_snd_platform_data bfin_snd_data[] = { | ||
| 541 | { | ||
| 542 | .pin_req = &bfin_snd_pin[0][0], | ||
| 543 | }, | ||
| 544 | { | ||
| 545 | .pin_req = &bfin_snd_pin[1][0], | ||
| 546 | }, | ||
| 547 | }; | ||
| 548 | |||
| 549 | #define BFIN_SND_RES(x) \ | ||
| 550 | [x] = { \ | ||
| 551 | { \ | ||
| 552 | .start = SPORT##x##_TCR1, \ | ||
| 553 | .end = SPORT##x##_TCR1, \ | ||
| 554 | .flags = IORESOURCE_MEM \ | ||
| 555 | }, \ | ||
| 556 | { \ | ||
| 557 | .start = CH_SPORT##x##_RX, \ | ||
| 558 | .end = CH_SPORT##x##_RX, \ | ||
| 559 | .flags = IORESOURCE_DMA, \ | ||
| 560 | }, \ | ||
| 561 | { \ | ||
| 562 | .start = CH_SPORT##x##_TX, \ | ||
| 563 | .end = CH_SPORT##x##_TX, \ | ||
| 564 | .flags = IORESOURCE_DMA, \ | ||
| 565 | }, \ | ||
| 566 | { \ | ||
| 567 | .start = IRQ_SPORT##x##_ERROR, \ | ||
| 568 | .end = IRQ_SPORT##x##_ERROR, \ | ||
| 569 | .flags = IORESOURCE_IRQ, \ | ||
| 570 | } \ | ||
| 571 | } | ||
| 572 | |||
| 573 | static struct resource bfin_snd_resources[][4] = { | ||
| 574 | BFIN_SND_RES(0), | ||
| 575 | BFIN_SND_RES(1), | ||
| 576 | }; | ||
| 577 | |||
| 578 | static struct platform_device bfin_pcm = { | ||
| 579 | .name = "bfin-pcm-audio", | ||
| 580 | .id = -1, | ||
| 581 | }; | ||
| 582 | #endif | ||
| 583 | |||
| 529 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | 584 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) |
| 530 | static struct platform_device bfin_i2s = { | 585 | static struct platform_device bfin_i2s = { |
| 531 | .name = "bfin-i2s", | 586 | .name = "bfin-i2s", |
| 532 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | 587 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
| 533 | /* TODO: add platform data here */ | 588 | .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), |
| 589 | .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], | ||
| 590 | .dev = { | ||
| 591 | .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], | ||
| 592 | }, | ||
| 534 | }; | 593 | }; |
| 535 | #endif | 594 | #endif |
| 536 | 595 | ||
| @@ -538,7 +597,11 @@ static struct platform_device bfin_i2s = { | |||
| 538 | static struct platform_device bfin_tdm = { | 597 | static struct platform_device bfin_tdm = { |
| 539 | .name = "bfin-tdm", | 598 | .name = "bfin-tdm", |
| 540 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | 599 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
| 541 | /* TODO: add platform data here */ | 600 | .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), |
| 601 | .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], | ||
| 602 | .dev = { | ||
| 603 | .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], | ||
| 604 | }, | ||
| 542 | }; | 605 | }; |
| 543 | #endif | 606 | #endif |
| 544 | 607 | ||
| @@ -583,7 +646,9 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
| 583 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 646 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
| 584 | .bus_num = 0, | 647 | .bus_num = 0, |
| 585 | .chip_select = 4, | 648 | .chip_select = 4, |
| 649 | .platform_data = "ad1836", | ||
| 586 | .controller_data = &ad1836_spi_chip_info, | 650 | .controller_data = &ad1836_spi_chip_info, |
| 651 | .mode = SPI_MODE_3, | ||
| 587 | }, | 652 | }, |
| 588 | #endif | 653 | #endif |
| 589 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 654 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
| @@ -1211,6 +1276,11 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
| 1211 | &ezkit_flash_device, | 1276 | &ezkit_flash_device, |
| 1212 | #endif | 1277 | #endif |
| 1213 | 1278 | ||
| 1279 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ | ||
| 1280 | defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
| 1281 | &bfin_pcm, | ||
| 1282 | #endif | ||
| 1283 | |||
| 1214 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | 1284 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) |
| 1215 | &bfin_i2s, | 1285 | &bfin_i2s, |
| 1216 | #endif | 1286 | #endif |
