aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/sh/rcar/adg.c10
-rw-r--r--sound/soc/sh/rcar/rsnd.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 2935bbf1811b..9430097979a5 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -21,6 +21,7 @@ struct rsnd_adg {
21 21
22 int rate_of_441khz_div_6; 22 int rate_of_441khz_div_6;
23 int rate_of_48khz_div_6; 23 int rate_of_48khz_div_6;
24 u32 ckr;
24}; 25};
25 26
26#define for_each_rsnd_clk(pos, adg, i) \ 27#define for_each_rsnd_clk(pos, adg, i) \
@@ -115,6 +116,11 @@ int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate)
115 116
116found_clock: 117found_clock:
117 118
119 /* see rsnd_adg_ssi_clk_init() */
120 rsnd_mod_bset(mod, SSICKR, 0x00FF0000, adg->ckr);
121 rsnd_mod_write(mod, BRRA, 0x00000002); /* 1/6 */
122 rsnd_mod_write(mod, BRRB, 0x00000002); /* 1/6 */
123
118 /* 124 /*
119 * This "mod" = "ssi" here. 125 * This "mod" = "ssi" here.
120 * we can get "ssi id" from mod 126 * we can get "ssi id" from mod
@@ -181,9 +187,7 @@ static void rsnd_adg_ssi_clk_init(struct rsnd_priv *priv, struct rsnd_adg *adg)
181 } 187 }
182 } 188 }
183 189
184 rsnd_priv_bset(priv, SSICKR, 0x00FF0000, ckr); 190 adg->ckr = ckr;
185 rsnd_priv_write(priv, BRRA, 0x00000002); /* 1/6 */
186 rsnd_priv_write(priv, BRRB, 0x00000002); /* 1/6 */
187} 191}
188 192
189int rsnd_adg_probe(struct platform_device *pdev, 193int rsnd_adg_probe(struct platform_device *pdev,
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 9cc6986a8cfb..3868aaf41cc4 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -78,10 +78,6 @@ struct rsnd_dai_stream;
78#define rsnd_mod_bset(m, r, s, d) \ 78#define rsnd_mod_bset(m, r, s, d) \
79 rsnd_bset(rsnd_mod_to_priv(m), m, RSND_REG_##r, s, d) 79 rsnd_bset(rsnd_mod_to_priv(m), m, RSND_REG_##r, s, d)
80 80
81#define rsnd_priv_read(p, r) rsnd_read(p, NULL, RSND_REG_##r)
82#define rsnd_priv_write(p, r, d) rsnd_write(p, NULL, RSND_REG_##r, d)
83#define rsnd_priv_bset(p, r, s, d) rsnd_bset(p, NULL, RSND_REG_##r, s, d)
84
85u32 rsnd_read(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg); 81u32 rsnd_read(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg);
86void rsnd_write(struct rsnd_priv *priv, struct rsnd_mod *mod, 82void rsnd_write(struct rsnd_priv *priv, struct rsnd_mod *mod,
87 enum rsnd_reg reg, u32 data); 83 enum rsnd_reg reg, u32 data);