aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/fsi.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-11-07 01:05:25 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-08 06:02:00 -0500
commit65ff03f4624d12ad6c19a01a0af7385eda09e4a6 (patch)
treeb77f2393982b4a8cc53c06e7d9825145727e308c /sound/soc/sh/fsi.c
parent202113912ba117b5c5f36e45529921b4cca4be6a (diff)
ASoC: fsi: add valid data position control support
FSI2 can control valid data position, like package in front/back or stream mode (16bit x 2). But current fsi driver is assuming it was in-back. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/sh/fsi.c')
-rw-r--r--sound/soc/sh/fsi.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index e620cb17cd2c..99ed61024166 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -32,7 +32,9 @@
32#define REG_DIDT 0x0020 32#define REG_DIDT 0x0020
33#define REG_DODT 0x0024 33#define REG_DODT 0x0024
34#define REG_MUTE_ST 0x0028 34#define REG_MUTE_ST 0x0028
35#define REG_OUT_DMAC 0x002C
35#define REG_OUT_SEL 0x0030 36#define REG_OUT_SEL 0x0030
37#define REG_IN_DMAC 0x0038
36 38
37/* master register */ 39/* master register */
38#define MST_CLK_RST 0x0210 40#define MST_CLK_RST 0x0210
@@ -886,6 +888,8 @@ static int fsi_hw_startup(struct fsi_priv *fsi,
886 int is_play, 888 int is_play,
887 struct device *dev) 889 struct device *dev)
888{ 890{
891 struct fsi_master *master = fsi_get_master(fsi);
892 int fsi_ver = master->core->ver;
889 u32 flags = fsi_get_info_flags(fsi); 893 u32 flags = fsi_get_info_flags(fsi);
890 u32 data = 0; 894 u32 data = 0;
891 895
@@ -920,6 +924,17 @@ static int fsi_hw_startup(struct fsi_priv *fsi,
920 fsi_reg_mask_set(fsi, OUT_SEL, DMMD, DMMD); 924 fsi_reg_mask_set(fsi, OUT_SEL, DMMD, DMMD);
921 } 925 }
922 926
927 /*
928 * FIXME
929 *
930 * FSI driver assumed that data package is in-back.
931 * FSI2 chip can select it.
932 */
933 if (fsi_ver >= 2) {
934 fsi_reg_write(fsi, OUT_DMAC, (1 << 4));
935 fsi_reg_write(fsi, IN_DMAC, (1 << 4));
936 }
937
923 /* irq clear */ 938 /* irq clear */
924 fsi_irq_disable(fsi, is_play); 939 fsi_irq_disable(fsi, is_play);
925 fsi_irq_clear_status(fsi); 940 fsi_irq_clear_status(fsi);