Skip to contentSkip to conversation

dmaengine: dw: remove slave_id, add PCI support

PATCH Applied Andy Shevchenko 8 participants 33 messages Aug 19, 2014 – Sep 11, 2014

Subsystems (9)
lore
Share & tools
lore

Andy Shevchenko

author reviewer
#0 lore raw

cover dmaengine: dw: remove slave_id, add PCI support

The patchset is targeting two things:
- removal of slave_id which is deprecated (suggested by Arnd Bergmann)
- support BayTrail and Braswell SoCs in PCI case

They are tight with each other, thus comes in one series.

The patch set was BAT tested on Braswell and BayTrail machines.

We would like to push this through slave-dma tree, so, Mark, Greg, Hans-Christian, and Haavard, please, Ack them if you have no objections.

Vinod, we would like them to be pushed during this cycle since we have more coming. And it would be nice to have Braswell support in v3.18-rc1.

Alan Cox (1):
serial: 8250_pci: Add PCI IDs for Intel Braswell

Andy Shevchenko (9):
dmaengine: dw: move dw_dmac.h to where it belongs to
avr32: at32ap700x: don't rely on default DMA masters
dmaengine: dw: convert dw_dma_slave to use explicit HS interfaces
dmaengine: dw: apply both HS interfaces and remove slave_id usage
dmaengine: dw: introduce generic filter function
dmaengine: dw: move clock operations to platform.c
dmaengine: dw: add PCI IDs for Braswell DMAs spi/pxa2xx-pci: remove unnecessary assignment
serial: 8250: don't use slave_id of dma_slave_config

Mika Westerberg (2):
spi/pxa2xx: Don't use slave_id of dma_slave_config spi/pxa2xx-pci: Add support for Intel Braswell

 MAINTAINERS                                     |   2 +-
 arch/avr32/mach-at32ap/at32ap700x.c             |  19 ++--
 arch/avr32/mach-at32ap/include/mach/atmel-mci.h |   2 +-
 drivers/dma/dw/core.c                           |  72 +++++----------
 drivers/dma/dw/internal.h                       |  28 +-----
 drivers/dma/dw/pci.c                            |   4 +
 drivers/dma/dw/platform.c                       |  86 +++++++++---------
 drivers/dma/dw/regs.h                           |  14 +--
 drivers/spi/spi-pxa2xx-dma.c                    |  15 +---
 drivers/spi/spi-pxa2xx-pci.c                    | 102 ++++++++++++++++++----
 drivers/spi/spi-pxa2xx.c                        |   2 -
 drivers/tty/serial/8250/8250.h                  |   6 +-
 drivers/tty/serial/8250/8250_dw.c               |   7 +-
 drivers/tty/serial/8250/8250_pci.c              |  78 ++++++++++++++---
 include/linux/dw_dmac.h                         | 111 ------------------------
 include/linux/platform_data/dma-dw.h            | 109 +++++++++++++++++++++++
 include/linux/spi/pxa2xx_spi.h                  |   9 +-
 include/sound/atmel-abdac.h                     |   2 +-
 include/sound/atmel-ac97c.h                     |   2 +-
 sound/atmel/abdac.c                             |   2 +-
 sound/atmel/ac97c.c                             |   2 +-
 21 files changed, 365 insertions(+), 309 deletions(-)
 delete mode 100644 include/linux/dw_dmac.h
 create mode 100644 include/linux/platform_data/dma-dw.h
Signature · 1 line
2.1.0
author reviewer
#1 lore raw

PATCH 1/12 dmaengine: dw: move dw_dmac.h to where it belongs to

There is a common storage for platform data related structures and definitions inside kernel source tree. The patch moves file from include/linux to include/linux/platform_data and renames it acoordingly. The users are also updated.

---
 MAINTAINERS                                     |   2 +-
 arch/avr32/mach-at32ap/at32ap700x.c             |   2 +-
 arch/avr32/mach-at32ap/include/mach/atmel-mci.h |   2 +-
 drivers/dma/dw/internal.h                       |   2 +-
 drivers/dma/dw/regs.h                           |   6 +-
 include/linux/dw_dmac.h                         | 111 ------------------------
 include/linux/platform_data/dma-dw.h            | 111 ++++++++++++++++++++++++
 include/sound/atmel-abdac.h                     |   2 +-
 include/sound/atmel-ac97c.h                     |   2 +-
 sound/atmel/abdac.c                             |   2 +-
 sound/atmel/ac97c.c                             |   2 +-
 11 files changed, 122 insertions(+), 122 deletions(-)
 delete mode 100644 include/linux/dw_dmac.h
 create mode 100644 include/linux/platform_data/dma-dw.h
MAINTAINERS +1 -1
index 04bf956..cd4a118 100644
@@ -7888,7 +7888,7 @@ SYNOPSYS DESIGNWARE DMAC DRIVER
 M:	Viresh Kumar <[email protected]>
 M:	Andy Shevchenko <[email protected]>
 S:	Maintained
-F:	include/linux/dw_dmac.h
+F:	include/linux/platform_data/dma-dw.h
 F:	drivers/dma/dw/
 
 SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER
arch/avr32/mach-at32ap/at32ap700x.c +1 -1
index db85b5e..2a1aa71 100644
@@ -7,7 +7,7 @@
  */
 #include <linux/clk.h>
 #include <linux/delay.h>
-#include <linux/dw_dmac.h>
+#include <linux/platform_data/dma-dw.h>
 #include <linux/fb.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
arch/avr32/mach-at32ap/include/mach/atmel-mci.h +1 -1
index 4bba585..11d7f4b 100644
@@ -1,7 +1,7 @@
 #ifndef __MACH_ATMEL_MCI_H
 #define __MACH_ATMEL_MCI_H
 
-#include <linux/dw_dmac.h>
+#include <linux/platform_data/dma-dw.h>
 
 /**
  * struct mci_dma_data - DMA data for MCI interface
drivers/dma/dw/internal.h +1 -1
index 32667f9..43cc1df 100644
@@ -12,7 +12,7 @@
 #define _DW_DMAC_INTERNAL_H
 
 #include <linux/device.h>
-#include <linux/dw_dmac.h>
+#include <linux/platform_data/dma-dw.h>
 
 #include "regs.h"
 
drivers/dma/dw/regs.h +3 -3
index bb98d3e..af02439 100644
@@ -11,7 +11,7 @@
 
 #include <linux/interrupt.h>
 #include <linux/dmaengine.h>
-#include <linux/dw_dmac.h>
+#include <linux/platform_data/dma-dw.h>
 
 #define DW_DMA_MAX_NR_CHANNELS	8
 #define DW_DMA_MAX_NR_REQUESTS	16
@@ -161,7 +161,7 @@ struct dw_dma_regs {
 #define DWC_CTLH_DONE		0x00001000
 #define DWC_CTLH_BLOCK_TS_MASK	0x00000fff
 
-/* Bitfields in CFG_LO. Platform-configurable bits are in <linux/dw_dmac.h> */
+/* Bitfields in CFG_LO. Platform-configurable bits are in <linux/platform_data/dma-dw.h> */
 #define DWC_CFGL_CH_PRIOR_MASK	(0x7 << 5)	/* priority mask */
 #define DWC_CFGL_CH_PRIOR(x)	((x) << 5)	/* priority */
 #define DWC_CFGL_CH_SUSP	(1 << 8)	/* pause xfer */
@@ -172,7 +172,7 @@ struct dw_dma_regs {
 #define DWC_CFGL_RELOAD_SAR	(1 << 30)
 #define DWC_CFGL_RELOAD_DAR	(1 << 31)
 
-/* Bitfields in CFG_HI. Platform-configurable bits are in <linux/dw_dmac.h> */
+/* Bitfields in CFG_HI. Platform-configurable bits are in <linux/platform_data/dma-dw.h> */
 #define DWC_CFGH_DS_UPD_EN	(1 << 5)
 #define DWC_CFGH_SS_UPD_EN	(1 << 6)
 
include/linux/dw_dmac.h deleted +0 -111

111 lines not on this page · raw message

include/linux/platform_data/dma-dw.h new file +111 -0

111 lines not on this page · raw message

include/sound/atmel-abdac.h +1 -1
index edff6a8..a8f735d 100644
@@ -10,7 +10,7 @@
 #ifndef __INCLUDE_SOUND_ATMEL_ABDAC_H
 #define __INCLUDE_SOUND_ATMEL_ABDAC_H
 
-#include <linux/dw_dmac.h>
+#include <linux/platform_data/dma-dw.h>
 
 /**
  * struct atmel_abdac_pdata - board specific ABDAC configuration
include/sound/atmel-ac97c.h +1 -1
index 00e6c289..f2a1cdc 100644
@@ -10,7 +10,7 @@
 #ifndef __INCLUDE_SOUND_ATMEL_AC97C_H
 #define __INCLUDE_SOUND_ATMEL_AC97C_H
 
-#include <linux/dw_dmac.h>
+#include <linux/platform_data/dma-dw.h>
 
 #define AC97C_CAPTURE	0x01
 #define AC97C_PLAYBACK	0x02
sound/atmel/abdac.c +1 -1
index edf2ca7..154a7c4 100644
@@ -9,7 +9,7 @@
  */
 #include <linux/clk.h>
 #include <linux/bitmap.h>
-#include <linux/dw_dmac.h>
+#include <linux/platform_data/dma-dw.h>
 #include <linux/dmaengine.h>
 #include <linux/dma-mapping.h>
 #include <linux/init.h>
sound/atmel/ac97c.c +1 -1
index a04d2317..1dfb35a 100644
@@ -31,7 +31,7 @@
 #include <sound/atmel-ac97c.h>
 #include <sound/memalloc.h>
 
-#include <linux/dw_dmac.h>
+#include <linux/platform_data/dma-dw.h>
 
 #include <mach/cpu.h>
 
Signature · 1 line
2.1.0
Acked-by on v1 1/12
#2 lore raw

Re: [PATCH v1 01/12] dmaengine: dw: move dw_dmac.h to where it belongs to

Quoted 4 lines · Andy Shevchenko

There is a common storage for platform data related structures and definitions inside kernel source tree. The patch moves file from include/linux to include/linux/platform_data and renames it acoordingly. The users are also updated.

Nice cleanup, thanks.

Quoted 2 lines

For the arch/avr32/.* and .*sound/atmel.* related changes

Quoted 7 lines
---
 MAINTAINERS                                     |   2 +-
 arch/avr32/mach-at32ap/at32ap700x.c             |   2 +-
 arch/avr32/mach-at32ap/include/mach/atmel-mci.h |   2 +-
 drivers/dma/dw/internal.h                       |   2 +-
 drivers/dma/dw/regs.h                           |   6 +-
 include/linux/dw_dmac.h                         | 111 ------------------------
Quoted 8 lines
 include/linux/platform_data/dma-dw.h            | 111 ++++++++++++++++++++++++
 include/sound/atmel-abdac.h                     |   2 +-
 include/sound/atmel-ac97c.h                     |   2 +-
 sound/atmel/abdac.c                             |   2 +-
 sound/atmel/ac97c.c                             |   2 +-
 11 files changed, 122 insertions(+), 122 deletions(-)
 delete mode 100644 include/linux/dw_dmac.h
 create mode 100644 include/linux/platform_data/dma-dw.h

<snipp diff>

Signature · 1 line
BR, HcE
#3 lore raw

Re: [PATCH v1 01/12] dmaengine: dw: move dw_dmac.h to where it belongs to

In reply to Andy Shevchenko
Quoted 10 lines · Andy Shevchenko

There is a common storage for platform data related structures and definitions inside kernel source tree. The patch moves file from include/linux to include/linux/platform_data and renames it acoordingly. The users are also updated.

---

 include/linux/dw_dmac.h                         | 111 ------------------------
 include/linux/platform_data/dma-dw.h            | 111 ++++++++++++++++++++++++

Nice work but wrong git commands to produce this patch.. Always run format-patch with these options Atleast:

git format-patch -C -M --thread=shallow

With the -C -M option you would have got something like:

 include/linux/{dw_dmac.h => platform_data/dma-dw.h} | 0

Which would have made review so so easy :)

#4 lore raw

Re: [PATCH v1 01/12] dmaengine: dw: move dw_dmac.h to where it belongs to

Quoted 16 lines · Viresh Kumar
Quoted 10 lines · Andy Shevchenko

There is a common storage for platform data related structures and definitions inside kernel source tree. The patch moves file from include/linux to include/linux/platform_data and renames it acoordingly. The users are also updated.

---

 include/linux/dw_dmac.h                         | 111 ------------------------
 include/linux/platform_data/dma-dw.h            | 111 ++++++++++++++++++++++++

Nice work but wrong git commands to produce this patch.. Always run format-patch with these options Atleast:

Quoted 7 lines

git format-patch -C -M --thread=shallow

With the -C -M option you would have got something like:

 include/linux/{dw_dmac.h => platform_data/dma-dw.h} | 0

Which would have made review so so easy :)

Otherwise: Acked-by: Viresh Kumar <[email protected]>

author reviewer
#5 lore raw

Re: [PATCH v1 01/12] dmaengine: dw: move dw_dmac.h to where it belongs to

In reply to Viresh Kumar
Quoted 16 lines · Viresh Kumar
Quoted 10 lines · Andy Shevchenko

There is a common storage for platform data related structures and definitions inside kernel source tree. The patch moves file from include/linux to include/linux/platform_data and renames it acoordingly. The users are also updated.

---

 include/linux/dw_dmac.h                         | 111 ------------------------
 include/linux/platform_data/dma-dw.h            | 111 ++++++++++++++++++++++++

Nice work but wrong git commands to produce this patch.. Always run format-patch with these options Atleast:

Quoted 7 lines

git format-patch -C -M --thread=shallow

With the -C -M option you would have got something like:

 include/linux/{dw_dmac.h => platform_data/dma-dw.h} | 0

Which would have made review so so easy :)

Thanks for reminding me this, though I thought I would do that way and *forgot* while rebasing series.

And thanks for Ack!

Signature · 6 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy

-- 
Andy Shevchenko <[email protected]>
Intel Finland Oy
author reviewer
#6 lore raw

PATCH 2/12 avr32: at32ap700x: don't rely on default DMA masters

In reply to Andy Shevchenko

In future we are going to remove the defaults of AHB masters from dw_dmac driver. It means each user have to supply proper source and destination masters by itself explicitly.

---
 arch/avr32/mach-at32ap/at32ap700x.c | 2 ++
 1 file changed, 2 insertions(+)
arch/avr32/mach-at32ap/at32ap700x.c +2 -0
index 2a1aa71..ec7be28 100644
@@ -1360,6 +1360,8 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
 				| DWC_CFGH_DST_PER(1));
 	slave->sdata.cfg_lo &= ~(DWC_CFGL_HS_DST_POL
 				| DWC_CFGL_HS_SRC_POL);
+	slave->sdata.src_master = 1;
+	slave->sdata.dst_master = 0;
 
 	data->dma_slave = slave;
 
Signature · 1 line
2.1.0
Acked-by on v1 2/12
#7 lore raw

Re: [PATCH v1 02/12] avr32: at32ap700x: don't rely on default DMA masters

Quoted 5 lines · Andy Shevchenko

In future we are going to remove the defaults of AHB masters from dw_dmac driver. It means each user have to supply proper source and destination masters by itself explicitly.

Quoted 16 lines
---
 arch/avr32/mach-at32ap/at32ap700x.c | 2 ++
 1 file changed, 2 insertions(+)
arch/avr32/mach-at32ap/at32ap700x.c +2 -0
index 2a1aa71..ec7be28 100644
@@ -1360,6 +1360,8 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
 				| DWC_CFGH_DST_PER(1));
 	slave->sdata.cfg_lo &= ~(DWC_CFGL_HS_DST_POL
 				| DWC_CFGL_HS_SRC_POL);
+	slave->sdata.src_master = 1;
+	slave->sdata.dst_master = 0;
 
 	data->dma_slave = slave;
Signature · 1 line
Hans-Christian Egtvedt
author reviewer
#8 lore raw

PATCH 3/12 dmaengine: dw: convert dw_dma_slave to use explicit HS interfaces

In reply to Andy Shevchenko

Instead of exposing the possibility to set DMA registers CFG_HI and CFG_LO strict user to provide handshake interfaces explicitly.

---
 arch/avr32/mach-at32ap/at32ap700x.c  | 15 +++++----------
 drivers/dma/dw/core.c                |  4 ++--
 include/linux/platform_data/dma-dw.h | 10 ++++------
 3 files changed, 11 insertions(+), 18 deletions(-)
arch/avr32/mach-at32ap/at32ap700x.c +5 -10
index ec7be28..37b7560 100644
@@ -1356,10 +1356,8 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
 		goto fail;
 
 	slave->sdata.dma_dev = &dw_dmac0_device.dev;
-	slave->sdata.cfg_hi = (DWC_CFGH_SRC_PER(0)
-				| DWC_CFGH_DST_PER(1));
-	slave->sdata.cfg_lo &= ~(DWC_CFGL_HS_DST_POL
-				| DWC_CFGL_HS_SRC_POL);
+	slave->sdata.src_id = 0;
+	slave->sdata.dst_id = 1;
 	slave->sdata.src_master = 1;
 	slave->sdata.dst_master = 0;
 
@@ -2054,8 +2052,7 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
 	/* Check if DMA slave interface for capture should be configured. */
 	if (flags & AC97C_CAPTURE) {
 		rx_dws->dma_dev = &dw_dmac0_device.dev;
-		rx_dws->cfg_hi = DWC_CFGH_SRC_PER(3);
-		rx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL);
+		rx_dws->src_id = 3;
 		rx_dws->src_master = 0;
 		rx_dws->dst_master = 1;
 	}
@@ -2063,8 +2060,7 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
 	/* Check if DMA slave interface for playback should be configured. */
 	if (flags & AC97C_PLAYBACK) {
 		tx_dws->dma_dev = &dw_dmac0_device.dev;
-		tx_dws->cfg_hi = DWC_CFGH_DST_PER(4);
-		tx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL);
+		tx_dws->dst_id = 4;
 		tx_dws->src_master = 0;
 		tx_dws->dst_master = 1;
 	}
@@ -2136,8 +2132,7 @@ at32_add_device_abdac(unsigned int id, struct atmel_abdac_pdata *data)
 	dws = &data->dws;
 
 	dws->dma_dev = &dw_dmac0_device.dev;
-	dws->cfg_hi = DWC_CFGH_DST_PER(2);
-	dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL);
+	dws->dst_id = 2;
 	dws->src_master = 0;
 	dws->dst_master = 1;
 
drivers/dma/dw/core.c +2 -2
index 1af731b..0a9c052 100644
@@ -155,8 +155,8 @@ static void dwc_initialize(struct dw_dma_chan *dwc)
 		 */
 		BUG_ON(!dws->dma_dev || dws->dma_dev != dw->dma.dev);
 
-		cfghi = dws->cfg_hi;
-		cfglo |= dws->cfg_lo & ~DWC_CFGL_CH_PRIOR_MASK;
+		cfghi |= DWC_CFGH_DST_PER(dws->dst_id);
+		cfghi |= DWC_CFGH_SRC_PER(dws->src_id);
 	} else {
 		if (dwc->direction == DMA_MEM_TO_DEV)
 			cfghi = DWC_CFGH_DST_PER(dwc->request_line);
include/linux/platform_data/dma-dw.h +4 -6
index 68b4024..bc411a1 100644
@@ -17,17 +17,15 @@
  * struct dw_dma_slave - Controller-specific information about a slave
  *
  * @dma_dev: required DMA master device. Depricated.
- * @bus_id: name of this device channel, not just a device name since
- *          devices may have more than one channel e.g. "foo_tx"
- * @cfg_hi: Platform-specific initializer for the CFG_HI register
- * @cfg_lo: Platform-specific initializer for the CFG_LO register
+ * @src_id:	src request line
+ * @dst_id:	dst request line
  * @src_master: src master for transfers on allocated channel.
  * @dst_master: dest master for transfers on allocated channel.
  */
 struct dw_dma_slave {
 	struct device		*dma_dev;
-	u32			cfg_hi;
-	u32			cfg_lo;
+	u8			src_id;
+	u8			dst_id;
 	u8			src_master;
 	u8			dst_master;
 };
Signature · 1 line
2.1.0
Acked-by on v1 3/12
#9 lore raw

Re: [PATCH v1 03/12] dmaengine: dw: convert dw_dma_slave to use explicit HS interfaces

Quoted 4 lines · Andy Shevchenko

Instead of exposing the possibility to set DMA registers CFG_HI and CFG_LO strict user to provide handshake interfaces explicitly.

Quoted 5 lines
---
 arch/avr32/mach-at32ap/at32ap700x.c  | 15 +++++----------
 drivers/dma/dw/core.c                |  4 ++--
 include/linux/platform_data/dma-dw.h | 10 ++++------
 3 files changed, 11 insertions(+), 18 deletions(-)

<snipp diff>

Signature · 2 lines
mvh
Hans-Christian Egtvedt
author reviewer
#10 lore raw

PATCH 4/12 dmaengine: dw: apply both HS interfaces and remove slave_id usage

In reply to Andy Shevchenko

Instead of one request line member let's use both source and destination ones. Usually we have no such hardware except Atmel MMC controller found on AVR32 platform (see arch/avr32/mach-at32ap/at32ap700x.c and drivers/mmc/host/atmel-mci.c).

This patch removes slave_id usage since it'll be removed from the generic structure in later. This breaks the non-ACPI / non-DT cases for the users of the driver, i.e. SPI and HSUART. However, these cases mean only PCI enumerated devices for now, which is anyway broken (considering more than one DMA controller in the system) and this patch series is intended to fix that eventually.

The ACPI and DT cases shall be aware of the channel direction when setting request lines, but this is a minor problem that would be addressed in future.

---
 drivers/dma/dw/core.c     | 32 ++------------------------------
 drivers/dma/dw/platform.c |  6 ++++--
 drivers/dma/dw/regs.h     |  7 ++++---
 3 files changed, 10 insertions(+), 35 deletions(-)
drivers/dma/dw/core.c +2 -30
index 0a9c052..1c45212 100644
@@ -37,24 +37,6 @@
  * support descriptor writeback.
  */
 
-static inline bool is_request_line_unset(struct dw_dma_chan *dwc)
-{
-	return dwc->request_line == (typeof(dwc->request_line))~0;
-}
-
-static inline void dwc_set_masters(struct dw_dma_chan *dwc)
-{
-	struct dw_dma *dw = to_dw_dma(dwc->chan.device);
-	struct dw_dma_slave *dws = dwc->chan.private;
-	unsigned char mmax = dw->nr_masters - 1;
-
-	if (!is_request_line_unset(dwc))
-		return;
-
-	dwc->src_master = min_t(unsigned char, mmax, dwc_get_sms(dws));
-	dwc->dst_master = min_t(unsigned char, mmax, dwc_get_dms(dws));
-}
-
 #define DWC_DEFAULT_CTLLO(_chan) ({				\
 		struct dw_dma_chan *_dwc = to_dw_dma_chan(_chan);	\
 		struct dma_slave_config	*_sconfig = &_dwc->dma_sconfig;	\
@@ -158,10 +140,8 @@ static void dwc_initialize(struct dw_dma_chan *dwc)
 		cfghi |= DWC_CFGH_DST_PER(dws->dst_id);
 		cfghi |= DWC_CFGH_SRC_PER(dws->src_id);
 	} else {
-		if (dwc->direction == DMA_MEM_TO_DEV)
-			cfghi = DWC_CFGH_DST_PER(dwc->request_line);
-		else if (dwc->direction == DMA_DEV_TO_MEM)
-			cfghi = DWC_CFGH_SRC_PER(dwc->request_line);
+		cfghi |= DWC_CFGH_DST_PER(dwc->dst_id);
+		cfghi |= DWC_CFGH_SRC_PER(dwc->src_id);
 	}
 
 	channel_writel(dwc, CFG_LO, cfglo);
@@ -967,10 +947,6 @@ set_runtime_config(struct dma_chan *chan, struct dma_slave_config *sconfig)
 	memcpy(&dwc->dma_sconfig, sconfig, sizeof(*sconfig));
 	dwc->direction = sconfig->direction;
 
-	/* Take the request line from slave_id member */
-	if (is_request_line_unset(dwc))
-		dwc->request_line = sconfig->slave_id;
-
 	convert_burst(&dwc->dma_sconfig.src_maxburst);
 	convert_burst(&dwc->dma_sconfig.dst_maxburst);
 
@@ -1123,8 +1099,6 @@ static int dwc_alloc_chan_resources(struct dma_chan *chan)
 	 * doesn't mean what you think it means), and status writeback.
 	 */
 
-	dwc_set_masters(dwc);
-
 	spin_lock_irqsave(&dwc->lock, flags);
 	i = dwc->descs_allocated;
 	while (dwc->descs_allocated < NR_DESCS_PER_CHANNEL) {
@@ -1182,7 +1156,6 @@ static void dwc_free_chan_resources(struct dma_chan *chan)
 	list_splice_init(&dwc->free_list, &list);
 	dwc->descs_allocated = 0;
 	dwc->initialized = false;
-	dwc->request_line = ~0;
 
 	/* Disable interrupts */
 	channel_clear_bit(dw, MASK.XFER, dwc->mask);
@@ -1604,7 +1577,6 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata)
 		channel_clear_bit(dw, CH_EN, dwc->mask);
 
 		dwc->direction = DMA_TRANS_NONE;
-		dwc->request_line = ~0;
 
 		/* Hardware configuration */
 		if (autocfg) {
drivers/dma/dw/platform.c +4 -2
index c5b339a..7aa3cd3 100644
@@ -41,7 +41,8 @@ static bool dw_dma_of_filter(struct dma_chan *chan, void *param)
 	if (chan->device != &fargs->dw->dma)
 		return false;
 
-	dwc->request_line = fargs->req;
+	dwc->src_id = fargs->req;
+	dwc->dst_id = fargs->req;
 	dwc->src_master	= fargs->src;
 	dwc->dst_master	= fargs->dst;
 
@@ -86,7 +87,8 @@ static bool dw_dma_acpi_filter(struct dma_chan *chan, void *param)
 	    chan->chan_id != dma_spec->chan_id)
 		return false;
 
-	dwc->request_line = dma_spec->slave_id;
+	dwc->src_id = dma_spec->slave_id;
+	dwc->dst_id = dma_spec->slave_id;
 	dwc->src_master = dwc_get_sms(NULL);
 	dwc->dst_master = dwc_get_dms(NULL);
 
drivers/dma/dw/regs.h +4 -3
index af02439..0e82d99 100644
@@ -221,9 +221,10 @@ struct dw_dma_chan {
 	bool			nollp;
 
 	/* custom slave configuration */
-	unsigned int		request_line;
-	unsigned char		src_master;
-	unsigned char		dst_master;
+	u8			src_id;
+	u8			dst_id;
+	u8			src_master;
+	u8			dst_master;
 
 	/* configuration passed via DMA_SLAVE_CONFIG */
 	struct dma_slave_config dma_sconfig;
Signature · 1 line
2.1.0
author reviewer
#11 lore raw

PATCH 5/12 dmaengine: dw: introduce generic filter function

In reply to Andy Shevchenko

The introduced filter function would be reused in the ACPI and DT cases since in those cases we have to apply mandatory data to the requested channel. Thus, patch moves platform driver to use it in that case.

The function unlikely can't be used by users of the driver due to an implicit dependency to the dw_dmac_core module.

---
 drivers/dma/dw/core.c     | 20 +++++++++++++++
 drivers/dma/dw/internal.h | 24 +-----------------
 drivers/dma/dw/platform.c | 63 ++++++++++++++---------------------------------
 3 files changed, 40 insertions(+), 67 deletions(-)
drivers/dma/dw/core.c +20 -0
index 1c45212..10e43ea 100644
@@ -919,6 +919,26 @@ err_desc_get:
 	return NULL;
 }
 
+bool dw_dma_filter(struct dma_chan *chan, void *param)
+{
+	struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
+	struct dw_dma_slave *dws = param;
+
+	if (!dws || dws->dma_dev != chan->device->dev)
+		return false;
+
+	/* We have to copy data since dws can be temporary storage */
+
+	dwc->src_id = dws->src_id;
+	dwc->dst_id = dws->dst_id;
+
+	dwc->src_master = dws->src_master;
+	dwc->dst_master = dws->dst_master;
+
+	return true;
+}
+EXPORT_SYMBOL_GPL(dw_dma_filter);
+
 /*
  * Fix sconfig's burst size according to dw_dmac. We need to convert them as:
  * 1 -> 0, 4 -> 1, 8 -> 2, 16 -> 3.
drivers/dma/dw/internal.h +1 -23
index 43cc1df..2c8d02f 100644
@@ -43,28 +43,6 @@ int dw_dma_resume(struct dw_dma_chip *chip);
 
 #endif /* CONFIG_PM_SLEEP */
 
-/**
- * dwc_get_dms - get destination master
- * @slave:	pointer to the custom slave configuration
- *
- * Returns destination master in the custom slave configuration if defined, or
- * default value otherwise.
- */
-static inline unsigned int dwc_get_dms(struct dw_dma_slave *slave)
-{
-	return slave ? slave->dst_master : 0;
-}
-
-/**
- * dwc_get_sms - get source master
- * @slave:	pointer to the custom slave configuration
- *
- * Returns source master in the custom slave configuration if defined, or
- * default value otherwise.
- */
-static inline unsigned int dwc_get_sms(struct dw_dma_slave *slave)
-{
-	return slave ? slave->src_master : 1;
-}
+extern bool dw_dma_filter(struct dma_chan *chan, void *param);
 
 #endif /* _DW_DMAC_INTERNAL_H */
drivers/dma/dw/platform.c +19 -44

93 lines not on this page · raw message

Signature · 1 line
2.1.0
author reviewer
#12 lore raw

PATCH 6/12 dmaengine: dw: move clock operations to platform.c

In reply to Andy Shevchenko

On BayTrail platform DMA is not functional in the PCI mode, whereby it always failed and exit at the point when it tries to get a clock. It causes the PCI mode probe to exit with the error message:

	dw_dmac_pci: probe of 0000:00:1e.0 failed with error -2

This patch moves clock operations to where it belongs to. Thus, the clock is provided only in ACPI / non-PCI cases.

---
 drivers/dma/dw/core.c     | 16 ----------------
 drivers/dma/dw/internal.h |  2 ++
 drivers/dma/dw/platform.c | 25 ++++++++++++++++++++++---
 drivers/dma/dw/regs.h     |  1 -
 4 files changed, 24 insertions(+), 20 deletions(-)
drivers/dma/dw/core.c +0 -16
index 10e43ea..9546b1f 100644
@@ -11,7 +11,6 @@
  */
 
 #include <linux/bitops.h>
-#include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/dmaengine.h>
 #include <linux/dma-mapping.h>
@@ -1488,13 +1487,6 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata)
 	dw->regs = chip->regs;
 	chip->dw = dw;
 
-	dw->clk = devm_clk_get(chip->dev, "hclk");
-	if (IS_ERR(dw->clk))
-		return PTR_ERR(dw->clk);
-	err = clk_prepare_enable(dw->clk);
-	if (err)
-		return err;
-
 	dw_params = dma_read_byaddr(chip->regs, DW_PARAMS);
 	autocfg = dw_params >> DW_PARAMS_EN & 0x1;
 
@@ -1665,7 +1657,6 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata)
 err_dma_register:
 	free_irq(chip->irq, dw);
 err_pdata:
-	clk_disable_unprepare(dw->clk);
 	return err;
 }
 EXPORT_SYMBOL_GPL(dw_dma_probe);
@@ -1687,8 +1678,6 @@ int dw_dma_remove(struct dw_dma_chip *chip)
 		channel_clear_bit(dw, CH_EN, dwc->mask);
 	}
 
-	clk_disable_unprepare(dw->clk);
-
 	return 0;
 }
 EXPORT_SYMBOL_GPL(dw_dma_remove);
@@ -1698,7 +1687,6 @@ void dw_dma_shutdown(struct dw_dma_chip *chip)
 	struct dw_dma *dw = chip->dw;
 
 	dw_dma_off(dw);
-	clk_disable_unprepare(dw->clk);
 }
 EXPORT_SYMBOL_GPL(dw_dma_shutdown);
 
@@ -1709,8 +1697,6 @@ int dw_dma_suspend(struct dw_dma_chip *chip)
 	struct dw_dma *dw = chip->dw;
 
 	dw_dma_off(dw);
-	clk_disable_unprepare(dw->clk);
-
 	return 0;
 }
 EXPORT_SYMBOL_GPL(dw_dma_suspend);
@@ -1719,9 +1705,7 @@ int dw_dma_resume(struct dw_dma_chip *chip)
 {
 	struct dw_dma *dw = chip->dw;
 
-	clk_prepare_enable(dw->clk);
 	dma_writel(dw, CFG, DW_CFG_DMA_EN);
-
 	return 0;
 }
 EXPORT_SYMBOL_GPL(dw_dma_resume);
drivers/dma/dw/internal.h +2 -0
index 2c8d02f..82258a1 100644
@@ -21,12 +21,14 @@
  * @dev:		struct device of the DMA controller
  * @irq:		irq line
  * @regs:		memory mapped I/O space
+ * @clk:		hclk clock
  * @dw:			struct dw_dma that is filed by dw_dma_probe()
  */
 struct dw_dma_chip {
 	struct device	*dev;
 	int		irq;
 	void __iomem	*regs;
+	struct clk	*clk;
 	struct dw_dma	*dw;
 };
 
drivers/dma/dw/platform.c +22 -3
index 860c9ac..d50077e 100644
@@ -178,10 +178,17 @@ static int dw_probe(struct platform_device *pdev)
 
 	chip->dev = dev;
 
-	err = dw_dma_probe(chip, pdata);
+	chip->clk = devm_clk_get(chip->dev, "hclk");
+	if (IS_ERR(chip->clk))
+		return PTR_ERR(chip->clk);
+	err = clk_prepare_enable(chip->clk);
 	if (err)
 		return err;
 
+	err = dw_dma_probe(chip, pdata);
+	if (err)
+		goto err_dw_dma_probe;
+
 	platform_set_drvdata(pdev, chip);
 
 	if (pdev->dev.of_node) {
@@ -196,6 +203,10 @@ static int dw_probe(struct platform_device *pdev)
 		dw_dma_acpi_controller_register(chip->dw);
 
 	return 0;
+
+err_dw_dma_probe:
+	clk_disable_unprepare(chip->clk);
+	return err;
 }
 
 static int dw_remove(struct platform_device *pdev)
@@ -205,7 +216,10 @@ static int dw_remove(struct platform_device *pdev)
 	if (pdev->dev.of_node)
 		of_dma_controller_free(pdev->dev.of_node);
 
-	return dw_dma_remove(chip);
+	dw_dma_remove(chip);
+	clk_disable_unprepare(chip->clk);
+
+	return 0;
 }
 
 static void dw_shutdown(struct platform_device *pdev)
@@ -213,6 +227,7 @@ static void dw_shutdown(struct platform_device *pdev)
 	struct dw_dma_chip *chip = platform_get_drvdata(pdev);
 
 	dw_dma_shutdown(chip);
+	clk_disable_unprepare(chip->clk);
 }
 
 #ifdef CONFIG_OF
@@ -238,7 +253,10 @@ static int dw_suspend_late(struct device *dev)
 	struct platform_device *pdev = to_platform_device(dev);
 	struct dw_dma_chip *chip = platform_get_drvdata(pdev);
 
-	return dw_dma_suspend(chip);
+	dw_dma_suspend(chip);
+	clk_disable_unprepare(chip->clk);
+
+	return 0;
 }
 
 static int dw_resume_early(struct device *dev)
@@ -246,6 +264,7 @@ static int dw_resume_early(struct device *dev)
 	struct platform_device *pdev = to_platform_device(dev);
 	struct dw_dma_chip *chip = platform_get_drvdata(pdev);
 
+	clk_prepare_enable(chip->clk);
 	return dw_dma_resume(chip);
 }
 
drivers/dma/dw/regs.h +0 -1
index 0e82d99..00d27a9 100644
@@ -251,7 +251,6 @@ struct dw_dma {
 	void __iomem		*regs;
 	struct dma_pool		*desc_pool;
 	struct tasklet_struct	tasklet;
-	struct clk		*clk;
 
 	/* channels */
 	struct dw_dma_chan	*chan;
Signature · 1 line
2.1.0
author reviewer
#13 lore raw

PATCH 7/12 dmaengine: dw: add PCI IDs for Braswell DMAs

In reply to Andy Shevchenko

Braswell SoC has two DMA controllers for LPSS. This patch adds them to supported list in the PCI driver.

---
 drivers/dma/dw/pci.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/dma/dw/pci.c +4 -0
index 39e30c3..9c88828 100644
@@ -108,6 +108,10 @@ static const struct pci_device_id dw_pci_id_table[] = {
 	{ PCI_VDEVICE(INTEL, 0x0f06), (kernel_ulong_t)&dw_pci_pdata },
 	{ PCI_VDEVICE(INTEL, 0x0f40), (kernel_ulong_t)&dw_pci_pdata },
 
+	/* Braswell */
+	{ PCI_VDEVICE(INTEL, 0x2286), (kernel_ulong_t)&dw_pci_pdata },
+	{ PCI_VDEVICE(INTEL, 0x22c0), (kernel_ulong_t)&dw_pci_pdata },
+
 	/* Haswell */
 	{ PCI_VDEVICE(INTEL, 0x9c60), (kernel_ulong_t)&dw_pci_pdata },
 	{ }
Signature · 1 line
2.1.0
author reviewer
#14 lore raw

PATCH 8/12 spi/pxa2xx: Don't use slave_id of dma_slave_config

In reply to Andy Shevchenko

From: Mika Westerberg <[email protected]>

That field has been deprecated in favour of getting the necessary information from ACPI/DT.

However, we still need to deal systems that are PCI only (no ACPI to back up). In order to support such systems, we allow the DMA filter function and its corresponding parameter via pxa2xx_spi_master platform data. Then when the pxa2xx_spi_dma_setup() doesn't find the channel via ACPI, it falls back to use the given filter function.

---
 drivers/spi/spi-pxa2xx-dma.c   | 15 ++--------
 drivers/spi/spi-pxa2xx-pci.c   | 64 +++++++++++++++++++++++++++++++-----------
 drivers/spi/spi-pxa2xx.c       |  2 --
 include/linux/spi/pxa2xx_spi.h |  9 +++---
 4 files changed, 54 insertions(+), 36 deletions(-)
drivers/spi/spi-pxa2xx-dma.c +2 -13
index c41ff14..62a9297 100644
@@ -157,7 +157,6 @@ static struct dma_async_tx_descriptor *
 pxa2xx_spi_dma_prepare_one(struct driver_data *drv_data,
 			   enum dma_transfer_direction dir)
 {
-	struct pxa2xx_spi_master *pdata = drv_data->master_info;
 	struct chip_data *chip = drv_data->cur_chip;
 	enum dma_slave_buswidth width;
 	struct dma_slave_config cfg;
@@ -184,7 +183,6 @@ pxa2xx_spi_dma_prepare_one(struct driver_data *drv_data,
 		cfg.dst_addr = drv_data->ssdr_physical;
 		cfg.dst_addr_width = width;
 		cfg.dst_maxburst = chip->dma_burst_size;
-		cfg.slave_id = pdata->tx_slave_id;
 
 		sgt = &drv_data->tx_sgt;
 		nents = drv_data->tx_nents;
@@ -193,7 +191,6 @@ pxa2xx_spi_dma_prepare_one(struct driver_data *drv_data,
 		cfg.src_addr = drv_data->ssdr_physical;
 		cfg.src_addr_width = width;
 		cfg.src_maxburst = chip->dma_burst_size;
-		cfg.slave_id = pdata->rx_slave_id;
 
 		sgt = &drv_data->rx_sgt;
 		nents = drv_data->rx_nents;
@@ -210,14 +207,6 @@ pxa2xx_spi_dma_prepare_one(struct driver_data *drv_data,
 				       DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
 }
 
-static bool pxa2xx_spi_dma_filter(struct dma_chan *chan, void *param)
-{
-	const struct pxa2xx_spi_master *pdata = param;
-
-	return chan->chan_id == pdata->tx_chan_id ||
-	       chan->chan_id == pdata->rx_chan_id;
-}
-
 bool pxa2xx_spi_dma_is_possible(size_t len)
 {
 	return len <= MAX_DMA_LEN;
@@ -321,12 +310,12 @@ int pxa2xx_spi_dma_setup(struct driver_data *drv_data)
 		return -ENOMEM;
 
 	drv_data->tx_chan = dma_request_slave_channel_compat(mask,
-				pxa2xx_spi_dma_filter, pdata, dev, "tx");
+				pdata->dma_filter, pdata->tx_param, dev, "tx");
 	if (!drv_data->tx_chan)
 		return -ENODEV;
 
 	drv_data->rx_chan = dma_request_slave_channel_compat(mask,
-				pxa2xx_spi_dma_filter, pdata, dev, "rx");
+				pdata->dma_filter, pdata->rx_param, dev, "rx");
 	if (!drv_data->rx_chan) {
 		dma_release_channel(drv_data->tx_chan);
 		drv_data->tx_chan = NULL;
drivers/spi/spi-pxa2xx-pci.c +47 -17

103 lines not on this page · raw message

drivers/spi/spi-pxa2xx.c +0 -2
index fe79210..256c0ab 100644
@@ -1062,8 +1062,6 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev)
 
 	pdata->num_chipselect = 1;
 	pdata->enable_dma = true;
-	pdata->tx_chan_id = -1;
-	pdata->rx_chan_id = -1;
 
 	return pdata;
 }
include/linux/spi/pxa2xx_spi.h +5 -4
index 82d5111..d5a3165 100644
@@ -23,6 +23,8 @@
 #define PXA2XX_CS_ASSERT (0x01)
 #define PXA2XX_CS_DEASSERT (0x02)
 
+struct dma_chan;
+
 /* device.platform_data for SSP controller devices */
 struct pxa2xx_spi_master {
 	u32 clock_enable;
@@ -30,10 +32,9 @@ struct pxa2xx_spi_master {
 	u8 enable_dma;
 
 	/* DMA engine specific config */
-	int rx_chan_id;
-	int tx_chan_id;
-	int rx_slave_id;
-	int tx_slave_id;
+	bool (*dma_filter)(struct dma_chan *chan, void *param);
+	void *tx_param;
+	void *rx_param;
 
 	/* For non-PXA arches */
 	struct ssp_device ssp;
Signature · 1 line
2.1.0
maintainer Acked-by on v1 8/12
#15 lore raw

Re: [PATCH v1 08/12] spi/pxa2xx: Don't use slave_id of dma_slave_config

Quoted 4 lines · Andy Shevchenko

From: Mika Westerberg <[email protected]>

That field has been deprecated in favour of getting the necessary information from ACPI/DT.

#16 lore raw

Re: [PATCH v1 08/12] spi/pxa2xx: Don't use slave_id of dma_slave_config

In reply to Andy Shevchenko
Quoted 10 lines · Andy Shevchenko

From: Mika Westerberg <[email protected]>

That field has been deprecated in favour of getting the necessary information from ACPI/DT.

However, we still need to deal systems that are PCI only (no ACPI to back up). In order to support such systems, we allow the DMA filter function and its corresponding parameter via pxa2xx_spi_master platform data. Then when the pxa2xx_spi_dma_setup() doesn't find the channel via ACPI, it falls back to use the given filter function.

This fails to apply for me, was it based on dmaengine tree or spi?

Signature · 1 line
~Vinod
Quoted 223 lines
---
 drivers/spi/spi-pxa2xx-dma.c   | 15 ++--------
 drivers/spi/spi-pxa2xx-pci.c   | 64 +++++++++++++++++++++++++++++++-----------
 drivers/spi/spi-pxa2xx.c       |  2 --
 include/linux/spi/pxa2xx_spi.h |  9 +++---
 4 files changed, 54 insertions(+), 36 deletions(-)
drivers/spi/spi-pxa2xx-dma.c +2 -13
index c41ff14..62a9297 100644
@@ -157,7 +157,6 @@ static struct dma_async_tx_descriptor *
 pxa2xx_spi_dma_prepare_one(struct driver_data *drv_data,
 			   enum dma_transfer_direction dir)
 {
-	struct pxa2xx_spi_master *pdata = drv_data->master_info;
 	struct chip_data *chip = drv_data->cur_chip;
 	enum dma_slave_buswidth width;
 	struct dma_slave_config cfg;
@@ -184,7 +183,6 @@ pxa2xx_spi_dma_prepare_one(struct driver_data *drv_data,
 		cfg.dst_addr = drv_data->ssdr_physical;
 		cfg.dst_addr_width = width;
 		cfg.dst_maxburst = chip->dma_burst_size;
-		cfg.slave_id = pdata->tx_slave_id;
 
 		sgt = &drv_data->tx_sgt;
 		nents = drv_data->tx_nents;
@@ -193,7 +191,6 @@ pxa2xx_spi_dma_prepare_one(struct driver_data *drv_data,
 		cfg.src_addr = drv_data->ssdr_physical;
 		cfg.src_addr_width = width;
 		cfg.src_maxburst = chip->dma_burst_size;
-		cfg.slave_id = pdata->rx_slave_id;
 
 		sgt = &drv_data->rx_sgt;
 		nents = drv_data->rx_nents;
@@ -210,14 +207,6 @@ pxa2xx_spi_dma_prepare_one(struct driver_data *drv_data,
 				       DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
 }
 
-static bool pxa2xx_spi_dma_filter(struct dma_chan *chan, void *param)
-{
-	const struct pxa2xx_spi_master *pdata = param;
-
-	return chan->chan_id == pdata->tx_chan_id ||
-	       chan->chan_id == pdata->rx_chan_id;
-}
-
 bool pxa2xx_spi_dma_is_possible(size_t len)
 {
 	return len <= MAX_DMA_LEN;
@@ -321,12 +310,12 @@ int pxa2xx_spi_dma_setup(struct driver_data *drv_data)
 		return -ENOMEM;
 
 	drv_data->tx_chan = dma_request_slave_channel_compat(mask,
-				pxa2xx_spi_dma_filter, pdata, dev, "tx");
+				pdata->dma_filter, pdata->tx_param, dev, "tx");
 	if (!drv_data->tx_chan)
 		return -ENODEV;
 
 	drv_data->rx_chan = dma_request_slave_channel_compat(mask,
-				pxa2xx_spi_dma_filter, pdata, dev, "rx");
+				pdata->dma_filter, pdata->rx_param, dev, "rx");
 	if (!drv_data->rx_chan) {
 		dma_release_channel(drv_data->tx_chan);
 		drv_data->tx_chan = NULL;
drivers/spi/spi-pxa2xx-pci.c +47 -17
index 20ebbc7..0424b67 100644
@@ -10,6 +10,9 @@
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
 
+#include <linux/dmaengine.h>
+#include <linux/platform_data/dma-dw.h>
+
 enum {
 	PORT_CE4100,
 	PORT_BYT,
@@ -19,33 +22,41 @@ struct pxa_spi_info {
 	enum pxa_ssp_type type;
 	int port_id;
 	int num_chipselect;
-	int tx_slave_id;
-	int tx_chan_id;
-	int rx_slave_id;
-	int rx_chan_id;
 	unsigned long max_clk_rate;
+
+	/* DMA channel request parameters */
+	void *tx_param;
+	void *rx_param;
 };
 
+static struct dw_dma_slave byt_tx_param = { .dst_id = 0 };
+static struct dw_dma_slave byt_rx_param = { .src_id = 1 };
+
+static bool lpss_dma_filter(struct dma_chan *chan, void *param)
+{
+	struct dw_dma_slave *dws = param;
+
+	if (dws->dma_dev != chan->device->dev)
+		return false;
+
+	chan->private = dws;
+	return true;
+}
+
 static struct pxa_spi_info spi_info_configs[] = {
 	[PORT_CE4100] = {
 		.type = PXA25x_SSP,
 		.port_id =  -1,
 		.num_chipselect = -1,
-		.tx_slave_id = -1,
-		.tx_chan_id = -1,
-		.rx_slave_id = -1,
-		.rx_chan_id = -1,
 		.max_clk_rate = 3686400,
 	},
 	[PORT_BYT] = {
 		.type = LPSS_SSP,
 		.port_id = 0,
 		.num_chipselect = 1,
-		.tx_slave_id = 0,
-		.tx_chan_id = 0,
-		.rx_slave_id = 1,
-		.rx_chan_id = 1,
 		.max_clk_rate = 50000000,
+		.tx_param = &byt_tx_param,
+		.rx_param = &byt_rx_param,
 	},
 };
 
@@ -59,6 +70,7 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
 	struct ssp_device *ssp;
 	struct pxa_spi_info *c;
 	char buf[40];
+	struct pci_dev *dma_dev;
 
 	ret = pcim_enable_device(dev);
 	if (ret)
@@ -73,11 +85,29 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
 	memset(&spi_pdata, 0, sizeof(spi_pdata));
 	spi_pdata.num_chipselect = (c->num_chipselect > 0) ?
 					c->num_chipselect : dev->devfn;
-	spi_pdata.tx_slave_id = c->tx_slave_id;
-	spi_pdata.tx_chan_id = c->tx_chan_id;
-	spi_pdata.rx_slave_id = c->rx_slave_id;
-	spi_pdata.rx_chan_id = c->rx_chan_id;
-	spi_pdata.enable_dma = c->rx_slave_id >= 0 && c->tx_slave_id >= 0;
+
+	dma_dev = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn), 0));
+
+	if (c->tx_param) {
+		struct dw_dma_slave *slave = c->tx_param;
+
+		slave->dma_dev = &dma_dev->dev;
+		slave->src_master = 1;
+		slave->dst_master = 0;
+	}
+
+	if (c->rx_param) {
+		struct dw_dma_slave *slave = c->rx_param;
+
+		slave->dma_dev = &dma_dev->dev;
+		slave->src_master = 1;
+		slave->dst_master = 0;
+	}
+
+	spi_pdata.dma_filter = lpss_dma_filter;
+	spi_pdata.tx_param = c->tx_param;
+	spi_pdata.rx_param = c->rx_param;
+	spi_pdata.enable_dma = c->rx_param && c->tx_param;
 
 	ssp = &spi_pdata.ssp;
 	ssp->phys_base = pci_resource_start(dev, 0);
drivers/spi/spi-pxa2xx.c +0 -2
index fe79210..256c0ab 100644
@@ -1062,8 +1062,6 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev)
 
 	pdata->num_chipselect = 1;
 	pdata->enable_dma = true;
-	pdata->tx_chan_id = -1;
-	pdata->rx_chan_id = -1;
 
 	return pdata;
 }
include/linux/spi/pxa2xx_spi.h +5 -4
index 82d5111..d5a3165 100644
@@ -23,6 +23,8 @@
 #define PXA2XX_CS_ASSERT (0x01)
 #define PXA2XX_CS_DEASSERT (0x02)
 
+struct dma_chan;
+
 /* device.platform_data for SSP controller devices */
 struct pxa2xx_spi_master {
 	u32 clock_enable;
@@ -30,10 +32,9 @@ struct pxa2xx_spi_master {
 	u8 enable_dma;
 
 	/* DMA engine specific config */
-	int rx_chan_id;
-	int tx_chan_id;
-	int rx_slave_id;
-	int tx_slave_id;
+	bool (*dma_filter)(struct dma_chan *chan, void *param);
+	void *tx_param;
+	void *rx_param;
 
 	/* For non-PXA arches */
 	struct ssp_device ssp;
Signature · 1 line
2.1.0
author reviewer
#17 lore raw

PATCH 9/12 spi/pxa2xx-pci: remove unnecessary assignment

In reply to Andy Shevchenko

There is no need to unset driver data pointer at removal stage.

---
 drivers/spi/spi-pxa2xx-pci.c | 1 -
 1 file changed, 1 deletion(-)
drivers/spi/spi-pxa2xx-pci.c +0 -1
index 0424b67..c950ee2 100644
@@ -153,7 +153,6 @@ static void pxa2xx_spi_pci_remove(struct pci_dev *dev)
 
 	platform_device_unregister(pdev);
 	clk_unregister(spi_pdata->ssp.clk);
-	pci_set_drvdata(dev, NULL);
 }
 
 static const struct pci_device_id pxa2xx_spi_pci_devices[] = {
Signature · 1 line
2.1.0
maintainer Applied
#18 lore raw

Re: [PATCH v1 09/12] spi/pxa2xx-pci: remove unnecessary assignment

Quoted 1 line · Andy Shevchenko

There is no need to unset driver data pointer at removal stage.

Applied, thanks.

author reviewer
#19 lore raw

PATCH 10/12 spi/pxa2xx-pci: Add support for Intel Braswell

In reply to Andy Shevchenko

From: Mika Westerberg <[email protected]>

Instead of one port we have 3 ports and all of them can take advantage of the shared DMA controller.

---
 drivers/spi/spi-pxa2xx-pci.c | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
drivers/spi/spi-pxa2xx-pci.c +37 -0
index c950ee2..6beee8c 100644
@@ -16,6 +16,9 @@
 enum {
 	PORT_CE4100,
 	PORT_BYT,
+	PORT_BSW0,
+	PORT_BSW1,
+	PORT_BSW2,
 };
 
 struct pxa_spi_info {
@@ -32,6 +35,13 @@ struct pxa_spi_info {
 static struct dw_dma_slave byt_tx_param = { .dst_id = 0 };
 static struct dw_dma_slave byt_rx_param = { .src_id = 1 };
 
+static struct dw_dma_slave bsw0_tx_param = { .dst_id = 0 };
+static struct dw_dma_slave bsw0_rx_param = { .src_id = 1 };
+static struct dw_dma_slave bsw1_tx_param = { .dst_id = 6 };
+static struct dw_dma_slave bsw1_rx_param = { .src_id = 7 };
+static struct dw_dma_slave bsw2_tx_param = { .dst_id = 8 };
+static struct dw_dma_slave bsw2_rx_param = { .src_id = 9 };
+
 static bool lpss_dma_filter(struct dma_chan *chan, void *param)
 {
 	struct dw_dma_slave *dws = param;
@@ -58,6 +68,30 @@ static struct pxa_spi_info spi_info_configs[] = {
 		.tx_param = &byt_tx_param,
 		.rx_param = &byt_rx_param,
 	},
+	[PORT_BSW0] = {
+		.type = LPSS_SSP,
+		.port_id = 0,
+		.num_chipselect = 1,
+		.max_clk_rate = 50000000,
+		.tx_param = &bsw0_tx_param,
+		.rx_param = &bsw0_rx_param,
+	},
+	[PORT_BSW1] = {
+		.type = LPSS_SSP,
+		.port_id = 1,
+		.num_chipselect = 1,
+		.max_clk_rate = 50000000,
+		.tx_param = &bsw1_tx_param,
+		.rx_param = &bsw1_rx_param,
+	},
+	[PORT_BSW2] = {
+		.type = LPSS_SSP,
+		.port_id = 2,
+		.num_chipselect = 1,
+		.max_clk_rate = 50000000,
+		.tx_param = &bsw2_tx_param,
+		.rx_param = &bsw2_rx_param,
+	},
 };
 
 static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
@@ -158,6 +192,9 @@ static void pxa2xx_spi_pci_remove(struct pci_dev *dev)
 static const struct pci_device_id pxa2xx_spi_pci_devices[] = {
 	{ PCI_VDEVICE(INTEL, 0x2e6a), PORT_CE4100 },
 	{ PCI_VDEVICE(INTEL, 0x0f0e), PORT_BYT },
+	{ PCI_VDEVICE(INTEL, 0x228e), PORT_BSW0 },
+	{ PCI_VDEVICE(INTEL, 0x2290), PORT_BSW1 },
+	{ PCI_VDEVICE(INTEL, 0x22ac), PORT_BSW2 },
 	{ },
 };
 MODULE_DEVICE_TABLE(pci, pxa2xx_spi_pci_devices);
Signature · 1 line
2.1.0
maintainer Acked-by on v1 10/12
#20 lore raw

Re: [PATCH v1 10/12] spi/pxa2xx-pci: Add support for Intel Braswell

Quoted 4 lines · Andy Shevchenko

From: Mika Westerberg <[email protected]>

Instead of one port we have 3 ports and all of them can take advantage of the shared DMA controller.

author reviewer
#21 lore raw

PATCH 11/12 serial: 8250: don't use slave_id of dma_slave_config

In reply to Andy Shevchenko

That field has been deprecated in favour of getting the necessary information from ACPI or DT.

However, we still need to deal systems that are PCI only (no ACPI to back up) like Intel Bay Trail. In order to support such systems, we explicitly bind setup() to the appropriate DMA filter function and its corresponding parameter. Then when serial8250_request_dma() doesn't find the channel via ACPI or DT, it falls back to use the given filter function.

---
 drivers/tty/serial/8250/8250.h     |  6 ++---
 drivers/tty/serial/8250/8250_dw.c  |  7 +-----
 drivers/tty/serial/8250/8250_pci.c | 51 ++++++++++++++++++++++++++++++--------
 3 files changed, 44 insertions(+), 20 deletions(-)
drivers/tty/serial/8250/8250.h +3 -3
index 1b08c91..c3c7091 100644
@@ -16,13 +16,13 @@
 #include <linux/dmaengine.h>
 
 struct uart_8250_dma {
+	/* Filter function */
 	dma_filter_fn		fn;
+
+	/* Parameter to the filter function */
 	void			*rx_param;
 	void			*tx_param;
 
-	int			rx_chan_id;
-	int			tx_chan_id;
-
 	struct dma_slave_config	rxconf;
 	struct dma_slave_config	txconf;
 
drivers/tty/serial/8250/8250_dw.c +1 -6
index 4db7987..6664de2 100644
@@ -216,10 +216,7 @@ out:
 
 static bool dw8250_dma_filter(struct dma_chan *chan, void *param)
 {
-	struct dw8250_data *data = param;
-
-	return chan->chan_id == data->dma.tx_chan_id ||
-	       chan->chan_id == data->dma.rx_chan_id;
+	return false;
 }
 
 static void dw8250_setup_port(struct uart_8250_port *up)
@@ -399,8 +396,6 @@ static int dw8250_probe(struct platform_device *pdev)
 	if (!IS_ERR(data->rst))
 		reset_control_deassert(data->rst);
 
-	data->dma.rx_chan_id = -1;
-	data->dma.tx_chan_id = -1;
 	data->dma.rx_param = data;
 	data->dma.tx_param = data;
 	data->dma.fn = dw8250_dma_filter;
drivers/tty/serial/8250/8250_pci.c +40 -11

88 lines not on this page · raw message

Signature · 1 line
2.1.0
maintainer Acked-by on v1 11/12
#22 lore raw

Re: [PATCH v1 11/12] serial: 8250: don't use slave_id of dma_slave_config

Quoted 10 lines · Andy Shevchenko

That field has been deprecated in favour of getting the necessary information from ACPI or DT.

However, we still need to deal systems that are PCI only (no ACPI to back up) like Intel Bay Trail. In order to support such systems, we explicitly bind setup() to the appropriate DMA filter function and its corresponding parameter. Then when serial8250_request_dma() doesn't find the channel via ACPI or DT, it falls back to use the given filter function.

author reviewer
#23 lore raw

PATCH 12/12 serial: 8250_pci: Add PCI IDs for Intel Braswell

In reply to Andy Shevchenko

From: Alan Cox <[email protected]>

Add new PCI IDs to cover newer Intel SoCs such as Braswell.

---
 drivers/tty/serial/8250/8250_pci.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
drivers/tty/serial/8250/8250_pci.c +27 -0
index a00c9de..85a2eb9 100644
@@ -1352,6 +1352,9 @@ ce4100_serial_setup(struct serial_private *priv,
 #define PCI_DEVICE_ID_INTEL_BYT_UART1	0x0f0a
 #define PCI_DEVICE_ID_INTEL_BYT_UART2	0x0f0c
 
+#define PCI_DEVICE_ID_INTEL_BSW_UART1	0x228a
+#define PCI_DEVICE_ID_INTEL_BSW_UART2	0x228c
+
 #define BYT_PRV_CLK			0x800
 #define BYT_PRV_CLK_EN			(1 << 0)
 #define BYT_PRV_CLK_M_VAL_SHIFT		1
@@ -1465,10 +1468,12 @@ byt_serial_setup(struct serial_private *priv,
 
 	switch (pdev->device) {
 	case PCI_DEVICE_ID_INTEL_BYT_UART1:
+	case PCI_DEVICE_ID_INTEL_BSW_UART1:
 		rx_param->src_id = 3;
 		tx_param->dst_id = 2;
 		break;
 	case PCI_DEVICE_ID_INTEL_BYT_UART2:
+	case PCI_DEVICE_ID_INTEL_BSW_UART2:
 		rx_param->src_id = 5;
 		tx_param->dst_id = 4;
 		break;
@@ -1927,6 +1932,20 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
 		.subdevice	= PCI_ANY_ID,
 		.setup		= byt_serial_setup,
 	},
+	{
+		.vendor		= PCI_VENDOR_ID_INTEL,
+		.device		= PCI_DEVICE_ID_INTEL_BSW_UART1,
+		.subvendor	= PCI_ANY_ID,
+		.subdevice	= PCI_ANY_ID,
+		.setup		= byt_serial_setup,
+	},
+	{
+		.vendor		= PCI_VENDOR_ID_INTEL,
+		.device		= PCI_DEVICE_ID_INTEL_BSW_UART2,
+		.subvendor	= PCI_ANY_ID,
+		.subdevice	= PCI_ANY_ID,
+		.setup		= byt_serial_setup,
+	},
 	/*
 	 * ITE
 	 */
@@ -5219,6 +5238,14 @@ static struct pci_device_id serial_pci_tbl[] = {
 		PCI_ANY_ID,  PCI_ANY_ID,
 		PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xff0000,
 		pbn_byt },
+	{	PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BSW_UART1,
+		PCI_ANY_ID,  PCI_ANY_ID,
+		PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xff0000,
+		pbn_byt },
+	{	PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BSW_UART2,
+		PCI_ANY_ID,  PCI_ANY_ID,
+		PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xff0000,
+		pbn_byt },
 
 	/*
 	 * Cronyx Omega PCI
Signature · 1 line
2.1.0
maintainer Acked-by on v1 12/12
#24 lore raw

Re: [PATCH v1 12/12] serial: 8250_pci: Add PCI IDs for Intel Braswell

Quoted 11 lines · Andy Shevchenko

From: Alan Cox <[email protected]>

Add new PCI IDs to cover newer Intel SoCs such as Braswell.

---
 drivers/tty/serial/8250/8250_pci.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
#25 lore raw
In reply to Andy Shevchenko
Quoted 10 lines · Andy Shevchenko

The patchset is targeting two things:
- removal of slave_id which is deprecated (suggested by Arnd Bergmann)
- support BayTrail and Braswell SoCs in PCI case

They are tight with each other, thus comes in one series.

The patch set was BAT tested on Braswell and BayTrail machines.

We would like to push this through slave-dma tree, so, Mark, Greg, Hans-Christian, and Haavard, please, Ack them if you have no objections.

I had a look through the patches touching Atmel and AVR32 related files, mostly things I originally wrote or maintain. They seem all good, feel free to push the changes through the slave-dma tree.

Quoted 45 lines

Vinod, we would like them to be pushed during this cycle since we have more coming. And it would be nice to have Braswell support in v3.18-rc1.

Alan Cox (1):
serial: 8250_pci: Add PCI IDs for Intel Braswell

Andy Shevchenko (9):
dmaengine: dw: move dw_dmac.h to where it belongs to
avr32: at32ap700x: don't rely on default DMA masters
dmaengine: dw: convert dw_dma_slave to use explicit HS interfaces
dmaengine: dw: apply both HS interfaces and remove slave_id usage
dmaengine: dw: introduce generic filter function
dmaengine: dw: move clock operations to platform.c
dmaengine: dw: add PCI IDs for Braswell DMAs spi/pxa2xx-pci: remove unnecessary assignment
serial: 8250: don't use slave_id of dma_slave_config

Mika Westerberg (2):
spi/pxa2xx: Don't use slave_id of dma_slave_config spi/pxa2xx-pci: Add support for Intel Braswell

 MAINTAINERS                                     |   2 +-
 arch/avr32/mach-at32ap/at32ap700x.c             |  19 ++--
 arch/avr32/mach-at32ap/include/mach/atmel-mci.h |   2 +-
 drivers/dma/dw/core.c                           |  72 +++++----------
 drivers/dma/dw/internal.h                       |  28 +-----
 drivers/dma/dw/pci.c                            |   4 +
 drivers/dma/dw/platform.c                       |  86 +++++++++---------
 drivers/dma/dw/regs.h                           |  14 +--
 drivers/spi/spi-pxa2xx-dma.c                    |  15 +---
 drivers/spi/spi-pxa2xx-pci.c                    | 102 ++++++++++++++++++----
 drivers/spi/spi-pxa2xx.c                        |   2 -
 drivers/tty/serial/8250/8250.h                  |   6 +-
 drivers/tty/serial/8250/8250_dw.c               |   7 +-
 drivers/tty/serial/8250/8250_pci.c              |  78 ++++++++++++++---
 include/linux/dw_dmac.h                         | 111 ------------------------
 include/linux/platform_data/dma-dw.h            | 109 +++++++++++++++++++++++
 include/linux/spi/pxa2xx_spi.h                  |   9 +-
 include/sound/atmel-abdac.h                     |   2 +-
 include/sound/atmel-ac97c.h                     |   2 +-
 sound/atmel/abdac.c                             |   2 +-
 sound/atmel/ac97c.c                             |   2 +-
 21 files changed, 365 insertions(+), 309 deletions(-)
 delete mode 100644 include/linux/dw_dmac.h
 create mode 100644 include/linux/platform_data/dma-dw.h
Signature · 2 lines
mvh
Hans-Christian Egtvedt
#26 lore raw
Quoted 7 lines · Hans-Christian Egtvedt
Quoted 6 lines · Andy Shevchenko

The patchset is targeting two things:
- removal of slave_id which is deprecated (suggested by Arnd Bergmann)
- support BayTrail and Braswell SoCs in PCI case

They are tight with each other, thus comes in one series.

Quoted 8 lines
Quoted 4 lines

The patch set was BAT tested on Braswell and BayTrail machines.

We would like to push this through slave-dma tree, so, Mark, Greg, Hans-Christian, and Haavard, please, Ack them if you have no objections.

I had a look through the patches touching Atmel and AVR32 related files, mostly things I originally wrote or maintain. They seem all good, feel free to push the changes through the slave-dma tree.

Thank you!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author reviewer
#27 lore raw
In reply to Andy Shevchenko
Quoted 10 lines · Andy Shevchenko

The patchset is targeting two things:
- removal of slave_id which is deprecated (suggested by Arnd Bergmann)
- support BayTrail and Braswell SoCs in PCI case

They are tight with each other, thus comes in one series.

The patch set was BAT tested on Braswell and BayTrail machines.

We would like to push this through slave-dma tree, so, Mark, Greg, Hans-Christian, and Haavard, please, Ack them if you have no objections.

Greg, gently ping you to get your Ack (or comments) on patches 11/12 and 12/12.

Quoted 47 lines

Vinod, we would like them to be pushed during this cycle since we have more coming. And it would be nice to have Braswell support in v3.18-rc1.

Alan Cox (1):
serial: 8250_pci: Add PCI IDs for Intel Braswell

Andy Shevchenko (9):
dmaengine: dw: move dw_dmac.h to where it belongs to
avr32: at32ap700x: don't rely on default DMA masters
dmaengine: dw: convert dw_dma_slave to use explicit HS interfaces
dmaengine: dw: apply both HS interfaces and remove slave_id usage
dmaengine: dw: introduce generic filter function
dmaengine: dw: move clock operations to platform.c
dmaengine: dw: add PCI IDs for Braswell DMAs spi/pxa2xx-pci: remove unnecessary assignment
serial: 8250: don't use slave_id of dma_slave_config

Mika Westerberg (2):
spi/pxa2xx: Don't use slave_id of dma_slave_config spi/pxa2xx-pci: Add support for Intel Braswell

 MAINTAINERS                                     |   2 +-
 arch/avr32/mach-at32ap/at32ap700x.c             |  19 ++--
 arch/avr32/mach-at32ap/include/mach/atmel-mci.h |   2 +-
 drivers/dma/dw/core.c                           |  72 +++++----------
 drivers/dma/dw/internal.h                       |  28 +-----
 drivers/dma/dw/pci.c                            |   4 +
 drivers/dma/dw/platform.c                       |  86 +++++++++---------
 drivers/dma/dw/regs.h                           |  14 +--
 drivers/spi/spi-pxa2xx-dma.c                    |  15 +---
 drivers/spi/spi-pxa2xx-pci.c                    | 102 ++++++++++++++++++----
 drivers/spi/spi-pxa2xx.c                        |   2 -
 drivers/tty/serial/8250/8250.h                  |   6 +-
 drivers/tty/serial/8250/8250_dw.c               |   7 +-
 drivers/tty/serial/8250/8250_pci.c              |  78 ++++++++++++++---
 include/linux/dw_dmac.h                         | 111 ------------------------
 include/linux/platform_data/dma-dw.h            | 109 +++++++++++++++++++++++
 include/linux/spi/pxa2xx_spi.h                  |   9 +-
 include/sound/atmel-abdac.h                     |   2 +-
 include/sound/atmel-ac97c.h                     |   2 +-
 sound/atmel/abdac.c                             |   2 +-
 sound/atmel/ac97c.c                             |   2 +-
 21 files changed, 365 insertions(+), 309 deletions(-)
 delete mode 100644 include/linux/dw_dmac.h
 create mode 100644 include/linux/platform_data/dma-dw.h
Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#28 lore raw
Quoted 7 lines · Andy Shevchenko
Quoted 6 lines · Andy Shevchenko

The patchset is targeting two things:
- removal of slave_id which is deprecated (suggested by Arnd Bergmann)
- support BayTrail and Braswell SoCs in PCI case

They are tight with each other, thus comes in one series.

Quoted 7 lines
Quoted 4 lines

The patch set was BAT tested on Braswell and BayTrail machines.

We would like to push this through slave-dma tree, so, Mark, Greg, Hans-Christian, and Haavard, please, Ack them if you have no objections.

Greg, gently ping you to get your Ack (or comments) on patches 11/12 and 12/12.

Oops, sorry about that, you should now have my acks for both of these.

greg k-h

#29 lore raw
Quoted 7 lines · Greg Kroah-Hartman
Quoted 4 lines · Andy Shevchenko

On Tue, 2014-08-19 at 20:29 +0300, Andy Shevchenko wrote:

Greg, gently ping you to get your Ack (or comments) on patches 11/12 and 12/12.

Oops, sorry about that, you should now have my acks for both of these.

No problem and thank you!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author reviewer
#30 lore raw
In reply to Andy Shevchenko
Quoted 6 lines · Andy Shevchenko

The patchset is targeting two things:
- removal of slave_id which is deprecated (suggested by Arnd Bergmann)
- support BayTrail and Braswell SoCs in PCI case

They are tight with each other, thus comes in one series.

Quoted 7 lines

The patch set was BAT tested on Braswell and BayTrail machines.

We would like to push this through slave-dma tree, so, Mark, Greg, Hans-Christian, and Haavard, please, Ack them if you have no objections.

Vinod, we would like them to be pushed during this cycle since we have more coming. And it would be nice to have Braswell support in v3.18-rc1.

Vinod, so far so good, we got all Acks needed to proceed. What is your opinion?

Quoted 44 lines

Alan Cox (1):
serial: 8250_pci: Add PCI IDs for Intel Braswell

Andy Shevchenko (9):
dmaengine: dw: move dw_dmac.h to where it belongs to
avr32: at32ap700x: don't rely on default DMA masters
dmaengine: dw: convert dw_dma_slave to use explicit HS interfaces
dmaengine: dw: apply both HS interfaces and remove slave_id usage
dmaengine: dw: introduce generic filter function
dmaengine: dw: move clock operations to platform.c
dmaengine: dw: add PCI IDs for Braswell DMAs spi/pxa2xx-pci: remove unnecessary assignment
serial: 8250: don't use slave_id of dma_slave_config

Mika Westerberg (2):
spi/pxa2xx: Don't use slave_id of dma_slave_config spi/pxa2xx-pci: Add support for Intel Braswell

 MAINTAINERS                                     |   2 +-
 arch/avr32/mach-at32ap/at32ap700x.c             |  19 ++--
 arch/avr32/mach-at32ap/include/mach/atmel-mci.h |   2 +-
 drivers/dma/dw/core.c                           |  72 +++++----------
 drivers/dma/dw/internal.h                       |  28 +-----
 drivers/dma/dw/pci.c                            |   4 +
 drivers/dma/dw/platform.c                       |  86 +++++++++---------
 drivers/dma/dw/regs.h                           |  14 +--
 drivers/spi/spi-pxa2xx-dma.c                    |  15 +---
 drivers/spi/spi-pxa2xx-pci.c                    | 102 ++++++++++++++++++----
 drivers/spi/spi-pxa2xx.c                        |   2 -
 drivers/tty/serial/8250/8250.h                  |   6 +-
 drivers/tty/serial/8250/8250_dw.c               |   7 +-
 drivers/tty/serial/8250/8250_pci.c              |  78 ++++++++++++++---
 include/linux/dw_dmac.h                         | 111 ------------------------
 include/linux/platform_data/dma-dw.h            | 109 +++++++++++++++++++++++
 include/linux/spi/pxa2xx_spi.h                  |   9 +-
 include/sound/atmel-abdac.h                     |   2 +-
 include/sound/atmel-ac97c.h                     |   2 +-
 sound/atmel/abdac.c                             |   2 +-
 sound/atmel/ac97c.c                             |   2 +-
 21 files changed, 365 insertions(+), 309 deletions(-)
 delete mode 100644 include/linux/dw_dmac.h
 create mode 100644 include/linux/platform_data/dma-dw.h
Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#31 lore raw
In reply to Andy Shevchenko
Quoted 6 lines · Andy Shevchenko

The patchset is targeting two things:
- removal of slave_id which is deprecated (suggested by Arnd Bergmann)
- support BayTrail and Braswell SoCs in PCI case

They are tight with each other, thus comes in one series.

Quoted 7 lines

The patch set was BAT tested on Braswell and BayTrail machines.

We would like to push this through slave-dma tree, so, Mark, Greg, Hans-Christian, and Haavard, please, Ack them if you have no objections.

Vinod, we would like them to be pushed during this cycle since we have more coming. And it would be nice to have Braswell support in v3.18-rc1.

Applied all except the three SPI patches. One of them Mark has applied, rest dont apply for me, so pls resend with acks.

Signature · 1 line
~Vinod
#32 lore raw
Quoted 9 lines · Vinod Koul
Quoted 8 lines · Andy Shevchenko

The patchset is targeting two things:
- removal of slave_id which is deprecated (suggested by Arnd Bergmann)
- support BayTrail and Braswell SoCs in PCI case

They are tight with each other, thus comes in one series.

The patch set was BAT tested on Braswell and BayTrail machines.

Quoted 7 lines
Quoted 5 lines

We would like to push this through slave-dma tree, so, Mark, Greg, Hans-Christian, and Haavard, please, Ack them if you have no objections.

Vinod, we would like them to be pushed during this cycle since we have more coming. And it would be nice to have Braswell support in v3.18-rc1.

Applied all

Thanks!

Quoted 2 lines

except the three SPI patches. One of them Mark has applied, rest dont apply for me, so pls resend with acks.

Done!

Signature · 13 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�