| From 0b9023fbf5f7ccf438450b40fc4e241ede107630 Mon Sep 17 00:00:00 2001 |
| From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
| Date: Fri, 11 Oct 2013 00:07:01 -0700 |
| Subject: ASoC: rcar: fixup generation checker |
| |
| Current rcar is using rsnd_is_gen1/gen2() to checking its |
| IP generation, but it needs data mask. |
| This patch fixes it up. |
| |
| Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
| Signed-off-by: Mark Brown <broonie@linaro.org> |
| (cherry picked from commit c5d5a58d7ff977289c4bba8eae447c9afa66516b) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| include/sound/rcar_snd.h | 1 + |
| sound/soc/sh/rcar/rsnd.h | 4 ++-- |
| 2 files changed, 3 insertions(+), 2 deletions(-) |
| |
| diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h |
| index fe66533e9b7a..fb0a312bcb81 100644 |
| --- a/include/sound/rcar_snd.h |
| +++ b/include/sound/rcar_snd.h |
| @@ -68,6 +68,7 @@ struct rsnd_scu_platform_info { |
| * |
| * A : generation |
| */ |
| +#define RSND_GEN_MASK (0xF << 0) |
| #define RSND_GEN1 (1 << 0) /* fixme */ |
| #define RSND_GEN2 (2 << 0) /* fixme */ |
| |
| diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h |
| index 3868aaf41cc4..3b71c3f2bfaa 100644 |
| --- a/sound/soc/sh/rcar/rsnd.h |
| +++ b/sound/soc/sh/rcar/rsnd.h |
| @@ -216,8 +216,8 @@ int rsnd_gen_path_exit(struct rsnd_priv *priv, |
| void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv, |
| struct rsnd_mod *mod, |
| enum rsnd_reg reg); |
| -#define rsnd_is_gen1(s) ((s)->info->flags & RSND_GEN1) |
| -#define rsnd_is_gen2(s) ((s)->info->flags & RSND_GEN2) |
| +#define rsnd_is_gen1(s) (((s)->info->flags & RSND_GEN_MASK) == RSND_GEN1) |
| +#define rsnd_is_gen2(s) (((s)->info->flags & RSND_GEN_MASK) == RSND_GEN2) |
| |
| /* |
| * R-Car ADG |
| -- |
| 1.8.5.rc3 |
| |