aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-mackerel.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-02-03 03:58:48 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-03 06:55:40 -0500
commitfec691e73bf20e1c8e6ecd8e3725e4745bec4e21 (patch)
tree041ec35c18cdfec12b91e938b533e62f078195c4 /arch/arm/mach-shmobile/board-mackerel.c
parent97df81873e9c1391319dd818bc4b6856517e4939 (diff)
ASoC: fsi: PortA/B information was controlled by sh_fsi_port_info
Current FSI got each PortA/B parameter by porta_flags/portb_flags from platform. And .set_rate function was shared for PortA/B. This structure was not readable and not flexible. This patch adds sh_fsi_port_info, and its own settings was added on each platform. it is preparation for DMAEngine support Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch/arm/mach-shmobile/board-mackerel.c')
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 9b42fbd10f8e..28d6d1f9dad4 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -901,7 +901,7 @@ static int __fsi_set_round_rate(struct clk *clk, long rate, int enable)
901 return clk_enable(clk); 901 return clk_enable(clk);
902} 902}
903 903
904static int fsi_set_rate(struct device *dev, int is_porta, int rate, int enable) 904static int fsi_b_set_rate(struct device *dev, int rate, int enable)
905{ 905{
906 struct clk *fsib_clk; 906 struct clk *fsib_clk;
907 struct clk *fdiv_clk = &sh7372_fsidivb_clk; 907 struct clk *fdiv_clk = &sh7372_fsidivb_clk;
@@ -910,10 +910,6 @@ static int fsi_set_rate(struct device *dev, int is_porta, int rate, int enable)
910 int ackmd_bpfmd; 910 int ackmd_bpfmd;
911 int ret; 911 int ret;
912 912
913 /* FSIA is slave mode. nothing to do here */
914 if (is_porta)
915 return 0;
916
917 /* clock start */ 913 /* clock start */
918 switch (rate) { 914 switch (rate) {
919 case 44100: 915 case 44100:
@@ -957,14 +953,16 @@ fsi_set_rate_end:
957} 953}
958 954
959static struct sh_fsi_platform_info fsi_info = { 955static struct sh_fsi_platform_info fsi_info = {
960 .porta_flags = SH_FSI_BRS_INV, 956 .port_a = {
961 957 .flags = SH_FSI_BRS_INV,
962 .portb_flags = SH_FSI_BRS_INV | 958 },
959 .port_b = {
960 .flags = SH_FSI_BRS_INV |
963 SH_FSI_BRM_INV | 961 SH_FSI_BRM_INV |
964 SH_FSI_LRS_INV | 962 SH_FSI_LRS_INV |
965 SH_FSI_FMT_SPDIF, 963 SH_FSI_FMT_SPDIF,
966 964 .set_rate = fsi_b_set_rate,
967 .set_rate = fsi_set_rate, 965 }
968}; 966};
969 967
970static struct resource fsi_resources[] = { 968static struct resource fsi_resources[] = {