From: codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
be17068-p0aYb1w59bq9tCD/VL7h6Q@public.gmane.org,
Marcus Cooper
<codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF
Date: Sat, 30 Jul 2016 16:27:16 +0200 [thread overview]
Message-ID: <20160730142716.29377-3-codekipper@gmail.com> (raw)
In-Reply-To: <20160730142716.29377-1-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
The A31 SoC uses the same SPDIF block as found in earlier SoCs, but its
reset is controlled via a separate reset controller.
The DMA also complains when the maxburst is set to 4 so it's been adjusted
to 8 which suites both the older and newer SoCs.
Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
sound/soc/sunxi/sun4i-spdif.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c
index 0b04fb0..88fbb3a 100644
--- a/sound/soc/sunxi/sun4i-spdif.c
+++ b/sound/soc/sunxi/sun4i-spdif.c
@@ -29,6 +29,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#include <linux/reset.h>
#include <sound/dmaengine_pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
@@ -162,6 +163,7 @@ struct sun4i_spdif_dev {
struct platform_device *pdev;
struct clk *spdif_clk;
struct clk *apb_clk;
+ struct reset_control *rst;
struct snd_soc_dai_driver cpu_dai_drv;
struct regmap *regmap;
struct snd_dmaengine_dai_dma_data dma_params_tx;
@@ -411,6 +413,7 @@ static const struct snd_soc_dapm_route dit_routes[] = {
static const struct of_device_id sun4i_spdif_of_match[] = {
{ .compatible = "allwinner,sun4i-a10-spdif", },
+ { .compatible = "allwinner,sun6i-a31-spdif", },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, sun4i_spdif_of_match);
@@ -482,11 +485,23 @@ static int sun4i_spdif_probe(struct platform_device *pdev)
}
host->dma_params_tx.addr = res->start + SUN4I_SPDIF_TXFIFO;
- host->dma_params_tx.maxburst = 4;
+ host->dma_params_tx.maxburst = 8;
host->dma_params_tx.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
platform_set_drvdata(pdev, host);
+ if (of_device_is_compatible(pdev->dev.of_node,
+ "allwinner,sun6i-a31-spdif")) {
+ host->rst = devm_reset_control_get_optional(&pdev->dev, NULL);
+ if (IS_ERR(host->rst) && PTR_ERR(host->rst) == -EPROBE_DEFER) {
+ ret = -EPROBE_DEFER;
+ dev_err(&pdev->dev, "Failed to get reset: %d\n", ret);
+ goto err_disable_apb_clk;
+ }
+ if (!IS_ERR(host->rst))
+ reset_control_deassert(host->rst);
+ }
+
ret = devm_snd_soc_register_component(&pdev->dev,
&sun4i_spdif_component, &sun4i_spdif_dai, 1);
if (ret)
--
2.9.2
WARNING: multiple messages have this Message-ID (diff)
From: codekipper@gmail.com (codekipper at gmail.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF
Date: Sat, 30 Jul 2016 16:27:16 +0200 [thread overview]
Message-ID: <20160730142716.29377-3-codekipper@gmail.com> (raw)
In-Reply-To: <20160730142716.29377-1-codekipper@gmail.com>
From: Marcus Cooper <codekipper@gmail.com>
The A31 SoC uses the same SPDIF block as found in earlier SoCs, but its
reset is controlled via a separate reset controller.
The DMA also complains when the maxburst is set to 4 so it's been adjusted
to 8 which suites both the older and newer SoCs.
Signed-off-by: Marcus Cooper <codekipper@gmail.com>
---
sound/soc/sunxi/sun4i-spdif.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c
index 0b04fb0..88fbb3a 100644
--- a/sound/soc/sunxi/sun4i-spdif.c
+++ b/sound/soc/sunxi/sun4i-spdif.c
@@ -29,6 +29,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#include <linux/reset.h>
#include <sound/dmaengine_pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
@@ -162,6 +163,7 @@ struct sun4i_spdif_dev {
struct platform_device *pdev;
struct clk *spdif_clk;
struct clk *apb_clk;
+ struct reset_control *rst;
struct snd_soc_dai_driver cpu_dai_drv;
struct regmap *regmap;
struct snd_dmaengine_dai_dma_data dma_params_tx;
@@ -411,6 +413,7 @@ static const struct snd_soc_dapm_route dit_routes[] = {
static const struct of_device_id sun4i_spdif_of_match[] = {
{ .compatible = "allwinner,sun4i-a10-spdif", },
+ { .compatible = "allwinner,sun6i-a31-spdif", },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, sun4i_spdif_of_match);
@@ -482,11 +485,23 @@ static int sun4i_spdif_probe(struct platform_device *pdev)
}
host->dma_params_tx.addr = res->start + SUN4I_SPDIF_TXFIFO;
- host->dma_params_tx.maxburst = 4;
+ host->dma_params_tx.maxburst = 8;
host->dma_params_tx.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
platform_set_drvdata(pdev, host);
+ if (of_device_is_compatible(pdev->dev.of_node,
+ "allwinner,sun6i-a31-spdif")) {
+ host->rst = devm_reset_control_get_optional(&pdev->dev, NULL);
+ if (IS_ERR(host->rst) && PTR_ERR(host->rst) == -EPROBE_DEFER) {
+ ret = -EPROBE_DEFER;
+ dev_err(&pdev->dev, "Failed to get reset: %d\n", ret);
+ goto err_disable_apb_clk;
+ }
+ if (!IS_ERR(host->rst))
+ reset_control_deassert(host->rst);
+ }
+
ret = devm_snd_soc_register_component(&pdev->dev,
&sun4i_spdif_component, &sun4i_spdif_dai, 1);
if (ret)
--
2.9.2
WARNING: multiple messages have this Message-ID (diff)
From: codekipper@gmail.com
To: maxime.ripard@free-electrons.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-sunxi@googlegroups.com, lgirdwood@gmail.com,
broonie@kernel.org, linux-kernel@vger.kernel.org,
alsa-devel@alsa-project.org, be17068@iperbole.bo.it,
Marcus Cooper <codekipper@gmail.com>
Subject: [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF
Date: Sat, 30 Jul 2016 16:27:16 +0200 [thread overview]
Message-ID: <20160730142716.29377-3-codekipper@gmail.com> (raw)
In-Reply-To: <20160730142716.29377-1-codekipper@gmail.com>
From: Marcus Cooper <codekipper@gmail.com>
The A31 SoC uses the same SPDIF block as found in earlier SoCs, but its
reset is controlled via a separate reset controller.
The DMA also complains when the maxburst is set to 4 so it's been adjusted
to 8 which suites both the older and newer SoCs.
Signed-off-by: Marcus Cooper <codekipper@gmail.com>
---
sound/soc/sunxi/sun4i-spdif.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c
index 0b04fb0..88fbb3a 100644
--- a/sound/soc/sunxi/sun4i-spdif.c
+++ b/sound/soc/sunxi/sun4i-spdif.c
@@ -29,6 +29,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#include <linux/reset.h>
#include <sound/dmaengine_pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
@@ -162,6 +163,7 @@ struct sun4i_spdif_dev {
struct platform_device *pdev;
struct clk *spdif_clk;
struct clk *apb_clk;
+ struct reset_control *rst;
struct snd_soc_dai_driver cpu_dai_drv;
struct regmap *regmap;
struct snd_dmaengine_dai_dma_data dma_params_tx;
@@ -411,6 +413,7 @@ static const struct snd_soc_dapm_route dit_routes[] = {
static const struct of_device_id sun4i_spdif_of_match[] = {
{ .compatible = "allwinner,sun4i-a10-spdif", },
+ { .compatible = "allwinner,sun6i-a31-spdif", },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, sun4i_spdif_of_match);
@@ -482,11 +485,23 @@ static int sun4i_spdif_probe(struct platform_device *pdev)
}
host->dma_params_tx.addr = res->start + SUN4I_SPDIF_TXFIFO;
- host->dma_params_tx.maxburst = 4;
+ host->dma_params_tx.maxburst = 8;
host->dma_params_tx.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
platform_set_drvdata(pdev, host);
+ if (of_device_is_compatible(pdev->dev.of_node,
+ "allwinner,sun6i-a31-spdif")) {
+ host->rst = devm_reset_control_get_optional(&pdev->dev, NULL);
+ if (IS_ERR(host->rst) && PTR_ERR(host->rst) == -EPROBE_DEFER) {
+ ret = -EPROBE_DEFER;
+ dev_err(&pdev->dev, "Failed to get reset: %d\n", ret);
+ goto err_disable_apb_clk;
+ }
+ if (!IS_ERR(host->rst))
+ reset_control_deassert(host->rst);
+ }
+
ret = devm_snd_soc_register_component(&pdev->dev,
&sun4i_spdif_component, &sun4i_spdif_dai, 1);
if (ret)
--
2.9.2
next prev parent reply other threads:[~2016-07-30 14:27 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-30 14:27 [PATCH 0/2] ASoC: Extended SPDIF support to Allwinner A31 SoCs codekipper-Re5JQEeQqe8AvxtiuMwx3w
2016-07-30 14:27 ` codekipper
2016-07-30 14:27 ` codekipper at gmail.com
[not found] ` <20160730142716.29377-1-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-30 14:27 ` [PATCH 1/2] ASoC: sunxi: Add bindings for sun6i to SPDIF codekipper-Re5JQEeQqe8AvxtiuMwx3w
2016-07-30 14:27 ` codekipper
2016-07-30 14:27 ` codekipper at gmail.com
[not found] ` <20160730142716.29377-2-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-30 15:17 ` Maxime Ripard
2016-07-30 15:17 ` Maxime Ripard
2016-07-30 15:17 ` Maxime Ripard
2016-07-30 15:34 ` Code Kipper
2016-07-30 15:34 ` Code Kipper
2016-07-30 15:34 ` Code Kipper
[not found] ` <CAEKpxBn6aC0o7nixq-gjCCwFkAy+sb-hE5DTp5ikm+4LaPfCzw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-30 15:40 ` Maxime Ripard
2016-07-30 15:40 ` Maxime Ripard
2016-07-30 15:40 ` Maxime Ripard
2016-07-30 14:27 ` codekipper-Re5JQEeQqe8AvxtiuMwx3w [this message]
2016-07-30 14:27 ` [PATCH 2/2] ASoC: sunxi: compatibility " codekipper
2016-07-30 14:27 ` codekipper at gmail.com
[not found] ` <20160730142716.29377-3-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-30 14:40 ` Julian Calaby
2016-07-30 14:40 ` [linux-sunxi] " Julian Calaby
2016-07-30 14:40 ` Julian Calaby
[not found] ` <CAGRGNgU-7skLeRNOxfVpqNXSaLTLA+vAZrm8=sdo0NJLbopJ7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-30 15:21 ` Maxime Ripard
2016-07-30 15:21 ` [linux-sunxi] " Maxime Ripard
2016-07-30 15:21 ` Maxime Ripard
2016-07-30 14:52 ` Icenowy Zheng
2016-07-30 14:52 ` Icenowy Zheng
[not found] ` <170941469890365-9lNg7JtStwluio3avFS2gg@public.gmane.org>
2016-07-30 15:20 ` maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
2016-07-30 15:20 ` maxime.ripard
2016-07-30 15:20 ` maxime.ripard at free-electrons.com
2016-07-30 15:23 ` Icenowy Zheng
2016-07-30 15:23 ` Icenowy Zheng
2016-08-01 13:39 ` Chen-Yu Tsai
2016-08-01 13:39 ` [linux-sunxi] " Chen-Yu Tsai
2016-08-01 13:39 ` Chen-Yu Tsai
[not found] ` <CAGb2v65Hyp8U1OMrfy0Bo9-qC0eO5de+NjWQzch87_2Ty+fBqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-01 15:02 ` Icenowy Zheng
2016-08-01 15:02 ` [linux-sunxi] " Icenowy Zheng
2016-08-22 16:04 ` Maxime Ripard
2016-08-22 16:04 ` [linux-sunxi] " Maxime Ripard
2016-08-22 16:04 ` Maxime Ripard
2016-07-30 15:19 ` Maxime Ripard
2016-07-30 15:19 ` Maxime Ripard
2016-07-30 15:19 ` Maxime Ripard
2016-08-12 12:29 ` Applied "ASoC: sunxi: compatibility for sun6i to SPDIF" to the asoc tree Mark Brown
2016-08-12 12:29 ` Mark Brown
2016-08-12 12:29 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160730142716.29377-3-codekipper@gmail.com \
--to=codekipper-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=be17068-p0aYb1w59bq9tCD/VL7h6Q@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.