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 /arch/blackfin/mach-bf537 | |
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>
Diffstat (limited to 'arch/blackfin/mach-bf537')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 106 |
1 files changed, 97 insertions, 9 deletions
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) |