diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-08 15:57:08 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-08 15:57:08 -0800 |
commit | 2217cafbe264a33adc4a3992127137ea624108fd (patch) | |
tree | 2bc056d520a5957cd2f2f9269be9746190525868 | |
parent | 120a6c8453e17a070d872b8cc8be079d5e8800ac (diff) | |
download | ltsi-kernel-2217cafbe264a33adc4a3992127137ea624108fd.tar.gz |
Update KERNEL_VERSION to 3.14.28
21 files changed, 1391 insertions, 851 deletions
diff --git a/KERNEL_VERSION b/KERNEL_VERSION index 8cd982185bc32..91471d2231bf6 100644 --- a/KERNEL_VERSION +++ b/KERNEL_VERSION @@ -1 +1 @@ -3.14.24 +3.14.28 diff --git a/patches.ltsi/ltsi-makefile-addition.patch b/patches.ltsi/ltsi-makefile-addition.patch index 3b3de892da8bd..53a8fa76e9dae 100644 --- a/patches.ltsi/ltsi-makefile-addition.patch +++ b/patches.ltsi/ltsi-makefile-addition.patch @@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> @@ -1,7 +1,7 @@ VERSION = 3 PATCHLEVEL = 14 - SUBLEVEL = 24 + SUBLEVEL = 28 -EXTRAVERSION = +EXTRAVERSION = -ltsi NAME = Remembering Coco diff --git a/patches.renesas/0031-ASoC-rsnd-non-0-is-error-on-probe.patch b/patches.renesas/0031-ASoC-rsnd-non-0-is-error-on-probe.patch index c13fd041b4b12..65bf2d5bf4021 100644 --- a/patches.renesas/0031-ASoC-rsnd-non-0-is-error-on-probe.patch +++ b/patches.renesas/0031-ASoC-rsnd-non-0-is-error-on-probe.patch @@ -10,14 +10,12 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 106d2eff563b2abdb34872cb8ec7b19766edaffc) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - sound/soc/sh/rcar/core.c | 10 +++++----- + sound/soc/sh/rcar/core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index ed8611f9c64f..4fd57351c54a 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c -@@ -737,23 +737,23 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -736,23 +736,23 @@ static int rsnd_probe(struct platform_de * init each module */ ret = rsnd_gen_probe(pdev, info, priv); @@ -46,6 +44,3 @@ index ed8611f9c64f..4fd57351c54a 100644 return ret; /* --- -2.1.2 - diff --git a/patches.renesas/0042-ASoC-rsnd-rsnd_ssi_probe-goes-forwarder-than-rsnd_sc.patch b/patches.renesas/0042-ASoC-rsnd-rsnd_ssi_probe-goes-forwarder-than-rsnd_sc.patch index b9382376a7dd8..c34f05a667e6d 100644 --- a/patches.renesas/0042-ASoC-rsnd-rsnd_ssi_probe-goes-forwarder-than-rsnd_sc.patch +++ b/patches.renesas/0042-ASoC-rsnd-rsnd_ssi_probe-goes-forwarder-than-rsnd_sc.patch @@ -11,14 +11,12 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit eb854f6dff24a59378acc8d8eda57a3543a25acc) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - sound/soc/sh/rcar/core.c | 6 +++--- + sound/soc/sh/rcar/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index b5af6f5145ea..f316a663e4d3 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c -@@ -763,15 +763,15 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -762,15 +762,15 @@ static int rsnd_probe(struct platform_de if (ret) return ret; @@ -37,6 +35,3 @@ index b5af6f5145ea..f316a663e4d3 100644 if (ret) return ret; --- -2.1.2 - diff --git a/patches.renesas/0050-ASoC-rsnd-remove-verbose-function-parameter.patch b/patches.renesas/0050-ASoC-rsnd-remove-verbose-function-parameter.patch index ad829db3bdc8e..4a136330b51d5 100644 --- a/patches.renesas/0050-ASoC-rsnd-remove-verbose-function-parameter.patch +++ b/patches.renesas/0050-ASoC-rsnd-remove-verbose-function-parameter.patch @@ -11,19 +11,17 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 5da39cf30454bbf3e92f56935e7d137e5bd2c830) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - sound/soc/sh/rcar/adg.c | 1 - - sound/soc/sh/rcar/core.c | 11 +++++------ - sound/soc/sh/rcar/gen.c | 7 ++----- - sound/soc/sh/rcar/rsnd.h | 5 +---- - sound/soc/sh/rcar/scu.c | 2 +- - sound/soc/sh/rcar/ssi.c | 2 +- + sound/soc/sh/rcar/adg.c | 1 - + sound/soc/sh/rcar/core.c | 11 +++++------ + sound/soc/sh/rcar/gen.c | 7 ++----- + sound/soc/sh/rcar/rsnd.h | 5 +---- + sound/soc/sh/rcar/scu.c | 2 +- + sound/soc/sh/rcar/ssi.c | 2 +- 6 files changed, 10 insertions(+), 18 deletions(-) -diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c -index af9e4407aa89..69d9394f3697 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c -@@ -391,7 +391,6 @@ static void rsnd_adg_ssi_clk_init(struct rsnd_priv *priv, struct rsnd_adg *adg) +@@ -391,7 +391,6 @@ static void rsnd_adg_ssi_clk_init(struct } int rsnd_adg_probe(struct platform_device *pdev, @@ -31,11 +29,9 @@ index af9e4407aa89..69d9394f3697 100644 struct rsnd_priv *priv) { struct rsnd_adg *adg; -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index 5f6d9fef23d1..b2370f68e645 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c -@@ -577,7 +577,6 @@ static const struct snd_soc_dai_ops rsnd_soc_dai_ops = { +@@ -577,7 +577,6 @@ static const struct snd_soc_dai_ops rsnd }; static int rsnd_dai_probe(struct platform_device *pdev, @@ -43,7 +39,7 @@ index 5f6d9fef23d1..b2370f68e645 100644 struct rsnd_priv *priv) { struct snd_soc_dai_driver *drv; -@@ -773,23 +772,23 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -772,23 +771,23 @@ static int rsnd_probe(struct platform_de /* * init each module */ @@ -72,11 +68,9 @@ index 5f6d9fef23d1..b2370f68e645 100644 if (ret) return ret; -diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c -index 0a43b906ffdf..bcb98f4be831 100644 --- a/sound/soc/sh/rcar/gen.c +++ b/sound/soc/sh/rcar/gen.c -@@ -276,7 +276,6 @@ static int rsnd_gen2_regmap_init(struct rsnd_priv *priv, struct rsnd_gen *gen) +@@ -276,7 +276,6 @@ static int rsnd_gen2_regmap_init(struct } static int rsnd_gen2_probe(struct platform_device *pdev, @@ -84,7 +78,7 @@ index 0a43b906ffdf..bcb98f4be831 100644 struct rsnd_priv *priv) { struct device *dev = rsnd_priv_to_dev(priv); -@@ -374,7 +373,6 @@ static int rsnd_gen1_regmap_init(struct rsnd_priv *priv, struct rsnd_gen *gen) +@@ -374,7 +373,6 @@ static int rsnd_gen1_regmap_init(struct } static int rsnd_gen1_probe(struct platform_device *pdev, @@ -92,7 +86,7 @@ index 0a43b906ffdf..bcb98f4be831 100644 struct rsnd_priv *priv) { struct device *dev = rsnd_priv_to_dev(priv); -@@ -419,7 +417,6 @@ static int rsnd_gen1_probe(struct platform_device *pdev, +@@ -419,7 +417,6 @@ static int rsnd_gen1_probe(struct platfo * Gen */ int rsnd_gen_probe(struct platform_device *pdev, @@ -100,7 +94,7 @@ index 0a43b906ffdf..bcb98f4be831 100644 struct rsnd_priv *priv) { struct device *dev = rsnd_priv_to_dev(priv); -@@ -436,9 +433,9 @@ int rsnd_gen_probe(struct platform_device *pdev, +@@ -436,9 +433,9 @@ int rsnd_gen_probe(struct platform_devic ret = -ENODEV; if (rsnd_is_gen1(priv)) @@ -112,11 +106,9 @@ index 0a43b906ffdf..bcb98f4be831 100644 if (ret < 0) dev_err(dev, "unknown generation R-Car sound device\n"); -diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h -index fb1e0cee08b6..8ac28acc7086 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h -@@ -226,7 +226,6 @@ int rsnd_dai_pointer_offset(struct rsnd_dai_stream *io, int additional); +@@ -226,7 +226,6 @@ int rsnd_dai_pointer_offset(struct rsnd_ * R-Car Gen1/Gen2 */ int rsnd_gen_probe(struct platform_device *pdev, @@ -124,7 +116,7 @@ index fb1e0cee08b6..8ac28acc7086 100644 struct rsnd_priv *priv); void rsnd_gen_remove(struct platform_device *pdev, struct rsnd_priv *priv); -@@ -248,7 +247,6 @@ void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv, +@@ -248,7 +247,6 @@ void __iomem *rsnd_gen_reg_get(struct rs int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod); int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate); int rsnd_adg_probe(struct platform_device *pdev, @@ -148,7 +140,7 @@ index fb1e0cee08b6..8ac28acc7086 100644 struct rsnd_priv *priv); void rsnd_scu_remove(struct platform_device *pdev, struct rsnd_priv *priv); -@@ -327,7 +325,6 @@ unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv, +@@ -327,7 +325,6 @@ unsigned int rsnd_scu_get_ssi_rate(struc * R-Car SSI */ int rsnd_ssi_probe(struct platform_device *pdev, @@ -156,11 +148,9 @@ index fb1e0cee08b6..8ac28acc7086 100644 struct rsnd_priv *priv); void rsnd_ssi_remove(struct platform_device *pdev, struct rsnd_priv *priv); -diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c -index 3984d4b4f2df..82d8b20a6ffb 100644 --- a/sound/soc/sh/rcar/scu.c +++ b/sound/soc/sh/rcar/scu.c -@@ -604,9 +604,9 @@ struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id) +@@ -604,9 +604,9 @@ struct rsnd_mod *rsnd_scu_mod_get(struct } int rsnd_scu_probe(struct platform_device *pdev, @@ -171,11 +161,9 @@ index 3984d4b4f2df..82d8b20a6ffb 100644 struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_scu *scu; struct rsnd_mod_ops *ops; -diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c -index d3371d798d54..2460c9f564de 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c -@@ -511,9 +511,9 @@ static void rsnd_ssi_parent_clk_setup(struct rsnd_priv *priv, struct rsnd_ssi *s +@@ -511,9 +511,9 @@ static void rsnd_ssi_parent_clk_setup(st } int rsnd_ssi_probe(struct platform_device *pdev, @@ -186,6 +174,3 @@ index d3371d798d54..2460c9f564de 100644 struct rsnd_ssi_platform_info *pinfo; struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_mod_ops *ops; --- -2.1.2 - diff --git a/patches.renesas/0052-ASoC-rsnd-unify-rdai-naming.patch b/patches.renesas/0052-ASoC-rsnd-unify-rdai-naming.patch index 8c2473b74cead..cfa31280c16c7 100644 --- a/patches.renesas/0052-ASoC-rsnd-unify-rdai-naming.patch +++ b/patches.renesas/0052-ASoC-rsnd-unify-rdai-naming.patch @@ -12,15 +12,13 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit ecba9e724c5775aebd3a28e831643160c7146e83) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - sound/soc/sh/rcar/core.c | 8 ++++---- - sound/soc/sh/rcar/rsnd.h | 6 +++--- + sound/soc/sh/rcar/core.c | 8 ++++---- + sound/soc/sh/rcar/rsnd.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index b2370f68e645..f0745af316be 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c -@@ -352,7 +352,7 @@ int rsnd_dai_id(struct rsnd_priv *priv, struct rsnd_dai *rdai) +@@ -352,7 +352,7 @@ int rsnd_dai_id(struct rsnd_priv *priv, { int id = rdai - priv->rdai; @@ -29,7 +27,7 @@ index b2370f68e645..f0745af316be 100644 return -EINVAL; return id; -@@ -360,7 +360,7 @@ int rsnd_dai_id(struct rsnd_priv *priv, struct rsnd_dai *rdai) +@@ -360,7 +360,7 @@ int rsnd_dai_id(struct rsnd_priv *priv, struct rsnd_dai *rsnd_dai_get(struct rsnd_priv *priv, int id) { @@ -38,7 +36,7 @@ index b2370f68e645..f0745af316be 100644 return NULL; return priv->rdai + id; -@@ -607,7 +607,7 @@ static int rsnd_dai_probe(struct platform_device *pdev, +@@ -607,7 +607,7 @@ static int rsnd_dai_probe(struct platfor return -ENOMEM; } @@ -47,7 +45,7 @@ index b2370f68e645..f0745af316be 100644 priv->daidrv = drv; priv->rdai = rdai; -@@ -802,7 +802,7 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -801,7 +801,7 @@ static int rsnd_probe(struct platform_de } ret = snd_soc_register_component(dev, &rsnd_soc_component, @@ -56,8 +54,6 @@ index b2370f68e645..f0745af316be 100644 if (ret < 0) { dev_err(dev, "cannot snd dai register\n"); goto exit_snd_soc; -diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h -index 8ac28acc7086..3962a50977e5 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -202,10 +202,10 @@ struct rsnd_dai { @@ -82,6 +78,3 @@ index 8ac28acc7086..3962a50977e5 100644 }; #define rsnd_priv_to_dev(priv) ((priv)->dev) --- -2.1.2 - diff --git a/patches.renesas/0058-ASoC-rsnd-use-function-pointer-for-each-probe.patch b/patches.renesas/0058-ASoC-rsnd-use-function-pointer-for-each-probe.patch index 7a48ec9969c51..bac1d4f8a3c32 100644 --- a/patches.renesas/0058-ASoC-rsnd-use-function-pointer-for-each-probe.patch +++ b/patches.renesas/0058-ASoC-rsnd-use-function-pointer-for-each-probe.patch @@ -12,14 +12,12 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit d1ac970f5de94bef9e094b46f016899d04e8178b) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - sound/soc/sh/rcar/core.c | 34 ++++++++++++++-------------------- + sound/soc/sh/rcar/core.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index 416b0782503a..ea747614fbf8 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c -@@ -814,7 +814,15 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -813,7 +813,15 @@ static int rsnd_probe(struct platform_de struct rcar_snd_info *info; struct rsnd_priv *priv; struct device *dev = &pdev->dev; @@ -36,7 +34,7 @@ index 416b0782503a..ea747614fbf8 100644 info = pdev->dev.platform_data; if (!info) { -@@ -838,25 +846,11 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -837,25 +845,11 @@ static int rsnd_probe(struct platform_de /* * init each module */ @@ -67,6 +65,3 @@ index 416b0782503a..ea747614fbf8 100644 /* * asoc register --- -2.1.2 - diff --git a/patches.renesas/0066-ASoC-rsnd-add-probe-remove-callback-on-rsnd_mod_ops.patch b/patches.renesas/0066-ASoC-rsnd-add-probe-remove-callback-on-rsnd_mod_ops.patch index 531534d8590c7..3ff48de1b5c4a 100644 --- a/patches.renesas/0066-ASoC-rsnd-add-probe-remove-callback-on-rsnd_mod_ops.patch +++ b/patches.renesas/0066-ASoC-rsnd-add-probe-remove-callback-on-rsnd_mod_ops.patch @@ -13,15 +13,13 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 7681f6ac6b6338932621f842d68e54f6267b785f) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - sound/soc/sh/rcar/core.c | 23 +++++++++++++++++++++++ - sound/soc/sh/rcar/rsnd.h | 6 ++++++ + sound/soc/sh/rcar/core.c | 23 +++++++++++++++++++++++ + sound/soc/sh/rcar/rsnd.h | 6 ++++++ 2 files changed, 29 insertions(+) -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index 7316d10e4649..e8e585de7251 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c -@@ -842,6 +842,7 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -841,6 +841,7 @@ static int rsnd_probe(struct platform_de struct rcar_snd_info *info; struct rsnd_priv *priv; struct device *dev = &pdev->dev; @@ -29,7 +27,7 @@ index 7316d10e4649..e8e585de7251 100644 int (*probe_func[])(struct platform_device *pdev, struct rsnd_priv *priv) = { rsnd_gen_probe, -@@ -880,6 +881,16 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -879,6 +880,16 @@ static int rsnd_probe(struct platform_de return ret; } @@ -46,7 +44,7 @@ index 7316d10e4649..e8e585de7251 100644 /* * asoc register */ -@@ -912,9 +923,21 @@ exit_snd_soc: +@@ -911,9 +922,21 @@ exit_snd_soc: static int rsnd_remove(struct platform_device *pdev) { struct rsnd_priv *priv = dev_get_drvdata(&pdev->dev); @@ -68,8 +66,6 @@ index 7316d10e4649..e8e585de7251 100644 /* * remove each module */ -diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h -index 9205f96da2f4..db20b3721953 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -167,6 +167,12 @@ enum rsnd_mod_type { @@ -85,6 +81,3 @@ index 9205f96da2f4..db20b3721953 100644 int (*init)(struct rsnd_mod *mod, struct rsnd_dai *rdai, struct rsnd_dai_stream *io); --- -2.1.2 - diff --git a/patches.renesas/0070-ASoC-rsnd-remove-all-rsnd_xxx_remove.patch b/patches.renesas/0070-ASoC-rsnd-remove-all-rsnd_xxx_remove.patch index e188cc42fc080..a1c38d1a8394e 100644 --- a/patches.renesas/0070-ASoC-rsnd-remove-all-rsnd_xxx_remove.patch +++ b/patches.renesas/0070-ASoC-rsnd-remove-all-rsnd_xxx_remove.patch @@ -11,19 +11,17 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 9524be0e761edd9f3c020344677d914ed249d010) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - sound/soc/sh/rcar/adg.c | 5 ----- - sound/soc/sh/rcar/core.c | 14 -------------- - sound/soc/sh/rcar/gen.c | 5 ----- - sound/soc/sh/rcar/rsnd.h | 8 -------- - sound/soc/sh/rcar/scu.c | 5 ----- - sound/soc/sh/rcar/ssi.c | 5 ----- + sound/soc/sh/rcar/adg.c | 5 ----- + sound/soc/sh/rcar/core.c | 14 -------------- + sound/soc/sh/rcar/gen.c | 5 ----- + sound/soc/sh/rcar/rsnd.h | 8 -------- + sound/soc/sh/rcar/scu.c | 5 ----- + sound/soc/sh/rcar/ssi.c | 5 ----- 6 files changed, 42 deletions(-) -diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c -index 8df00ac3b120..953f1cce982d 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c -@@ -454,8 +454,3 @@ int rsnd_adg_probe(struct platform_device *pdev, +@@ -454,8 +454,3 @@ int rsnd_adg_probe(struct platform_devic return 0; } @@ -32,11 +30,9 @@ index 8df00ac3b120..953f1cce982d 100644 - struct rsnd_priv *priv) -{ -} -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index 92e155b7b6a7..ceb4e8bd4970 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c -@@ -708,11 +708,6 @@ static int rsnd_dai_probe(struct platform_device *pdev, +@@ -708,11 +708,6 @@ static int rsnd_dai_probe(struct platfor return 0; } @@ -48,7 +44,7 @@ index 92e155b7b6a7..ceb4e8bd4970 100644 /* * pcm ops */ -@@ -902,15 +897,6 @@ static int rsnd_remove(struct platform_device *pdev) +@@ -901,15 +896,6 @@ static int rsnd_remove(struct platform_d return ret; } @@ -64,11 +60,9 @@ index 92e155b7b6a7..ceb4e8bd4970 100644 return 0; } -diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c -index 92d1bc9acef0..9094970dbdfb 100644 --- a/sound/soc/sh/rcar/gen.c +++ b/sound/soc/sh/rcar/gen.c -@@ -385,8 +385,3 @@ int rsnd_gen_probe(struct platform_device *pdev, +@@ -385,8 +385,3 @@ int rsnd_gen_probe(struct platform_devic return ret; } @@ -77,11 +71,9 @@ index 92d1bc9acef0..9094970dbdfb 100644 - struct rsnd_priv *priv) -{ -} -diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h -index db20b3721953..878dc6e20ff2 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h -@@ -261,8 +261,6 @@ int rsnd_dai_pointer_offset(struct rsnd_dai_stream *io, int additional); +@@ -261,8 +261,6 @@ int rsnd_dai_pointer_offset(struct rsnd_ */ int rsnd_gen_probe(struct platform_device *pdev, struct rsnd_priv *priv); @@ -90,7 +82,7 @@ index db20b3721953..878dc6e20ff2 100644 void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg); -@@ -276,8 +274,6 @@ int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod); +@@ -276,8 +274,6 @@ int rsnd_adg_ssi_clk_stop(struct rsnd_mo int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate); int rsnd_adg_probe(struct platform_device *pdev, struct rsnd_priv *priv); @@ -108,7 +100,7 @@ index db20b3721953..878dc6e20ff2 100644 struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id); unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv, struct rsnd_dai_stream *io, -@@ -373,8 +367,6 @@ int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod, +@@ -373,8 +367,6 @@ int rsnd_scu_enable_ssi_irq(struct rsnd_ */ int rsnd_ssi_probe(struct platform_device *pdev, struct rsnd_priv *priv); @@ -117,11 +109,9 @@ index db20b3721953..878dc6e20ff2 100644 struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id); struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv, int dai_id, int is_play); -diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c -index 40250acf608d..3526a5c2f608 100644 --- a/sound/soc/sh/rcar/scu.c +++ b/sound/soc/sh/rcar/scu.c -@@ -680,8 +680,3 @@ int rsnd_scu_probe(struct platform_device *pdev, +@@ -680,8 +680,3 @@ int rsnd_scu_probe(struct platform_devic return 0; } @@ -130,11 +120,9 @@ index 40250acf608d..3526a5c2f608 100644 - struct rsnd_priv *priv) -{ -} -diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c -index 0f3eeac56155..45f828ded935 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c -@@ -638,8 +638,3 @@ int rsnd_ssi_probe(struct platform_device *pdev, +@@ -638,8 +638,3 @@ int rsnd_ssi_probe(struct platform_devic return 0; } @@ -143,6 +131,3 @@ index 0f3eeac56155..45f828ded935 100644 - struct rsnd_priv *priv) -{ -} --- -2.1.2 - diff --git a/patches.renesas/0071-ASoC-rsnd-rename-scu-to-src.patch b/patches.renesas/0071-ASoC-rsnd-rename-scu-to-src.patch index 63c6cd99612c6..f2bd6d8c1343c 100644 --- a/patches.renesas/0071-ASoC-rsnd-rename-scu-to-src.patch +++ b/patches.renesas/0071-ASoC-rsnd-rename-scu-to-src.patch @@ -15,17 +15,16 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit ba9c949f797aa3af56303445812a452144c61c35) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - include/sound/rcar_snd.h | 18 ++- - sound/soc/sh/rcar/Makefile | 2 +- - sound/soc/sh/rcar/core.c | 26 ++-- - sound/soc/sh/rcar/rsnd.h | 24 ++-- - sound/soc/sh/rcar/{scu.c => src.c} | 265 +++++++++++++++++++------------------ - sound/soc/sh/rcar/ssi.c | 6 +- - 6 files changed, 175 insertions(+), 166 deletions(-) + include/sound/rcar_snd.h | 18 - + sound/soc/sh/rcar/Makefile | 2 + sound/soc/sh/rcar/core.c | 26 - + sound/soc/sh/rcar/rsnd.h | 24 - + sound/soc/sh/rcar/scu.c | 682 -------------------------------------------- + sound/soc/sh/rcar/src.c | 687 +++++++++++++++++++++++++++++++++++++++++++++ + sound/soc/sh/rcar/ssi.c | 6 + 7 files changed, 727 insertions(+), 718 deletions(-) rename sound/soc/sh/rcar/{scu.c => src.c} (63%) -diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h -index 1d8c68323f49..34a3c02a4576 100644 --- a/include/sound/rcar_snd.h +++ b/include/sound/rcar_snd.h @@ -55,14 +55,18 @@ struct rsnd_ssi_platform_info { @@ -71,8 +70,6 @@ index 1d8c68323f49..34a3c02a4576 100644 struct rsnd_dai_platform_info *dai_info; int dai_info_nr; int (*start)(int id); -diff --git a/sound/soc/sh/rcar/Makefile b/sound/soc/sh/rcar/Makefile -index 0ff492df7929..7d0051ced838 100644 --- a/sound/soc/sh/rcar/Makefile +++ b/sound/soc/sh/rcar/Makefile @@ -1,2 +1,2 @@ @@ -80,8 +77,6 @@ index 0ff492df7929..7d0051ced838 100644 +snd-soc-rcar-objs := core.o gen.o src.o adg.o ssi.o obj-$(CONFIG_SND_SOC_RCAR) += snd-soc-rcar.o \ No newline at end of file -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index ceb4e8bd4970..6a1b45df8101 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -73,13 +73,13 @@ @@ -103,7 +98,7 @@ index ceb4e8bd4970..6a1b45df8101 100644 * ... * * -@@ -572,7 +572,7 @@ static int rsnd_path_init(struct rsnd_priv *priv, +@@ -572,7 +572,7 @@ static int rsnd_path_init(struct rsnd_pr struct rsnd_dai_platform_info *dai_info = rdai->info; int ret; int ssi_id = -1; @@ -112,7 +107,7 @@ index ceb4e8bd4970..6a1b45df8101 100644 /* * Gen1 is created by SRU/SSI, and this SRU is base module of -@@ -587,8 +587,8 @@ static int rsnd_path_init(struct rsnd_priv *priv, +@@ -587,8 +587,8 @@ static int rsnd_path_init(struct rsnd_pr if (dai_info) { if (rsnd_is_enable_path(io, ssi)) ssi_id = rsnd_info_id(priv, io, ssi); @@ -123,7 +118,7 @@ index ceb4e8bd4970..6a1b45df8101 100644 } else { /* get SSI's ID */ mod = rsnd_ssi_mod_get_frm_dai(priv, -@@ -596,14 +596,14 @@ static int rsnd_path_init(struct rsnd_priv *priv, +@@ -596,14 +596,14 @@ static int rsnd_path_init(struct rsnd_pr rsnd_dai_is_play(rdai, io)); if (!mod) return 0; @@ -142,7 +137,7 @@ index ceb4e8bd4970..6a1b45df8101 100644 ret = rsnd_dai_connect(mod, io); if (ret < 0) return ret; -@@ -806,7 +806,7 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -805,7 +805,7 @@ static int rsnd_probe(struct platform_de struct rsnd_priv *priv) = { rsnd_gen_probe, rsnd_ssi_probe, @@ -151,11 +146,9 @@ index ceb4e8bd4970..6a1b45df8101 100644 rsnd_adg_probe, rsnd_dai_probe, }; -diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h -index 878dc6e20ff2..c46e0afa54ae 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h -@@ -160,7 +160,7 @@ void rsnd_dma_quit(struct rsnd_priv *priv, +@@ -160,7 +160,7 @@ void rsnd_dma_quit(struct rsnd_priv *pr * R-Car sound mod */ enum rsnd_mod_type { @@ -217,41 +210,38 @@ index 878dc6e20ff2..c46e0afa54ae 100644 /* * R-Car SSI -diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/src.c -similarity index 63% -rename from sound/soc/sh/rcar/scu.c -rename to sound/soc/sh/rcar/src.c -index 3526a5c2f608..ea6a214985d0 100644 --- a/sound/soc/sh/rcar/scu.c -+++ b/sound/soc/sh/rcar/src.c -@@ -1,5 +1,5 @@ - /* ++++ /dev/null +@@ -1,682 +0,0 @@ +-/* - * Renesas R-Car SCU support -+ * Renesas R-Car SRC support - * - * Copyright (C) 2013 Renesas Solutions Corp. - * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> -@@ -10,13 +10,13 @@ - */ - #include "rsnd.h" - +- * +- * Copyright (C) 2013 Renesas Solutions Corp. +- * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License version 2 as +- * published by the Free Software Foundation. +- */ +-#include "rsnd.h" +- -struct rsnd_scu { - struct rsnd_scu_platform_info *info; /* rcar_snd.h */ -+struct rsnd_src { -+ struct rsnd_src_platform_info *info; /* rcar_snd.h */ - struct rsnd_mod mod; - struct clk *clk; - }; - +- struct rsnd_mod mod; +- struct clk *clk; +-}; +- -#define RSND_SCU_NAME_SIZE 16 -+#define RSND_SRC_NAME_SIZE 16 - - /* - * ADINR -@@ -27,19 +27,19 @@ struct rsnd_scu { - #define OTBL_18 (6 << 16) - #define OTBL_16 (8 << 16) - +- +-/* +- * ADINR +- */ +-#define OTBL_24 (0 << 16) +-#define OTBL_22 (2 << 16) +-#define OTBL_20 (4 << 16) +-#define OTBL_18 (6 << 16) +-#define OTBL_16 (8 << 16) +- -#define rsnd_scu_mode_flags(p) ((p)->info->flags) -#define rsnd_scu_convert_rate(p) ((p)->info->convert_rate) -#define rsnd_mod_to_scu(_mod) \ @@ -260,512 +250,581 @@ index 3526a5c2f608..ea6a214985d0 100644 - (rsnd_scu_mode_flags(scu) & RSND_SCU_USE_HPBIF) -#define rsnd_scu_dma_available(scu) \ - rsnd_dma_available(rsnd_mod_to_dma(&(scu)->mod)) -+#define rsnd_src_mode_flags(p) ((p)->info->flags) -+#define rsnd_src_convert_rate(p) ((p)->info->convert_rate) -+#define rsnd_mod_to_src(_mod) \ -+ container_of((_mod), struct rsnd_src, mod) -+#define rsnd_src_hpbif_is_enable(src) \ -+ (rsnd_src_mode_flags(src) & RSND_SCU_USE_HPBIF) -+#define rsnd_src_dma_available(src) \ -+ rsnd_dma_available(rsnd_mod_to_dma(&(src)->mod)) - +- -#define for_each_rsnd_scu(pos, priv, i) \ -+#define for_each_rsnd_src(pos, priv, i) \ - for ((i) = 0; \ +- for ((i) = 0; \ - ((i) < rsnd_scu_nr(priv)) && \ - ((pos) = (struct rsnd_scu *)(priv)->scu + i); \ -+ ((i) < rsnd_src_nr(priv)) && \ -+ ((pos) = (struct rsnd_src *)(priv)->src + i); \ - i++) - - -@@ -54,7 +54,7 @@ struct rsnd_scu { - */ - - /* +- i++) +- +- +-/* +- * image of SRC (Sampling Rate Converter) +- * +- * 96kHz <-> +-----+ 48kHz +-----+ 48kHz +-------+ +- * 48kHz <-> | SRC | <------> | SSI | <-----> | codec | +- * 44.1kHz <-> +-----+ +-----+ +-------+ +- * ... +- * +- */ +- +-/* - * scu.c is caring... -+ * src.c is caring... - * - * Gen1 - * -@@ -63,7 +63,7 @@ struct rsnd_scu { - * - * Gen2 - * +- * +- * Gen1 +- * +- * [mem] -> [SRU] -> [SSI] +- * |--------| +- * +- * Gen2 +- * - * [mem] -> [SCU] -> [SSIU] -> [SSI] -+ * [mem] -> [SRC] -> [SSIU] -> [SSI] - * |-----------------| - */ - -@@ -79,34 +79,34 @@ struct rsnd_scu { - * but SRC bypass mode needs SSI_MODE0 only. - * - * This driver request +- * |-----------------| +- */ +- +-/* +- * How to use SRC bypass mode for debugging +- * +- * SRC has bypass mode, and it is useful for debugging. +- * In Gen2 case, +- * SRCm_MODE controls whether SRC is used or not +- * SSI_MODE0 controls whether SSIU which receives SRC data +- * is used or not. +- * Both SRCm_MODE/SSI_MODE0 settings are needed if you use SRC, +- * but SRC bypass mode needs SSI_MODE0 only. +- * +- * This driver request - * struct rsnd_scu_platform_info { -+ * struct rsnd_src_platform_info { - * u32 flags; - * u32 convert_rate; - * } - * +- * u32 flags; +- * u32 convert_rate; +- * } +- * - * rsnd_scu_hpbif_is_enable() will be true - * if flags had RSND_SCU_USE_HPBIF, -+ * rsnd_src_hpbif_is_enable() will be true -+ * if flags had RSND_SRC_USE_HPBIF, - * and it controls whether SSIU is used or not. - * +- * and it controls whether SSIU is used or not. +- * - * rsnd_scu_convert_rate() indicates -+ * rsnd_src_convert_rate() indicates - * above convert_rate, and it controls - * whether SRC is used or not. - * - * ex) doesn't use SRC +- * above convert_rate, and it controls +- * whether SRC is used or not. +- * +- * ex) doesn't use SRC - * struct rsnd_scu_platform_info info = { -+ * struct rsnd_src_platform_info info = { - * .flags = 0, - * .convert_rate = 0, - * }; - * - * ex) uses SRC +- * .flags = 0, +- * .convert_rate = 0, +- * }; +- * +- * ex) uses SRC - * struct rsnd_scu_platform_info info = { - * .flags = RSND_SCU_USE_HPBIF, -+ * struct rsnd_src_platform_info info = { -+ * .flags = RSND_SRC_USE_HPBIF, - * .convert_rate = 48000, - * }; - * - * ex) uses SRC bypass mode +- * .convert_rate = 48000, +- * }; +- * +- * ex) uses SRC bypass mode - * struct rsnd_scu_platform_info info = { - * .flags = RSND_SCU_USE_HPBIF, -+ * struct rsnd_src_platform_info info = { -+ * .flags = RSND_SRC_USE_HPBIF, - * .convert_rate = 0, - * }; - * -@@ -115,28 +115,28 @@ struct rsnd_scu { - /* - * Gen1/Gen2 common functions - */ +- * .convert_rate = 0, +- * }; +- * +- */ +- +-/* +- * Gen1/Gen2 common functions +- */ -int rsnd_scu_ssi_mode_init(struct rsnd_mod *ssi_mod, -+int rsnd_src_ssi_mode_init(struct rsnd_mod *ssi_mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { - struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod); +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod); - struct rsnd_mod *scu_mod = rsnd_io_to_mod_scu(io); -+ struct rsnd_mod *src_mod = rsnd_io_to_mod_src(io); - struct rcar_snd_info *info = rsnd_priv_to_info(priv); - int ssi_id = rsnd_mod_id(ssi_mod); +- struct rcar_snd_info *info = rsnd_priv_to_info(priv); +- int ssi_id = rsnd_mod_id(ssi_mod); - int has_scu = 0; -+ int has_src = 0; - - /* - * SSI_MODE0 - */ - if (info->dai_info) { +- +- /* +- * SSI_MODE0 +- */ +- if (info->dai_info) { - has_scu = !!scu_mod; -+ has_src = !!src_mod; - } else { +- } else { - struct rsnd_scu *scu = rsnd_mod_to_scu(scu_mod); - has_scu = rsnd_scu_hpbif_is_enable(scu); -+ struct rsnd_src *src = rsnd_mod_to_src(src_mod); -+ has_src = rsnd_src_hpbif_is_enable(src); - } - - rsnd_mod_bset(ssi_mod, SSI_MODE0, (1 << ssi_id), +- } +- +- rsnd_mod_bset(ssi_mod, SSI_MODE0, (1 << ssi_id), - has_scu ? 0 : (1 << ssi_id)); -+ has_src ? 0 : (1 << ssi_id)); - - /* - * SSI_MODE1 -@@ -165,7 +165,7 @@ int rsnd_scu_ssi_mode_init(struct rsnd_mod *ssi_mod, - return 0; - } - +- +- /* +- * SSI_MODE1 +- */ +- if (rsnd_ssi_is_pin_sharing(ssi_mod)) { +- int shift = -1; +- switch (ssi_id) { +- case 1: +- shift = 0; +- break; +- case 2: +- shift = 2; +- break; +- case 4: +- shift = 16; +- break; +- } +- +- if (shift >= 0) +- rsnd_mod_bset(ssi_mod, SSI_MODE1, +- 0x3 << shift, +- rsnd_dai_is_clk_master(rdai) ? +- 0x2 << shift : 0x1 << shift); +- } +- +- return 0; +-} +- -int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod, -+int rsnd_src_enable_ssi_irq(struct rsnd_mod *ssi_mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { -@@ -178,33 +178,33 @@ int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod, - return 0; - } - +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod); +- +- /* enable PIO interrupt if Gen2 */ +- if (rsnd_is_gen2(priv)) +- rsnd_mod_write(ssi_mod, INT_ENABLE, 0x0f000000); +- +- return 0; +-} +- -unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv, -+unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv, - struct rsnd_dai_stream *io, - struct snd_pcm_runtime *runtime) - { +- struct rsnd_dai_stream *io, +- struct snd_pcm_runtime *runtime) +-{ - struct rsnd_scu *scu; -+ struct rsnd_src *src; - unsigned int rate; - +- unsigned int rate; +- - scu = rsnd_mod_to_scu(rsnd_io_to_mod_scu(io)); -+ src = rsnd_mod_to_src(rsnd_io_to_mod_src(io)); - - /* - * return convert rate if SRC is used, - * otherwise, return runtime->rate as usual - */ +- +- /* +- * return convert rate if SRC is used, +- * otherwise, return runtime->rate as usual +- */ - rate = rsnd_scu_convert_rate(scu); -+ rate = rsnd_src_convert_rate(src); - if (!rate) - rate = runtime->rate; - - return rate; - } - +- if (!rate) +- rate = runtime->rate; +- +- return rate; +-} +- -static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod, -+static int rsnd_src_set_convert_rate(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { - struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); - struct rsnd_scu *scu = rsnd_mod_to_scu(mod); - u32 convert_rate = rsnd_scu_convert_rate(scu); -+ struct rsnd_src *src = rsnd_mod_to_src(mod); -+ u32 convert_rate = rsnd_src_convert_rate(src); - u32 adinr = runtime->channels; - u32 fsrate = 0; - -@@ -217,7 +217,7 @@ static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod, - - /* - * Initialize the operation of the SRC internal circuits +- u32 adinr = runtime->channels; +- u32 fsrate = 0; +- +- if (convert_rate) +- fsrate = 0x0400000 / convert_rate * runtime->rate; +- +- /* set/clear soft reset */ +- rsnd_mod_write(mod, SRC_SWRSR, 0); +- rsnd_mod_write(mod, SRC_SWRSR, 1); +- +- /* +- * Initialize the operation of the SRC internal circuits - * see rsnd_scu_start() -+ * see rsnd_src_start() - */ - rsnd_mod_write(mod, SRC_SRCIR, 1); - -@@ -248,61 +248,61 @@ static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod, - return 0; - } - +- */ +- rsnd_mod_write(mod, SRC_SRCIR, 1); +- +- /* Set channel number and output bit length */ +- switch (runtime->sample_bits) { +- case 16: +- adinr |= OTBL_16; +- break; +- case 32: +- adinr |= OTBL_24; +- break; +- default: +- return -EIO; +- } +- rsnd_mod_write(mod, SRC_ADINR, adinr); +- +- /* Enable the initial value of IFS */ +- if (fsrate) { +- rsnd_mod_write(mod, SRC_IFSCR, 1); +- +- /* Set initial value of IFS */ +- rsnd_mod_write(mod, SRC_IFSVR, fsrate); +- } +- +- /* use DMA transfer */ +- rsnd_mod_write(mod, SRC_BUSIF_MODE, 1); +- +- return 0; +-} +- -static int rsnd_scu_init(struct rsnd_mod *mod, -+static int rsnd_src_init(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ - struct rsnd_scu *scu = rsnd_mod_to_scu(mod); -+ struct rsnd_src *src = rsnd_mod_to_src(mod); - +- - clk_enable(scu->clk); -+ clk_enable(src->clk); - - return 0; - } - +- +- return 0; +-} +- -static int rsnd_scu_quit(struct rsnd_mod *mod, -+static int rsnd_src_quit(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ - struct rsnd_scu *scu = rsnd_mod_to_scu(mod); -+ struct rsnd_src *src = rsnd_mod_to_src(mod); - +- - clk_disable(scu->clk); -+ clk_disable(src->clk); - - return 0; - } - +- +- return 0; +-} +- -static int rsnd_scu_start(struct rsnd_mod *mod, -+static int rsnd_src_start(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ - struct rsnd_scu *scu = rsnd_mod_to_scu(mod); -+ struct rsnd_src *src = rsnd_mod_to_src(mod); - - /* - * Cancel the initialization and operate the SRC function +- +- /* +- * Cancel the initialization and operate the SRC function - * see rsnd_scu_set_convert_rate() -+ * see rsnd_src_set_convert_rate() - */ - rsnd_mod_write(mod, SRC_SRCIR, 0); - +- */ +- rsnd_mod_write(mod, SRC_SRCIR, 0); +- - if (rsnd_scu_convert_rate(scu)) -+ if (rsnd_src_convert_rate(src)) - rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1); - - return 0; - } - - +- rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1); +- +- return 0; +-} +- +- -static int rsnd_scu_stop(struct rsnd_mod *mod, -+static int rsnd_src_stop(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ - struct rsnd_scu *scu = rsnd_mod_to_scu(mod); -+ struct rsnd_src *src = rsnd_mod_to_src(mod); - +- - if (rsnd_scu_convert_rate(scu)) -+ if (rsnd_src_convert_rate(src)) - rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0); - - return 0; - } - +- rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0); +- +- return 0; +-} +- -static struct rsnd_mod_ops rsnd_scu_non_ops = { - .name = "scu (non)", -+static struct rsnd_mod_ops rsnd_src_non_ops = { -+ .name = "src (non)", - }; - - /* -@@ -312,7 +312,7 @@ static int rsnd_src_set_route_gen1(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { +-}; +- +-/* +- * Gen1 functions +- */ +-static int rsnd_src_set_route_gen1(struct rsnd_mod *mod, +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ - struct scu_route_config { -+ struct src_route_config { - u32 mask; - int shift; - } routes[] = { -@@ -346,14 +346,14 @@ static int rsnd_src_set_route_gen1(struct rsnd_mod *mod, - return 0; - } - +- u32 mask; +- int shift; +- } routes[] = { +- { 0xF, 0, }, /* 0 */ +- { 0xF, 4, }, /* 1 */ +- { 0xF, 8, }, /* 2 */ +- { 0x7, 12, }, /* 3 */ +- { 0x7, 16, }, /* 4 */ +- { 0x7, 20, }, /* 5 */ +- { 0x7, 24, }, /* 6 */ +- { 0x3, 28, }, /* 7 */ +- { 0x3, 30, }, /* 8 */ +- }; +- u32 mask; +- u32 val; +- int id; +- +- id = rsnd_mod_id(mod); +- if (id < 0 || id >= ARRAY_SIZE(routes)) +- return -EIO; +- +- /* +- * SRC_ROUTE_SELECT +- */ +- val = rsnd_dai_is_play(rdai, io) ? 0x1 : 0x2; +- val = val << routes[id].shift; +- mask = routes[id].mask << routes[id].shift; +- +- rsnd_mod_bset(mod, SRC_ROUTE_SEL, mask, val); +- +- return 0; +-} +- -static int rsnd_scu_set_convert_timing_gen1(struct rsnd_mod *mod, -+static int rsnd_src_set_convert_timing_gen1(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { - struct rsnd_priv *priv = rsnd_mod_to_priv(mod); +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- struct rsnd_priv *priv = rsnd_mod_to_priv(mod); - struct rsnd_scu *scu = rsnd_mod_to_scu(mod); -+ struct rsnd_src *src = rsnd_mod_to_src(mod); - struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); +- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); - u32 convert_rate = rsnd_scu_convert_rate(scu); -+ u32 convert_rate = rsnd_src_convert_rate(src); - u32 mask; - u32 val; - int shift; -@@ -405,13 +405,13 @@ static int rsnd_scu_set_convert_timing_gen1(struct rsnd_mod *mod, - return 0; - } - +- u32 mask; +- u32 val; +- int shift; +- int id = rsnd_mod_id(mod); +- int ret; +- +- /* +- * SRC_TIMING_SELECT +- */ +- shift = (id % 4) * 8; +- mask = 0x1F << shift; +- +- /* +- * ADG is used as source clock if SRC was used, +- * then, SSI WS is used as destination clock. +- * SSI WS is used as source clock if SRC is not used +- * (when playback, source/destination become reverse when capture) +- */ +- ret = 0; +- if (convert_rate) { +- /* use ADG */ +- val = 0; +- ret = rsnd_adg_set_convert_clk_gen1(priv, mod, +- runtime->rate, +- convert_rate); +- } else if (8 == id) { +- /* use SSI WS, but SRU8 is special */ +- val = id << shift; +- } else { +- /* use SSI WS */ +- val = (id + 1) << shift; +- } +- +- if (ret < 0) +- return ret; +- +- switch (id / 4) { +- case 0: +- rsnd_mod_bset(mod, SRC_TMG_SEL0, mask, val); +- break; +- case 1: +- rsnd_mod_bset(mod, SRC_TMG_SEL1, mask, val); +- break; +- case 2: +- rsnd_mod_bset(mod, SRC_TMG_SEL2, mask, val); +- break; +- } +- +- return 0; +-} +- -static int rsnd_scu_set_convert_rate_gen1(struct rsnd_mod *mod, -+static int rsnd_src_set_convert_rate_gen1(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { - int ret; - +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- int ret; +- - ret = rsnd_scu_set_convert_rate(mod, rdai, io); -+ ret = rsnd_src_set_convert_rate(mod, rdai, io); - if (ret < 0) - return ret; - -@@ -427,13 +427,13 @@ static int rsnd_scu_set_convert_rate_gen1(struct rsnd_mod *mod, - return 0; - } - +- if (ret < 0) +- return ret; +- +- /* Select SRC mode (fixed value) */ +- rsnd_mod_write(mod, SRC_SRCCR, 0x00010110); +- +- /* Set the restriction value of the FS ratio (98%) */ +- rsnd_mod_write(mod, SRC_MNFSR, +- rsnd_mod_read(mod, SRC_IFSVR) / 100 * 98); +- +- /* no SRC_BFSSR settings, since SRC_SRCCR::BUFMD is 0 */ +- +- return 0; +-} +- -static int rsnd_scu_init_gen1(struct rsnd_mod *mod, -+static int rsnd_src_init_gen1(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { - int ret; - +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- int ret; +- - ret = rsnd_scu_init(mod, rdai, io); -+ ret = rsnd_src_init(mod, rdai, io); - if (ret < 0) - return ret; - -@@ -441,18 +441,18 @@ static int rsnd_scu_init_gen1(struct rsnd_mod *mod, - if (ret < 0) - return ret; - +- if (ret < 0) +- return ret; +- +- ret = rsnd_src_set_route_gen1(mod, rdai, io); +- if (ret < 0) +- return ret; +- - ret = rsnd_scu_set_convert_rate_gen1(mod, rdai, io); -+ ret = rsnd_src_set_convert_rate_gen1(mod, rdai, io); - if (ret < 0) - return ret; - +- if (ret < 0) +- return ret; +- - ret = rsnd_scu_set_convert_timing_gen1(mod, rdai, io); -+ ret = rsnd_src_set_convert_timing_gen1(mod, rdai, io); - if (ret < 0) - return ret; - - return 0; - } - +- if (ret < 0) +- return ret; +- +- return 0; +-} +- -static int rsnd_scu_start_gen1(struct rsnd_mod *mod, -+static int rsnd_src_start_gen1(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { -@@ -460,10 +460,10 @@ static int rsnd_scu_start_gen1(struct rsnd_mod *mod, - - rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id)); - +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- int id = rsnd_mod_id(mod); +- +- rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id)); +- - return rsnd_scu_start(mod, rdai, io); -+ return rsnd_src_start(mod, rdai, io); - } - +-} +- -static int rsnd_scu_stop_gen1(struct rsnd_mod *mod, -+static int rsnd_src_stop_gen1(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { -@@ -471,27 +471,27 @@ static int rsnd_scu_stop_gen1(struct rsnd_mod *mod, - - rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0); - +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- int id = rsnd_mod_id(mod); +- +- rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0); +- - return rsnd_scu_stop(mod, rdai, io); -+ return rsnd_src_stop(mod, rdai, io); - } - +-} +- -static struct rsnd_mod_ops rsnd_scu_gen1_ops = { -+static struct rsnd_mod_ops rsnd_src_gen1_ops = { - .name = "sru (gen1)", +- .name = "sru (gen1)", - .init = rsnd_scu_init_gen1, - .quit = rsnd_scu_quit, - .start = rsnd_scu_start_gen1, - .stop = rsnd_scu_stop_gen1, -+ .init = rsnd_src_init_gen1, -+ .quit = rsnd_src_quit, -+ .start = rsnd_src_start_gen1, -+ .stop = rsnd_src_stop_gen1, - }; - - /* - * Gen2 functions - */ +-}; +- +-/* +- * Gen2 functions +- */ -static int rsnd_scu_set_convert_rate_gen2(struct rsnd_mod *mod, -+static int rsnd_src_set_convert_rate_gen2(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { - int ret; - +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- int ret; +- - ret = rsnd_scu_set_convert_rate(mod, rdai, io); -+ ret = rsnd_src_set_convert_rate(mod, rdai, io); - if (ret < 0) - return ret; - -@@ -506,13 +506,13 @@ static int rsnd_scu_set_convert_rate_gen2(struct rsnd_mod *mod, - return 0; - } - +- if (ret < 0) +- return ret; +- +- rsnd_mod_write(mod, SSI_BUSIF_ADINR, rsnd_mod_read(mod, SRC_ADINR)); +- rsnd_mod_write(mod, SSI_BUSIF_MODE, rsnd_mod_read(mod, SRC_BUSIF_MODE)); +- +- rsnd_mod_write(mod, SRC_SRCCR, 0x00011110); +- +- rsnd_mod_write(mod, SRC_BSDSR, 0x01800000); +- rsnd_mod_write(mod, SRC_BSISR, 0x00100060); +- +- return 0; +-} +- -static int rsnd_scu_set_convert_timing_gen2(struct rsnd_mod *mod, -+static int rsnd_src_set_convert_timing_gen2(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { - struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); - struct rsnd_scu *scu = rsnd_mod_to_scu(mod); - u32 convert_rate = rsnd_scu_convert_rate(scu); -+ struct rsnd_src *src = rsnd_mod_to_src(mod); -+ u32 convert_rate = rsnd_src_convert_rate(src); - int ret; - - if (convert_rate) -@@ -525,34 +525,34 @@ static int rsnd_scu_set_convert_timing_gen2(struct rsnd_mod *mod, - return ret; - } - +- int ret; +- +- if (convert_rate) +- ret = rsnd_adg_set_convert_clk_gen2(mod, rdai, io, +- runtime->rate, +- convert_rate); +- else +- ret = rsnd_adg_set_convert_timing_gen2(mod, rdai, io); +- +- return ret; +-} +- -static int rsnd_scu_probe_gen2(struct rsnd_mod *mod, -+static int rsnd_src_probe_gen2(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { - struct rsnd_priv *priv = rsnd_mod_to_priv(mod); - struct rcar_snd_info *info = rsnd_priv_to_info(priv); +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- struct rsnd_priv *priv = rsnd_mod_to_priv(mod); +- struct rcar_snd_info *info = rsnd_priv_to_info(priv); - struct rsnd_scu *scu = rsnd_mod_to_scu(mod); -+ struct rsnd_src *src = rsnd_mod_to_src(mod); - struct rsnd_mod *ssi = rsnd_ssi_mod_get(priv, rsnd_mod_id(mod)); - struct device *dev = rsnd_priv_to_dev(priv); - int ret; - int is_play; - - if (info->dai_info) +- struct rsnd_mod *ssi = rsnd_ssi_mod_get(priv, rsnd_mod_id(mod)); +- struct device *dev = rsnd_priv_to_dev(priv); +- int ret; +- int is_play; +- +- if (info->dai_info) - is_play = rsnd_info_is_playback(priv, scu); -+ is_play = rsnd_info_is_playback(priv, src); - else - is_play = rsnd_ssi_is_play(ssi); - - ret = rsnd_dma_init(priv, - rsnd_mod_to_dma(mod), - is_play, +- else +- is_play = rsnd_ssi_is_play(ssi); +- +- ret = rsnd_dma_init(priv, +- rsnd_mod_to_dma(mod), +- is_play, - scu->info->dma_id); -+ src->info->dma_id); - if (ret < 0) +- if (ret < 0) - dev_err(dev, "SCU DMA failed\n"); -+ dev_err(dev, "SRC DMA failed\n"); - - return ret; - } - +- +- return ret; +-} +- -static int rsnd_scu_remove_gen2(struct rsnd_mod *mod, -+static int rsnd_src_remove_gen2(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { -@@ -561,121 +561,126 @@ static int rsnd_scu_remove_gen2(struct rsnd_mod *mod, - return 0; - } - +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- rsnd_dma_quit(rsnd_mod_to_priv(mod), rsnd_mod_to_dma(mod)); +- +- return 0; +-} +- -static int rsnd_scu_init_gen2(struct rsnd_mod *mod, -+static int rsnd_src_init_gen2(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { - int ret; - +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ +- int ret; +- - ret = rsnd_scu_init(mod, rdai, io); -+ ret = rsnd_src_init(mod, rdai, io); - if (ret < 0) - return ret; - +- if (ret < 0) +- return ret; +- - ret = rsnd_scu_set_convert_rate_gen2(mod, rdai, io); -+ ret = rsnd_src_set_convert_rate_gen2(mod, rdai, io); - if (ret < 0) - return ret; - +- if (ret < 0) +- return ret; +- - ret = rsnd_scu_set_convert_timing_gen2(mod, rdai, io); -+ ret = rsnd_src_set_convert_timing_gen2(mod, rdai, io); - if (ret < 0) - return ret; - - return 0; - } - +- if (ret < 0) +- return ret; +- +- return 0; +-} +- -static int rsnd_scu_start_gen2(struct rsnd_mod *mod, -+static int rsnd_src_start_gen2(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ - struct rsnd_scu *scu = rsnd_mod_to_scu(mod); -+ struct rsnd_src *src = rsnd_mod_to_src(mod); - +- - rsnd_dma_start(rsnd_mod_to_dma(&scu->mod)); -+ rsnd_dma_start(rsnd_mod_to_dma(&src->mod)); - - rsnd_mod_write(mod, SSI_CTRL, 0x1); - rsnd_mod_write(mod, SRC_CTRL, 0x11); - +- +- rsnd_mod_write(mod, SSI_CTRL, 0x1); +- rsnd_mod_write(mod, SRC_CTRL, 0x11); +- - return rsnd_scu_start(mod, rdai, io); -+ return rsnd_src_start(mod, rdai, io); - } - +-} +- -static int rsnd_scu_stop_gen2(struct rsnd_mod *mod, -+static int rsnd_src_stop_gen2(struct rsnd_mod *mod, - struct rsnd_dai *rdai, - struct rsnd_dai_stream *io) - { +- struct rsnd_dai *rdai, +- struct rsnd_dai_stream *io) +-{ - struct rsnd_scu *scu = rsnd_mod_to_scu(mod); -+ struct rsnd_src *src = rsnd_mod_to_src(mod); - - rsnd_mod_write(mod, SSI_CTRL, 0); - rsnd_mod_write(mod, SRC_CTRL, 0); - +- +- rsnd_mod_write(mod, SSI_CTRL, 0); +- rsnd_mod_write(mod, SRC_CTRL, 0); +- - rsnd_dma_stop(rsnd_mod_to_dma(&scu->mod)); -+ rsnd_dma_stop(rsnd_mod_to_dma(&src->mod)); - +- - return rsnd_scu_stop(mod, rdai, io); -+ return rsnd_src_stop(mod, rdai, io); - } - +-} +- -static struct rsnd_mod_ops rsnd_scu_gen2_ops = { - .name = "scu (gen2)", - .probe = rsnd_scu_probe_gen2, @@ -774,6 +833,683 @@ index 3526a5c2f608..ea6a214985d0 100644 - .quit = rsnd_scu_quit, - .start = rsnd_scu_start_gen2, - .stop = rsnd_scu_stop_gen2, +-}; +- +-struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id) +-{ +- if (WARN_ON(id < 0 || id >= rsnd_scu_nr(priv))) +- id = 0; +- +- return &((struct rsnd_scu *)(priv->scu) + id)->mod; +-} +- +-int rsnd_scu_probe(struct platform_device *pdev, +- struct rsnd_priv *priv) +-{ +- struct rcar_snd_info *info = rsnd_priv_to_info(priv); +- struct device *dev = rsnd_priv_to_dev(priv); +- struct rsnd_scu *scu; +- struct rsnd_mod_ops *ops; +- struct clk *clk; +- char name[RSND_SCU_NAME_SIZE]; +- int i, nr; +- +- /* +- * init SCU +- */ +- nr = info->scu_info_nr; +- if (!nr) +- return 0; +- +- scu = devm_kzalloc(dev, sizeof(*scu) * nr, GFP_KERNEL); +- if (!scu) { +- dev_err(dev, "SCU allocate failed\n"); +- return -ENOMEM; +- } +- +- priv->scu_nr = nr; +- priv->scu = scu; +- +- for_each_rsnd_scu(scu, priv, i) { +- snprintf(name, RSND_SCU_NAME_SIZE, "scu.%d", i); +- +- clk = devm_clk_get(dev, name); +- if (IS_ERR(clk)) +- return PTR_ERR(clk); +- +- scu->info = &info->scu_info[i]; +- scu->clk = clk; +- +- ops = &rsnd_scu_non_ops; +- if (rsnd_scu_hpbif_is_enable(scu)) { +- if (rsnd_is_gen1(priv)) +- ops = &rsnd_scu_gen1_ops; +- if (rsnd_is_gen2(priv)) +- ops = &rsnd_scu_gen2_ops; +- } +- +- rsnd_mod_init(priv, &scu->mod, ops, RSND_MOD_SCU, i); +- +- dev_dbg(dev, "SCU%d probed\n", i); +- } +- +- return 0; +-} +--- /dev/null ++++ b/sound/soc/sh/rcar/src.c +@@ -0,0 +1,687 @@ ++/* ++ * Renesas R-Car SRC support ++ * ++ * Copyright (C) 2013 Renesas Solutions Corp. ++ * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++#include "rsnd.h" ++ ++struct rsnd_src { ++ struct rsnd_src_platform_info *info; /* rcar_snd.h */ ++ struct rsnd_mod mod; ++ struct clk *clk; ++}; ++ ++#define RSND_SRC_NAME_SIZE 16 ++ ++/* ++ * ADINR ++ */ ++#define OTBL_24 (0 << 16) ++#define OTBL_22 (2 << 16) ++#define OTBL_20 (4 << 16) ++#define OTBL_18 (6 << 16) ++#define OTBL_16 (8 << 16) ++ ++#define rsnd_src_mode_flags(p) ((p)->info->flags) ++#define rsnd_src_convert_rate(p) ((p)->info->convert_rate) ++#define rsnd_mod_to_src(_mod) \ ++ container_of((_mod), struct rsnd_src, mod) ++#define rsnd_src_hpbif_is_enable(src) \ ++ (rsnd_src_mode_flags(src) & RSND_SCU_USE_HPBIF) ++#define rsnd_src_dma_available(src) \ ++ rsnd_dma_available(rsnd_mod_to_dma(&(src)->mod)) ++ ++#define for_each_rsnd_src(pos, priv, i) \ ++ for ((i) = 0; \ ++ ((i) < rsnd_src_nr(priv)) && \ ++ ((pos) = (struct rsnd_src *)(priv)->src + i); \ ++ i++) ++ ++ ++/* ++ * image of SRC (Sampling Rate Converter) ++ * ++ * 96kHz <-> +-----+ 48kHz +-----+ 48kHz +-------+ ++ * 48kHz <-> | SRC | <------> | SSI | <-----> | codec | ++ * 44.1kHz <-> +-----+ +-----+ +-------+ ++ * ... ++ * ++ */ ++ ++/* ++ * src.c is caring... ++ * ++ * Gen1 ++ * ++ * [mem] -> [SRU] -> [SSI] ++ * |--------| ++ * ++ * Gen2 ++ * ++ * [mem] -> [SRC] -> [SSIU] -> [SSI] ++ * |-----------------| ++ */ ++ ++/* ++ * How to use SRC bypass mode for debugging ++ * ++ * SRC has bypass mode, and it is useful for debugging. ++ * In Gen2 case, ++ * SRCm_MODE controls whether SRC is used or not ++ * SSI_MODE0 controls whether SSIU which receives SRC data ++ * is used or not. ++ * Both SRCm_MODE/SSI_MODE0 settings are needed if you use SRC, ++ * but SRC bypass mode needs SSI_MODE0 only. ++ * ++ * This driver request ++ * struct rsnd_src_platform_info { ++ * u32 flags; ++ * u32 convert_rate; ++ * } ++ * ++ * rsnd_src_hpbif_is_enable() will be true ++ * if flags had RSND_SRC_USE_HPBIF, ++ * and it controls whether SSIU is used or not. ++ * ++ * rsnd_src_convert_rate() indicates ++ * above convert_rate, and it controls ++ * whether SRC is used or not. ++ * ++ * ex) doesn't use SRC ++ * struct rsnd_src_platform_info info = { ++ * .flags = 0, ++ * .convert_rate = 0, ++ * }; ++ * ++ * ex) uses SRC ++ * struct rsnd_src_platform_info info = { ++ * .flags = RSND_SRC_USE_HPBIF, ++ * .convert_rate = 48000, ++ * }; ++ * ++ * ex) uses SRC bypass mode ++ * struct rsnd_src_platform_info info = { ++ * .flags = RSND_SRC_USE_HPBIF, ++ * .convert_rate = 0, ++ * }; ++ * ++ */ ++ ++/* ++ * Gen1/Gen2 common functions ++ */ ++int rsnd_src_ssi_mode_init(struct rsnd_mod *ssi_mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod); ++ struct rsnd_mod *src_mod = rsnd_io_to_mod_src(io); ++ struct rcar_snd_info *info = rsnd_priv_to_info(priv); ++ int ssi_id = rsnd_mod_id(ssi_mod); ++ int has_src = 0; ++ ++ /* ++ * SSI_MODE0 ++ */ ++ if (info->dai_info) { ++ has_src = !!src_mod; ++ } else { ++ struct rsnd_src *src = rsnd_mod_to_src(src_mod); ++ has_src = rsnd_src_hpbif_is_enable(src); ++ } ++ ++ rsnd_mod_bset(ssi_mod, SSI_MODE0, (1 << ssi_id), ++ has_src ? 0 : (1 << ssi_id)); ++ ++ /* ++ * SSI_MODE1 ++ */ ++ if (rsnd_ssi_is_pin_sharing(ssi_mod)) { ++ int shift = -1; ++ switch (ssi_id) { ++ case 1: ++ shift = 0; ++ break; ++ case 2: ++ shift = 2; ++ break; ++ case 4: ++ shift = 16; ++ break; ++ } ++ ++ if (shift >= 0) ++ rsnd_mod_bset(ssi_mod, SSI_MODE1, ++ 0x3 << shift, ++ rsnd_dai_is_clk_master(rdai) ? ++ 0x2 << shift : 0x1 << shift); ++ } ++ ++ return 0; ++} ++ ++int rsnd_src_enable_ssi_irq(struct rsnd_mod *ssi_mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod); ++ ++ /* enable PIO interrupt if Gen2 */ ++ if (rsnd_is_gen2(priv)) ++ rsnd_mod_write(ssi_mod, INT_ENABLE, 0x0f000000); ++ ++ return 0; ++} ++ ++unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv, ++ struct rsnd_dai_stream *io, ++ struct snd_pcm_runtime *runtime) ++{ ++ struct rsnd_src *src; ++ unsigned int rate; ++ ++ src = rsnd_mod_to_src(rsnd_io_to_mod_src(io)); ++ ++ /* ++ * return convert rate if SRC is used, ++ * otherwise, return runtime->rate as usual ++ */ ++ rate = rsnd_src_convert_rate(src); ++ if (!rate) ++ rate = runtime->rate; ++ ++ return rate; ++} ++ ++static int rsnd_src_set_convert_rate(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); ++ struct rsnd_src *src = rsnd_mod_to_src(mod); ++ u32 convert_rate = rsnd_src_convert_rate(src); ++ u32 adinr = runtime->channels; ++ u32 fsrate = 0; ++ ++ if (convert_rate) ++ fsrate = 0x0400000 / convert_rate * runtime->rate; ++ ++ /* set/clear soft reset */ ++ rsnd_mod_write(mod, SRC_SWRSR, 0); ++ rsnd_mod_write(mod, SRC_SWRSR, 1); ++ ++ /* ++ * Initialize the operation of the SRC internal circuits ++ * see rsnd_src_start() ++ */ ++ rsnd_mod_write(mod, SRC_SRCIR, 1); ++ ++ /* Set channel number and output bit length */ ++ switch (runtime->sample_bits) { ++ case 16: ++ adinr |= OTBL_16; ++ break; ++ case 32: ++ adinr |= OTBL_24; ++ break; ++ default: ++ return -EIO; ++ } ++ rsnd_mod_write(mod, SRC_ADINR, adinr); ++ ++ /* Enable the initial value of IFS */ ++ if (fsrate) { ++ rsnd_mod_write(mod, SRC_IFSCR, 1); ++ ++ /* Set initial value of IFS */ ++ rsnd_mod_write(mod, SRC_IFSVR, fsrate); ++ } ++ ++ /* use DMA transfer */ ++ rsnd_mod_write(mod, SRC_BUSIF_MODE, 1); ++ ++ return 0; ++} ++ ++static int rsnd_src_init(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct rsnd_src *src = rsnd_mod_to_src(mod); ++ ++ clk_enable(src->clk); ++ ++ return 0; ++} ++ ++static int rsnd_src_quit(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct rsnd_src *src = rsnd_mod_to_src(mod); ++ ++ clk_disable(src->clk); ++ ++ return 0; ++} ++ ++static int rsnd_src_start(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct rsnd_src *src = rsnd_mod_to_src(mod); ++ ++ /* ++ * Cancel the initialization and operate the SRC function ++ * see rsnd_src_set_convert_rate() ++ */ ++ rsnd_mod_write(mod, SRC_SRCIR, 0); ++ ++ if (rsnd_src_convert_rate(src)) ++ rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1); ++ ++ return 0; ++} ++ ++ ++static int rsnd_src_stop(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct rsnd_src *src = rsnd_mod_to_src(mod); ++ ++ if (rsnd_src_convert_rate(src)) ++ rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0); ++ ++ return 0; ++} ++ ++static struct rsnd_mod_ops rsnd_src_non_ops = { ++ .name = "src (non)", ++}; ++ ++/* ++ * Gen1 functions ++ */ ++static int rsnd_src_set_route_gen1(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct src_route_config { ++ u32 mask; ++ int shift; ++ } routes[] = { ++ { 0xF, 0, }, /* 0 */ ++ { 0xF, 4, }, /* 1 */ ++ { 0xF, 8, }, /* 2 */ ++ { 0x7, 12, }, /* 3 */ ++ { 0x7, 16, }, /* 4 */ ++ { 0x7, 20, }, /* 5 */ ++ { 0x7, 24, }, /* 6 */ ++ { 0x3, 28, }, /* 7 */ ++ { 0x3, 30, }, /* 8 */ ++ }; ++ u32 mask; ++ u32 val; ++ int id; ++ ++ id = rsnd_mod_id(mod); ++ if (id < 0 || id >= ARRAY_SIZE(routes)) ++ return -EIO; ++ ++ /* ++ * SRC_ROUTE_SELECT ++ */ ++ val = rsnd_dai_is_play(rdai, io) ? 0x1 : 0x2; ++ val = val << routes[id].shift; ++ mask = routes[id].mask << routes[id].shift; ++ ++ rsnd_mod_bset(mod, SRC_ROUTE_SEL, mask, val); ++ ++ return 0; ++} ++ ++static int rsnd_src_set_convert_timing_gen1(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct rsnd_priv *priv = rsnd_mod_to_priv(mod); ++ struct rsnd_src *src = rsnd_mod_to_src(mod); ++ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); ++ u32 convert_rate = rsnd_src_convert_rate(src); ++ u32 mask; ++ u32 val; ++ int shift; ++ int id = rsnd_mod_id(mod); ++ int ret; ++ ++ /* ++ * SRC_TIMING_SELECT ++ */ ++ shift = (id % 4) * 8; ++ mask = 0x1F << shift; ++ ++ /* ++ * ADG is used as source clock if SRC was used, ++ * then, SSI WS is used as destination clock. ++ * SSI WS is used as source clock if SRC is not used ++ * (when playback, source/destination become reverse when capture) ++ */ ++ ret = 0; ++ if (convert_rate) { ++ /* use ADG */ ++ val = 0; ++ ret = rsnd_adg_set_convert_clk_gen1(priv, mod, ++ runtime->rate, ++ convert_rate); ++ } else if (8 == id) { ++ /* use SSI WS, but SRU8 is special */ ++ val = id << shift; ++ } else { ++ /* use SSI WS */ ++ val = (id + 1) << shift; ++ } ++ ++ if (ret < 0) ++ return ret; ++ ++ switch (id / 4) { ++ case 0: ++ rsnd_mod_bset(mod, SRC_TMG_SEL0, mask, val); ++ break; ++ case 1: ++ rsnd_mod_bset(mod, SRC_TMG_SEL1, mask, val); ++ break; ++ case 2: ++ rsnd_mod_bset(mod, SRC_TMG_SEL2, mask, val); ++ break; ++ } ++ ++ return 0; ++} ++ ++static int rsnd_src_set_convert_rate_gen1(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ int ret; ++ ++ ret = rsnd_src_set_convert_rate(mod, rdai, io); ++ if (ret < 0) ++ return ret; ++ ++ /* Select SRC mode (fixed value) */ ++ rsnd_mod_write(mod, SRC_SRCCR, 0x00010110); ++ ++ /* Set the restriction value of the FS ratio (98%) */ ++ rsnd_mod_write(mod, SRC_MNFSR, ++ rsnd_mod_read(mod, SRC_IFSVR) / 100 * 98); ++ ++ /* no SRC_BFSSR settings, since SRC_SRCCR::BUFMD is 0 */ ++ ++ return 0; ++} ++ ++static int rsnd_src_init_gen1(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ int ret; ++ ++ ret = rsnd_src_init(mod, rdai, io); ++ if (ret < 0) ++ return ret; ++ ++ ret = rsnd_src_set_route_gen1(mod, rdai, io); ++ if (ret < 0) ++ return ret; ++ ++ ret = rsnd_src_set_convert_rate_gen1(mod, rdai, io); ++ if (ret < 0) ++ return ret; ++ ++ ret = rsnd_src_set_convert_timing_gen1(mod, rdai, io); ++ if (ret < 0) ++ return ret; ++ ++ return 0; ++} ++ ++static int rsnd_src_start_gen1(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ int id = rsnd_mod_id(mod); ++ ++ rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id)); ++ ++ return rsnd_src_start(mod, rdai, io); ++} ++ ++static int rsnd_src_stop_gen1(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ int id = rsnd_mod_id(mod); ++ ++ rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0); ++ ++ return rsnd_src_stop(mod, rdai, io); ++} ++ ++static struct rsnd_mod_ops rsnd_src_gen1_ops = { ++ .name = "sru (gen1)", ++ .init = rsnd_src_init_gen1, ++ .quit = rsnd_src_quit, ++ .start = rsnd_src_start_gen1, ++ .stop = rsnd_src_stop_gen1, ++}; ++ ++/* ++ * Gen2 functions ++ */ ++static int rsnd_src_set_convert_rate_gen2(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ int ret; ++ ++ ret = rsnd_src_set_convert_rate(mod, rdai, io); ++ if (ret < 0) ++ return ret; ++ ++ rsnd_mod_write(mod, SSI_BUSIF_ADINR, rsnd_mod_read(mod, SRC_ADINR)); ++ rsnd_mod_write(mod, SSI_BUSIF_MODE, rsnd_mod_read(mod, SRC_BUSIF_MODE)); ++ ++ rsnd_mod_write(mod, SRC_SRCCR, 0x00011110); ++ ++ rsnd_mod_write(mod, SRC_BSDSR, 0x01800000); ++ rsnd_mod_write(mod, SRC_BSISR, 0x00100060); ++ ++ return 0; ++} ++ ++static int rsnd_src_set_convert_timing_gen2(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); ++ struct rsnd_src *src = rsnd_mod_to_src(mod); ++ u32 convert_rate = rsnd_src_convert_rate(src); ++ int ret; ++ ++ if (convert_rate) ++ ret = rsnd_adg_set_convert_clk_gen2(mod, rdai, io, ++ runtime->rate, ++ convert_rate); ++ else ++ ret = rsnd_adg_set_convert_timing_gen2(mod, rdai, io); ++ ++ return ret; ++} ++ ++static int rsnd_src_probe_gen2(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct rsnd_priv *priv = rsnd_mod_to_priv(mod); ++ struct rcar_snd_info *info = rsnd_priv_to_info(priv); ++ struct rsnd_src *src = rsnd_mod_to_src(mod); ++ struct rsnd_mod *ssi = rsnd_ssi_mod_get(priv, rsnd_mod_id(mod)); ++ struct device *dev = rsnd_priv_to_dev(priv); ++ int ret; ++ int is_play; ++ ++ if (info->dai_info) ++ is_play = rsnd_info_is_playback(priv, src); ++ else ++ is_play = rsnd_ssi_is_play(ssi); ++ ++ ret = rsnd_dma_init(priv, ++ rsnd_mod_to_dma(mod), ++ is_play, ++ src->info->dma_id); ++ if (ret < 0) ++ dev_err(dev, "SRC DMA failed\n"); ++ ++ return ret; ++} ++ ++static int rsnd_src_remove_gen2(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ rsnd_dma_quit(rsnd_mod_to_priv(mod), rsnd_mod_to_dma(mod)); ++ ++ return 0; ++} ++ ++static int rsnd_src_init_gen2(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ int ret; ++ ++ ret = rsnd_src_init(mod, rdai, io); ++ if (ret < 0) ++ return ret; ++ ++ ret = rsnd_src_set_convert_rate_gen2(mod, rdai, io); ++ if (ret < 0) ++ return ret; ++ ++ ret = rsnd_src_set_convert_timing_gen2(mod, rdai, io); ++ if (ret < 0) ++ return ret; ++ ++ return 0; ++} ++ ++static int rsnd_src_start_gen2(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct rsnd_src *src = rsnd_mod_to_src(mod); ++ ++ rsnd_dma_start(rsnd_mod_to_dma(&src->mod)); ++ ++ rsnd_mod_write(mod, SSI_CTRL, 0x1); ++ rsnd_mod_write(mod, SRC_CTRL, 0x11); ++ ++ return rsnd_src_start(mod, rdai, io); ++} ++ ++static int rsnd_src_stop_gen2(struct rsnd_mod *mod, ++ struct rsnd_dai *rdai, ++ struct rsnd_dai_stream *io) ++{ ++ struct rsnd_src *src = rsnd_mod_to_src(mod); ++ ++ rsnd_mod_write(mod, SSI_CTRL, 0); ++ rsnd_mod_write(mod, SRC_CTRL, 0); ++ ++ rsnd_dma_stop(rsnd_mod_to_dma(&src->mod)); ++ ++ return rsnd_src_stop(mod, rdai, io); ++} ++ +static struct rsnd_mod_ops rsnd_src_gen2_ops = { + .name = "src (gen2)", + .probe = rsnd_src_probe_gen2, @@ -782,100 +1518,76 @@ index 3526a5c2f608..ea6a214985d0 100644 + .quit = rsnd_src_quit, + .start = rsnd_src_start_gen2, + .stop = rsnd_src_stop_gen2, - }; - --struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id) ++}; ++ +struct rsnd_mod *rsnd_src_mod_get(struct rsnd_priv *priv, int id) - { -- if (WARN_ON(id < 0 || id >= rsnd_scu_nr(priv))) ++{ + if (WARN_ON(id < 0 || id >= rsnd_src_nr(priv))) - id = 0; - -- return &((struct rsnd_scu *)(priv->scu) + id)->mod; ++ id = 0; ++ + return &((struct rsnd_src *)(priv->src) + id)->mod; - } - --int rsnd_scu_probe(struct platform_device *pdev, ++} ++ +int rsnd_src_probe(struct platform_device *pdev, - struct rsnd_priv *priv) - { - struct rcar_snd_info *info = rsnd_priv_to_info(priv); - struct device *dev = rsnd_priv_to_dev(priv); -- struct rsnd_scu *scu; ++ struct rsnd_priv *priv) ++{ ++ struct rcar_snd_info *info = rsnd_priv_to_info(priv); ++ struct device *dev = rsnd_priv_to_dev(priv); + struct rsnd_src *src; - struct rsnd_mod_ops *ops; - struct clk *clk; -- char name[RSND_SCU_NAME_SIZE]; ++ struct rsnd_mod_ops *ops; ++ struct clk *clk; + char name[RSND_SRC_NAME_SIZE]; - int i, nr; - - /* -- * init SCU ++ int i, nr; ++ ++ /* + * init SRC - */ -- nr = info->scu_info_nr; ++ */ + nr = info->src_info_nr; - if (!nr) - return 0; - -- scu = devm_kzalloc(dev, sizeof(*scu) * nr, GFP_KERNEL); -- if (!scu) { -- dev_err(dev, "SCU allocate failed\n"); ++ if (!nr) ++ return 0; ++ + src = devm_kzalloc(dev, sizeof(*src) * nr, GFP_KERNEL); + if (!src) { + dev_err(dev, "SRC allocate failed\n"); - return -ENOMEM; - } - -- priv->scu_nr = nr; -- priv->scu = scu; ++ return -ENOMEM; ++ } ++ + priv->src_nr = nr; + priv->src = src; - -- for_each_rsnd_scu(scu, priv, i) { -- snprintf(name, RSND_SCU_NAME_SIZE, "scu.%d", i); ++ + for_each_rsnd_src(src, priv, i) { + snprintf(name, RSND_SRC_NAME_SIZE, "src.%d", i); - - clk = devm_clk_get(dev, name); ++ ++ clk = devm_clk_get(dev, name); + if (IS_ERR(clk)) { + snprintf(name, RSND_SRC_NAME_SIZE, "scu.%d", i); + clk = devm_clk_get(dev, name); + } + - if (IS_ERR(clk)) - return PTR_ERR(clk); - -- scu->info = &info->scu_info[i]; -- scu->clk = clk; ++ if (IS_ERR(clk)) ++ return PTR_ERR(clk); ++ + src->info = &info->src_info[i]; + src->clk = clk; - -- ops = &rsnd_scu_non_ops; -- if (rsnd_scu_hpbif_is_enable(scu)) { ++ + ops = &rsnd_src_non_ops; + if (rsnd_src_hpbif_is_enable(src)) { - if (rsnd_is_gen1(priv)) -- ops = &rsnd_scu_gen1_ops; ++ if (rsnd_is_gen1(priv)) + ops = &rsnd_src_gen1_ops; - if (rsnd_is_gen2(priv)) -- ops = &rsnd_scu_gen2_ops; ++ if (rsnd_is_gen2(priv)) + ops = &rsnd_src_gen2_ops; - } - -- rsnd_mod_init(priv, &scu->mod, ops, RSND_MOD_SCU, i); ++ } ++ + rsnd_mod_init(priv, &src->mod, ops, RSND_MOD_SRC, i); - -- dev_dbg(dev, "SCU%d probed\n", i); ++ + dev_dbg(dev, "SRC%d probed\n", i); - } - - return 0; -diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c -index 45f828ded935..633b23d209b9 100644 ++ } ++ ++ return 0; ++} --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c -@@ -121,7 +121,7 @@ static int rsnd_ssi_master_clk_start(struct rsnd_ssi *ssi, +@@ -121,7 +121,7 @@ static int rsnd_ssi_master_clk_start(str 1, 2, 4, 8, 16, 6, 12, }; unsigned int main_rate; @@ -884,7 +1596,7 @@ index 45f828ded935..633b23d209b9 100644 /* * Find best clock, and try to start ADG -@@ -287,7 +287,7 @@ static int rsnd_ssi_init(struct rsnd_mod *mod, +@@ -287,7 +287,7 @@ static int rsnd_ssi_init(struct rsnd_mod ssi->cr_own = cr; ssi->err = -1; /* ignore 1st error */ @@ -893,7 +1605,7 @@ index 45f828ded935..633b23d209b9 100644 return 0; } -@@ -387,7 +387,7 @@ static int rsnd_ssi_pio_start(struct rsnd_mod *mod, +@@ -387,7 +387,7 @@ static int rsnd_ssi_pio_start(struct rsn /* enable PIO IRQ */ ssi->cr_etc = UIEN | OIEN | DIEN; @@ -902,6 +1614,3 @@ index 45f828ded935..633b23d209b9 100644 rsnd_ssi_hw_start(ssi, rdai, io); --- -2.1.2 - diff --git a/patches.renesas/0073-ASoC-rsnd-add-DeviceTree-support.patch b/patches.renesas/0073-ASoC-rsnd-add-DeviceTree-support.patch index 7dc337dccdbd0..c940073ad29dc 100644 --- a/patches.renesas/0073-ASoC-rsnd-add-DeviceTree-support.patch +++ b/patches.renesas/0073-ASoC-rsnd-add-DeviceTree-support.patch @@ -10,19 +10,16 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 90e8e50fce3585d6f9902701de08389b027dadc6) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - .../devicetree/bindings/sound/renesas,rsnd.txt | 96 ++++++++++++++++ - sound/soc/sh/rcar/adg.c | 1 + - sound/soc/sh/rcar/core.c | 122 ++++++++++++++++++++- - sound/soc/sh/rcar/gen.c | 15 +++ - sound/soc/sh/rcar/rsnd.h | 11 ++ - sound/soc/sh/rcar/src.c | 36 ++++++ - sound/soc/sh/rcar/ssi.c | 56 ++++++++++ + Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 96 +++++++++++ + sound/soc/sh/rcar/adg.c | 1 + sound/soc/sh/rcar/core.c | 122 ++++++++++++++- + sound/soc/sh/rcar/gen.c | 15 + + sound/soc/sh/rcar/rsnd.h | 11 + + sound/soc/sh/rcar/src.c | 36 ++++ + sound/soc/sh/rcar/ssi.c | 56 ++++++ 7 files changed, 334 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/renesas,rsnd.txt -diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt -new file mode 100644 -index 000000000000..7c6d33f29796 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt @@ -0,0 +1,96 @@ @@ -122,11 +119,9 @@ index 000000000000..7c6d33f29796 + }; + }; +}; -diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c -index 953f1cce982d..69c44269ebdb 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c -@@ -392,6 +392,7 @@ static void rsnd_adg_ssi_clk_init(struct rsnd_priv *priv, struct rsnd_adg *adg) +@@ -392,6 +392,7 @@ static void rsnd_adg_ssi_clk_init(struct } int rsnd_adg_probe(struct platform_device *pdev, @@ -134,8 +129,6 @@ index 953f1cce982d..69c44269ebdb 100644 struct rsnd_priv *priv) { struct rsnd_adg *adg; -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index d836e8a9fdce..215b668166be 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -100,6 +100,21 @@ @@ -160,7 +153,7 @@ index d836e8a9fdce..215b668166be 100644 /* * rsnd_platform functions */ -@@ -620,7 +635,92 @@ static int rsnd_path_init(struct rsnd_priv *priv, +@@ -620,7 +635,92 @@ static int rsnd_path_init(struct rsnd_pr return ret; } @@ -253,7 +246,7 @@ index d836e8a9fdce..215b668166be 100644 struct rsnd_priv *priv) { struct snd_soc_dai_driver *drv; -@@ -628,13 +728,16 @@ static int rsnd_dai_probe(struct platform_device *pdev, +@@ -628,13 +728,16 @@ static int rsnd_dai_probe(struct platfor struct rsnd_dai *rdai; struct rsnd_mod *pmod, *cmod; struct device *dev = rsnd_priv_to_dev(priv); @@ -271,7 +264,7 @@ index d836e8a9fdce..215b668166be 100644 if (!dai_nr) { /* get max dai nr */ for (dai_nr = 0; dai_nr < 32; dai_nr++) { -@@ -802,7 +905,10 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -801,7 +904,10 @@ static int rsnd_probe(struct platform_de struct rsnd_priv *priv; struct device *dev = &pdev->dev; struct rsnd_dai *rdai; @@ -282,7 +275,7 @@ index d836e8a9fdce..215b668166be 100644 struct rsnd_priv *priv) = { rsnd_gen_probe, rsnd_ssi_probe, -@@ -812,7 +918,16 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -811,7 +917,16 @@ static int rsnd_probe(struct platform_de }; int ret, i; @@ -300,7 +293,7 @@ index d836e8a9fdce..215b668166be 100644 if (!info) { dev_err(dev, "driver needs R-Car sound information\n"); return -ENODEV; -@@ -835,7 +950,7 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -834,7 +949,7 @@ static int rsnd_probe(struct platform_de * init each module */ for (i = 0; i < ARRAY_SIZE(probe_func); i++) { @@ -309,7 +302,7 @@ index d836e8a9fdce..215b668166be 100644 if (ret) return ret; } -@@ -903,6 +1018,7 @@ static int rsnd_remove(struct platform_device *pdev) +@@ -902,6 +1017,7 @@ static int rsnd_remove(struct platform_d static struct platform_driver rsnd_driver = { .driver = { .name = "rcar_sound", @@ -317,11 +310,9 @@ index d836e8a9fdce..215b668166be 100644 }, .probe = rsnd_probe, .remove = rsnd_remove, -diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c -index 9094970dbdfb..50a1ef3eb1c6 100644 --- a/sound/soc/sh/rcar/gen.c +++ b/sound/soc/sh/rcar/gen.c -@@ -359,13 +359,28 @@ static int rsnd_gen1_probe(struct platform_device *pdev, +@@ -359,13 +359,28 @@ static int rsnd_gen1_probe(struct platfo /* * Gen */ @@ -350,8 +341,6 @@ index 9094970dbdfb..50a1ef3eb1c6 100644 gen = devm_kzalloc(dev, sizeof(*gen), GFP_KERNEL); if (!gen) { dev_err(dev, "GEN allocate failed\n"); -diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h -index c46e0afa54ae..619d198c7d2e 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -17,6 +17,8 @@ @@ -371,7 +360,7 @@ index c46e0afa54ae..619d198c7d2e 100644 struct rsnd_priv; struct rsnd_mod; struct rsnd_dai; -@@ -260,6 +263,7 @@ int rsnd_dai_pointer_offset(struct rsnd_dai_stream *io, int additional); +@@ -260,6 +263,7 @@ int rsnd_dai_pointer_offset(struct rsnd_ * R-Car Gen1/Gen2 */ int rsnd_gen_probe(struct platform_device *pdev, @@ -379,7 +368,7 @@ index c46e0afa54ae..619d198c7d2e 100644 struct rsnd_priv *priv); void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv, struct rsnd_mod *mod, -@@ -273,6 +277,7 @@ void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv, +@@ -273,6 +277,7 @@ void __iomem *rsnd_gen_reg_get(struct rs int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod); int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate); int rsnd_adg_probe(struct platform_device *pdev, @@ -387,7 +376,7 @@ index c46e0afa54ae..619d198c7d2e 100644 struct rsnd_priv *priv); int rsnd_adg_set_convert_clk_gen1(struct rsnd_priv *priv, struct rsnd_mod *mod, -@@ -290,6 +295,10 @@ int rsnd_adg_set_convert_timing_gen2(struct rsnd_mod *mod, +@@ -290,6 +295,10 @@ int rsnd_adg_set_convert_timing_gen2(str /* * R-Car sound priv */ @@ -406,7 +395,7 @@ index c46e0afa54ae..619d198c7d2e 100644 struct rsnd_priv *priv); struct rsnd_mod *rsnd_src_mod_get(struct rsnd_priv *priv, int id); unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv, -@@ -366,6 +376,7 @@ int rsnd_src_enable_ssi_irq(struct rsnd_mod *ssi_mod, +@@ -366,6 +376,7 @@ int rsnd_src_enable_ssi_irq(struct rsnd_ * R-Car SSI */ int rsnd_ssi_probe(struct platform_device *pdev, @@ -414,11 +403,9 @@ index c46e0afa54ae..619d198c7d2e 100644 struct rsnd_priv *priv); struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id); struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv, -diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c -index ea6a214985d0..eee75ebf961c 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c -@@ -628,7 +628,41 @@ struct rsnd_mod *rsnd_src_mod_get(struct rsnd_priv *priv, int id) +@@ -628,7 +628,41 @@ struct rsnd_mod *rsnd_src_mod_get(struct return &((struct rsnd_src *)(priv->src) + id)->mod; } @@ -460,7 +447,7 @@ index ea6a214985d0..eee75ebf961c 100644 struct rsnd_priv *priv) { struct rcar_snd_info *info = rsnd_priv_to_info(priv); -@@ -639,6 +673,8 @@ int rsnd_src_probe(struct platform_device *pdev, +@@ -639,6 +673,8 @@ int rsnd_src_probe(struct platform_devic char name[RSND_SRC_NAME_SIZE]; int i, nr; @@ -469,11 +456,9 @@ index ea6a214985d0..eee75ebf961c 100644 /* * init SRC */ -diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c -index 633b23d209b9..4b7e20603dd7 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c -@@ -588,7 +588,61 @@ static void rsnd_ssi_parent_clk_setup(struct rsnd_priv *priv, struct rsnd_ssi *s +@@ -588,7 +588,61 @@ static void rsnd_ssi_parent_clk_setup(st } } @@ -535,7 +520,7 @@ index 633b23d209b9..4b7e20603dd7 100644 struct rsnd_priv *priv) { struct rcar_snd_info *info = rsnd_priv_to_info(priv); -@@ -600,6 +654,8 @@ int rsnd_ssi_probe(struct platform_device *pdev, +@@ -600,6 +654,8 @@ int rsnd_ssi_probe(struct platform_devic char name[RSND_SSI_NAME_SIZE]; int i, nr; @@ -544,6 +529,3 @@ index 633b23d209b9..4b7e20603dd7 100644 /* * init SSI */ --- -2.1.2 - diff --git a/patches.renesas/0363-xhci-platform-Change-compatible-string-from-xhci-pla.patch b/patches.renesas/0363-xhci-platform-Change-compatible-string-from-xhci-pla.patch index 5733b1e2cf26a..208a0f75a61df 100644 --- a/patches.renesas/0363-xhci-platform-Change-compatible-string-from-xhci-pla.patch +++ b/patches.renesas/0363-xhci-platform-Change-compatible-string-from-xhci-pla.patch @@ -17,12 +17,10 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 0f94388b27c599015b74eedf1a32126a3f5fc0f9) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - Documentation/devicetree/bindings/usb/usb-xhci.txt | 4 ++-- - drivers/usb/host/xhci-plat.c | 1 + + Documentation/devicetree/bindings/usb/usb-xhci.txt | 4 ++-- + drivers/usb/host/xhci-plat.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) -diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt -index 5752df0e17a2..90f8f607d125 100644 --- a/Documentation/devicetree/bindings/usb/usb-xhci.txt +++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt @@ -1,14 +1,14 @@ @@ -42,11 +40,9 @@ index 5752df0e17a2..90f8f607d125 100644 reg = <0xf0931000 0x8c8>; interrupts = <0x0 0x4e 0x0>; }; -diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c -index 8abda5c73ca1..8affef910782 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c -@@ -226,6 +226,7 @@ static const struct dev_pm_ops xhci_plat_pm_ops = { +@@ -234,6 +234,7 @@ static const struct dev_pm_ops xhci_plat #ifdef CONFIG_OF static const struct of_device_id usb_xhci_of_match[] = { @@ -54,6 +50,3 @@ index 8abda5c73ca1..8affef910782 100644 { .compatible = "xhci-platform" }, { }, }; --- -2.1.2 - diff --git a/patches.renesas/0405-ata-use-CONFIG_PM_SLEEP-instead-of-CONFIG_PM-where-a.patch b/patches.renesas/0405-ata-use-CONFIG_PM_SLEEP-instead-of-CONFIG_PM-where-a.patch index 5687cc6f19ad4..7bd9ea30adbc0 100644 --- a/patches.renesas/0405-ata-use-CONFIG_PM_SLEEP-instead-of-CONFIG_PM-where-a.patch +++ b/patches.renesas/0405-ata-use-CONFIG_PM_SLEEP-instead-of-CONFIG_PM-where-a.patch @@ -1107,7 +1107,7 @@ Signed-off-by: Simon Horman <horms+renesas@verge.net.au> struct ata_host *host = pci_get_drvdata(pdev); --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c -@@ -937,7 +937,7 @@ static int sata_rcar_remove(struct platf +@@ -947,7 +947,7 @@ static int sata_rcar_remove(struct platf return 0; } @@ -1116,7 +1116,7 @@ Signed-off-by: Simon Horman <horms+renesas@verge.net.au> static int sata_rcar_suspend(struct device *dev) { struct ata_host *host = dev_get_drvdata(dev); -@@ -991,7 +991,7 @@ static struct platform_driver sata_rcar_ +@@ -1001,7 +1001,7 @@ static struct platform_driver sata_rcar_ .name = DRV_NAME, .owner = THIS_MODULE, .of_match_table = sata_rcar_match, diff --git a/patches.renesas/0531-usb-host-xhci-plat-add-support-for-the-Armada-375-38.patch b/patches.renesas/0531-usb-host-xhci-plat-add-support-for-the-Armada-375-38.patch index 42d9ffa8b86e2..41324f0129fbd 100644 --- a/patches.renesas/0531-usb-host-xhci-plat-add-support-for-the-Armada-375-38.patch +++ b/patches.renesas/0531-usb-host-xhci-plat-add-support-for-the-Armada-375-38.patch @@ -19,17 +19,15 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 973747928514bb636e3fe6a13b7ec6d6d73100f0) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - drivers/usb/host/Kconfig | 8 +++++ - drivers/usb/host/Makefile | 3 ++ - drivers/usb/host/xhci-mvebu.c | 72 +++++++++++++++++++++++++++++++++++++++++++ - drivers/usb/host/xhci-mvebu.h | 21 +++++++++++++ - drivers/usb/host/xhci-plat.c | 12 ++++++++ + drivers/usb/host/Kconfig | 8 ++++ + drivers/usb/host/Makefile | 3 + + drivers/usb/host/xhci-mvebu.c | 72 ++++++++++++++++++++++++++++++++++++++++++ + drivers/usb/host/xhci-mvebu.h | 21 ++++++++++++ + drivers/usb/host/xhci-plat.c | 12 +++++++ 5 files changed, 116 insertions(+) create mode 100644 drivers/usb/host/xhci-mvebu.c create mode 100644 drivers/usb/host/xhci-mvebu.h -diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index a9707da7da0b..ed79c7abf226 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -29,6 +29,14 @@ if USB_XHCI_HCD @@ -47,8 +45,6 @@ index a9707da7da0b..ed79c7abf226 100644 endif # USB_XHCI_HCD config USB_EHCI_HCD -diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile -index 7530468c9a4f..7c0886a35182 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -19,6 +19,9 @@ xhci-hcd-$(CONFIG_PCI) += xhci-pci.o @@ -61,9 +57,6 @@ index 7530468c9a4f..7c0886a35182 100644 endif obj-$(CONFIG_USB_WHCI_HCD) += whci/ -diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c -new file mode 100644 -index 000000000000..1eefc988192d --- /dev/null +++ b/drivers/usb/host/xhci-mvebu.c @@ -0,0 +1,72 @@ @@ -139,9 +132,6 @@ index 000000000000..1eefc988192d + + return 0; +} -diff --git a/drivers/usb/host/xhci-mvebu.h b/drivers/usb/host/xhci-mvebu.h -new file mode 100644 -index 000000000000..7ede92aa41f6 --- /dev/null +++ b/drivers/usb/host/xhci-mvebu.h @@ -0,0 +1,21 @@ @@ -166,8 +156,6 @@ index 000000000000..7ede92aa41f6 +} +#endif +#endif /* __LINUX_XHCI_MVEBU_H */ -diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c -index 17465cce6d0d..4010fc5bebaf 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -19,6 +19,7 @@ @@ -178,7 +166,7 @@ index 17465cce6d0d..4010fc5bebaf 100644 static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci) { -@@ -109,6 +110,15 @@ static int xhci_plat_probe(struct platform_device *pdev) +@@ -109,6 +110,15 @@ static int xhci_plat_probe(struct platfo if (!res) return -ENODEV; @@ -194,7 +182,7 @@ index 17465cce6d0d..4010fc5bebaf 100644 /* Initialize dma_mask and coherent_dma_mask to 32-bits */ ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); if (ret) -@@ -250,6 +260,8 @@ static const struct dev_pm_ops xhci_plat_pm_ops = { +@@ -258,6 +268,8 @@ static const struct dev_pm_ops xhci_plat static const struct of_device_id usb_xhci_of_match[] = { { .compatible = "generic-xhci" }, { .compatible = "xhci-platform" }, @@ -203,6 +191,3 @@ index 17465cce6d0d..4010fc5bebaf 100644 { }, }; MODULE_DEVICE_TABLE(of, usb_xhci_of_match); --- -2.1.2 - diff --git a/patches.renesas/0684-ASoC-rsnd-enable-to-use-multi-parameter-on-rsnd_dai_.patch b/patches.renesas/0684-ASoC-rsnd-enable-to-use-multi-parameter-on-rsnd_dai_.patch index b6fbfd11fd379..2434429ff0d51 100644 --- a/patches.renesas/0684-ASoC-rsnd-enable-to-use-multi-parameter-on-rsnd_dai_.patch +++ b/patches.renesas/0684-ASoC-rsnd-enable-to-use-multi-parameter-on-rsnd_dai_.patch @@ -12,11 +12,9 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 68b6af3656a1f3303cca094a19e26653fad1853a) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - sound/soc/sh/rcar/core.c | 26 +++++++++++++------------- + sound/soc/sh/rcar/core.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index 798c7cc8d8be..1f34cd4e949d 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -337,7 +337,7 @@ u32 rsnd_get_adinr(struct rsnd_mod *mod) @@ -53,7 +51,7 @@ index 798c7cc8d8be..1f34cd4e949d 100644 if (ret < 0) \ break; \ } \ -@@ -509,20 +509,20 @@ static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd, +@@ -509,20 +509,20 @@ static int rsnd_soc_dai_trigger(struct s if (ret < 0) goto dai_trigger_end; @@ -78,7 +76,7 @@ index 798c7cc8d8be..1f34cd4e949d 100644 if (ret < 0) goto dai_trigger_end; -@@ -950,11 +950,11 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -949,11 +949,11 @@ static int rsnd_probe(struct platform_de } for_each_rsnd_dai(rdai, priv, i) { @@ -92,7 +90,7 @@ index 798c7cc8d8be..1f34cd4e949d 100644 if (ret) return ret; } -@@ -997,11 +997,11 @@ static int rsnd_remove(struct platform_device *pdev) +@@ -996,11 +996,11 @@ static int rsnd_remove(struct platform_d pm_runtime_disable(&pdev->dev); for_each_rsnd_dai(rdai, priv, i) { @@ -106,6 +104,3 @@ index 798c7cc8d8be..1f34cd4e949d 100644 if (ret) return ret; } --- -2.1.2 - diff --git a/patches.renesas/0685-ASoC-rsnd-add-DVC-support.patch b/patches.renesas/0685-ASoC-rsnd-add-DVC-support.patch index 3a67c8c2743bb..de9af5eaf72b5 100644 --- a/patches.renesas/0685-ASoC-rsnd-add-DVC-support.patch +++ b/patches.renesas/0685-ASoC-rsnd-add-DVC-support.patch @@ -11,19 +11,17 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit bff58ea4f43d9b4a9fd6fb05fabc8f50f68131f5) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - include/sound/rcar_snd.h | 10 ++ - sound/soc/sh/rcar/Makefile | 2 +- - sound/soc/sh/rcar/adg.c | 18 +++ - sound/soc/sh/rcar/core.c | 20 ++++ - sound/soc/sh/rcar/dvc.c | 273 +++++++++++++++++++++++++++++++++++++++++++++ - sound/soc/sh/rcar/gen.c | 11 ++ - sound/soc/sh/rcar/rsnd.h | 40 +++++++ - sound/soc/sh/rcar/src.c | 4 +- + include/sound/rcar_snd.h | 10 + + sound/soc/sh/rcar/Makefile | 2 + sound/soc/sh/rcar/adg.c | 18 ++ + sound/soc/sh/rcar/core.c | 20 +++ + sound/soc/sh/rcar/dvc.c | 273 +++++++++++++++++++++++++++++++++++++++++++++ + sound/soc/sh/rcar/gen.c | 11 + + sound/soc/sh/rcar/rsnd.h | 40 ++++++ + sound/soc/sh/rcar/src.c | 4 8 files changed, 376 insertions(+), 2 deletions(-) create mode 100644 sound/soc/sh/rcar/dvc.c -diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h -index a03268ec59c3..f4a706f82cb7 100644 --- a/include/sound/rcar_snd.h +++ b/include/sound/rcar_snd.h @@ -56,9 +56,17 @@ struct rsnd_src_platform_info { @@ -53,8 +51,6 @@ index a03268ec59c3..f4a706f82cb7 100644 struct rsnd_dai_platform_info *dai_info; int dai_info_nr; int (*start)(int id); -diff --git a/sound/soc/sh/rcar/Makefile b/sound/soc/sh/rcar/Makefile -index 7d0051ced838..9ac536429800 100644 --- a/sound/soc/sh/rcar/Makefile +++ b/sound/soc/sh/rcar/Makefile @@ -1,2 +1,2 @@ @@ -62,11 +58,9 @@ index 7d0051ced838..9ac536429800 100644 +snd-soc-rcar-objs := core.o gen.o src.o adg.o ssi.o dvc.o obj-$(CONFIG_SND_SOC_RCAR) += snd-soc-rcar.o \ No newline at end of file -diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c -index 41556b2ef21e..fc41a0e8b09f 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c -@@ -57,6 +57,24 @@ static u32 rsnd_adg_ssi_ws_timing_gen2(struct rsnd_dai_stream *io) +@@ -57,6 +57,24 @@ static u32 rsnd_adg_ssi_ws_timing_gen2(s return (0x6 + ws) << 8; } @@ -91,11 +85,9 @@ index 41556b2ef21e..fc41a0e8b09f 100644 static int rsnd_adg_set_src_timsel_gen2(struct rsnd_dai *rdai, struct rsnd_mod *mod, struct rsnd_dai_stream *io, -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index 1f34cd4e949d..964463dada87 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c -@@ -644,6 +644,11 @@ static int rsnd_path_init(struct rsnd_priv *priv, +@@ -644,6 +644,11 @@ static int rsnd_path_init(struct rsnd_pr if (ret < 0) return ret; @@ -107,7 +99,7 @@ index 1f34cd4e949d..964463dada87 100644 return ret; } -@@ -868,6 +873,20 @@ static struct snd_pcm_ops rsnd_pcm_ops = { +@@ -867,6 +872,20 @@ static struct snd_pcm_ops rsnd_pcm_ops = static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd) { @@ -128,7 +120,7 @@ index 1f34cd4e949d..964463dada87 100644 return snd_pcm_lib_preallocate_pages_for_all( rtd->pcm, SNDRV_DMA_TYPE_DEV, -@@ -907,6 +926,7 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -906,6 +925,7 @@ static int rsnd_probe(struct platform_de rsnd_gen_probe, rsnd_ssi_probe, rsnd_src_probe, @@ -136,9 +128,6 @@ index 1f34cd4e949d..964463dada87 100644 rsnd_adg_probe, rsnd_dai_probe, }; -diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c -new file mode 100644 -index 000000000000..74769b1be005 --- /dev/null +++ b/sound/soc/sh/rcar/dvc.c @@ -0,0 +1,273 @@ @@ -415,11 +404,9 @@ index 000000000000..74769b1be005 + + return 0; +} -diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c -index 50a1ef3eb1c6..a135d4c9d080 100644 --- a/sound/soc/sh/rcar/gen.c +++ b/sound/soc/sh/rcar/gen.c -@@ -181,6 +181,8 @@ static int rsnd_gen2_regmap_init(struct rsnd_priv *priv, struct rsnd_gen *gen) +@@ -181,6 +181,8 @@ static int rsnd_gen2_regmap_init(struct RSND_GEN2_M_REG(gen, SCU, SRC_BUSIF_MODE, 0x0, 0x20), RSND_GEN2_M_REG(gen, SCU, SRC_ROUTE_MODE0,0xc, 0x20), RSND_GEN2_M_REG(gen, SCU, SRC_CTRL, 0x10, 0x20), @@ -428,7 +415,7 @@ index 50a1ef3eb1c6..a135d4c9d080 100644 RSND_GEN2_M_REG(gen, SCU, SRC_SWRSR, 0x200, 0x40), RSND_GEN2_M_REG(gen, SCU, SRC_SRCIR, 0x204, 0x40), RSND_GEN2_M_REG(gen, SCU, SRC_ADINR, 0x214, 0x40), -@@ -189,6 +191,14 @@ static int rsnd_gen2_regmap_init(struct rsnd_priv *priv, struct rsnd_gen *gen) +@@ -189,6 +191,14 @@ static int rsnd_gen2_regmap_init(struct RSND_GEN2_M_REG(gen, SCU, SRC_SRCCR, 0x224, 0x40), RSND_GEN2_M_REG(gen, SCU, SRC_BSDSR, 0x22c, 0x40), RSND_GEN2_M_REG(gen, SCU, SRC_BSISR, 0x238, 0x40), @@ -443,7 +430,7 @@ index 50a1ef3eb1c6..a135d4c9d080 100644 RSND_GEN2_S_REG(gen, ADG, BRRA, 0x00), RSND_GEN2_S_REG(gen, ADG, BRRB, 0x04), -@@ -207,6 +217,7 @@ static int rsnd_gen2_regmap_init(struct rsnd_priv *priv, struct rsnd_gen *gen) +@@ -207,6 +217,7 @@ static int rsnd_gen2_regmap_init(struct RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL2, 0x50), RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL3, 0x54), RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL4, 0x58), @@ -451,8 +438,6 @@ index 50a1ef3eb1c6..a135d4c9d080 100644 RSND_GEN2_M_REG(gen, SSI, SSICR, 0x00, 0x40), RSND_GEN2_M_REG(gen, SSI, SSISR, 0x04, 0x40), -diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h -index 6156ceebd58b..5aa790170b01 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -44,6 +44,15 @@ enum rsnd_reg { @@ -489,7 +474,7 @@ index 6156ceebd58b..5aa790170b01 100644 struct rsnd_of_data; struct rsnd_priv; -@@ -166,6 +179,7 @@ void rsnd_dma_quit(struct rsnd_priv *priv, +@@ -166,6 +179,7 @@ void rsnd_dma_quit(struct rsnd_priv *pr enum rsnd_mod_type { RSND_MOD_SRC = 0, RSND_MOD_SSI, @@ -515,7 +500,7 @@ index 6156ceebd58b..5aa790170b01 100644 struct rsnd_dai { char name[RSND_DAI_NAME_SIZE]; -@@ -286,6 +304,9 @@ int rsnd_adg_set_convert_clk_gen2(struct rsnd_mod *mod, +@@ -286,6 +304,9 @@ int rsnd_adg_set_convert_clk_gen2(struct int rsnd_adg_set_convert_timing_gen2(struct rsnd_mod *mod, struct rsnd_dai *rdai, struct rsnd_dai_stream *io); @@ -538,7 +523,7 @@ index 6156ceebd58b..5aa790170b01 100644 * below value will be filled on rsnd_dai_probe() */ struct snd_soc_dai_driver *daidrv; -@@ -374,4 +401,17 @@ int rsnd_ssi_probe(struct platform_device *pdev, +@@ -374,4 +401,17 @@ int rsnd_ssi_probe(struct platform_devic struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id); int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod); @@ -556,11 +541,9 @@ index 6156ceebd58b..5aa790170b01 100644 + + #endif -diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c -index 2a0f7e63ffc8..e3b078e7c3aa 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c -@@ -536,12 +536,14 @@ static int rsnd_src_init_gen2(struct rsnd_mod *mod, +@@ -536,12 +536,14 @@ static int rsnd_src_init_gen2(struct rsn static int rsnd_src_start_gen2(struct rsnd_mod *mod, struct rsnd_dai *rdai) { @@ -576,6 +559,3 @@ index 2a0f7e63ffc8..e3b078e7c3aa 100644 return rsnd_src_start(mod, rdai); } --- -2.1.2 - diff --git a/patches.renesas/0688-ASoC-rsnd-save-platform_device-instead-of-device.patch b/patches.renesas/0688-ASoC-rsnd-save-platform_device-instead-of-device.patch index 21515d335bf67..221406ada4a34 100644 --- a/patches.renesas/0688-ASoC-rsnd-save-platform_device-instead-of-device.patch +++ b/patches.renesas/0688-ASoC-rsnd-save-platform_device-instead-of-device.patch @@ -12,15 +12,13 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 9f464f8e076e6fcc8d249e76d84f4fb99c1fecff) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - sound/soc/sh/rcar/core.c | 2 +- - sound/soc/sh/rcar/rsnd.h | 5 +++-- + sound/soc/sh/rcar/core.c | 2 +- + sound/soc/sh/rcar/rsnd.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index 964463dada87..7bb9a2e69ad4 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c -@@ -956,7 +956,7 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -955,7 +955,7 @@ static int rsnd_probe(struct platform_de return -ENODEV; } @@ -29,8 +27,6 @@ index 964463dada87..7bb9a2e69ad4 100644 priv->info = info; spin_lock_init(&priv->lock); -diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h -index 5aa790170b01..344f9415e669 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -317,7 +317,7 @@ struct rsnd_of_data { @@ -52,6 +48,3 @@ index 5aa790170b01..344f9415e669 100644 #define rsnd_priv_to_info(priv) ((priv)->info) #define rsnd_lock(priv, flags) spin_lock_irqsave(&priv->lock, flags) #define rsnd_unlock(priv, flags) spin_unlock_irqrestore(&priv->lock, flags) --- -2.1.2 - diff --git a/patches.renesas/0798-ASoC-rsnd-fixup-dai-remove-callback-operation.patch b/patches.renesas/0798-ASoC-rsnd-fixup-dai-remove-callback-operation.patch index ac462697ea4de..a28e657d4b6c5 100644 --- a/patches.renesas/0798-ASoC-rsnd-fixup-dai-remove-callback-operation.patch +++ b/patches.renesas/0798-ASoC-rsnd-fixup-dai-remove-callback-operation.patch @@ -21,14 +21,12 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit d62a3dcd4d75b1713d12697afdbffaf9a9da8f43) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - sound/soc/sh/rcar/core.c | 22 +++++++++++----------- + sound/soc/sh/rcar/core.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index c48d999a3fce..f07742f1eb11 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c -@@ -1043,11 +1043,11 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -1042,11 +1042,11 @@ static int rsnd_probe(struct platform_de for_each_rsnd_dai(rdai, priv, i) { ret = rsnd_dai_call(probe, &rdai->playback, rdai); if (ret) @@ -42,7 +40,7 @@ index c48d999a3fce..f07742f1eb11 100644 } /* -@@ -1075,6 +1075,11 @@ static int rsnd_probe(struct platform_device *pdev) +@@ -1074,6 +1074,11 @@ static int rsnd_probe(struct platform_de exit_snd_soc: snd_soc_unregister_platform(dev); @@ -54,7 +52,7 @@ index c48d999a3fce..f07742f1eb11 100644 return ret; } -@@ -1083,21 +1088,16 @@ static int rsnd_remove(struct platform_device *pdev) +@@ -1082,21 +1087,16 @@ static int rsnd_remove(struct platform_d { struct rsnd_priv *priv = dev_get_drvdata(&pdev->dev); struct rsnd_dai *rdai; @@ -80,6 +78,3 @@ index c48d999a3fce..f07742f1eb11 100644 } static struct platform_driver rsnd_driver = { --- -2.1.2 - diff --git a/patches.renesas/0803-ASoC-rsnd-fixup-pcm_new-callback-method.patch b/patches.renesas/0803-ASoC-rsnd-fixup-pcm_new-callback-method.patch index f33f0302a8063..d27c113e20147 100644 --- a/patches.renesas/0803-ASoC-rsnd-fixup-pcm_new-callback-method.patch +++ b/patches.renesas/0803-ASoC-rsnd-fixup-pcm_new-callback-method.patch @@ -14,14 +14,12 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 7c63f3c02f5a998621758239abed43c5bd454b70) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - sound/soc/sh/rcar/core.c | 20 +++++++++----------- + sound/soc/sh/rcar/core.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) -diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c -index f07742f1eb11..d7c669790dd4 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c -@@ -944,19 +944,17 @@ static struct snd_pcm_ops rsnd_pcm_ops = { +@@ -943,19 +943,17 @@ static struct snd_pcm_ops rsnd_pcm_ops = static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd) { @@ -50,6 +48,3 @@ index f07742f1eb11..d7c669790dd4 100644 return snd_pcm_lib_preallocate_pages_for_all( rtd->pcm, --- -2.1.2 - diff --git a/patches.renesas/0920-ASoC-fsi-use-SNDRV_DMA_TYPE_DEV-for-sound-buffer.patch b/patches.renesas/0920-ASoC-fsi-use-SNDRV_DMA_TYPE_DEV-for-sound-buffer.patch index b365b25e6a28c..82bf222f36d57 100644 --- a/patches.renesas/0920-ASoC-fsi-use-SNDRV_DMA_TYPE_DEV-for-sound-buffer.patch +++ b/patches.renesas/0920-ASoC-fsi-use-SNDRV_DMA_TYPE_DEV-for-sound-buffer.patch @@ -16,18 +16,16 @@ Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit ffb83e8cb14cace1b08ceb56695b580c808d8a41) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - arch/arm/mach-shmobile/board-armadillo800eva.c | 4 +++ - arch/arm/mach-shmobile/board-kzm9g.c | 2 ++ - arch/arm/mach-shmobile/board-mackerel.c | 4 +++ - arch/sh/boards/mach-ecovec24/setup.c | 2 ++ - sound/soc/sh/fsi.c | 42 +++----------------------- + arch/arm/mach-shmobile/board-armadillo800eva.c | 4 ++ + arch/arm/mach-shmobile/board-kzm9g.c | 2 + + arch/arm/mach-shmobile/board-mackerel.c | 4 ++ + arch/sh/boards/mach-ecovec24/setup.c | 2 + + sound/soc/sh/fsi.c | 42 ++----------------------- 5 files changed, 17 insertions(+), 37 deletions(-) -diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c -index 4612a18c797f..922887b2492f 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c -@@ -1034,6 +1034,8 @@ static struct platform_device fsi_wm8978_device = { +@@ -1034,6 +1034,8 @@ static struct platform_device fsi_wm8978 .id = 0, .dev = { .platform_data = &fsi_wm8978_info, @@ -36,7 +34,7 @@ index 4612a18c797f..922887b2492f 100644 }, }; -@@ -1057,6 +1059,8 @@ static struct platform_device fsi_hdmi_device = { +@@ -1057,6 +1059,8 @@ static struct platform_device fsi_hdmi_d .id = 1, .dev = { .platform_data = &fsi2_hdmi_info, @@ -45,11 +43,9 @@ index 4612a18c797f..922887b2492f 100644 }, }; -diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c -index dc529f9f58d7..c4336cc1d8ed 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c -@@ -605,6 +605,8 @@ static struct platform_device fsi_ak4648_device = { +@@ -605,6 +605,8 @@ static struct platform_device fsi_ak4648 .name = "asoc-simple-card", .dev = { .platform_data = &fsi2_ak4648_info, @@ -58,11 +54,9 @@ index dc529f9f58d7..c4336cc1d8ed 100644 }, }; -diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c -index 304b76f3bf4a..79f448e93abb 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c -@@ -523,6 +523,8 @@ static struct platform_device fsi_hdmi_device = { +@@ -523,6 +523,8 @@ static struct platform_device fsi_hdmi_d .id = 1, .dev = { .platform_data = &fsi2_hdmi_info, @@ -71,7 +65,7 @@ index 304b76f3bf4a..79f448e93abb 100644 }, }; -@@ -919,6 +921,8 @@ static struct platform_device fsi_ak4643_device = { +@@ -919,6 +921,8 @@ static struct platform_device fsi_ak4643 .name = "asoc-simple-card", .dev = { .platform_data = &fsi2_ak4643_info, @@ -80,11 +74,9 @@ index 304b76f3bf4a..79f448e93abb 100644 }, }; -diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c -index 85d5255d259f..0d3049244cd3 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c -@@ -874,6 +874,8 @@ static struct platform_device fsi_da7210_device = { +@@ -874,6 +874,8 @@ static struct platform_device fsi_da7210 .name = "asoc-simple-card", .dev = { .platform_data = &fsi_da7210_info, @@ -93,8 +85,6 @@ index 85d5255d259f..0d3049244cd3 100644 }, }; -diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c -index 710a079a7377..7a6b632c3db8 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -233,7 +233,6 @@ struct fsi_stream { @@ -105,7 +95,7 @@ index 710a079a7377..7a6b632c3db8 100644 int dma_id; int loop_cnt; int additional_pos; -@@ -1279,11 +1278,6 @@ static irqreturn_t fsi_interrupt(int irq, void *data) +@@ -1279,11 +1278,6 @@ static irqreturn_t fsi_interrupt(int irq */ static int fsi_dma_init(struct fsi_priv *fsi, struct fsi_stream *io) { @@ -117,7 +107,7 @@ index 710a079a7377..7a6b632c3db8 100644 /* * 24bit data : 24bit bus / package in back * 16bit data : 16bit bus / stream mode -@@ -1293,19 +1287,7 @@ static int fsi_dma_init(struct fsi_priv *fsi, struct fsi_stream *io) +@@ -1293,19 +1287,7 @@ static int fsi_dma_init(struct fsi_priv io->loop_cnt = 2; /* push 1st, 2nd period first, then 3rd, 4th... */ io->additional_pos = 0; @@ -137,7 +127,7 @@ index 710a079a7377..7a6b632c3db8 100644 return 0; } -@@ -1317,7 +1299,8 @@ static dma_addr_t fsi_dma_get_area(struct fsi_stream *io, int additional) +@@ -1317,7 +1299,8 @@ static dma_addr_t fsi_dma_get_area(struc if (period >= runtime->periods) period = 0; @@ -160,7 +150,7 @@ index 710a079a7377..7a6b632c3db8 100644 io->buff_sample_pos += io->period_samples; io->period_pos++; -@@ -1369,8 +1346,6 @@ static void fsi_dma_do_work(struct work_struct *work) +@@ -1369,8 +1346,6 @@ static void fsi_dma_do_work(struct work_ for (i = 0; i < io->loop_cnt; i++) { buf = fsi_dma_get_area(io, io->additional_pos); @@ -169,7 +159,7 @@ index 710a079a7377..7a6b632c3db8 100644 desc = dmaengine_prep_slave_single(io->chan, buf, len, dir, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc) { -@@ -1495,7 +1470,6 @@ static int fsi_dma_remove(struct fsi_priv *fsi, struct fsi_stream *io) +@@ -1495,7 +1470,6 @@ static int fsi_dma_remove(struct fsi_pri static struct fsi_stream_handler fsi_dma_push_handler = { .init = fsi_dma_init, @@ -177,7 +167,7 @@ index 710a079a7377..7a6b632c3db8 100644 .probe = fsi_dma_probe, .transfer = fsi_dma_transfer, .remove = fsi_dma_remove, -@@ -1850,16 +1824,10 @@ static void fsi_pcm_free(struct snd_pcm *pcm) +@@ -1849,16 +1823,10 @@ static void fsi_pcm_free(struct snd_pcm static int fsi_pcm_new(struct snd_soc_pcm_runtime *rtd) { @@ -197,6 +187,3 @@ index 710a079a7377..7a6b632c3db8 100644 PREALLOC_BUFFER, PREALLOC_BUFFER_MAX); } --- -2.1.2 - diff --git a/patches.renesas/0963-usb-host-xhci-plat-add-support-for-the-R-Car-H2-and-.patch b/patches.renesas/0963-usb-host-xhci-plat-add-support-for-the-R-Car-H2-and-.patch index 07f961b29499c..42db72c723466 100644 --- a/patches.renesas/0963-usb-host-xhci-plat-add-support-for-the-R-Car-H2-and-.patch +++ b/patches.renesas/0963-usb-host-xhci-plat-add-support-for-the-R-Car-H2-and-.patch @@ -15,17 +15,15 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 4ac8918f3a737c21d81e250e4194c12ea2b7eb04) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- - drivers/usb/host/Kconfig | 8 +++ - drivers/usb/host/Makefile | 3 + - drivers/usb/host/xhci-plat.c | 19 ++++++ - drivers/usb/host/xhci-rcar.c | 148 +++++++++++++++++++++++++++++++++++++++++++ - drivers/usb/host/xhci-rcar.h | 27 ++++++++ + drivers/usb/host/Kconfig | 8 ++ + drivers/usb/host/Makefile | 3 + drivers/usb/host/xhci-plat.c | 19 +++++ + drivers/usb/host/xhci-rcar.c | 148 +++++++++++++++++++++++++++++++++++++++++++ + drivers/usb/host/xhci-rcar.h | 27 +++++++ 5 files changed, 205 insertions(+) create mode 100644 drivers/usb/host/xhci-rcar.c create mode 100644 drivers/usb/host/xhci-rcar.h -diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index ed79c7abf226..eba5893285f1 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -37,6 +37,14 @@ config USB_XHCI_MVEBU @@ -43,8 +41,6 @@ index ed79c7abf226..eba5893285f1 100644 endif # USB_XHCI_HCD config USB_EHCI_HCD -diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile -index 7c0886a35182..b59ca3c9415d 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -22,6 +22,9 @@ ifneq ($(CONFIG_USB_XHCI_PLATFORM), ) @@ -57,8 +53,6 @@ index 7c0886a35182..b59ca3c9415d 100644 endif obj-$(CONFIG_USB_WHCI_HCD) += whci/ -diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c -index 5cb5de1ee766..d1dda3334105 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -21,6 +21,7 @@ @@ -69,7 +63,7 @@ index 5cb5de1ee766..d1dda3334105 100644 static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci) { -@@ -35,11 +36,27 @@ static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci) +@@ -35,11 +36,27 @@ static void xhci_plat_quirks(struct devi /* called during probe() after chip reset completes */ static int xhci_plat_setup(struct usb_hcd *hcd) { @@ -97,7 +91,7 @@ index 5cb5de1ee766..d1dda3334105 100644 return xhci_run(hcd); } -@@ -260,6 +277,8 @@ static const struct of_device_id usb_xhci_of_match[] = { +@@ -268,6 +285,8 @@ static const struct of_device_id usb_xhc { .compatible = "xhci-platform" }, { .compatible = "marvell,armada-375-xhci"}, { .compatible = "marvell,armada-380-xhci"}, @@ -106,9 +100,6 @@ index 5cb5de1ee766..d1dda3334105 100644 { }, }; MODULE_DEVICE_TABLE(of, usb_xhci_of_match); -diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c -new file mode 100644 -index 000000000000..ff0d1b44ea58 --- /dev/null +++ b/drivers/usb/host/xhci-rcar.c @@ -0,0 +1,148 @@ @@ -260,9 +251,6 @@ index 000000000000..ff0d1b44ea58 + + return xhci_rcar_download_firmware(hcd->self.controller, hcd->regs); +} -diff --git a/drivers/usb/host/xhci-rcar.h b/drivers/usb/host/xhci-rcar.h -new file mode 100644 -index 000000000000..58501256715d --- /dev/null +++ b/drivers/usb/host/xhci-rcar.h @@ -0,0 +1,27 @@ @@ -293,6 +281,3 @@ index 000000000000..58501256715d +} +#endif +#endif /* _XHCI_RCAR_H */ --- -2.1.2 - |