All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	linux-usb@vger.kernel.org,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	linux-fbdev@vger.kernel.org,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	linux-mips@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-mtd@lists.infradead.org, Tomas Cech <sleep_walker@suse.com>,
	linux-clk@vger.kernel.org, linux-leds@vger.kernel.org,
	linux-rtc@vger.kernel.org, Helge Deller <deller@gmx.de>,
	Marek Vasut <marek.vasut@gmail.com>,
	Paul Parsons <lost.distance@yahoo.com>,
	Sergey Lapin <slapin@ossfans.org>, Arnd Bergmann <arnd@arndb.de>,
	linux-pm@vger.kernel.org, linux-input@vger.kernel.org,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Lubomir Rintel <lkundrak@v3.sk>, Mark Brown <broonie@kernel.org>,
	dri-devel@lists.freedesktop.org,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Stephen Boyd <sboyd@kernel.org>,
	patches@opensource.cirrus.com,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michael Turquette <mturquette@baylibre.com>,
	alsa-devel@alsa-project.org, Daniel Mack <daniel@zonque.org>
Subject: [PATCH 33/48] ASoC: pxa: i2s: use normal MMIO accessors
Date: Tue, 19 Apr 2022 18:37:55 +0200	[thread overview]
Message-ID: <20220419163810.2118169-34-arnd@kernel.org> (raw)
In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

To avoid dereferencing hardwired constant pointers from a global header
file, change the driver to use devm_platform_ioremap_resource for getting
an __iomem pointer, and then using readl/writel on that.

Each pointer dereference gets changed by a search&replace, which leads
to a few overlong lines, but seems less risky than trying to clean up
the code at the same time.

Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/pxa/pxa2xx-i2s.c | 110 +++++++++++++++++++++----------------
 1 file changed, 62 insertions(+), 48 deletions(-)

diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 5164c60ba89f..746e6ec9198b 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -21,7 +21,6 @@
 #include <sound/pxa2xx-lib.h>
 #include <sound/dmaengine_pcm.h>
 
-#include <mach/pxa-regs.h>
 #include <linux/platform_data/asoc-pxa.h>
 
 #include "pxa2xx-i2s.h"
@@ -29,13 +28,13 @@
 /*
  * I2S Controller Register and Bit Definitions
  */
-#define SACR0		__REG(0x40400000)  /* Global Control Register */
-#define SACR1		__REG(0x40400004)  /* Serial Audio I 2 S/MSB-Justified Control Register */
-#define SASR0		__REG(0x4040000C)  /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
-#define SAIMR		__REG(0x40400014)  /* Serial Audio Interrupt Mask Register */
-#define SAICR		__REG(0x40400018)  /* Serial Audio Interrupt Clear Register */
-#define SADIV		__REG(0x40400060)  /* Audio Clock Divider Register. */
-#define SADR		__REG(0x40400080)  /* Serial Audio Data Register (TX and RX FIFO access Register). */
+#define SACR0		(0x0000)	/* Global Control Register */
+#define SACR1		(0x0004)	/* Serial Audio I 2 S/MSB-Justified Control Register */
+#define SASR0		(0x000C)	/* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
+#define SAIMR		(0x0014)	/* Serial Audio Interrupt Mask Register */
+#define SAICR		(0x0018)	/* Serial Audio Interrupt Clear Register */
+#define SADIV		(0x0060)	/* Audio Clock Divider Register. */
+#define SADR		(0x0080)	/* Serial Audio Data Register (TX and RX FIFO access Register). */
 
 #define SACR0_RFTH(x)	((x) << 12)	/* Rx FIFO Interrupt or DMA Trigger Threshold */
 #define SACR0_TFTH(x)	((x) << 8)	/* Tx FIFO Interrupt or DMA Trigger Threshold */
@@ -77,16 +76,15 @@ struct pxa_i2s_port {
 static struct pxa_i2s_port pxa_i2s;
 static struct clk *clk_i2s;
 static int clk_ena = 0;
+static void __iomem *i2s_reg_base;
 
 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = {
-	.addr		= __PREG(SADR),
 	.addr_width	= DMA_SLAVE_BUSWIDTH_4_BYTES,
 	.chan_name	= "tx",
 	.maxburst	= 32,
 };
 
 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = {
-	.addr		= __PREG(SADR),
 	.addr_width	= DMA_SLAVE_BUSWIDTH_4_BYTES,
 	.chan_name	= "rx",
 	.maxburst	= 32,
@@ -102,7 +100,7 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
 		return PTR_ERR(clk_i2s);
 
 	if (!snd_soc_dai_active(cpu_dai))
-		SACR0 = 0;
+		writel(0, i2s_reg_base + SACR0);
 
 	return 0;
 }
@@ -114,7 +112,7 @@ static int pxa_i2s_wait(void)
 
 	/* flush the Rx FIFO */
 	for (i = 0; i < 16; i++)
-		SADR;
+		readl(i2s_reg_base + SADR);
 	return 0;
 }
 
@@ -174,39 +172,39 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
 
 	/* is port used by another stream */
 	if (!(SACR0 & SACR0_ENB)) {
-		SACR0 = 0;
+		writel(0, i2s_reg_base + SACR0);
 		if (pxa_i2s.master)
-			SACR0 |= SACR0_BCKD;
+			writel(readl(i2s_reg_base + SACR0) | (SACR0_BCKD), i2s_reg_base + SACR0);
 
-		SACR0 |= SACR0_RFTH(14) | SACR0_TFTH(1);
-		SACR1 |= pxa_i2s.fmt;
+		writel(readl(i2s_reg_base + SACR0) | (SACR0_RFTH(14) | SACR0_TFTH(1)), i2s_reg_base + SACR0);
+		writel(readl(i2s_reg_base + SACR1) | (pxa_i2s.fmt), i2s_reg_base + SACR1);
 	}
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-		SAIMR |= SAIMR_TFS;
+		writel(readl(i2s_reg_base + SAIMR) | (SAIMR_TFS), i2s_reg_base + SAIMR);
 	else
-		SAIMR |= SAIMR_RFS;
+		writel(readl(i2s_reg_base + SAIMR) | (SAIMR_RFS), i2s_reg_base + SAIMR);
 
 	switch (params_rate(params)) {
 	case 8000:
-		SADIV = 0x48;
+		writel(0x48, i2s_reg_base + SADIV);
 		break;
 	case 11025:
-		SADIV = 0x34;
+		writel(0x34, i2s_reg_base + SADIV);
 		break;
 	case 16000:
-		SADIV = 0x24;
+		writel(0x24, i2s_reg_base + SADIV);
 		break;
 	case 22050:
-		SADIV = 0x1a;
+		writel(0x1a, i2s_reg_base + SADIV);
 		break;
 	case 44100:
-		SADIV = 0xd;
+		writel(0xd, i2s_reg_base + SADIV);
 		break;
 	case 48000:
-		SADIV = 0xc;
+		writel(0xc, i2s_reg_base + SADIV);
 		break;
 	case 96000: /* not in manual and possibly slightly inaccurate */
-		SADIV = 0x6;
+		writel(0x6, i2s_reg_base + SADIV);
 		break;
 	}
 
@@ -221,10 +219,10 @@ static int pxa2xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
 		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-			SACR1 &= ~SACR1_DRPL;
+			writel(readl(i2s_reg_base + SACR1) & (~SACR1_DRPL), i2s_reg_base + SACR1);
 		else
-			SACR1 &= ~SACR1_DREC;
-		SACR0 |= SACR0_ENB;
+			writel(readl(i2s_reg_base + SACR1) & (~SACR1_DREC), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SACR0) | (SACR0_ENB), i2s_reg_base + SACR0);
 		break;
 	case SNDRV_PCM_TRIGGER_RESUME:
 	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
@@ -243,15 +241,15 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
 				struct snd_soc_dai *dai)
 {
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
-		SACR1 |= SACR1_DRPL;
-		SAIMR &= ~SAIMR_TFS;
+		writel(readl(i2s_reg_base + SACR1) | (SACR1_DRPL), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SAIMR) & (~SAIMR_TFS), i2s_reg_base + SAIMR);
 	} else {
-		SACR1 |= SACR1_DREC;
-		SAIMR &= ~SAIMR_RFS;
+		writel(readl(i2s_reg_base + SACR1) | (SACR1_DREC), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SAIMR) & (~SAIMR_RFS), i2s_reg_base + SAIMR);
 	}
 
-	if ((SACR1 & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
-		SACR0 &= ~SACR0_ENB;
+	if ((readl(i2s_reg_base + SACR1) & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
+		writel(readl(i2s_reg_base + SACR0) & (~SACR0_ENB), i2s_reg_base + SACR0);
 		pxa_i2s_wait();
 		if (clk_ena) {
 			clk_disable_unprepare(clk_i2s);
@@ -264,13 +262,13 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
 static int pxa2xx_soc_pcm_suspend(struct snd_soc_component *component)
 {
 	/* store registers */
-	pxa_i2s.sacr0 = SACR0;
-	pxa_i2s.sacr1 = SACR1;
-	pxa_i2s.saimr = SAIMR;
-	pxa_i2s.sadiv = SADIV;
+	pxa_i2s.sacr0 = readl(i2s_reg_base + SACR0);
+	pxa_i2s.sacr1 = readl(i2s_reg_base + SACR1);
+	pxa_i2s.saimr = readl(i2s_reg_base + SAIMR);
+	pxa_i2s.sadiv = readl(i2s_reg_base + SADIV);
 
 	/* deactivate link */
-	SACR0 &= ~SACR0_ENB;
+	writel(readl(i2s_reg_base + SACR0) & (~SACR0_ENB), i2s_reg_base + SACR0);
 	pxa_i2s_wait();
 	return 0;
 }
@@ -279,12 +277,12 @@ static int pxa2xx_soc_pcm_resume(struct snd_soc_component *component)
 {
 	pxa_i2s_wait();
 
-	SACR0 = pxa_i2s.sacr0 & ~SACR0_ENB;
-	SACR1 = pxa_i2s.sacr1;
-	SAIMR = pxa_i2s.saimr;
-	SADIV = pxa_i2s.sadiv;
+	writel(pxa_i2s.sacr0 & ~SACR0_ENB, i2s_reg_base + SACR0);
+	writel(pxa_i2s.sacr1, i2s_reg_base + SACR1);
+	writel(pxa_i2s.saimr, i2s_reg_base + SAIMR);
+	writel(pxa_i2s.sadiv, i2s_reg_base + SADIV);
 
-	SACR0 = pxa_i2s.sacr0;
+	writel(pxa_i2s.sacr0, i2s_reg_base + SACR0);
 
 	return 0;
 }
@@ -306,12 +304,12 @@ static int pxa2xx_i2s_probe(struct snd_soc_dai *dai)
 	 * the SACR0[RST] bit must also be set and cleared to reset all
 	 * I2S controller registers.
 	 */
-	SACR0 = SACR0_RST;
-	SACR0 = 0;
+	writel(SACR0_RST, i2s_reg_base + SACR0);
+	writel(0, i2s_reg_base + SACR0);
 	/* Make sure RPL and REC are disabled */
-	SACR1 = SACR1_DRPL | SACR1_DREC;
+	writel(SACR1_DRPL | SACR1_DREC, i2s_reg_base + SACR1);
 	/* Along with FIFO servicing */
-	SAIMR &= ~(SAIMR_RFS | SAIMR_TFS);
+	writel(readl(i2s_reg_base + SAIMR) & (~(SAIMR_RFS | SAIMR_TFS)), i2s_reg_base + SAIMR);
 
 	snd_soc_dai_init_dma_data(dai, &pxa2xx_i2s_pcm_stereo_out,
 		&pxa2xx_i2s_pcm_stereo_in);
@@ -371,6 +369,22 @@ static const struct snd_soc_component_driver pxa_i2s_component = {
 
 static int pxa2xx_i2s_drv_probe(struct platform_device *pdev)
 {
+	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+	if (!res) {
+		dev_err(&pdev->dev, "missing MMIO resource\n");
+		return -ENXIO;
+	}
+
+	i2s_reg_base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(i2s_reg_base)) {
+		dev_err(&pdev->dev, "ioremap failed\n");
+		return PTR_ERR(i2s_reg_base);
+	}
+
+	pxa2xx_i2s_pcm_stereo_out.addr = res->start + SADR;
+	pxa2xx_i2s_pcm_stereo_in.addr = res->start + SADR;
+
 	return devm_snd_soc_register_component(&pdev->dev, &pxa_i2s_component,
 					       &pxa_i2s_dai, 1);
 }
-- 
2.29.2


WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org
Cc: Arnd Bergmann <arnd@arndb.de>, Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Philipp Zabel <philipp.zabel@gmail.com>,
	Lubomir Rintel <lkundrak@v3.sk>,
	Paul Parsons <lost.distance@yahoo.com>,
	Tomas Cech <sleep_walker@suse.com>,
	Sergey Lapin <slapin@ossfans.org>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Helge Deller <deller@gmx.de>, Mark Brown <broonie@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-ide@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-input@vger.kernel.org,
	patches@opensource.cirrus.com, linux-leds@vger.kernel.org,
	linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org,
	linux-rtc@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	alsa-devel@alsa-project.org
Subject: [PATCH 33/48] ASoC: pxa: i2s: use normal MMIO accessors
Date: Tue, 19 Apr 2022 18:37:55 +0200	[thread overview]
Message-ID: <20220419163810.2118169-34-arnd@kernel.org> (raw)
In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

To avoid dereferencing hardwired constant pointers from a global header
file, change the driver to use devm_platform_ioremap_resource for getting
an __iomem pointer, and then using readl/writel on that.

Each pointer dereference gets changed by a search&replace, which leads
to a few overlong lines, but seems less risky than trying to clean up
the code at the same time.

Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/pxa/pxa2xx-i2s.c | 110 +++++++++++++++++++++----------------
 1 file changed, 62 insertions(+), 48 deletions(-)

diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 5164c60ba89f..746e6ec9198b 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -21,7 +21,6 @@
 #include <sound/pxa2xx-lib.h>
 #include <sound/dmaengine_pcm.h>
 
-#include <mach/pxa-regs.h>
 #include <linux/platform_data/asoc-pxa.h>
 
 #include "pxa2xx-i2s.h"
@@ -29,13 +28,13 @@
 /*
  * I2S Controller Register and Bit Definitions
  */
-#define SACR0		__REG(0x40400000)  /* Global Control Register */
-#define SACR1		__REG(0x40400004)  /* Serial Audio I 2 S/MSB-Justified Control Register */
-#define SASR0		__REG(0x4040000C)  /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
-#define SAIMR		__REG(0x40400014)  /* Serial Audio Interrupt Mask Register */
-#define SAICR		__REG(0x40400018)  /* Serial Audio Interrupt Clear Register */
-#define SADIV		__REG(0x40400060)  /* Audio Clock Divider Register. */
-#define SADR		__REG(0x40400080)  /* Serial Audio Data Register (TX and RX FIFO access Register). */
+#define SACR0		(0x0000)	/* Global Control Register */
+#define SACR1		(0x0004)	/* Serial Audio I 2 S/MSB-Justified Control Register */
+#define SASR0		(0x000C)	/* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
+#define SAIMR		(0x0014)	/* Serial Audio Interrupt Mask Register */
+#define SAICR		(0x0018)	/* Serial Audio Interrupt Clear Register */
+#define SADIV		(0x0060)	/* Audio Clock Divider Register. */
+#define SADR		(0x0080)	/* Serial Audio Data Register (TX and RX FIFO access Register). */
 
 #define SACR0_RFTH(x)	((x) << 12)	/* Rx FIFO Interrupt or DMA Trigger Threshold */
 #define SACR0_TFTH(x)	((x) << 8)	/* Tx FIFO Interrupt or DMA Trigger Threshold */
@@ -77,16 +76,15 @@ struct pxa_i2s_port {
 static struct pxa_i2s_port pxa_i2s;
 static struct clk *clk_i2s;
 static int clk_ena = 0;
+static void __iomem *i2s_reg_base;
 
 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = {
-	.addr		= __PREG(SADR),
 	.addr_width	= DMA_SLAVE_BUSWIDTH_4_BYTES,
 	.chan_name	= "tx",
 	.maxburst	= 32,
 };
 
 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = {
-	.addr		= __PREG(SADR),
 	.addr_width	= DMA_SLAVE_BUSWIDTH_4_BYTES,
 	.chan_name	= "rx",
 	.maxburst	= 32,
@@ -102,7 +100,7 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
 		return PTR_ERR(clk_i2s);
 
 	if (!snd_soc_dai_active(cpu_dai))
-		SACR0 = 0;
+		writel(0, i2s_reg_base + SACR0);
 
 	return 0;
 }
@@ -114,7 +112,7 @@ static int pxa_i2s_wait(void)
 
 	/* flush the Rx FIFO */
 	for (i = 0; i < 16; i++)
-		SADR;
+		readl(i2s_reg_base + SADR);
 	return 0;
 }
 
@@ -174,39 +172,39 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
 
 	/* is port used by another stream */
 	if (!(SACR0 & SACR0_ENB)) {
-		SACR0 = 0;
+		writel(0, i2s_reg_base + SACR0);
 		if (pxa_i2s.master)
-			SACR0 |= SACR0_BCKD;
+			writel(readl(i2s_reg_base + SACR0) | (SACR0_BCKD), i2s_reg_base + SACR0);
 
-		SACR0 |= SACR0_RFTH(14) | SACR0_TFTH(1);
-		SACR1 |= pxa_i2s.fmt;
+		writel(readl(i2s_reg_base + SACR0) | (SACR0_RFTH(14) | SACR0_TFTH(1)), i2s_reg_base + SACR0);
+		writel(readl(i2s_reg_base + SACR1) | (pxa_i2s.fmt), i2s_reg_base + SACR1);
 	}
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-		SAIMR |= SAIMR_TFS;
+		writel(readl(i2s_reg_base + SAIMR) | (SAIMR_TFS), i2s_reg_base + SAIMR);
 	else
-		SAIMR |= SAIMR_RFS;
+		writel(readl(i2s_reg_base + SAIMR) | (SAIMR_RFS), i2s_reg_base + SAIMR);
 
 	switch (params_rate(params)) {
 	case 8000:
-		SADIV = 0x48;
+		writel(0x48, i2s_reg_base + SADIV);
 		break;
 	case 11025:
-		SADIV = 0x34;
+		writel(0x34, i2s_reg_base + SADIV);
 		break;
 	case 16000:
-		SADIV = 0x24;
+		writel(0x24, i2s_reg_base + SADIV);
 		break;
 	case 22050:
-		SADIV = 0x1a;
+		writel(0x1a, i2s_reg_base + SADIV);
 		break;
 	case 44100:
-		SADIV = 0xd;
+		writel(0xd, i2s_reg_base + SADIV);
 		break;
 	case 48000:
-		SADIV = 0xc;
+		writel(0xc, i2s_reg_base + SADIV);
 		break;
 	case 96000: /* not in manual and possibly slightly inaccurate */
-		SADIV = 0x6;
+		writel(0x6, i2s_reg_base + SADIV);
 		break;
 	}
 
@@ -221,10 +219,10 @@ static int pxa2xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
 		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-			SACR1 &= ~SACR1_DRPL;
+			writel(readl(i2s_reg_base + SACR1) & (~SACR1_DRPL), i2s_reg_base + SACR1);
 		else
-			SACR1 &= ~SACR1_DREC;
-		SACR0 |= SACR0_ENB;
+			writel(readl(i2s_reg_base + SACR1) & (~SACR1_DREC), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SACR0) | (SACR0_ENB), i2s_reg_base + SACR0);
 		break;
 	case SNDRV_PCM_TRIGGER_RESUME:
 	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
@@ -243,15 +241,15 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
 				struct snd_soc_dai *dai)
 {
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
-		SACR1 |= SACR1_DRPL;
-		SAIMR &= ~SAIMR_TFS;
+		writel(readl(i2s_reg_base + SACR1) | (SACR1_DRPL), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SAIMR) & (~SAIMR_TFS), i2s_reg_base + SAIMR);
 	} else {
-		SACR1 |= SACR1_DREC;
-		SAIMR &= ~SAIMR_RFS;
+		writel(readl(i2s_reg_base + SACR1) | (SACR1_DREC), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SAIMR) & (~SAIMR_RFS), i2s_reg_base + SAIMR);
 	}
 
-	if ((SACR1 & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
-		SACR0 &= ~SACR0_ENB;
+	if ((readl(i2s_reg_base + SACR1) & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
+		writel(readl(i2s_reg_base + SACR0) & (~SACR0_ENB), i2s_reg_base + SACR0);
 		pxa_i2s_wait();
 		if (clk_ena) {
 			clk_disable_unprepare(clk_i2s);
@@ -264,13 +262,13 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
 static int pxa2xx_soc_pcm_suspend(struct snd_soc_component *component)
 {
 	/* store registers */
-	pxa_i2s.sacr0 = SACR0;
-	pxa_i2s.sacr1 = SACR1;
-	pxa_i2s.saimr = SAIMR;
-	pxa_i2s.sadiv = SADIV;
+	pxa_i2s.sacr0 = readl(i2s_reg_base + SACR0);
+	pxa_i2s.sacr1 = readl(i2s_reg_base + SACR1);
+	pxa_i2s.saimr = readl(i2s_reg_base + SAIMR);
+	pxa_i2s.sadiv = readl(i2s_reg_base + SADIV);
 
 	/* deactivate link */
-	SACR0 &= ~SACR0_ENB;
+	writel(readl(i2s_reg_base + SACR0) & (~SACR0_ENB), i2s_reg_base + SACR0);
 	pxa_i2s_wait();
 	return 0;
 }
@@ -279,12 +277,12 @@ static int pxa2xx_soc_pcm_resume(struct snd_soc_component *component)
 {
 	pxa_i2s_wait();
 
-	SACR0 = pxa_i2s.sacr0 & ~SACR0_ENB;
-	SACR1 = pxa_i2s.sacr1;
-	SAIMR = pxa_i2s.saimr;
-	SADIV = pxa_i2s.sadiv;
+	writel(pxa_i2s.sacr0 & ~SACR0_ENB, i2s_reg_base + SACR0);
+	writel(pxa_i2s.sacr1, i2s_reg_base + SACR1);
+	writel(pxa_i2s.saimr, i2s_reg_base + SAIMR);
+	writel(pxa_i2s.sadiv, i2s_reg_base + SADIV);
 
-	SACR0 = pxa_i2s.sacr0;
+	writel(pxa_i2s.sacr0, i2s_reg_base + SACR0);
 
 	return 0;
 }
@@ -306,12 +304,12 @@ static int pxa2xx_i2s_probe(struct snd_soc_dai *dai)
 	 * the SACR0[RST] bit must also be set and cleared to reset all
 	 * I2S controller registers.
 	 */
-	SACR0 = SACR0_RST;
-	SACR0 = 0;
+	writel(SACR0_RST, i2s_reg_base + SACR0);
+	writel(0, i2s_reg_base + SACR0);
 	/* Make sure RPL and REC are disabled */
-	SACR1 = SACR1_DRPL | SACR1_DREC;
+	writel(SACR1_DRPL | SACR1_DREC, i2s_reg_base + SACR1);
 	/* Along with FIFO servicing */
-	SAIMR &= ~(SAIMR_RFS | SAIMR_TFS);
+	writel(readl(i2s_reg_base + SAIMR) & (~(SAIMR_RFS | SAIMR_TFS)), i2s_reg_base + SAIMR);
 
 	snd_soc_dai_init_dma_data(dai, &pxa2xx_i2s_pcm_stereo_out,
 		&pxa2xx_i2s_pcm_stereo_in);
@@ -371,6 +369,22 @@ static const struct snd_soc_component_driver pxa_i2s_component = {
 
 static int pxa2xx_i2s_drv_probe(struct platform_device *pdev)
 {
+	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+	if (!res) {
+		dev_err(&pdev->dev, "missing MMIO resource\n");
+		return -ENXIO;
+	}
+
+	i2s_reg_base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(i2s_reg_base)) {
+		dev_err(&pdev->dev, "ioremap failed\n");
+		return PTR_ERR(i2s_reg_base);
+	}
+
+	pxa2xx_i2s_pcm_stereo_out.addr = res->start + SADR;
+	pxa2xx_i2s_pcm_stereo_in.addr = res->start + SADR;
+
 	return devm_snd_soc_register_component(&pdev->dev, &pxa_i2s_component,
 					       &pxa_i2s_dai, 1);
 }
-- 
2.29.2


WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org
Cc: Arnd Bergmann <arnd@arndb.de>, Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Philipp Zabel <philipp.zabel@gmail.com>,
	Lubomir Rintel <lkundrak@v3.sk>,
	Paul Parsons <lost.distance@yahoo.com>,
	Tomas Cech <sleep_walker@suse.com>,
	Sergey Lapin <slapin@ossfans.org>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Helge Deller <deller@gmx.de>, Mark Brown <broonie@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-ide@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-input@vger.kernel.org,
	patches@opensource.cirrus.com, linux-leds@vger.kernel.org,
	linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org,
	linux-rtc@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	alsa-devel@alsa-project.org
Subject: [PATCH 33/48] ASoC: pxa: i2s: use normal MMIO accessors
Date: Tue, 19 Apr 2022 18:37:55 +0200	[thread overview]
Message-ID: <20220419163810.2118169-34-arnd@kernel.org> (raw)
In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

To avoid dereferencing hardwired constant pointers from a global header
file, change the driver to use devm_platform_ioremap_resource for getting
an __iomem pointer, and then using readl/writel on that.

Each pointer dereference gets changed by a search&replace, which leads
to a few overlong lines, but seems less risky than trying to clean up
the code at the same time.

Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/pxa/pxa2xx-i2s.c | 110 +++++++++++++++++++++----------------
 1 file changed, 62 insertions(+), 48 deletions(-)

diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 5164c60ba89f..746e6ec9198b 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -21,7 +21,6 @@
 #include <sound/pxa2xx-lib.h>
 #include <sound/dmaengine_pcm.h>
 
-#include <mach/pxa-regs.h>
 #include <linux/platform_data/asoc-pxa.h>
 
 #include "pxa2xx-i2s.h"
@@ -29,13 +28,13 @@
 /*
  * I2S Controller Register and Bit Definitions
  */
-#define SACR0		__REG(0x40400000)  /* Global Control Register */
-#define SACR1		__REG(0x40400004)  /* Serial Audio I 2 S/MSB-Justified Control Register */
-#define SASR0		__REG(0x4040000C)  /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
-#define SAIMR		__REG(0x40400014)  /* Serial Audio Interrupt Mask Register */
-#define SAICR		__REG(0x40400018)  /* Serial Audio Interrupt Clear Register */
-#define SADIV		__REG(0x40400060)  /* Audio Clock Divider Register. */
-#define SADR		__REG(0x40400080)  /* Serial Audio Data Register (TX and RX FIFO access Register). */
+#define SACR0		(0x0000)	/* Global Control Register */
+#define SACR1		(0x0004)	/* Serial Audio I 2 S/MSB-Justified Control Register */
+#define SASR0		(0x000C)	/* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
+#define SAIMR		(0x0014)	/* Serial Audio Interrupt Mask Register */
+#define SAICR		(0x0018)	/* Serial Audio Interrupt Clear Register */
+#define SADIV		(0x0060)	/* Audio Clock Divider Register. */
+#define SADR		(0x0080)	/* Serial Audio Data Register (TX and RX FIFO access Register). */
 
 #define SACR0_RFTH(x)	((x) << 12)	/* Rx FIFO Interrupt or DMA Trigger Threshold */
 #define SACR0_TFTH(x)	((x) << 8)	/* Tx FIFO Interrupt or DMA Trigger Threshold */
@@ -77,16 +76,15 @@ struct pxa_i2s_port {
 static struct pxa_i2s_port pxa_i2s;
 static struct clk *clk_i2s;
 static int clk_ena = 0;
+static void __iomem *i2s_reg_base;
 
 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = {
-	.addr		= __PREG(SADR),
 	.addr_width	= DMA_SLAVE_BUSWIDTH_4_BYTES,
 	.chan_name	= "tx",
 	.maxburst	= 32,
 };
 
 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = {
-	.addr		= __PREG(SADR),
 	.addr_width	= DMA_SLAVE_BUSWIDTH_4_BYTES,
 	.chan_name	= "rx",
 	.maxburst	= 32,
@@ -102,7 +100,7 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
 		return PTR_ERR(clk_i2s);
 
 	if (!snd_soc_dai_active(cpu_dai))
-		SACR0 = 0;
+		writel(0, i2s_reg_base + SACR0);
 
 	return 0;
 }
@@ -114,7 +112,7 @@ static int pxa_i2s_wait(void)
 
 	/* flush the Rx FIFO */
 	for (i = 0; i < 16; i++)
-		SADR;
+		readl(i2s_reg_base + SADR);
 	return 0;
 }
 
@@ -174,39 +172,39 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
 
 	/* is port used by another stream */
 	if (!(SACR0 & SACR0_ENB)) {
-		SACR0 = 0;
+		writel(0, i2s_reg_base + SACR0);
 		if (pxa_i2s.master)
-			SACR0 |= SACR0_BCKD;
+			writel(readl(i2s_reg_base + SACR0) | (SACR0_BCKD), i2s_reg_base + SACR0);
 
-		SACR0 |= SACR0_RFTH(14) | SACR0_TFTH(1);
-		SACR1 |= pxa_i2s.fmt;
+		writel(readl(i2s_reg_base + SACR0) | (SACR0_RFTH(14) | SACR0_TFTH(1)), i2s_reg_base + SACR0);
+		writel(readl(i2s_reg_base + SACR1) | (pxa_i2s.fmt), i2s_reg_base + SACR1);
 	}
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-		SAIMR |= SAIMR_TFS;
+		writel(readl(i2s_reg_base + SAIMR) | (SAIMR_TFS), i2s_reg_base + SAIMR);
 	else
-		SAIMR |= SAIMR_RFS;
+		writel(readl(i2s_reg_base + SAIMR) | (SAIMR_RFS), i2s_reg_base + SAIMR);
 
 	switch (params_rate(params)) {
 	case 8000:
-		SADIV = 0x48;
+		writel(0x48, i2s_reg_base + SADIV);
 		break;
 	case 11025:
-		SADIV = 0x34;
+		writel(0x34, i2s_reg_base + SADIV);
 		break;
 	case 16000:
-		SADIV = 0x24;
+		writel(0x24, i2s_reg_base + SADIV);
 		break;
 	case 22050:
-		SADIV = 0x1a;
+		writel(0x1a, i2s_reg_base + SADIV);
 		break;
 	case 44100:
-		SADIV = 0xd;
+		writel(0xd, i2s_reg_base + SADIV);
 		break;
 	case 48000:
-		SADIV = 0xc;
+		writel(0xc, i2s_reg_base + SADIV);
 		break;
 	case 96000: /* not in manual and possibly slightly inaccurate */
-		SADIV = 0x6;
+		writel(0x6, i2s_reg_base + SADIV);
 		break;
 	}
 
@@ -221,10 +219,10 @@ static int pxa2xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
 		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-			SACR1 &= ~SACR1_DRPL;
+			writel(readl(i2s_reg_base + SACR1) & (~SACR1_DRPL), i2s_reg_base + SACR1);
 		else
-			SACR1 &= ~SACR1_DREC;
-		SACR0 |= SACR0_ENB;
+			writel(readl(i2s_reg_base + SACR1) & (~SACR1_DREC), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SACR0) | (SACR0_ENB), i2s_reg_base + SACR0);
 		break;
 	case SNDRV_PCM_TRIGGER_RESUME:
 	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
@@ -243,15 +241,15 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
 				struct snd_soc_dai *dai)
 {
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
-		SACR1 |= SACR1_DRPL;
-		SAIMR &= ~SAIMR_TFS;
+		writel(readl(i2s_reg_base + SACR1) | (SACR1_DRPL), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SAIMR) & (~SAIMR_TFS), i2s_reg_base + SAIMR);
 	} else {
-		SACR1 |= SACR1_DREC;
-		SAIMR &= ~SAIMR_RFS;
+		writel(readl(i2s_reg_base + SACR1) | (SACR1_DREC), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SAIMR) & (~SAIMR_RFS), i2s_reg_base + SAIMR);
 	}
 
-	if ((SACR1 & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
-		SACR0 &= ~SACR0_ENB;
+	if ((readl(i2s_reg_base + SACR1) & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
+		writel(readl(i2s_reg_base + SACR0) & (~SACR0_ENB), i2s_reg_base + SACR0);
 		pxa_i2s_wait();
 		if (clk_ena) {
 			clk_disable_unprepare(clk_i2s);
@@ -264,13 +262,13 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
 static int pxa2xx_soc_pcm_suspend(struct snd_soc_component *component)
 {
 	/* store registers */
-	pxa_i2s.sacr0 = SACR0;
-	pxa_i2s.sacr1 = SACR1;
-	pxa_i2s.saimr = SAIMR;
-	pxa_i2s.sadiv = SADIV;
+	pxa_i2s.sacr0 = readl(i2s_reg_base + SACR0);
+	pxa_i2s.sacr1 = readl(i2s_reg_base + SACR1);
+	pxa_i2s.saimr = readl(i2s_reg_base + SAIMR);
+	pxa_i2s.sadiv = readl(i2s_reg_base + SADIV);
 
 	/* deactivate link */
-	SACR0 &= ~SACR0_ENB;
+	writel(readl(i2s_reg_base + SACR0) & (~SACR0_ENB), i2s_reg_base + SACR0);
 	pxa_i2s_wait();
 	return 0;
 }
@@ -279,12 +277,12 @@ static int pxa2xx_soc_pcm_resume(struct snd_soc_component *component)
 {
 	pxa_i2s_wait();
 
-	SACR0 = pxa_i2s.sacr0 & ~SACR0_ENB;
-	SACR1 = pxa_i2s.sacr1;
-	SAIMR = pxa_i2s.saimr;
-	SADIV = pxa_i2s.sadiv;
+	writel(pxa_i2s.sacr0 & ~SACR0_ENB, i2s_reg_base + SACR0);
+	writel(pxa_i2s.sacr1, i2s_reg_base + SACR1);
+	writel(pxa_i2s.saimr, i2s_reg_base + SAIMR);
+	writel(pxa_i2s.sadiv, i2s_reg_base + SADIV);
 
-	SACR0 = pxa_i2s.sacr0;
+	writel(pxa_i2s.sacr0, i2s_reg_base + SACR0);
 
 	return 0;
 }
@@ -306,12 +304,12 @@ static int pxa2xx_i2s_probe(struct snd_soc_dai *dai)
 	 * the SACR0[RST] bit must also be set and cleared to reset all
 	 * I2S controller registers.
 	 */
-	SACR0 = SACR0_RST;
-	SACR0 = 0;
+	writel(SACR0_RST, i2s_reg_base + SACR0);
+	writel(0, i2s_reg_base + SACR0);
 	/* Make sure RPL and REC are disabled */
-	SACR1 = SACR1_DRPL | SACR1_DREC;
+	writel(SACR1_DRPL | SACR1_DREC, i2s_reg_base + SACR1);
 	/* Along with FIFO servicing */
-	SAIMR &= ~(SAIMR_RFS | SAIMR_TFS);
+	writel(readl(i2s_reg_base + SAIMR) & (~(SAIMR_RFS | SAIMR_TFS)), i2s_reg_base + SAIMR);
 
 	snd_soc_dai_init_dma_data(dai, &pxa2xx_i2s_pcm_stereo_out,
 		&pxa2xx_i2s_pcm_stereo_in);
@@ -371,6 +369,22 @@ static const struct snd_soc_component_driver pxa_i2s_component = {
 
 static int pxa2xx_i2s_drv_probe(struct platform_device *pdev)
 {
+	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+	if (!res) {
+		dev_err(&pdev->dev, "missing MMIO resource\n");
+		return -ENXIO;
+	}
+
+	i2s_reg_base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(i2s_reg_base)) {
+		dev_err(&pdev->dev, "ioremap failed\n");
+		return PTR_ERR(i2s_reg_base);
+	}
+
+	pxa2xx_i2s_pcm_stereo_out.addr = res->start + SADR;
+	pxa2xx_i2s_pcm_stereo_in.addr = res->start + SADR;
+
 	return devm_snd_soc_register_component(&pdev->dev, &pxa_i2s_component,
 					       &pxa_i2s_dai, 1);
 }
-- 
2.29.2


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org
Cc: Arnd Bergmann <arnd@arndb.de>, Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Philipp Zabel <philipp.zabel@gmail.com>,
	Lubomir Rintel <lkundrak@v3.sk>,
	Paul Parsons <lost.distance@yahoo.com>,
	Tomas Cech <sleep_walker@suse.com>,
	Sergey Lapin <slapin@ossfans.org>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Helge Deller <deller@gmx.de>, Mark Brown <broonie@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-ide@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-input@vger.kernel.org,
	patches@opensource.cirrus.com, linux-leds@vger.kernel.org,
	linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org,
	linux-rtc@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	alsa-devel@alsa-project.org
Subject: [PATCH 33/48] ASoC: pxa: i2s: use normal MMIO accessors
Date: Tue, 19 Apr 2022 18:37:55 +0200	[thread overview]
Message-ID: <20220419163810.2118169-34-arnd@kernel.org> (raw)
In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

To avoid dereferencing hardwired constant pointers from a global header
file, change the driver to use devm_platform_ioremap_resource for getting
an __iomem pointer, and then using readl/writel on that.

Each pointer dereference gets changed by a search&replace, which leads
to a few overlong lines, but seems less risky than trying to clean up
the code at the same time.

Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/pxa/pxa2xx-i2s.c | 110 +++++++++++++++++++++----------------
 1 file changed, 62 insertions(+), 48 deletions(-)

diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 5164c60ba89f..746e6ec9198b 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -21,7 +21,6 @@
 #include <sound/pxa2xx-lib.h>
 #include <sound/dmaengine_pcm.h>
 
-#include <mach/pxa-regs.h>
 #include <linux/platform_data/asoc-pxa.h>
 
 #include "pxa2xx-i2s.h"
@@ -29,13 +28,13 @@
 /*
  * I2S Controller Register and Bit Definitions
  */
-#define SACR0		__REG(0x40400000)  /* Global Control Register */
-#define SACR1		__REG(0x40400004)  /* Serial Audio I 2 S/MSB-Justified Control Register */
-#define SASR0		__REG(0x4040000C)  /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
-#define SAIMR		__REG(0x40400014)  /* Serial Audio Interrupt Mask Register */
-#define SAICR		__REG(0x40400018)  /* Serial Audio Interrupt Clear Register */
-#define SADIV		__REG(0x40400060)  /* Audio Clock Divider Register. */
-#define SADR		__REG(0x40400080)  /* Serial Audio Data Register (TX and RX FIFO access Register). */
+#define SACR0		(0x0000)	/* Global Control Register */
+#define SACR1		(0x0004)	/* Serial Audio I 2 S/MSB-Justified Control Register */
+#define SASR0		(0x000C)	/* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
+#define SAIMR		(0x0014)	/* Serial Audio Interrupt Mask Register */
+#define SAICR		(0x0018)	/* Serial Audio Interrupt Clear Register */
+#define SADIV		(0x0060)	/* Audio Clock Divider Register. */
+#define SADR		(0x0080)	/* Serial Audio Data Register (TX and RX FIFO access Register). */
 
 #define SACR0_RFTH(x)	((x) << 12)	/* Rx FIFO Interrupt or DMA Trigger Threshold */
 #define SACR0_TFTH(x)	((x) << 8)	/* Tx FIFO Interrupt or DMA Trigger Threshold */
@@ -77,16 +76,15 @@ struct pxa_i2s_port {
 static struct pxa_i2s_port pxa_i2s;
 static struct clk *clk_i2s;
 static int clk_ena = 0;
+static void __iomem *i2s_reg_base;
 
 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = {
-	.addr		= __PREG(SADR),
 	.addr_width	= DMA_SLAVE_BUSWIDTH_4_BYTES,
 	.chan_name	= "tx",
 	.maxburst	= 32,
 };
 
 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = {
-	.addr		= __PREG(SADR),
 	.addr_width	= DMA_SLAVE_BUSWIDTH_4_BYTES,
 	.chan_name	= "rx",
 	.maxburst	= 32,
@@ -102,7 +100,7 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
 		return PTR_ERR(clk_i2s);
 
 	if (!snd_soc_dai_active(cpu_dai))
-		SACR0 = 0;
+		writel(0, i2s_reg_base + SACR0);
 
 	return 0;
 }
@@ -114,7 +112,7 @@ static int pxa_i2s_wait(void)
 
 	/* flush the Rx FIFO */
 	for (i = 0; i < 16; i++)
-		SADR;
+		readl(i2s_reg_base + SADR);
 	return 0;
 }
 
@@ -174,39 +172,39 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
 
 	/* is port used by another stream */
 	if (!(SACR0 & SACR0_ENB)) {
-		SACR0 = 0;
+		writel(0, i2s_reg_base + SACR0);
 		if (pxa_i2s.master)
-			SACR0 |= SACR0_BCKD;
+			writel(readl(i2s_reg_base + SACR0) | (SACR0_BCKD), i2s_reg_base + SACR0);
 
-		SACR0 |= SACR0_RFTH(14) | SACR0_TFTH(1);
-		SACR1 |= pxa_i2s.fmt;
+		writel(readl(i2s_reg_base + SACR0) | (SACR0_RFTH(14) | SACR0_TFTH(1)), i2s_reg_base + SACR0);
+		writel(readl(i2s_reg_base + SACR1) | (pxa_i2s.fmt), i2s_reg_base + SACR1);
 	}
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-		SAIMR |= SAIMR_TFS;
+		writel(readl(i2s_reg_base + SAIMR) | (SAIMR_TFS), i2s_reg_base + SAIMR);
 	else
-		SAIMR |= SAIMR_RFS;
+		writel(readl(i2s_reg_base + SAIMR) | (SAIMR_RFS), i2s_reg_base + SAIMR);
 
 	switch (params_rate(params)) {
 	case 8000:
-		SADIV = 0x48;
+		writel(0x48, i2s_reg_base + SADIV);
 		break;
 	case 11025:
-		SADIV = 0x34;
+		writel(0x34, i2s_reg_base + SADIV);
 		break;
 	case 16000:
-		SADIV = 0x24;
+		writel(0x24, i2s_reg_base + SADIV);
 		break;
 	case 22050:
-		SADIV = 0x1a;
+		writel(0x1a, i2s_reg_base + SADIV);
 		break;
 	case 44100:
-		SADIV = 0xd;
+		writel(0xd, i2s_reg_base + SADIV);
 		break;
 	case 48000:
-		SADIV = 0xc;
+		writel(0xc, i2s_reg_base + SADIV);
 		break;
 	case 96000: /* not in manual and possibly slightly inaccurate */
-		SADIV = 0x6;
+		writel(0x6, i2s_reg_base + SADIV);
 		break;
 	}
 
@@ -221,10 +219,10 @@ static int pxa2xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
 		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-			SACR1 &= ~SACR1_DRPL;
+			writel(readl(i2s_reg_base + SACR1) & (~SACR1_DRPL), i2s_reg_base + SACR1);
 		else
-			SACR1 &= ~SACR1_DREC;
-		SACR0 |= SACR0_ENB;
+			writel(readl(i2s_reg_base + SACR1) & (~SACR1_DREC), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SACR0) | (SACR0_ENB), i2s_reg_base + SACR0);
 		break;
 	case SNDRV_PCM_TRIGGER_RESUME:
 	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
@@ -243,15 +241,15 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
 				struct snd_soc_dai *dai)
 {
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
-		SACR1 |= SACR1_DRPL;
-		SAIMR &= ~SAIMR_TFS;
+		writel(readl(i2s_reg_base + SACR1) | (SACR1_DRPL), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SAIMR) & (~SAIMR_TFS), i2s_reg_base + SAIMR);
 	} else {
-		SACR1 |= SACR1_DREC;
-		SAIMR &= ~SAIMR_RFS;
+		writel(readl(i2s_reg_base + SACR1) | (SACR1_DREC), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SAIMR) & (~SAIMR_RFS), i2s_reg_base + SAIMR);
 	}
 
-	if ((SACR1 & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
-		SACR0 &= ~SACR0_ENB;
+	if ((readl(i2s_reg_base + SACR1) & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
+		writel(readl(i2s_reg_base + SACR0) & (~SACR0_ENB), i2s_reg_base + SACR0);
 		pxa_i2s_wait();
 		if (clk_ena) {
 			clk_disable_unprepare(clk_i2s);
@@ -264,13 +262,13 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
 static int pxa2xx_soc_pcm_suspend(struct snd_soc_component *component)
 {
 	/* store registers */
-	pxa_i2s.sacr0 = SACR0;
-	pxa_i2s.sacr1 = SACR1;
-	pxa_i2s.saimr = SAIMR;
-	pxa_i2s.sadiv = SADIV;
+	pxa_i2s.sacr0 = readl(i2s_reg_base + SACR0);
+	pxa_i2s.sacr1 = readl(i2s_reg_base + SACR1);
+	pxa_i2s.saimr = readl(i2s_reg_base + SAIMR);
+	pxa_i2s.sadiv = readl(i2s_reg_base + SADIV);
 
 	/* deactivate link */
-	SACR0 &= ~SACR0_ENB;
+	writel(readl(i2s_reg_base + SACR0) & (~SACR0_ENB), i2s_reg_base + SACR0);
 	pxa_i2s_wait();
 	return 0;
 }
@@ -279,12 +277,12 @@ static int pxa2xx_soc_pcm_resume(struct snd_soc_component *component)
 {
 	pxa_i2s_wait();
 
-	SACR0 = pxa_i2s.sacr0 & ~SACR0_ENB;
-	SACR1 = pxa_i2s.sacr1;
-	SAIMR = pxa_i2s.saimr;
-	SADIV = pxa_i2s.sadiv;
+	writel(pxa_i2s.sacr0 & ~SACR0_ENB, i2s_reg_base + SACR0);
+	writel(pxa_i2s.sacr1, i2s_reg_base + SACR1);
+	writel(pxa_i2s.saimr, i2s_reg_base + SAIMR);
+	writel(pxa_i2s.sadiv, i2s_reg_base + SADIV);
 
-	SACR0 = pxa_i2s.sacr0;
+	writel(pxa_i2s.sacr0, i2s_reg_base + SACR0);
 
 	return 0;
 }
@@ -306,12 +304,12 @@ static int pxa2xx_i2s_probe(struct snd_soc_dai *dai)
 	 * the SACR0[RST] bit must also be set and cleared to reset all
 	 * I2S controller registers.
 	 */
-	SACR0 = SACR0_RST;
-	SACR0 = 0;
+	writel(SACR0_RST, i2s_reg_base + SACR0);
+	writel(0, i2s_reg_base + SACR0);
 	/* Make sure RPL and REC are disabled */
-	SACR1 = SACR1_DRPL | SACR1_DREC;
+	writel(SACR1_DRPL | SACR1_DREC, i2s_reg_base + SACR1);
 	/* Along with FIFO servicing */
-	SAIMR &= ~(SAIMR_RFS | SAIMR_TFS);
+	writel(readl(i2s_reg_base + SAIMR) & (~(SAIMR_RFS | SAIMR_TFS)), i2s_reg_base + SAIMR);
 
 	snd_soc_dai_init_dma_data(dai, &pxa2xx_i2s_pcm_stereo_out,
 		&pxa2xx_i2s_pcm_stereo_in);
@@ -371,6 +369,22 @@ static const struct snd_soc_component_driver pxa_i2s_component = {
 
 static int pxa2xx_i2s_drv_probe(struct platform_device *pdev)
 {
+	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+	if (!res) {
+		dev_err(&pdev->dev, "missing MMIO resource\n");
+		return -ENXIO;
+	}
+
+	i2s_reg_base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(i2s_reg_base)) {
+		dev_err(&pdev->dev, "ioremap failed\n");
+		return PTR_ERR(i2s_reg_base);
+	}
+
+	pxa2xx_i2s_pcm_stereo_out.addr = res->start + SADR;
+	pxa2xx_i2s_pcm_stereo_in.addr = res->start + SADR;
+
 	return devm_snd_soc_register_component(&pdev->dev, &pxa_i2s_component,
 					       &pxa_i2s_dai, 1);
 }
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	linux-usb@vger.kernel.org,
	Philipp Zabel <philipp.zabel@gmail.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Sergey Lapin <slapin@ossfans.org>,
	linux-fbdev@vger.kernel.org,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-mtd@lists.infradead.org, Tomas Cech <sleep_walker@suse.com>,
	linux-clk@vger.kernel.org, linux-leds@vger.kernel.org,
	linux-rtc@vger.kernel.org, Helge Deller <deller@gmx.de>,
	Marek Vasut <marek.vasut@gmail.com>,
	Paul Parsons <lost.distance@yahoo.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-pm@vger.kernel.org, linux-input@vger.kernel.org,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Lubomir Rintel <lkundrak@v3.sk>, Mark Brown <broonie@kernel.org>,
	dri-devel@lists.freedesktop.org,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Stephen Boyd <sboyd@kernel.org>,
	patches@opensource.cirrus.com,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-mmc@vger.kernel.org, linux-mips@vger.kernel.org,
	Michael Turquette <mturquette@baylibre.com>,
	alsa-devel@alsa-project.org, Daniel Mack <daniel@zonque.org>
Subject: [PATCH 33/48] ASoC: pxa: i2s: use normal MMIO accessors
Date: Tue, 19 Apr 2022 18:37:55 +0200	[thread overview]
Message-ID: <20220419163810.2118169-34-arnd@kernel.org> (raw)
In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

To avoid dereferencing hardwired constant pointers from a global header
file, change the driver to use devm_platform_ioremap_resource for getting
an __iomem pointer, and then using readl/writel on that.

Each pointer dereference gets changed by a search&replace, which leads
to a few overlong lines, but seems less risky than trying to clean up
the code at the same time.

Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/pxa/pxa2xx-i2s.c | 110 +++++++++++++++++++++----------------
 1 file changed, 62 insertions(+), 48 deletions(-)

diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 5164c60ba89f..746e6ec9198b 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -21,7 +21,6 @@
 #include <sound/pxa2xx-lib.h>
 #include <sound/dmaengine_pcm.h>
 
-#include <mach/pxa-regs.h>
 #include <linux/platform_data/asoc-pxa.h>
 
 #include "pxa2xx-i2s.h"
@@ -29,13 +28,13 @@
 /*
  * I2S Controller Register and Bit Definitions
  */
-#define SACR0		__REG(0x40400000)  /* Global Control Register */
-#define SACR1		__REG(0x40400004)  /* Serial Audio I 2 S/MSB-Justified Control Register */
-#define SASR0		__REG(0x4040000C)  /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
-#define SAIMR		__REG(0x40400014)  /* Serial Audio Interrupt Mask Register */
-#define SAICR		__REG(0x40400018)  /* Serial Audio Interrupt Clear Register */
-#define SADIV		__REG(0x40400060)  /* Audio Clock Divider Register. */
-#define SADR		__REG(0x40400080)  /* Serial Audio Data Register (TX and RX FIFO access Register). */
+#define SACR0		(0x0000)	/* Global Control Register */
+#define SACR1		(0x0004)	/* Serial Audio I 2 S/MSB-Justified Control Register */
+#define SASR0		(0x000C)	/* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
+#define SAIMR		(0x0014)	/* Serial Audio Interrupt Mask Register */
+#define SAICR		(0x0018)	/* Serial Audio Interrupt Clear Register */
+#define SADIV		(0x0060)	/* Audio Clock Divider Register. */
+#define SADR		(0x0080)	/* Serial Audio Data Register (TX and RX FIFO access Register). */
 
 #define SACR0_RFTH(x)	((x) << 12)	/* Rx FIFO Interrupt or DMA Trigger Threshold */
 #define SACR0_TFTH(x)	((x) << 8)	/* Tx FIFO Interrupt or DMA Trigger Threshold */
@@ -77,16 +76,15 @@ struct pxa_i2s_port {
 static struct pxa_i2s_port pxa_i2s;
 static struct clk *clk_i2s;
 static int clk_ena = 0;
+static void __iomem *i2s_reg_base;
 
 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = {
-	.addr		= __PREG(SADR),
 	.addr_width	= DMA_SLAVE_BUSWIDTH_4_BYTES,
 	.chan_name	= "tx",
 	.maxburst	= 32,
 };
 
 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = {
-	.addr		= __PREG(SADR),
 	.addr_width	= DMA_SLAVE_BUSWIDTH_4_BYTES,
 	.chan_name	= "rx",
 	.maxburst	= 32,
@@ -102,7 +100,7 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
 		return PTR_ERR(clk_i2s);
 
 	if (!snd_soc_dai_active(cpu_dai))
-		SACR0 = 0;
+		writel(0, i2s_reg_base + SACR0);
 
 	return 0;
 }
@@ -114,7 +112,7 @@ static int pxa_i2s_wait(void)
 
 	/* flush the Rx FIFO */
 	for (i = 0; i < 16; i++)
-		SADR;
+		readl(i2s_reg_base + SADR);
 	return 0;
 }
 
@@ -174,39 +172,39 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
 
 	/* is port used by another stream */
 	if (!(SACR0 & SACR0_ENB)) {
-		SACR0 = 0;
+		writel(0, i2s_reg_base + SACR0);
 		if (pxa_i2s.master)
-			SACR0 |= SACR0_BCKD;
+			writel(readl(i2s_reg_base + SACR0) | (SACR0_BCKD), i2s_reg_base + SACR0);
 
-		SACR0 |= SACR0_RFTH(14) | SACR0_TFTH(1);
-		SACR1 |= pxa_i2s.fmt;
+		writel(readl(i2s_reg_base + SACR0) | (SACR0_RFTH(14) | SACR0_TFTH(1)), i2s_reg_base + SACR0);
+		writel(readl(i2s_reg_base + SACR1) | (pxa_i2s.fmt), i2s_reg_base + SACR1);
 	}
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-		SAIMR |= SAIMR_TFS;
+		writel(readl(i2s_reg_base + SAIMR) | (SAIMR_TFS), i2s_reg_base + SAIMR);
 	else
-		SAIMR |= SAIMR_RFS;
+		writel(readl(i2s_reg_base + SAIMR) | (SAIMR_RFS), i2s_reg_base + SAIMR);
 
 	switch (params_rate(params)) {
 	case 8000:
-		SADIV = 0x48;
+		writel(0x48, i2s_reg_base + SADIV);
 		break;
 	case 11025:
-		SADIV = 0x34;
+		writel(0x34, i2s_reg_base + SADIV);
 		break;
 	case 16000:
-		SADIV = 0x24;
+		writel(0x24, i2s_reg_base + SADIV);
 		break;
 	case 22050:
-		SADIV = 0x1a;
+		writel(0x1a, i2s_reg_base + SADIV);
 		break;
 	case 44100:
-		SADIV = 0xd;
+		writel(0xd, i2s_reg_base + SADIV);
 		break;
 	case 48000:
-		SADIV = 0xc;
+		writel(0xc, i2s_reg_base + SADIV);
 		break;
 	case 96000: /* not in manual and possibly slightly inaccurate */
-		SADIV = 0x6;
+		writel(0x6, i2s_reg_base + SADIV);
 		break;
 	}
 
@@ -221,10 +219,10 @@ static int pxa2xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
 		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-			SACR1 &= ~SACR1_DRPL;
+			writel(readl(i2s_reg_base + SACR1) & (~SACR1_DRPL), i2s_reg_base + SACR1);
 		else
-			SACR1 &= ~SACR1_DREC;
-		SACR0 |= SACR0_ENB;
+			writel(readl(i2s_reg_base + SACR1) & (~SACR1_DREC), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SACR0) | (SACR0_ENB), i2s_reg_base + SACR0);
 		break;
 	case SNDRV_PCM_TRIGGER_RESUME:
 	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
@@ -243,15 +241,15 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
 				struct snd_soc_dai *dai)
 {
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
-		SACR1 |= SACR1_DRPL;
-		SAIMR &= ~SAIMR_TFS;
+		writel(readl(i2s_reg_base + SACR1) | (SACR1_DRPL), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SAIMR) & (~SAIMR_TFS), i2s_reg_base + SAIMR);
 	} else {
-		SACR1 |= SACR1_DREC;
-		SAIMR &= ~SAIMR_RFS;
+		writel(readl(i2s_reg_base + SACR1) | (SACR1_DREC), i2s_reg_base + SACR1);
+		writel(readl(i2s_reg_base + SAIMR) & (~SAIMR_RFS), i2s_reg_base + SAIMR);
 	}
 
-	if ((SACR1 & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
-		SACR0 &= ~SACR0_ENB;
+	if ((readl(i2s_reg_base + SACR1) & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
+		writel(readl(i2s_reg_base + SACR0) & (~SACR0_ENB), i2s_reg_base + SACR0);
 		pxa_i2s_wait();
 		if (clk_ena) {
 			clk_disable_unprepare(clk_i2s);
@@ -264,13 +262,13 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
 static int pxa2xx_soc_pcm_suspend(struct snd_soc_component *component)
 {
 	/* store registers */
-	pxa_i2s.sacr0 = SACR0;
-	pxa_i2s.sacr1 = SACR1;
-	pxa_i2s.saimr = SAIMR;
-	pxa_i2s.sadiv = SADIV;
+	pxa_i2s.sacr0 = readl(i2s_reg_base + SACR0);
+	pxa_i2s.sacr1 = readl(i2s_reg_base + SACR1);
+	pxa_i2s.saimr = readl(i2s_reg_base + SAIMR);
+	pxa_i2s.sadiv = readl(i2s_reg_base + SADIV);
 
 	/* deactivate link */
-	SACR0 &= ~SACR0_ENB;
+	writel(readl(i2s_reg_base + SACR0) & (~SACR0_ENB), i2s_reg_base + SACR0);
 	pxa_i2s_wait();
 	return 0;
 }
@@ -279,12 +277,12 @@ static int pxa2xx_soc_pcm_resume(struct snd_soc_component *component)
 {
 	pxa_i2s_wait();
 
-	SACR0 = pxa_i2s.sacr0 & ~SACR0_ENB;
-	SACR1 = pxa_i2s.sacr1;
-	SAIMR = pxa_i2s.saimr;
-	SADIV = pxa_i2s.sadiv;
+	writel(pxa_i2s.sacr0 & ~SACR0_ENB, i2s_reg_base + SACR0);
+	writel(pxa_i2s.sacr1, i2s_reg_base + SACR1);
+	writel(pxa_i2s.saimr, i2s_reg_base + SAIMR);
+	writel(pxa_i2s.sadiv, i2s_reg_base + SADIV);
 
-	SACR0 = pxa_i2s.sacr0;
+	writel(pxa_i2s.sacr0, i2s_reg_base + SACR0);
 
 	return 0;
 }
@@ -306,12 +304,12 @@ static int pxa2xx_i2s_probe(struct snd_soc_dai *dai)
 	 * the SACR0[RST] bit must also be set and cleared to reset all
 	 * I2S controller registers.
 	 */
-	SACR0 = SACR0_RST;
-	SACR0 = 0;
+	writel(SACR0_RST, i2s_reg_base + SACR0);
+	writel(0, i2s_reg_base + SACR0);
 	/* Make sure RPL and REC are disabled */
-	SACR1 = SACR1_DRPL | SACR1_DREC;
+	writel(SACR1_DRPL | SACR1_DREC, i2s_reg_base + SACR1);
 	/* Along with FIFO servicing */
-	SAIMR &= ~(SAIMR_RFS | SAIMR_TFS);
+	writel(readl(i2s_reg_base + SAIMR) & (~(SAIMR_RFS | SAIMR_TFS)), i2s_reg_base + SAIMR);
 
 	snd_soc_dai_init_dma_data(dai, &pxa2xx_i2s_pcm_stereo_out,
 		&pxa2xx_i2s_pcm_stereo_in);
@@ -371,6 +369,22 @@ static const struct snd_soc_component_driver pxa_i2s_component = {
 
 static int pxa2xx_i2s_drv_probe(struct platform_device *pdev)
 {
+	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+	if (!res) {
+		dev_err(&pdev->dev, "missing MMIO resource\n");
+		return -ENXIO;
+	}
+
+	i2s_reg_base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(i2s_reg_base)) {
+		dev_err(&pdev->dev, "ioremap failed\n");
+		return PTR_ERR(i2s_reg_base);
+	}
+
+	pxa2xx_i2s_pcm_stereo_out.addr = res->start + SADR;
+	pxa2xx_i2s_pcm_stereo_in.addr = res->start + SADR;
+
 	return devm_snd_soc_register_component(&pdev->dev, &pxa_i2s_component,
 					       &pxa_i2s_dai, 1);
 }
-- 
2.29.2


  parent reply	other threads:[~2022-04-19 16:43 UTC|newest]

Thread overview: 474+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 16:37 [PATCH v2 00/48] ARM: PXA multiplatform support Arnd Bergmann
2022-04-19 16:37 ` Arnd Bergmann
2022-04-19 16:37 ` Arnd Bergmann
2022-04-19 16:37 ` Arnd Bergmann
2022-04-19 16:37 ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 01/48] ARM: pxa: split mach/generic.h Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 02/48] ARM: pxa: make mainstone.h private Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 03/48] ARM: pxa: make mach/regs-uart.h private Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 04/48] ARM: pxa: remove mach/dma.h Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 05/48] ARM: pxa: split up mach/hardware.h Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 06/48] ARM: pxa: stop using mach/bitfield.h Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 07/48] ARM: pxa: move mach/sound.h to linux/platform_data/ Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 08/48] ARM: pxa: move regs-lcd.h into driver Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 09/48] watchdog: sa1100: use platform device registration Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 19:19   ` Guenter Roeck
2022-04-19 19:19     ` Guenter Roeck
2022-04-19 19:19     ` Guenter Roeck
2022-04-19 19:19     ` Guenter Roeck
2022-04-19 19:19     ` Guenter Roeck
2022-04-19 16:37 ` [PATCH 10/48] ARM: pxa: pxa2xx-ac97-lib: use IRQ resource Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 11/48] ARM: pxa: move pcmcia board data into mach-pxa Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 12/48] ARM: pxa: make addr-map.h header local Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 13/48] ARM: pxa: use pdev resource for palmld mmio Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 23:55   ` Damien Le Moal
2022-04-19 23:55     ` Damien Le Moal
2022-04-19 23:55     ` Damien Le Moal
2022-04-19 23:55     ` Damien Le Moal
2022-04-19 23:55     ` Damien Le Moal
2022-04-19 16:37 ` [PATCH 14/48] ARM: pxa: maybe fix gpio lookup tables Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 15/48] ARM: pxa: tosa: use gpio descriptor for audio Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-05-01 21:34   ` Linus Walleij
2022-05-01 21:34     ` Linus Walleij
2022-05-01 21:34     ` Linus Walleij
2022-05-01 21:34     ` Linus Walleij
2022-04-19 16:37 ` [PATCH 16/48] ARM: pxa: poodle: use platform data for poodle asoc driver Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 17/48] ARM: pxa: corgi: use gpio descriptors for audio Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-05-01 21:35   ` Linus Walleij
2022-05-01 21:35     ` Linus Walleij
2022-05-01 21:35     ` Linus Walleij
2022-05-01 21:35     ` Linus Walleij
2022-04-19 16:37 ` [PATCH 18/48] ARM: pxa: hx4700: " Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-05-01 21:41   ` Linus Walleij
2022-05-01 21:41     ` Linus Walleij
2022-05-01 21:41     ` Linus Walleij
2022-05-01 21:41     ` Linus Walleij
2022-05-02  7:07     ` Arnd Bergmann
2022-05-02  7:07       ` Arnd Bergmann
2022-05-02  7:07       ` Arnd Bergmann
2022-05-02  7:07       ` Arnd Bergmann
2022-05-04 21:59       ` Linus Walleij
2022-05-04 21:59         ` Linus Walleij
2022-05-04 21:59         ` Linus Walleij
2022-05-04 21:59         ` Linus Walleij
2022-05-05  6:04         ` Arnd Bergmann
2022-05-05  6:04           ` Arnd Bergmann
2022-05-05  6:04           ` Arnd Bergmann
2022-05-05  6:04           ` Arnd Bergmann
2022-05-05 14:33           ` Linus Walleij
2022-05-05 14:33             ` Linus Walleij
2022-05-05 14:33             ` Linus Walleij
2022-05-05 14:33             ` Linus Walleij
2022-05-05 14:39             ` Mark Brown
2022-05-05 14:39               ` Mark Brown
2022-05-05 14:39               ` Mark Brown
2022-05-05 14:39               ` Mark Brown
2022-05-05 14:59               ` Arnd Bergmann
2022-05-05 14:59                 ` Arnd Bergmann
2022-05-05 14:59                 ` Arnd Bergmann
2022-05-05 14:59                 ` Arnd Bergmann
2022-05-05 15:04                 ` Mark Brown
2022-05-05 15:04                   ` Mark Brown
2022-05-05 15:04                   ` Mark Brown
2022-05-05 15:04                   ` Mark Brown
2022-05-05 20:07                   ` Arnd Bergmann
2022-05-05 20:07                     ` Arnd Bergmann
2022-05-05 20:07                     ` Arnd Bergmann
2022-05-05 20:07                     ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 19/48] ARM: pxa: lubbock: pass udc irqs as resource Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 20/48] ARM: pxa: spitz: use gpio descriptors for audio Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-05-01 21:42   ` Linus Walleij
2022-05-01 21:42     ` Linus Walleij
2022-05-01 21:42     ` Linus Walleij
2022-05-01 21:42     ` Linus Walleij
2022-04-19 16:37 ` [PATCH 21/48] ARM: pxa: eseries: use gpio lookup " Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-05-01 21:45   ` Linus Walleij
2022-05-01 21:45     ` Linus Walleij
2022-05-01 21:45     ` Linus Walleij
2022-05-01 21:45     ` Linus Walleij
2022-04-19 16:37 ` [PATCH 22/48] ARM: pxa: z2: use gpio lookup for audio device Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-05-01 21:45   ` Linus Walleij
2022-05-01 21:45     ` Linus Walleij
2022-05-01 21:45     ` Linus Walleij
2022-05-01 21:45     ` Linus Walleij
2022-04-19 16:37 ` [PATCH 23/48] ARM: pxa: magician: use platform driver for audio Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-05-01 21:46   ` Linus Walleij
2022-05-01 21:46     ` Linus Walleij
2022-05-01 21:46     ` Linus Walleij
2022-05-01 21:46     ` Linus Walleij
2022-04-19 16:37 ` [PATCH 24/48] ARM: pxa: mainstone-wm97xx: use gpio lookup table Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-05-01 21:48   ` Linus Walleij
2022-05-01 21:48     ` Linus Walleij
2022-05-01 21:48     ` Linus Walleij
2022-05-01 21:48     ` Linus Walleij
2022-04-19 16:37 ` [PATCH 25/48] ARM: pxa: zylonite: use gpio lookup instead mfp header Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-05-01 21:50   ` Linus Walleij
2022-05-01 21:50     ` Linus Walleij
2022-05-01 21:50     ` Linus Walleij
2022-05-01 21:50     ` Linus Walleij
2022-04-19 16:37 ` [PATCH 26/48] input: touchscreen: mainstone: fix pxa2xx+pxa3xx configuration Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 27/48] input: touchscreen: mainstone: sync with zylonite driver Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 28/48] Input: touchscreen: use wrapper for pxa2xx ac97 registers Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 29/48] Input: wm97xx - switch to using threaded IRQ Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 30/48] Input: wm97xx - get rid of irq_enable method in wm97xx_mach_ops Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 31/48] ASoC: pxa: use pdev resource for FIFO regs Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 32/48] ASoC: pxa: ac97: use normal MMIO accessors Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` Arnd Bergmann [this message]
2022-04-19 16:37   ` [PATCH 33/48] ASoC: pxa: i2s: " Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 34/48] ARM: pxa: pcmcia: move smemc configuration back to arch Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 35/48] ARM: pxa: remove get_clk_frequency_khz() Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37 ` [PATCH 36/48] cpufreq: pxa3: move clk register access to clk driver Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-22 22:56   ` Stephen Boyd
2022-04-22 22:56     ` Stephen Boyd
2022-04-19 16:37 ` [PATCH 37/48] ARM: pxa: move smemc register access from clk to platform Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-19 16:37   ` Arnd Bergmann
2022-04-22 22:57   ` Stephen Boyd
2022-04-22 22:57     ` Stephen Boyd
2022-04-19 16:38 ` [PATCH 38/48] ARM: pxa: move clk register definitions to driver Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38 ` [PATCH 39/48] power: tosa: simplify probe function Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38 ` [PATCH 40/48] ARM: pxa: tosa: use gpio lookup for battery Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-20 13:43   ` Sebastian Reichel
2022-04-20 13:43     ` Sebastian Reichel
2022-04-20 13:43     ` Sebastian Reichel
2022-04-20 13:43     ` Sebastian Reichel
2022-04-20 13:43     ` Sebastian Reichel
2022-04-20 13:48     ` Arnd Bergmann
2022-04-20 13:48       ` Arnd Bergmann
2022-04-20 13:48       ` Arnd Bergmann
2022-04-20 13:48       ` Arnd Bergmann
2022-04-20 13:48       ` Arnd Bergmann
2022-05-07 12:37   ` Linus Walleij
2022-05-07 12:37     ` Linus Walleij
2022-05-07 12:37     ` Linus Walleij
2022-05-07 12:37     ` Linus Walleij
2022-05-07 12:37     ` Linus Walleij
2022-04-19 16:38 ` [PATCH 41/48] ARM: pxa: remove unused mach/bitfield.h Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38 ` [PATCH 42/48] ARM: mmp: remove tavorevb board support Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38 ` [PATCH 43/48] ARM: mmp: rename pxa_register_device Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38 ` [PATCH 44/48] ARM: pxa: move plat-pxa to drivers/soc/ Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38 ` [PATCH 45/48] ARM: PXA: fix multi-cpu build of xsc3 Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38 ` [PATCH 46/48] ARM: pxa: move mach/*.h to mach-pxa/ Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38 ` [PATCH 47/48] ARM: pxa: remove support for MTD_XIP Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38 ` [PATCH 48/48] ARM: pxa: convert to multiplatform Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-19 16:38   ` Arnd Bergmann
2022-04-21 15:29 ` [PATCH v2 00/48] ARM: PXA multiplatform support Arnd Bergmann
2022-04-21 15:29   ` Arnd Bergmann
2022-04-21 15:29   ` Arnd Bergmann
2022-04-21 15:29   ` Arnd Bergmann
2022-04-21 15:29   ` Arnd Bergmann
2022-04-22 17:05 ` Guenter Roeck
2022-04-22 17:05   ` Guenter Roeck
2022-04-22 17:05   ` Guenter Roeck
2022-04-22 17:05   ` Guenter Roeck
2022-04-22 17:05   ` Guenter Roeck
2022-04-22 19:16   ` Arnd Bergmann
2022-04-22 19:16     ` Arnd Bergmann
2022-04-22 19:16     ` Arnd Bergmann
2022-04-22 19:16     ` Arnd Bergmann
2022-04-22 19:16     ` Arnd Bergmann
2022-04-22 20:55     ` Guenter Roeck
2022-04-22 20:55       ` Guenter Roeck
2022-04-22 20:55       ` Guenter Roeck
2022-04-22 20:55       ` Guenter Roeck
2022-04-22 20:55       ` Guenter Roeck
2022-04-22 22:04       ` Arnd Bergmann
2022-04-22 22:04         ` Arnd Bergmann
2022-04-22 22:04         ` Arnd Bergmann
2022-04-22 22:04         ` Arnd Bergmann
2022-04-22 22:04         ` Arnd Bergmann
2022-04-22 23:18         ` Guenter Roeck
2022-04-22 23:18           ` Guenter Roeck
2022-04-22 23:18           ` Guenter Roeck
2022-04-22 23:18           ` Guenter Roeck
2022-04-22 23:18           ` Guenter Roeck
2022-04-22 23:41         ` Guenter Roeck
2022-04-22 23:41           ` Guenter Roeck
2022-04-22 23:41           ` Guenter Roeck
2022-04-22 23:41           ` Guenter Roeck
2022-04-22 23:41           ` Guenter Roeck
2022-04-23 19:55           ` Arnd Bergmann
2022-04-23 19:55             ` Arnd Bergmann
2022-04-23 19:55             ` Arnd Bergmann
2022-04-23 19:55             ` Arnd Bergmann
2022-04-23 19:55             ` Arnd Bergmann
2022-04-24  2:09             ` Guenter Roeck
2022-04-24  2:09               ` Guenter Roeck
2022-04-24  2:09               ` Guenter Roeck
2022-04-24  2:09               ` Guenter Roeck
2022-04-24  2:09               ` Guenter Roeck
2022-04-24  8:52               ` Arnd Bergmann
2022-04-24  8:52                 ` Arnd Bergmann
2022-04-24  8:52                 ` Arnd Bergmann
2022-04-24  8:52                 ` Arnd Bergmann
2022-04-24  8:52                 ` Arnd Bergmann
2022-04-24 15:28                 ` Guenter Roeck
2022-04-24 15:28                   ` Guenter Roeck
2022-04-24 15:28                   ` Guenter Roeck
2022-04-24 15:28                   ` Guenter Roeck
2022-04-24 15:28                   ` Guenter Roeck
2022-04-24 18:48                   ` Arnd Bergmann
2022-04-24 18:48                     ` Arnd Bergmann
2022-04-24 18:48                     ` Arnd Bergmann
2022-04-24 18:48                     ` Arnd Bergmann
2022-04-24 18:48                     ` Arnd Bergmann
2022-04-28 13:44                     ` Arnd Bergmann
2022-04-28 13:44                       ` Arnd Bergmann
2022-04-28 13:44                       ` Arnd Bergmann
2022-04-28 13:44                       ` Arnd Bergmann
2022-04-28 16:49                       ` Guenter Roeck
2022-04-28 16:49                         ` Guenter Roeck
2022-04-28 16:49                         ` Guenter Roeck
2022-04-28 16:49                         ` Guenter Roeck
2022-04-29 17:48                       ` Guenter Roeck
2022-04-29 17:48                         ` Guenter Roeck
2022-04-29 17:48                         ` Guenter Roeck
2022-04-29 17:48                         ` Guenter Roeck
2022-04-29 20:23                         ` Guenter Roeck
2022-04-29 20:23                           ` Guenter Roeck
2022-04-29 20:23                           ` Guenter Roeck
2022-04-29 20:23                           ` Guenter Roeck
2022-04-29 21:46                           ` Arnd Bergmann
2022-04-29 21:46                             ` Arnd Bergmann
2022-04-29 21:46                             ` Arnd Bergmann
2022-04-29 21:46                             ` Arnd Bergmann
2022-04-29 23:09                             ` Guenter Roeck
2022-04-29 23:09                               ` Guenter Roeck
2022-04-29 23:09                               ` Guenter Roeck
2022-04-29 23:09                               ` Guenter Roeck
2022-04-30  8:04                               ` Arnd Bergmann
2022-04-30  8:04                                 ` Arnd Bergmann
2022-04-30  8:04                                 ` Arnd Bergmann
2022-04-30  8:04                                 ` Arnd Bergmann
2022-04-30 12:41                                 ` Guenter Roeck
2022-04-30 12:41                                   ` Guenter Roeck
2022-04-30 12:41                                   ` Guenter Roeck
2022-04-30 12:41                                   ` Guenter Roeck
2022-04-30 13:32                                   ` Arnd Bergmann
2022-04-30 13:32                                     ` Arnd Bergmann
2022-04-30 13:32                                     ` Arnd Bergmann
2022-04-30 13:32                                     ` Arnd Bergmann
2022-04-30 14:23                                     ` Arnd Bergmann
2022-04-30 14:23                                       ` Arnd Bergmann
2022-04-30 14:23                                       ` Arnd Bergmann
2022-04-30 14:23                                       ` Arnd Bergmann
2022-05-02 16:26                                       ` Guenter Roeck
2022-05-02 16:26                                         ` Guenter Roeck
2022-05-02 16:26                                         ` Guenter Roeck
2022-05-02 16:26                                         ` Guenter Roeck
2022-05-02 19:21                                         ` Arnd Bergmann
2022-05-02 19:21                                           ` Arnd Bergmann
2022-05-02 19:21                                           ` Arnd Bergmann
2022-05-02 19:21                                           ` Arnd Bergmann
2022-05-02 20:35                                           ` Guenter Roeck
2022-05-02 20:35                                             ` Guenter Roeck
2022-05-02 20:35                                             ` Guenter Roeck
2022-05-02 20:35                                             ` Guenter Roeck
2022-05-02 21:03                                             ` Arnd Bergmann
2022-05-02 21:03                                               ` Arnd Bergmann
2022-05-02 21:03                                               ` Arnd Bergmann
2022-05-02 21:03                                               ` Arnd Bergmann
2022-05-03  2:55                                               ` Guenter Roeck
2022-05-03  2:55                                                 ` Guenter Roeck
2022-05-03  2:55                                                 ` Guenter Roeck
2022-05-03  2:55                                                 ` Guenter Roeck
2022-05-03  7:17                                                 ` Arnd Bergmann
2022-05-03  7:17                                                   ` Arnd Bergmann
2022-05-03  7:17                                                   ` Arnd Bergmann
2022-05-03  7:17                                                   ` Arnd Bergmann
2022-05-03 14:04                                                   ` Guenter Roeck
2022-05-03 14:04                                                     ` Guenter Roeck
2022-05-03 14:04                                                     ` Guenter Roeck
2022-05-03 14:04                                                     ` Guenter Roeck
2022-05-03 14:29                                                     ` Arnd Bergmann
2022-05-03 14:29                                                       ` Arnd Bergmann
2022-05-03 14:29                                                       ` Arnd Bergmann
2022-05-03 14:29                                                       ` Arnd Bergmann

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=20220419163810.2118169-34-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=daniel@zonque.org \
    --cc=deller@gmx.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=lkundrak@v3.sk \
    --cc=lost.distance@yahoo.com \
    --cc=marek.vasut@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=patches@opensource.cirrus.com \
    --cc=rafael@kernel.org \
    --cc=robert.jarzmik@free.fr \
    --cc=sboyd@kernel.org \
    --cc=slapin@ossfans.org \
    --cc=sleep_walker@suse.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=ulf.hansson@linaro.org \
    --cc=viresh.kumar@linaro.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.