diff options
author | Scott Jiang <scott.jiang@analog.com> | 2011-03-01 04:43:50 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-05-25 08:24:14 -0400 |
commit | 6f53dbbb7fa9d29a5c8aa843f319ed10a8cde5bd (patch) | |
tree | 5f7900d5e41e5c8b884dbf0f24fa5f52a964786d | |
parent | f9691bb9674b6822ace56370a08c6fc02addf6cb (diff) |
Blackfin: boards: update ASoC resources after machine driver overhaul
Now that the Blackfin machine drivers have been updated to the
multicomponent support, update the resources to match. The pin
settings are now a board issue and removed from the driver.
Signed-off-by: Scott Jiang <scott.jiang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | arch/blackfin/include/asm/bfin_sport.h | 4 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 74 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 106 | ||||
-rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 106 |
4 files changed, 273 insertions, 17 deletions
diff --git a/arch/blackfin/include/asm/bfin_sport.h b/arch/blackfin/include/asm/bfin_sport.h index d27600c262c2..f8568a31d0ab 100644 --- a/arch/blackfin/include/asm/bfin_sport.h +++ b/arch/blackfin/include/asm/bfin_sport.h | |||
@@ -100,6 +100,10 @@ struct sport_register { | |||
100 | }; | 100 | }; |
101 | #undef __BFP | 101 | #undef __BFP |
102 | 102 | ||
103 | struct bfin_snd_platform_data { | ||
104 | const unsigned short *pin_req; | ||
105 | }; | ||
106 | |||
103 | #define bfin_read_sport_rx32(base) \ | 107 | #define bfin_read_sport_rx32(base) \ |
104 | ({ \ | 108 | ({ \ |
105 | struct sport_register *__mmrs = (void *)base; \ | 109 | struct sport_register *__mmrs = (void *)base; \ |
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 2cd2ff6f3043..e67ac7720668 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 |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 3fa335405b31..e16dc4560048 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/reboot.h> | 35 | #include <asm/reboot.h> |
36 | #include <asm/portmux.h> | 36 | #include <asm/portmux.h> |
37 | #include <asm/dpmc.h> | 37 | #include <asm/dpmc.h> |
38 | #include <asm/bfin_sport.h> | ||
38 | #ifdef CONFIG_REGULATOR_FIXED_VOLTAGE | 39 | #ifdef CONFIG_REGULATOR_FIXED_VOLTAGE |
39 | #include <linux/regulator/fixed.h> | 40 | #include <linux/regulator/fixed.h> |
40 | #endif | 41 | #endif |
@@ -2585,27 +2586,103 @@ static struct platform_device bfin_dpmc = { | |||
2585 | }, | 2586 | }, |
2586 | }; | 2587 | }; |
2587 | 2588 | ||
2588 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | 2589 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ |
2590 | defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \ | ||
2591 | defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
2592 | |||
2593 | #define SPORT_REQ(x) \ | ||
2594 | [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \ | ||
2595 | P_SPORT##x##_RFS, P_SPORT##x##_DRPRI, P_SPORT##x##_RSCLK, 0} | ||
2596 | |||
2597 | static const u16 bfin_snd_pin[][7] = { | ||
2598 | SPORT_REQ(0), | ||
2599 | SPORT_REQ(1), | ||
2600 | }; | ||
2601 | |||
2602 | static struct bfin_snd_platform_data bfin_snd_data[] = { | ||
2603 | { | ||
2604 | .pin_req = &bfin_snd_pin[0][0], | ||
2605 | }, | ||
2606 | { | ||
2607 | .pin_req = &bfin_snd_pin[1][0], | ||
2608 | }, | ||
2609 | }; | ||
2610 | |||
2611 | #define BFIN_SND_RES(x) \ | ||
2612 | [x] = { \ | ||
2613 | { \ | ||
2614 | .start = SPORT##x##_TCR1, \ | ||
2615 | .end = SPORT##x##_TCR1, \ | ||
2616 | .flags = IORESOURCE_MEM \ | ||
2617 | }, \ | ||
2618 | { \ | ||
2619 | .start = CH_SPORT##x##_RX, \ | ||
2620 | .end = CH_SPORT##x##_RX, \ | ||
2621 | .flags = IORESOURCE_DMA, \ | ||
2622 | }, \ | ||
2623 | { \ | ||
2624 | .start = CH_SPORT##x##_TX, \ | ||
2625 | .end = CH_SPORT##x##_TX, \ | ||
2626 | .flags = IORESOURCE_DMA, \ | ||
2627 | }, \ | ||
2628 | { \ | ||
2629 | .start = IRQ_SPORT##x##_ERROR, \ | ||
2630 | .end = IRQ_SPORT##x##_ERROR, \ | ||
2631 | .flags = IORESOURCE_IRQ, \ | ||
2632 | } \ | ||
2633 | } | ||
2634 | |||
2635 | static struct resource bfin_snd_resources[][4] = { | ||
2636 | BFIN_SND_RES(0), | ||
2637 | BFIN_SND_RES(1), | ||
2638 | }; | ||
2639 | |||
2640 | static struct platform_device bfin_pcm = { | ||
2641 | .name = "bfin-pcm-audio", | ||
2642 | .id = -1, | ||
2643 | }; | ||
2644 | #endif | ||
2645 | |||
2646 | #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) | ||
2647 | static struct platform_device bfin_ad73311_codec_device = { | ||
2648 | .name = "ad73311", | ||
2649 | .id = -1, | ||
2650 | }; | ||
2651 | #endif | ||
2652 | |||
2653 | #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) | ||
2589 | static struct platform_device bfin_i2s = { | 2654 | static struct platform_device bfin_i2s = { |
2590 | .name = "bfin-i2s", | 2655 | .name = "bfin-i2s", |
2591 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | 2656 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
2592 | /* TODO: add platform data here */ | 2657 | .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), |
2658 | .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], | ||
2659 | .dev = { | ||
2660 | .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], | ||
2661 | }, | ||
2593 | }; | 2662 | }; |
2594 | #endif | 2663 | #endif |
2595 | 2664 | ||
2596 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | 2665 | #if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE) |
2597 | static struct platform_device bfin_tdm = { | 2666 | static struct platform_device bfin_tdm = { |
2598 | .name = "bfin-tdm", | 2667 | .name = "bfin-tdm", |
2599 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | 2668 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
2600 | /* TODO: add platform data here */ | 2669 | .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), |
2670 | .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], | ||
2671 | .dev = { | ||
2672 | .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], | ||
2673 | }, | ||
2601 | }; | 2674 | }; |
2602 | #endif | 2675 | #endif |
2603 | 2676 | ||
2604 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | 2677 | #if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) |
2605 | static struct platform_device bfin_ac97 = { | 2678 | static struct platform_device bfin_ac97 = { |
2606 | .name = "bfin-ac97", | 2679 | .name = "bfin-ac97", |
2607 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | 2680 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
2608 | /* TODO: add platform data here */ | 2681 | .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), |
2682 | .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], | ||
2683 | .dev = { | ||
2684 | .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], | ||
2685 | }, | ||
2609 | }; | 2686 | }; |
2610 | #endif | 2687 | #endif |
2611 | 2688 | ||
@@ -2796,17 +2873,28 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
2796 | &stamp_flash_device, | 2873 | &stamp_flash_device, |
2797 | #endif | 2874 | #endif |
2798 | 2875 | ||
2799 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | 2876 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ |
2877 | defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \ | ||
2878 | defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
2879 | &bfin_pcm, | ||
2880 | #endif | ||
2881 | |||
2882 | #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) | ||
2883 | &bfin_ad73311_codec_device, | ||
2884 | #endif | ||
2885 | |||
2886 | #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) | ||
2800 | &bfin_i2s, | 2887 | &bfin_i2s, |
2801 | #endif | 2888 | #endif |
2802 | 2889 | ||
2803 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | 2890 | #if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE) |
2804 | &bfin_tdm, | 2891 | &bfin_tdm, |
2805 | #endif | 2892 | #endif |
2806 | 2893 | ||
2807 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | 2894 | #if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) |
2808 | &bfin_ac97, | 2895 | &bfin_ac97, |
2809 | #endif | 2896 | #endif |
2897 | |||
2810 | #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) | 2898 | #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) |
2811 | #if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ | 2899 | #if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ |
2812 | defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE) | 2900 | defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE) |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 0f44becafaa3..311bf9970fe7 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/gpio.h> | 22 | #include <asm/gpio.h> |
23 | #include <asm/nand.h> | 23 | #include <asm/nand.h> |
24 | #include <asm/dpmc.h> | 24 | #include <asm/dpmc.h> |
25 | #include <asm/bfin_sport.h> | ||
25 | #include <asm/portmux.h> | 26 | #include <asm/portmux.h> |
26 | #include <asm/bfin_sdh.h> | 27 | #include <asm/bfin_sdh.h> |
27 | #include <mach/bf54x_keys.h> | 28 | #include <mach/bf54x_keys.h> |
@@ -1320,27 +1321,110 @@ static struct platform_device bfin_dpmc = { | |||
1320 | }, | 1321 | }, |
1321 | }; | 1322 | }; |
1322 | 1323 | ||
1323 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | 1324 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ |
1325 | defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \ | ||
1326 | defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
1327 | |||
1328 | #define SPORT_REQ(x) \ | ||
1329 | [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \ | ||
1330 | P_SPORT##x##_RFS, P_SPORT##x##_DRPRI, P_SPORT##x##_RSCLK, 0} | ||
1331 | |||
1332 | static const u16 bfin_snd_pin[][7] = { | ||
1333 | SPORT_REQ(0), | ||
1334 | SPORT_REQ(1), | ||
1335 | }; | ||
1336 | |||
1337 | static struct bfin_snd_platform_data bfin_snd_data[] = { | ||
1338 | { | ||
1339 | .pin_req = &bfin_snd_pin[0][0], | ||
1340 | }, | ||
1341 | { | ||
1342 | .pin_req = &bfin_snd_pin[1][0], | ||
1343 | }, | ||
1344 | }; | ||
1345 | |||
1346 | #define BFIN_SND_RES(x) \ | ||
1347 | [x] = { \ | ||
1348 | { \ | ||
1349 | .start = SPORT##x##_TCR1, \ | ||
1350 | .end = SPORT##x##_TCR1, \ | ||
1351 | .flags = IORESOURCE_MEM \ | ||
1352 | }, \ | ||
1353 | { \ | ||
1354 | .start = CH_SPORT##x##_RX, \ | ||
1355 | .end = CH_SPORT##x##_RX, \ | ||
1356 | .flags = IORESOURCE_DMA, \ | ||
1357 | }, \ | ||
1358 | { \ | ||
1359 | .start = CH_SPORT##x##_TX, \ | ||
1360 | .end = CH_SPORT##x##_TX, \ | ||
1361 | .flags = IORESOURCE_DMA, \ | ||
1362 | }, \ | ||
1363 | { \ | ||
1364 | .start = IRQ_SPORT##x##_ERROR, \ | ||
1365 | .end = IRQ_SPORT##x##_ERROR, \ | ||
1366 | .flags = IORESOURCE_IRQ, \ | ||
1367 | } \ | ||
1368 | } | ||
1369 | |||
1370 | static struct resource bfin_snd_resources[][4] = { | ||
1371 | BFIN_SND_RES(0), | ||
1372 | BFIN_SND_RES(1), | ||
1373 | }; | ||
1374 | |||
1375 | static struct platform_device bfin_pcm = { | ||
1376 | .name = "bfin-pcm-audio", | ||
1377 | .id = -1, | ||
1378 | }; | ||
1379 | #endif | ||
1380 | |||
1381 | #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) | ||
1382 | static struct platform_device bfin_ad73311_codec_device = { | ||
1383 | .name = "ad73311", | ||
1384 | .id = -1, | ||
1385 | }; | ||
1386 | #endif | ||
1387 | |||
1388 | #if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE) | ||
1389 | static struct platform_device bfin_ad1980_codec_device = { | ||
1390 | .name = "ad1980", | ||
1391 | .id = -1, | ||
1392 | }; | ||
1393 | #endif | ||
1394 | |||
1395 | #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) | ||
1324 | static struct platform_device bfin_i2s = { | 1396 | static struct platform_device bfin_i2s = { |
1325 | .name = "bfin-i2s", | 1397 | .name = "bfin-i2s", |
1326 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | 1398 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
1327 | /* TODO: add platform data here */ | 1399 | .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), |
1400 | .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], | ||
1401 | .dev = { | ||
1402 | .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], | ||
1403 | }, | ||
1328 | }; | 1404 | }; |
1329 | #endif | 1405 | #endif |
1330 | 1406 | ||
1331 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | 1407 | #if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE) |
1332 | static struct platform_device bfin_tdm = { | 1408 | static struct platform_device bfin_tdm = { |
1333 | .name = "bfin-tdm", | 1409 | .name = "bfin-tdm", |
1334 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | 1410 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
1335 | /* TODO: add platform data here */ | 1411 | .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), |
1412 | .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], | ||
1413 | .dev = { | ||
1414 | .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], | ||
1415 | }, | ||
1336 | }; | 1416 | }; |
1337 | #endif | 1417 | #endif |
1338 | 1418 | ||
1339 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | 1419 | #if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) |
1340 | static struct platform_device bfin_ac97 = { | 1420 | static struct platform_device bfin_ac97 = { |
1341 | .name = "bfin-ac97", | 1421 | .name = "bfin-ac97", |
1342 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | 1422 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
1343 | /* TODO: add platform data here */ | 1423 | .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), |
1424 | .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], | ||
1425 | .dev = { | ||
1426 | .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], | ||
1427 | }, | ||
1344 | }; | 1428 | }; |
1345 | #endif | 1429 | #endif |
1346 | 1430 | ||
@@ -1458,6 +1542,16 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
1458 | &ezkit_flash_device, | 1542 | &ezkit_flash_device, |
1459 | #endif | 1543 | #endif |
1460 | 1544 | ||
1545 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ | ||
1546 | defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \ | ||
1547 | defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
1548 | &bfin_pcm, | ||
1549 | #endif | ||
1550 | |||
1551 | #if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE) | ||
1552 | &bfin_ad1980_codec_device, | ||
1553 | #endif | ||
1554 | |||
1461 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | 1555 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) |
1462 | &bfin_i2s, | 1556 | &bfin_i2s, |
1463 | #endif | 1557 | #endif |