aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf533/boards
diff options
context:
space:
mode:
authorBob Liu <lliubbo@gmail.com>2011-12-11 21:57:32 -0500
committerBob Liu <lliubbo@gmail.com>2012-01-08 21:26:14 -0500
commite7da266265e70f37b6702314dcb3b71c3f4a7def (patch)
tree652da585a94bed876205a859f7c0ef79ee9982c6 /arch/blackfin/mach-bf533/boards
parent1f11a10d658b817f736c5e049ba8edc3fe8f638c (diff)
blackfin: bf533-stamp: add missed patches for new asoc driver
ASoC drivers changed between 2.6.37 and 3.0, but we didn't apply these changes in bf533 board file. So apply missed patches for asoc since 2.6.37 together. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin/mach-bf533/boards')
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c168
1 files changed, 160 insertions, 8 deletions
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index d12d4de73e6d..2ba4d0b4e252 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -541,27 +541,150 @@ static struct platform_device bfin_dpmc = {
541 }, 541 },
542}; 542};
543 543
544#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
545 defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) \
546 || defined(CONFIG_SND_BF5XX_AC97) || \
547 defined(CONFIG_SND_BF5XX_AC97_MODULE)
548
549#include <asm/bfin_sport.h>
550
551#define SPORT_REQ(x) \
552 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \
553 P_SPORT##x##_RFS, P_SPORT##x##_DRPRI, P_SPORT##x##_RSCLK, 0}
554
555static const u16 bfin_snd_pin[][7] = {
556 SPORT_REQ(0),
557 SPORT_REQ(1),
558};
559
560static struct bfin_snd_platform_data bfin_snd_data[] = {
561 {
562 .pin_req = &bfin_snd_pin[0][0],
563 },
564 {
565 .pin_req = &bfin_snd_pin[1][0],
566 },
567};
568
569#define BFIN_SND_RES(x) \
570 [x] = { \
571 { \
572 .start = SPORT##x##_TCR1, \
573 .end = SPORT##x##_TCR1, \
574 .flags = IORESOURCE_MEM \
575 }, \
576 { \
577 .start = CH_SPORT##x##_RX, \
578 .end = CH_SPORT##x##_RX, \
579 .flags = IORESOURCE_DMA, \
580 }, \
581 { \
582 .start = CH_SPORT##x##_TX, \
583 .end = CH_SPORT##x##_TX, \
584 .flags = IORESOURCE_DMA, \
585 }, \
586 { \
587 .start = IRQ_SPORT##x##_ERROR, \
588 .end = IRQ_SPORT##x##_ERROR, \
589 .flags = IORESOURCE_IRQ, \
590 } \
591 }
592
593static struct resource bfin_snd_resources[][4] = {
594 BFIN_SND_RES(0),
595 BFIN_SND_RES(1),
596};
597#endif
598
544#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 599#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
600static struct platform_device bfin_i2s_pcm = {
601 .name = "bfin-i2s-pcm-audio",
602 .id = -1,
603};
604#endif
605
606#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
607static struct platform_device bfin_tdm_pcm = {
608 .name = "bfin-tdm-pcm-audio",
609 .id = -1,
610};
611#endif
612
613#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
614static struct platform_device bfin_ac97_pcm = {
615 .name = "bfin-ac97-pcm-audio",
616 .id = -1,
617};
618#endif
619
620#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
621 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
622static const unsigned ad73311_gpio[] = {
623 GPIO_PF4,
624};
625
626static struct platform_device bfin_ad73311_machine = {
627 .name = "bfin-snd-ad73311",
628 .id = 1,
629 .dev = {
630 .platform_data = (void *)ad73311_gpio,
631 },
632};
633#endif
634
635#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE)
636static struct platform_device bfin_ad73311_codec_device = {
637 .name = "ad73311",
638 .id = -1,
639};
640#endif
641
642#if defined(CONFIG_SND_SOC_AD74111) || defined(CONFIG_SND_SOC_AD74111_MODULE)
643static struct platform_device bfin_ad74111_codec_device = {
644 .name = "ad74111",
645 .id = -1,
646};
647#endif
648
649#if defined(CONFIG_SND_BF5XX_SOC_I2S) || \
650 defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
545static struct platform_device bfin_i2s = { 651static struct platform_device bfin_i2s = {
546 .name = "bfin-i2s", 652 .name = "bfin-i2s",
547 .id = CONFIG_SND_BF5XX_SPORT_NUM, 653 .id = CONFIG_SND_BF5XX_SPORT_NUM,
548 /* TODO: add platform data here */ 654 .num_resources =
655 ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
656 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
657 .dev = {
658 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
659 },
549}; 660};
550#endif 661#endif
551 662
552#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 663#if defined(CONFIG_SND_BF5XX_SOC_TDM) || \
664 defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE)
553static struct platform_device bfin_tdm = { 665static struct platform_device bfin_tdm = {
554 .name = "bfin-tdm", 666 .name = "bfin-tdm",
555 .id = CONFIG_SND_BF5XX_SPORT_NUM, 667 .id = CONFIG_SND_BF5XX_SPORT_NUM,
556 /* TODO: add platform data here */ 668 .num_resources =
669 ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
670 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
671 .dev = {
672 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
673 },
557}; 674};
558#endif 675#endif
559 676
560#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 677#if defined(CONFIG_SND_BF5XX_SOC_AC97) || \
678 defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
561static struct platform_device bfin_ac97 = { 679static struct platform_device bfin_ac97 = {
562 .name = "bfin-ac97", 680 .name = "bfin-ac97",
563 .id = CONFIG_SND_BF5XX_SPORT_NUM, 681 .id = CONFIG_SND_BF5XX_SPORT_NUM,
564 /* TODO: add platform data here */ 682 .num_resources =
683 ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
684 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
685 .dev = {
686 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
687 },
565}; 688};
566#endif 689#endif
567 690
@@ -597,7 +720,8 @@ static struct platform_device *stamp_devices[] __initdata = {
597#endif 720#endif
598#endif 721#endif
599 722
600#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 723#if defined(CONFIG_SERIAL_BFIN_SPORT) || \
724 defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
601#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 725#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
602 &bfin_sport0_uart_device, 726 &bfin_sport0_uart_device,
603#endif 727#endif
@@ -619,14 +743,42 @@ static struct platform_device *stamp_devices[] __initdata = {
619#endif 743#endif
620 744
621#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 745#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
622 &bfin_i2s, 746 &bfin_i2s_pcm,
623#endif 747#endif
624 748
625#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 749#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
626 &bfin_tdm, 750 &bfin_tdm_pcm,
627#endif 751#endif
628 752
629#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 753#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
754 &bfin_ac97_pcm,
755#endif
756
757#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
758 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
759 &bfin_ad73311_machine,
760#endif
761
762#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE)
763 &bfin_ad73311_codec_device,
764#endif
765
766#if defined(CONFIG_SND_SOC_AD74111) || defined(CONFIG_SND_SOC_AD74111_MODULE)
767 &bfin_ad74111_codec_device,
768#endif
769
770#if defined(CONFIG_SND_BF5XX_SOC_I2S) || \
771 defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
772 &bfin_i2s,
773#endif
774
775#if defined(CONFIG_SND_BF5XX_SOC_TDM) || \
776 defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE)
777 &bfin_tdm,
778#endif
779
780#if defined(CONFIG_SND_BF5XX_SOC_AC97) || \
781 defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
630 &bfin_ac97, 782 &bfin_ac97,
631#endif 783#endif
632}; 784};