aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2010-12-03 17:37:44 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-03 12:23:34 +0000
commit2b0e73025f74699e9cc9df60649fcc14cd02481b (patch)
tree94db597637da242bb257aabddabe0f3d249db0d5 /sound/soc/sh
parent48d78e5879b9f9e1beed341f6a30add127f43907 (diff)
downloadkernel_samsung_tuna-2b0e73025f74699e9cc9df60649fcc14cd02481b.zip
kernel_samsung_tuna-2b0e73025f74699e9cc9df60649fcc14cd02481b.tar.gz
kernel_samsung_tuna-2b0e73025f74699e9cc9df60649fcc14cd02481b.tar.bz2
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')
-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 41f4977..3927ee5 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -142,8 +142,6 @@ struct fsi_priv {
struct fsi_stream playback;
struct fsi_stream capture;
-
- u32 mst_ctrl;
};
struct fsi_core {
@@ -152,6 +150,8 @@ struct fsi_core {
u32 int_st;
u32 iemsk;
u32 imsk;
+ u32 a_mclk;
+ u32 b_mclk;
};
struct fsi_master {
@@ -505,17 +505,19 @@ static void fsi_irq_clear_status(struct fsi_priv *fsi)
static void fsi_spdif_clk_ctrl(struct fsi_priv *fsi, int enable)
{
struct fsi_master *master = fsi_get_master(fsi);
- u32 val = BP | SE;
+ u32 mask, val;
if (master->core->ver < 2) {
pr_err("fsi: register access err (%s)\n", __func__);
return;
}
- if (enable)
- fsi_master_mask_set(master, fsi->mst_ctrl, val, val);
- else
- fsi_master_mask_set(master, fsi->mst_ctrl, val, 0);
+ mask = BP | SE;
+ val = enable ? mask : 0;
+
+ fsi_is_port_a(fsi) ?
+ fsi_master_mask_set(master, master->core->a_mclk, mask, val) :
+ fsi_master_mask_set(master, master->core->b_mclk, mask, val);
}
/*
@@ -1157,12 +1159,10 @@ static int fsi_probe(struct platform_device *pdev)
/* FSI A setting */
master->fsia.base = master->base;
master->fsia.master = master;
- master->fsia.mst_ctrl = A_MST_CTLR;
/* FSI B setting */
master->fsib.base = master->base + 0x40;
master->fsib.master = master;
- master->fsib.mst_ctrl = B_MST_CTLR;
pm_runtime_enable(&pdev->dev);
pm_runtime_resume(&pdev->dev);
@@ -1249,6 +1249,8 @@ static struct fsi_core fsi2_core = {
.int_st = CPU_INT_ST,
.iemsk = CPU_IEMSK,
.imsk = CPU_IMSK,
+ .a_mclk = A_MST_CTLR,
+ .b_mclk = B_MST_CTLR,
};
static struct platform_device_id fsi_id_table[] = {