aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/fsi.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2010-12-03 03:37:44 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-03 07:23:34 -0500
commit2b0e73025f74699e9cc9df60649fcc14cd02481b (patch)
tree94db597637da242bb257aabddabe0f3d249db0d5 /sound/soc/sh/fsi.c
parent48d78e5879b9f9e1beed341f6a30add127f43907 (diff)
ASoC: sh: fsi: change fsi->mst_ctrl to master->a/b_mclk
There was a strange part where fsi->xxx had been used for fsi_master_xxx function instead of master->xxx in current FSI. This patch modify it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/sh/fsi.c')
-rw-r--r--sound/soc/sh/fsi.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 41f49776d6f2..3927ee598912 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -142,8 +142,6 @@ struct fsi_priv {
142 142
143 struct fsi_stream playback; 143 struct fsi_stream playback;
144 struct fsi_stream capture; 144 struct fsi_stream capture;
145
146 u32 mst_ctrl;
147}; 145};
148 146
149struct fsi_core { 147struct fsi_core {
@@ -152,6 +150,8 @@ struct fsi_core {
152 u32 int_st; 150 u32 int_st;
153 u32 iemsk; 151 u32 iemsk;
154 u32 imsk; 152 u32 imsk;
153 u32 a_mclk;
154 u32 b_mclk;
155}; 155};
156 156
157struct fsi_master { 157struct fsi_master {
@@ -505,17 +505,19 @@ static void fsi_irq_clear_status(struct fsi_priv *fsi)
505static void fsi_spdif_clk_ctrl(struct fsi_priv *fsi, int enable) 505static void fsi_spdif_clk_ctrl(struct fsi_priv *fsi, int enable)
506{ 506{
507 struct fsi_master *master = fsi_get_master(fsi); 507 struct fsi_master *master = fsi_get_master(fsi);
508 u32 val = BP | SE; 508 u32 mask, val;
509 509
510 if (master->core->ver < 2) { 510 if (master->core->ver < 2) {
511 pr_err("fsi: register access err (%s)\n", __func__); 511 pr_err("fsi: register access err (%s)\n", __func__);
512 return; 512 return;
513 } 513 }
514 514
515 if (enable) 515 mask = BP | SE;
516 fsi_master_mask_set(master, fsi->mst_ctrl, val, val); 516 val = enable ? mask : 0;
517 else 517
518 fsi_master_mask_set(master, fsi->mst_ctrl, val, 0); 518 fsi_is_port_a(fsi) ?
519 fsi_master_mask_set(master, master->core->a_mclk, mask, val) :
520 fsi_master_mask_set(master, master->core->b_mclk, mask, val);
519} 521}
520 522
521/* 523/*
@@ -1157,12 +1159,10 @@ static int fsi_probe(struct platform_device *pdev)
1157 /* FSI A setting */ 1159 /* FSI A setting */
1158 master->fsia.base = master->base; 1160 master->fsia.base = master->base;
1159 master->fsia.master = master; 1161 master->fsia.master = master;
1160 master->fsia.mst_ctrl = A_MST_CTLR;
1161 1162
1162 /* FSI B setting */ 1163 /* FSI B setting */
1163 master->fsib.base = master->base + 0x40; 1164 master->fsib.base = master->base + 0x40;
1164 master->fsib.master = master; 1165 master->fsib.master = master;
1165 master->fsib.mst_ctrl = B_MST_CTLR;
1166 1166
1167 pm_runtime_enable(&pdev->dev); 1167 pm_runtime_enable(&pdev->dev);
1168 pm_runtime_resume(&pdev->dev); 1168 pm_runtime_resume(&pdev->dev);
@@ -1249,6 +1249,8 @@ static struct fsi_core fsi2_core = {
1249 .int_st = CPU_INT_ST, 1249 .int_st = CPU_INT_ST,
1250 .iemsk = CPU_IEMSK, 1250 .iemsk = CPU_IEMSK,
1251 .imsk = CPU_IMSK, 1251 .imsk = CPU_IMSK,
1252 .a_mclk = A_MST_CTLR,
1253 .b_mclk = B_MST_CTLR,
1252}; 1254};
1253 1255
1254static struct platform_device_id fsi_id_table[] = { 1256static struct platform_device_id fsi_id_table[] = {