diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-02-03 00:58:48 -0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-03 11:55:40 +0000 |
commit | fec691e73bf20e1c8e6ecd8e3725e4745bec4e21 (patch) | |
tree | 041ec35c18cdfec12b91e938b533e62f078195c4 /arch/arm/mach-shmobile/board-mackerel.c | |
parent | 97df81873e9c1391319dd818bc4b6856517e4939 (diff) | |
download | linux-fec691e73bf20e1c8e6ecd8e3725e4745bec4e21.tar.gz linux-fec691e73bf20e1c8e6ecd8e3725e4745bec4e21.tar.bz2 linux-fec691e73bf20e1c8e6ecd8e3725e4745bec4e21.zip |
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.c | 18 |
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) return clk_enable(clk); } -static int fsi_set_rate(struct device *dev, int is_porta, int rate, int enable) +static int fsi_b_set_rate(struct device *dev, int rate, int enable) { struct clk *fsib_clk; 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) int ackmd_bpfmd; int ret; - /* FSIA is slave mode. nothing to do here */ - if (is_porta) - return 0; - /* clock start */ switch (rate) { case 44100: @@ -957,14 +953,16 @@ fsi_set_rate_end: } static struct sh_fsi_platform_info fsi_info = { - .porta_flags = SH_FSI_BRS_INV, - - .portb_flags = SH_FSI_BRS_INV | + .port_a = { + .flags = SH_FSI_BRS_INV, + }, + .port_b = { + .flags = SH_FSI_BRS_INV | SH_FSI_BRM_INV | SH_FSI_LRS_INV | SH_FSI_FMT_SPDIF, - - .set_rate = fsi_set_rate, + .set_rate = fsi_b_set_rate, + } }; static struct resource fsi_resources[] = { |