summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/ssi.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-10-17 22:50:59 -0700
committerMark Brown <broonie@linaro.org>2013-10-20 17:28:37 +0100
commitcdcfcac968a1ec648434892b6addd80e66a5a892 (patch)
treefbe99d504bcf2b169c62674523a14aabbb54a2be /sound/soc/sh/rcar/ssi.c
parent2192f81c53a7879c803f0f7d6c49645fdf6c2f6a (diff)
downloadop-kernel-dev-cdcfcac968a1ec648434892b6addd80e66a5a892.zip
op-kernel-dev-cdcfcac968a1ec648434892b6addd80e66a5a892.tar.gz
ASoC: rcar: add rsnd_scu_hpbif_is_enable()
Current SSI needs RSND_SSI_DEPENDENT flag to decide dependent/independent mode. And SCU needs RSND_SCU_USE_HPBIF flag to decide HPBIF is enable/disable. But these 2 means same things. This patch adds new rsnd_scu_hpbif_is_enable() function, and merges above methods. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/sh/rcar/ssi.c')
-rw-r--r--sound/soc/sh/rcar/ssi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index fae26d3..7613256 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -106,6 +106,7 @@ static void rsnd_ssi_mode_init(struct rsnd_priv *priv,
{
struct device *dev = rsnd_priv_to_dev(priv);
struct rsnd_ssi *ssi;
+ struct rsnd_mod *scu;
u32 flags;
u32 val;
int i;
@@ -116,13 +117,14 @@ static void rsnd_ssi_mode_init(struct rsnd_priv *priv,
ssiu->ssi_mode0 = 0;
for_each_rsnd_ssi(ssi, priv, i) {
flags = rsnd_ssi_mode_flags(ssi);
+ scu = rsnd_scu_mod_get(priv, rsnd_mod_id(&ssi->mod));
/* see also BUSIF_MODE */
- if (!(flags & RSND_SSI_DEPENDENT)) {
+ if (rsnd_scu_hpbif_is_enable(scu)) {
+ dev_dbg(dev, "SSI%d uses DEPENDENT mode\n", i);
+ } else {
ssiu->ssi_mode0 |= (1 << i);
dev_dbg(dev, "SSI%d uses INDEPENDENT mode\n", i);
- } else {
- dev_dbg(dev, "SSI%d uses DEPENDENT mode\n", i);
}
}
OpenPOWER on IntegriCloud