Skip to contentSkip to conversation

DMA: s3c64xx: Conversion to the new channel request API

PATCH New Sylwester Nawrocki 5 participants 24 messages Nov 10, 2016 – Dec 29, 2016

Subsystems (9)
lore
Share & tools
lore

Sylwester Nawrocki

author maintainer
#0 lore raw

cover DMA: s3c64xx: Conversion to the new channel request API

This patch series aims to convert the s3c64xx platform to use the new DMA channel request API, i.e. this is only meaningful for non-dt systems using s3c64xx SoCs.

Presumably the first 2 or 4 patches in this series could be queued for v4.10-rc1 and the remaining patches could be left for subsequent release, to avoid non-trivial conflict with patches already applied in the ASoC tree.

The whole series can be pulled from git repository:
git://linuxtv.org/snawrocki/samsung.git
branch: for-v4.10/dma/pl080-s3c64xx-v2

Thanks.

Sylwester Nawrocki (8):
dma: pl08x: Add support for the DMA slave map
ARM: s3c64xx: Add DMA slave maps for PL080 devices
spi: s3c64xx: Do not use platform_data for DMA parameters
ARM: s3c64xx: Drop unused DMA fields from struct s3c64xx_spi_csinfo
ASoC: samsung: i2s: Do not use platform_data for DMA parameters
ASoC: samsung: pcm: Do not use platform_data for DMA parameters
ARM: s3c64xx: Drop initialization of unused struct s3c_audio_pdata
fields
ARM: s3c24xx: Drop unused struct s3c_audio_pdata entries

 arch/arm/mach-s3c64xx/dev-audio.c         | 19 --------------
 arch/arm/mach-s3c64xx/pl080.c             | 32 +++++++++++++++++++++++
 arch/arm/plat-samsung/devs.c              | 43 -------------------------------
 drivers/dma/amba-pl08x.c                  | 11 ++++++++
 drivers/spi/spi-s3c64xx.c                 | 21 +++------------
 include/linux/amba/pl08x.h                |  4 +++
 include/linux/platform_data/spi-s3c64xx.h |  3 ---
 sound/soc/samsung/i2s.c                   | 14 ++--------
 sound/soc/samsung/pcm.c                   | 14 ++++------
 9 files changed, 58 insertions(+), 103 deletions(-)
Signature · 1 line
1.9.1
author maintainer
#1 lore raw

PATCH 1/8 dma: pl08x: Add support for the DMA slave map

This patch adds support for the new channel request API introduced in commit a8135d0d79e9d0ad3a4ff494fceeaae83
"dmaengine: core: Introduce new, universal API to request a channel".

param field of struct dma_slave_map type entries in the platform data structure should be pointing to struct pl08x_channel_data of related DMA channel.

---
 drivers/dma/amba-pl08x.c   | 11 +++++++++++
 include/linux/amba/pl08x.h |  4 ++++
 2 files changed, 15 insertions(+)
drivers/dma/amba-pl08x.c +11 -0
index 939a7c3..0b7c6ce 100644
@@ -1793,6 +1793,13 @@ bool pl08x_filter_id(struct dma_chan *chan, void *chan_id)
 }
 EXPORT_SYMBOL_GPL(pl08x_filter_id);
 
+static bool pl08x_filter_fn(struct dma_chan *chan, void *chan_id)
+{
+	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
+
+	return plchan->cd == chan_id;
+}
+
 /*
  * Just check that the device is there and active
  * TODO: turn this bit on/off depending on the number of physical channels
@@ -2307,6 +2314,10 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
 			ret = -EINVAL;
 			goto out_no_platdata;
 		}
+	} else {
+		pl08x->slave.filter.map = pl08x->pd->slave_map;
+		pl08x->slave.filter.mapcnt = pl08x->pd->slave_map_len;
+		pl08x->slave.filter.fn = pl08x_filter_fn;
 	}
 
 	/* By default, AHB1 only.  If dualmaster, from platform */
include/linux/amba/pl08x.h +4 -0
index 27e9ec8..5308eae 100644
@@ -84,6 +84,8 @@ struct pl08x_channel_data {
  * running any DMA transfer and multiplexing can be recycled
  * @lli_buses: buses which LLIs can be fetched from: PL08X_AHB1 | PL08X_AHB2
  * @mem_buses: buses which memory can be accessed from: PL08X_AHB1 | PL08X_AHB2
+ * @slave_map: DMA slave matching table
+ * @slave_map_len: number of elements in @slave_map
  */
 struct pl08x_platform_data {
 	struct pl08x_channel_data *slave_channels;
@@ -93,6 +95,8 @@ struct pl08x_platform_data {
 	void (*put_xfer_signal)(const struct pl08x_channel_data *, int);
 	u8 lli_buses;
 	u8 mem_buses;
+	const struct dma_slave_map *slave_map;
+	int slave_map_len;
 };
 
 #ifdef CONFIG_AMBA_PL08X
Signature · 1 line
1.9.1
author maintainer
#2 lore raw

PATCH 2/8 ARM: s3c64xx: Add DMA slave maps for PL080 devices

In reply to Sylwester Nawrocki

This patch adds DMA slave map tables to the pl080 devices's platform_data in order to support the new channel request API. A few devices for which there was no DMA support with current code are omitted in the tables.

---
 arch/arm/mach-s3c64xx/pl080.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
arch/arm/mach-s3c64xx/pl080.c +32 -0
index 89c5a62..261820a 100644
@@ -117,6 +117,25 @@ static void pl08x_put_xfer_signal(const struct pl08x_channel_data *cd, int ch)
 	}
 };
 
+static const struct dma_slave_map s3c64xx_dma0_slave_map[] = {
+	{ "s3c6400-uart.0", "tx", &s3c64xx_dma0_info[0] },
+	{ "s3c6400-uart.0", "rx", &s3c64xx_dma0_info[1] },
+	{ "s3c6400-uart.1", "tx", &s3c64xx_dma0_info[2] },
+	{ "s3c6400-uart.1", "rx", &s3c64xx_dma0_info[3] },
+	{ "s3c6400-uart.2", "tx", &s3c64xx_dma0_info[4] },
+	{ "s3c6400-uart.2", "rx", &s3c64xx_dma0_info[5] },
+	{ "s3c6400-uart.3", "tx", &s3c64xx_dma0_info[6] },
+	{ "s3c6400-uart.3", "rx", &s3c64xx_dma0_info[7] },
+	{ "samsung-pcm.0", "tx", &s3c64xx_dma0_info[8] },
+	{ "samsung-pcm.0", "rx", &s3c64xx_dma0_info[9] },
+	{ "samsung-i2s.0", "tx", &s3c64xx_dma0_info[10] },
+	{ "samsung-i2s.0", "rx", &s3c64xx_dma0_info[11] },
+	{ "s3c6410-spi.0", "tx", &s3c64xx_dma0_info[12] },
+	{ "s3c6410-spi.0", "rx", &s3c64xx_dma0_info[13] },
+	{ "samsung-i2s.2", "tx", &s3c64xx_dma0_info[14] },
+	{ "samsung-i2s.2", "rx", &s3c64xx_dma0_info[15] },
+};
+
 struct pl08x_platform_data s3c64xx_dma0_plat_data = {
 	.memcpy_channel = {
 		.bus_id = "memcpy",
@@ -134,6 +153,8 @@ struct pl08x_platform_data s3c64xx_dma0_plat_data = {
 	.put_xfer_signal = pl08x_put_xfer_signal,
 	.slave_channels = s3c64xx_dma0_info,
 	.num_slave_channels = ARRAY_SIZE(s3c64xx_dma0_info),
+	.slave_map = s3c64xx_dma0_slave_map,
+	.slave_map_len = ARRAY_SIZE(s3c64xx_dma0_slave_map),
 };
 
 static AMBA_AHB_DEVICE(s3c64xx_dma0, "dma-pl080s.0", 0,
@@ -207,6 +228,15 @@ static AMBA_AHB_DEVICE(s3c64xx_dma0, "dma-pl080s.0", 0,
 	},
 };
 
+static const struct dma_slave_map s3c64xx_dma1_slave_map[] = {
+	{ "samsung-pcm.1", "tx", &s3c64xx_dma1_info[0] },
+	{ "samsung-pcm.1", "rx", &s3c64xx_dma1_info[1] },
+	{ "samsung-i2s.1", "tx", &s3c64xx_dma1_info[2] },
+	{ "samsung-i2s.1", "rx", &s3c64xx_dma1_info[3] },
+	{ "s3c6410-spi.1", "tx", &s3c64xx_dma1_info[4] },
+	{ "s3c6410-spi.1", "rx", &s3c64xx_dma1_info[5] },
+};
+
 struct pl08x_platform_data s3c64xx_dma1_plat_data = {
 	.memcpy_channel = {
 		.bus_id = "memcpy",
@@ -224,6 +254,8 @@ struct pl08x_platform_data s3c64xx_dma1_plat_data = {
 	.put_xfer_signal = pl08x_put_xfer_signal,
 	.slave_channels = s3c64xx_dma1_info,
 	.num_slave_channels = ARRAY_SIZE(s3c64xx_dma1_info),
+	.slave_map = s3c64xx_dma1_slave_map,
+	.slave_map_len = ARRAY_SIZE(s3c64xx_dma1_slave_map),
 };
 
 static AMBA_AHB_DEVICE(s3c64xx_dma1, "dma-pl080s.1", 0,
Signature · 1 line
1.9.1
#3 lore raw

PATCH 2/8 ARM: s3c64xx: Add DMA slave maps for PL080 devices

Quoted 9 lines · Sylwester Nawrocki

This patch adds DMA slave map tables to the pl080 devices's platform_data in order to support the new channel request API. A few devices for which there was no DMA support with current code are omitted in the tables.

---
 arch/arm/mach-s3c64xx/pl080.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Best regards,
Krzysztof

author maintainer
#4 lore raw

PATCH 3/8 spi: s3c64xx: Do not use platform_data for DMA parameters

In reply to Sylwester Nawrocki

All related platforms use either devicetree or the DMA slave map API for mapping DMA channels to DMA slaves so we can now stop using platform_data for passing DMA details.

---
 drivers/spi/spi-s3c64xx.c | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)
drivers/spi/spi-s3c64xx.c +4 -17
index 3c09e94..28dfdce 100644
@@ -341,27 +341,20 @@ static void s3c64xx_spi_set_cs(struct spi_device *spi, bool enable)
 static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
 {
 	struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(spi);
-	dma_filter_fn filter = sdd->cntrlr_info->filter;
 	struct device *dev = &sdd->pdev->dev;
-	dma_cap_mask_t mask;
 
 	if (is_polling(sdd))
 		return 0;
 
-	dma_cap_zero(mask);
-	dma_cap_set(DMA_SLAVE, mask);
-
 	/* Acquire DMA channels */
-	sdd->rx_dma.ch = dma_request_slave_channel_compat(mask, filter,
-			   sdd->cntrlr_info->dma_rx, dev, "rx");
+	sdd->rx_dma.ch = dma_request_slave_channel(dev, "rx");
 	if (!sdd->rx_dma.ch) {
 		dev_err(dev, "Failed to get RX DMA channel\n");
 		return -EBUSY;
 	}
 	spi->dma_rx = sdd->rx_dma.ch;
 
-	sdd->tx_dma.ch = dma_request_slave_channel_compat(mask, filter,
-			   sdd->cntrlr_info->dma_tx, dev, "tx");
+	sdd->tx_dma.ch = dma_request_slave_channel(dev, "tx");
 	if (!sdd->tx_dma.ch) {
 		dev_err(dev, "Failed to get TX DMA channel\n");
 		dma_release_channel(sdd->rx_dma.ch);
@@ -1091,11 +1084,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
 
 	sdd->cur_bpw = 8;
 
-	if (!sdd->pdev->dev.of_node && (!sci->dma_tx || !sci->dma_rx)) {
-		dev_warn(&pdev->dev, "Unable to get SPI tx/rx DMA data. Switching to poll mode\n");
-		sdd->port_conf->quirks = S3C64XX_SPI_QUIRK_POLL;
-	}
-
 	sdd->tx_dma.direction = DMA_MEM_TO_DEV;
 	sdd->rx_dma.direction = DMA_DEV_TO_MEM;
 
@@ -1205,9 +1193,8 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
 
 	dev_dbg(&pdev->dev, "Samsung SoC SPI Driver loaded for Bus SPI-%d with %d Slaves attached\n",
 					sdd->port_id, master->num_chipselect);
-	dev_dbg(&pdev->dev, "\tIOmem=[%pR]\tFIFO %dbytes\tDMA=[Rx-%p, Tx-%p]\n",
-					mem_res, (FIFO_LVL_MASK(sdd) >> 1) + 1,
-					sci->dma_rx, sci->dma_tx);
+	dev_dbg(&pdev->dev, "\tIOmem=[%pR]\tFIFO %dbytes\n",
+					mem_res, (FIFO_LVL_MASK(sdd) >> 1) + 1);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
Signature · 1 line
1.9.1
author maintainer
#5 lore raw

PATCH 4/8 ARM: s3c64xx: Drop unused DMA fields from struct s3c64xx_spi_csinfo

In reply to Sylwester Nawrocki

There is no drivers using those fields so remove them and the remaining initializations.

---
 arch/arm/plat-samsung/devs.c              | 24 ------------------------
 include/linux/platform_data/spi-s3c64xx.h |  3 ---
 2 files changed, 27 deletions(-)
arch/arm/plat-samsung/devs.c +0 -24
index e93aa67..cf7b95f 100644
@@ -1124,15 +1124,6 @@ void __init s3c64xx_spi0_set_platdata(int (*cfg_gpio)(void), int src_clk_nr,
 	pd.num_cs = num_cs;
 	pd.src_clk_nr = src_clk_nr;
 	pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi0_cfg_gpio;
-	pd.dma_tx = (void *)DMACH_SPI0_TX;
-	pd.dma_rx = (void *)DMACH_SPI0_RX;
-#if defined(CONFIG_PL330_DMA)
-	pd.filter = pl330_filter;
-#elif defined(CONFIG_S3C64XX_PL080)
-	pd.filter = pl08x_filter_id;
-#elif defined(CONFIG_S3C24XX_DMAC)
-	pd.filter = s3c24xx_dma_filter;
-#endif
 
 	s3c_set_platdata(&pd, sizeof(pd), &s3c64xx_device_spi0);
 }
@@ -1169,14 +1160,6 @@ void __init s3c64xx_spi1_set_platdata(int (*cfg_gpio)(void), int src_clk_nr,
 	pd.num_cs = num_cs;
 	pd.src_clk_nr = src_clk_nr;
 	pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi1_cfg_gpio;
-	pd.dma_tx = (void *)DMACH_SPI1_TX;
-	pd.dma_rx = (void *)DMACH_SPI1_RX;
-#if defined(CONFIG_PL330_DMA)
-	pd.filter = pl330_filter;
-#elif defined(CONFIG_S3C64XX_PL080)
-	pd.filter = pl08x_filter_id;
-#endif
-
 
 	s3c_set_platdata(&pd, sizeof(pd), &s3c64xx_device_spi1);
 }
@@ -1213,13 +1196,6 @@ void __init s3c64xx_spi2_set_platdata(int (*cfg_gpio)(void), int src_clk_nr,
 	pd.num_cs = num_cs;
 	pd.src_clk_nr = src_clk_nr;
 	pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi2_cfg_gpio;
-	pd.dma_tx = (void *)DMACH_SPI2_TX;
-	pd.dma_rx = (void *)DMACH_SPI2_RX;
-#if defined(CONFIG_PL330_DMA)
-	pd.filter = pl330_filter;
-#elif defined(CONFIG_S3C64XX_PL080)
-	pd.filter = pl08x_filter_id;
-#endif
 
 	s3c_set_platdata(&pd, sizeof(pd), &s3c64xx_device_spi2);
 }
include/linux/platform_data/spi-s3c64xx.h +0 -3
index 5c1e21c..da79774 100644
@@ -40,9 +40,6 @@ struct s3c64xx_spi_info {
 	int num_cs;
 	bool no_cs;
 	int (*cfg_gpio)(void);
-	dma_filter_fn filter;
-	void *dma_tx;
-	void *dma_rx;
 };
 
 /**
Signature · 1 line
1.9.1
#6 lore raw

PATCH 4/8 ARM: s3c64xx: Drop unused DMA fields from struct s3c64xx_spi_csinfo

Quoted 9 lines · Sylwester Nawrocki

There is no drivers using those fields so remove them and the remaining initializations.

---
 arch/arm/plat-samsung/devs.c              | 24 ------------------------
 include/linux/platform_data/spi-s3c64xx.h |  3 ---
 2 files changed, 27 deletions(-)

Best regards,
Krzysztof

author maintainer
#7 lore raw

PATCH 5/8 ASoC: samsung: i2s: Do not use platform_data for DMA parameters

In reply to Sylwester Nawrocki

All related platforms use either devicetree or the DMA slave map API for mapping DMA channels to slave devices so we can now stop using platform_data for passing DMA details.

---
 sound/soc/samsung/i2s.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
sound/soc/samsung/i2s.c +2 -12
index 7e32cf4..95a9a3f 100644
@@ -90,7 +90,6 @@ struct i2s_dai {
 	struct snd_dmaengine_dai_dma_data dma_playback;
 	struct snd_dmaengine_dai_dma_data dma_capture;
 	struct snd_dmaengine_dai_dma_data idma_playback;
-	dma_filter_fn filter;
 	u32	quirks;
 	u32	suspend_i2smod;
 	u32	suspend_i2scon;
@@ -1244,7 +1243,7 @@ static int samsung_i2s_probe(struct platform_device *pdev)
 			return ret;
 
 		return samsung_asoc_dma_platform_register(&pdev->dev,
-					sec_dai->filter, "tx-sec", NULL);
+						NULL, "tx-sec", NULL);
 	}
 
 	pri_dai = i2s_alloc_dai(pdev, false);
@@ -1262,10 +1261,6 @@ static int samsung_i2s_probe(struct platform_device *pdev)
 			return -EINVAL;
 		}
 
-		pri_dai->dma_playback.filter_data = i2s_pdata->dma_playback;
-		pri_dai->dma_capture.filter_data = i2s_pdata->dma_capture;
-		pri_dai->filter = i2s_pdata->dma_filter;
-
 		if (&i2s_pdata->type)
 			i2s_cfg = &i2s_pdata->type.i2s;
 
@@ -1327,11 +1322,6 @@ static int samsung_i2s_probe(struct platform_device *pdev)
 		sec_dai->dma_playback.addr = regs_base + I2STXDS;
 		sec_dai->dma_playback.chan_name = "tx-sec";
 
-		if (!np) {
-			sec_dai->dma_playback.filter_data = i2s_pdata->dma_play_sec;
-			sec_dai->filter = i2s_pdata->dma_filter;
-		}
-
 		sec_dai->dma_playback.addr_width = 4;
 		sec_dai->addr = pri_dai->addr;
 		sec_dai->clk = pri_dai->clk;
@@ -1353,7 +1343,7 @@ static int samsung_i2s_probe(struct platform_device *pdev)
 	if (ret < 0)
 		goto err_free_dai;
 
-	ret = samsung_asoc_dma_platform_register(&pdev->dev, pri_dai->filter,
+	ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL,
 						 NULL, NULL);
 	if (ret < 0)
 		goto err_free_dai;
Signature · 1 line
1.9.1
author maintainer
#8 lore raw

PATCH 6/8 ASoC: samsung: pcm: Do not use platform_data for DMA parameters

In reply to Sylwester Nawrocki

All related platforms use either devicetree or the DMA slave map API for mapping DMA channels to slave devices so we can now stop using platform_data for passing DMA details.

---
 sound/soc/samsung/pcm.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
sound/soc/samsung/pcm.c +5 -9
index 43e367a..ccedab2 100644
@@ -134,18 +134,22 @@ struct s3c_pcm_info {
 static struct snd_dmaengine_dai_dma_data s3c_pcm_stereo_out[] = {
 	[0] = {
 		.addr_width	= 4,
+		.chan_name	= "tx",
 	},
 	[1] = {
 		.addr_width	= 4,
+		.chan_name	= "tx",
 	},
 };
 
 static struct snd_dmaengine_dai_dma_data s3c_pcm_stereo_in[] = {
 	[0] = {
 		.addr_width	= 4,
+		.chan_name	= "rx",
 	},
 	[1] = {
 		.addr_width	= 4,
+		.chan_name	= "rx",
 	},
 };
 
@@ -488,7 +492,6 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
 	struct s3c_pcm_info *pcm;
 	struct resource *mem_res;
 	struct s3c_audio_pdata *pcm_pdata;
-	dma_filter_fn filter;
 	int ret;
 
 	/* Check for valid device index */
@@ -555,13 +558,6 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
 	s3c_pcm_stereo_in[pdev->id].addr = mem_res->start + S3C_PCM_RXFIFO;
 	s3c_pcm_stereo_out[pdev->id].addr = mem_res->start + S3C_PCM_TXFIFO;
 
-	filter = NULL;
-	if (pcm_pdata) {
-		s3c_pcm_stereo_in[pdev->id].filter_data = pcm_pdata->dma_capture;
-		s3c_pcm_stereo_out[pdev->id].filter_data = pcm_pdata->dma_playback;
-		filter = pcm_pdata->dma_filter;
-	}
-
 	pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id];
 	pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id];
 
@@ -574,7 +570,7 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
 		goto err5;
 	}
 
-	ret = samsung_asoc_dma_platform_register(&pdev->dev, filter,
+	ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL,
 						 NULL, NULL);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret);
Signature · 1 line
1.9.1
author maintainer
#9 lore raw

PATCH 7/8 ARM: s3c64xx: Drop initialization of unused struct s3c_audio_pdata fields

In reply to Sylwester Nawrocki

Remove initialization of dma_{filter, playback, capture, capture_mic} fields where it is not used any more.

---
 arch/arm/mach-s3c64xx/dev-audio.c | 19 -------------------
 1 file changed, 19 deletions(-)
arch/arm/mach-s3c64xx/dev-audio.c +0 -19
index b577833..a3f39dd 100644
@@ -58,9 +58,6 @@ static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev)
 
 static struct s3c_audio_pdata i2s0_pdata = {
 	.cfg_gpio = s3c64xx_i2s_cfg_gpio,
-	.dma_filter = pl08x_filter_id,
-	.dma_playback = DMACH_I2S0_OUT,
-	.dma_capture = DMACH_I2S0_IN,
 };
 
 struct platform_device s3c64xx_device_iis0 = {
@@ -80,9 +77,6 @@ struct platform_device s3c64xx_device_iis0 = {
 
 static struct s3c_audio_pdata i2s1_pdata = {
 	.cfg_gpio = s3c64xx_i2s_cfg_gpio,
-	.dma_filter = pl08x_filter_id,
-	.dma_playback = DMACH_I2S1_OUT,
-	.dma_capture = DMACH_I2S1_IN,
 };
 
 struct platform_device s3c64xx_device_iis1 = {
@@ -102,9 +96,6 @@ struct platform_device s3c64xx_device_iis1 = {
 
 static struct s3c_audio_pdata i2sv4_pdata = {
 	.cfg_gpio = s3c64xx_i2s_cfg_gpio,
-	.dma_filter = pl08x_filter_id,
-	.dma_playback = DMACH_HSI_I2SV40_TX,
-	.dma_capture = DMACH_HSI_I2SV40_RX,
 	.type = {
 		.i2s = {
 			.quirks = QUIRK_PRI_6CHAN,
@@ -153,9 +144,6 @@ static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev)
 
 static struct s3c_audio_pdata s3c_pcm0_pdata = {
 	.cfg_gpio = s3c64xx_pcm_cfg_gpio,
-	.dma_filter = pl08x_filter_id,
-	.dma_capture = DMACH_PCM0_RX,
-	.dma_playback = DMACH_PCM0_TX,
 };
 
 struct platform_device s3c64xx_device_pcm0 = {
@@ -175,9 +163,6 @@ struct platform_device s3c64xx_device_pcm0 = {
 
 static struct s3c_audio_pdata s3c_pcm1_pdata = {
 	.cfg_gpio = s3c64xx_pcm_cfg_gpio,
-	.dma_filter = pl08x_filter_id,
-	.dma_playback = DMACH_PCM1_TX,
-	.dma_capture = DMACH_PCM1_RX,
 };
 
 struct platform_device s3c64xx_device_pcm1 = {
@@ -209,10 +194,6 @@ static int s3c64xx_ac97_cfg_gpe(struct platform_device *pdev)
 };
 
 static struct s3c_audio_pdata s3c_ac97_pdata = {
-	.dma_playback = DMACH_AC97_PCMOUT,
-	.dma_filter = pl08x_filter_id,
-	.dma_capture = DMACH_AC97_PCMIN,
-	.dma_capture_mic = DMACH_AC97_MICIN,
 };
 
 static u64 s3c64xx_ac97_dmamask = DMA_BIT_MASK(32);
Signature · 1 line
1.9.1
#10 lore raw

PATCH 7/8 ARM: s3c64xx: Drop initialization of unused struct s3c_audio_pdata fields

Quoted 8 lines · Sylwester Nawrocki

Remove initialization of dma_{filter, playback, capture, capture_mic} fields where it is not used any more.

---
 arch/arm/mach-s3c64xx/dev-audio.c | 19 -------------------
 1 file changed, 19 deletions(-)

Sylwester,

This and 8/8 should be safe to apply, right?

BR,
Krzysztof

author maintainer
#11 lore raw

PATCH 7/8 ARM: s3c64xx: Drop initialization of unused struct s3c_audio_pdata fields

Quoted 4 lines · Krzysztof Kozlowski
Quoted 3 lines · Sylwester Nawrocki

Remove initialization of dma_{filter, playback, capture, capture_mic} fields where it is not used any more.

Quoted 8 lines
Quoted 5 lines
---
 arch/arm/mach-s3c64xx/dev-audio.c | 19 -------------------
 1 file changed, 19 deletions(-)

Sylwester,

This and 8/8 should be safe to apply, right?

Yes, I think both patches can be applied safely now. Thanks for getting back to this.

maintainer Applied
#12 lore raw

PATCH 7/8 ARM: s3c64xx: Drop initialization of unused struct s3c_audio_pdata fields

Quoted 10 lines · Sylwester Nawrocki
Quoted 9 lines · Krzysztof Kozlowski
Quoted 8 lines · Sylwester Nawrocki

Remove initialization of dma_{filter, playback, capture, capture_mic} fields where it is not used any more.

---
 arch/arm/mach-s3c64xx/dev-audio.c | 19 -------------------
 1 file changed, 19 deletions(-)
Quoted 6 lines
Quoted 3 lines

Sylwester,

This and 8/8 should be safe to apply, right?

Yes, I think both patches can be applied safely now. Thanks for getting back to this.

Thanks, applied both.

Best regards,
Krzysztof

author maintainer
#13 lore raw

PATCH 8/8 ARM: s3c24xx: Drop unused struct s3c_audio_pdata entries

In reply to Sylwester Nawrocki

The s3c24xx-iis driver is now converted to use the dma_slave_map API and the samsung-ac97 driver got removed from the tree so remove the unused platform data structure instances.

---
 arch/arm/plat-samsung/devs.c | 19 -------------------
 1 file changed, 19 deletions(-)
arch/arm/plat-samsung/devs.c +0 -19
index cf7b95f..03fac12 100644
@@ -77,15 +77,6 @@
 	[1] = DEFINE_RES_IRQ(IRQ_S3C244X_AC97),
 };
 
-static struct s3c_audio_pdata s3c_ac97_pdata = {
-#ifdef CONFIG_S3C24XX_DMAC
-	.dma_filter = s3c24xx_dma_filter,
-#endif
-	.dma_playback = (void *)DMACH_PCM_OUT,
-	.dma_capture = (void *)DMACH_PCM_IN,
-	.dma_capture_mic = (void *)DMACH_MIC_IN,
-};
-
 struct platform_device s3c_device_ac97 = {
 	.name		= "samsung-ac97",
 	.id		= -1,
@@ -94,7 +85,6 @@ struct platform_device s3c_device_ac97 = {
 	.dev		= {
 		.dma_mask		= &samsung_device_dma_mask,
 		.coherent_dma_mask	= DMA_BIT_MASK(32),
-		.platform_data		= &s3c_ac97_pdata,
 	}
 };
 #endif /* CONFIG_CPU_S3C2440 */
@@ -574,14 +564,6 @@ void __init s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *pd)
 	[0] = DEFINE_RES_MEM(S3C24XX_PA_IIS, S3C24XX_SZ_IIS),
 };
 
-static struct s3c_audio_pdata s3c_iis_platdata = {
-#ifdef CONFIG_S3C24XX_DMAC
-	.dma_filter = s3c24xx_dma_filter,
-#endif
-	.dma_playback = (void *)DMACH_I2S_OUT,
-	.dma_capture = (void *)DMACH_I2S_IN,
-};
-
 struct platform_device s3c_device_iis = {
 	.name		= "s3c24xx-iis",
 	.id		= -1,
@@ -590,7 +572,6 @@ struct platform_device s3c_device_iis = {
 	.dev		= {
 		.dma_mask		= &samsung_device_dma_mask,
 		.coherent_dma_mask	= DMA_BIT_MASK(32),
-		.platform_data		= &s3c_iis_platdata,
 	}
 };
 #endif /* CONFIG_PLAT_S3C24XX */
Signature · 1 line
1.9.1
#14 lore raw

cover DMA: s3c64xx: Conversion to the new channel request API

In reply to Sylwester Nawrocki
Quoted 8 lines · Sylwester Nawrocki

This patch series aims to convert the s3c64xx platform to use the new DMA channel request API, i.e. this is only meaningful for non-dt systems using s3c64xx SoCs.

Presumably the first 2 or 4 patches in this series could be queued for v4.10-rc1 and the remaining patches could be left for subsequent release, to avoid non-trivial conflict with patches already applied in the ASoC tree.

Sounds good to me. Should I put the ARM/s3c64xx commits on separate branch in case someone would like to pull a tag with it?

Best regards,
Krzysztof

author maintainer
#15 lore raw

cover DMA: s3c64xx: Conversion to the new channel request API

Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Sylwester Nawrocki
Quoted 4 lines

This patch series aims to convert the s3c64xx platform to use the new DMA channel request API, i.e. this is only meaningful for non-dt systems using s3c64xx SoCs.

Quoted 7 lines
Quoted 4 lines
Quoted 4 lines

Presumably the first 2 or 4 patches in this series could be queued for v4.10-rc1 and the remaining patches could be left for subsequent release, to avoid non-trivial conflict with patches already applied in the ASoC tree.

Sounds good to me. Should I put the ARM/s3c64xx commits on separate branch in case someone would like to pull a tag with it?

I think it makes sense to put first 4 patches from the series onto a separate branch, and the remaining ones would need to wait for next development cycle.

But of course firstly we need some feedback and Ack on the first (DMA controller driver) patch.

Signature · 2 lines
Thanks,
Sylwester
#16 lore raw

cover DMA: s3c64xx: Conversion to the new channel request API

In reply to Sylwester Nawrocki
Quoted 4 lines · Sylwester Nawrocki

This patch series aims to convert the s3c64xx platform to use the new DMA channel request API, i.e. this is only meaningful for non-dt systems using s3c64xx SoCs.

Quoted 8 lines

Presumably the first 2 or 4 patches in this series could be queued for v4.10-rc1 and the remaining patches could be left for subsequent release, to avoid non-trivial conflict with patches already applied in the ASoC tree.

The whole series can be pulled from git repository:
git://linuxtv.org/snawrocki/samsung.git
branch: for-v4.10/dma/pl080-s3c64xx-v2

Tested this series again still looks good to me. The code on that branch does differ from the code on the list by the following diff however:

drivers/dma/amba-pl08x.c +0 -0
@@ -2317,7 +2317,7 @@ static int pl08x_probe(struct amba_device

*adev, const struct amba_id *id)

       } else {
            pl08x->slave.filter.map = pl08x->pd->slave_map;
            pl08x->slave.filter.mapcnt = pl08x->pd->slave_map_len;
-           pl08x->slave.filter.fn = pl08x_filter_id;
+           pl08x->slave.filter.fn = pl08x_filter_fn;
       }

I tested the code from the list, rather than the branch.

Thanks,
Charles

author maintainer
#17 lore raw

cover DMA: s3c64xx: Conversion to the new channel request API

Quoted 19 lines · Charles Keepax
Quoted 3 lines

The whole series can be pulled from git repository:

Quoted 2 lines

git://linuxtv.org/snawrocki/samsung.git
branch: for-v4.10/dma/pl080-s3c64xx-v2

Tested this series again still looks good to me. The code on that branch does differ from the code on the list by the following diff however:

drivers/dma/amba-pl08x.c +1 -1
@@ -2317,7 +2317,7 @@ static int pl08x_probe(struct amba_device
 *adev, const struct amba_id *id)
       } else {
            pl08x->slave.filter.map = pl08x->pd->slave_map;
            pl08x->slave.filter.mapcnt = pl08x->pd->slave_map_len;
-           pl08x->slave.filter.fn = pl08x_filter_id;
+           pl08x->slave.filter.fn = pl08x_filter_fn;
       }
 
Quoted 1 line

I tested the code from the list, rather than the branch.

Oops, I forgot to push the final branch again, it's corrected now. Thanks for your time, hopefully there is no need to bother you with this series any more.

Signature · 2 lines
Regards,
Sylwester
#18 lore raw

cover DMA: s3c64xx: Conversion to the new channel request API

In reply to Sylwester Nawrocki
Quoted 8 lines · Sylwester Nawrocki

This patch series aims to convert the s3c64xx platform to use the new DMA channel request API, i.e. this is only meaningful for non-dt systems using s3c64xx SoCs.

Presumably the first 2 or 4 patches in this series could be queued for v4.10-rc1 and the remaining patches could be left for subsequent release, to avoid non-trivial conflict with patches already applied in the ASoC tree.

I am fine with dma patch (expect the subsystem tag) and others except arm ones have acks, so I think we can merge this for v4.10-rc1. I cna create a immutable tag and people can merge into their tree in case they have dependencies.

Btw need acks on ARM patches before I can apply

Thanks

Signature · 1 line
~Vinod
author maintainer
#19 lore raw

cover DMA: s3c64xx: Conversion to the new channel request API

Quoted 10 lines · Vinod Koul
Quoted 8 lines · Sylwester Nawrocki

This patch series aims to convert the s3c64xx platform to use the new DMA channel request API, i.e. this is only meaningful for non-dt systems using s3c64xx SoCs.

Presumably the first 2 or 4 patches in this series could be queued for v4.10-rc1 and the remaining patches could be left for subsequent release, to avoid non-trivial conflict with patches already applied in the ASoC tree.

Quoted 6 lines

I am fine with dma patch (expect the subsystem tag) and others except arm ones have acks, so I think we can merge this for v4.10-rc1. I cna create a immutable tag and people can merge into their tree in case they have dependencies.

Btw need acks on ARM patches before I can apply

Great, then we an Ack for these 2 patches:

ARM: s3c64xx: Add DMA slave maps for PL080 devices
ARM: s3c64xx: Drop unused DMA fields from struct s3c64xx_spi_csinfo

Signature · 2 lines
Thanks,
Sylwester
#20 lore raw

cover DMA: s3c64xx: Conversion to the new channel request API

In reply to Vinod Koul
Quoted 10 lines · CET Vinod Koul
Quoted 8 lines · Sylwester Nawrocki

This patch series aims to convert the s3c64xx platform to use the new DMA channel request API, i.e. this is only meaningful for non-dt systems using s3c64xx SoCs.

Presumably the first 2 or 4 patches in this series could be queued for v4.10-rc1 and the remaining patches could be left for subsequent release, to avoid non-trivial conflict with patches already applied in the ASoC tree.

Quoted 6 lines

I am fine with dma patch (expect the subsystem tag) and others except arm ones have acks, so I think we can merge this for v4.10-rc1. I cna create a immutable tag and people can merge into their tree in case they have dependencies.

Btw need acks on ARM patches before I can apply

Whole series

#21 lore raw

cover DMA: s3c64xx: Conversion to the new channel request API

In reply to Vinod Koul
Quoted 10 lines · Vinod Koul
Quoted 8 lines · Sylwester Nawrocki

This patch series aims to convert the s3c64xx platform to use the new DMA channel request API, i.e. this is only meaningful for non-dt systems using s3c64xx SoCs.

Presumably the first 2 or 4 patches in this series could be queued for v4.10-rc1 and the remaining patches could be left for subsequent release, to avoid non-trivial conflict with patches already applied in the ASoC tree.

Quoted 6 lines

I am fine with dma patch (expect the subsystem tag) and others except arm ones have acks, so I think we can merge this for v4.10-rc1. I cna create a immutable tag and people can merge into their tree in case they have dependencies.

Btw need acks on ARM patches before I can apply

First two ARM acked. Vinod, could you prepare a tag with them?

As I understood, everything won't be applied because ASoC tree already contains some work around this?

Best regards,
Krzysztof

author maintainer
#22 lore raw

cover DMA: s3c64xx: Conversion to the new channel request API

Quoted 2 lines · Krzysztof Kozlowski

As I understood, everything won't be applied because ASoC tree already contains some work around this?

Yes, sorry, I didn't coordinate this work very well, there are some patches for the pcm and the i2s driver already in the ASoC tree which would conflict with this series. I'd suggest to ignore patches 5/8...8/8 for now.

Signature · 2 lines
Thanks,
Sylwester
#23 lore raw

cover DMA: s3c64xx: Conversion to the new channel request API

Quoted 7 lines · Sylwester Nawrocki
Quoted 2 lines · Krzysztof Kozlowski

As I understood, everything won't be applied because ASoC tree already contains some work around this?

Yes, sorry, I didn't coordinate this work very well, there are some patches for the pcm and the i2s driver already in the ASoC tree which would conflict with this series. I'd suggest to ignore patches 5/8...8/8 for now.

Okay, applied 1 thru 4 now after fixing subsystem name on 1st.

Anyone wants to pull can fetch topic/s3c64xx

Thanks

Signature · 1 line
~Vinod