diff options
-rw-r--r-- | Documentation/devicetree/bindings/dma/snps-dma.txt | 4 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap700x.c | 16 | ||||
-rw-r--r-- | drivers/ata/sata_dwc_460ex.c | 4 | ||||
-rw-r--r-- | drivers/dma/dw/core.c | 19 | ||||
-rw-r--r-- | drivers/dma/dw/platform.c | 12 | ||||
-rw-r--r-- | drivers/dma/dw/regs.h | 4 | ||||
-rw-r--r-- | drivers/spi/spi-pxa2xx-pci.c | 8 | ||||
-rw-r--r-- | drivers/tty/serial/8250/8250_pci.c | 8 | ||||
-rw-r--r-- | include/linux/platform_data/dma-dw.h | 8 |
9 files changed, 41 insertions, 42 deletions
diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt index c261598164a7..c99c1ffac199 100644 --- a/Documentation/devicetree/bindings/dma/snps-dma.txt +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt | |||
@@ -47,8 +47,8 @@ The four cells in order are: | |||
47 | 47 | ||
48 | 1. A phandle pointing to the DMA controller | 48 | 1. A phandle pointing to the DMA controller |
49 | 2. The DMA request line number | 49 | 2. The DMA request line number |
50 | 3. Source master for transfers on allocated channel | 50 | 3. Memory master for transfers on allocated channel |
51 | 4. Destination master for transfers on allocated channel | 51 | 4. Peripheral master for transfers on allocated channel |
52 | 52 | ||
53 | Example: | 53 | Example: |
54 | 54 | ||
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index bf445aa48282..00d6dcc1d9b6 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -1365,8 +1365,8 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data) | |||
1365 | slave->dma_dev = &dw_dmac0_device.dev; | 1365 | slave->dma_dev = &dw_dmac0_device.dev; |
1366 | slave->src_id = 0; | 1366 | slave->src_id = 0; |
1367 | slave->dst_id = 1; | 1367 | slave->dst_id = 1; |
1368 | slave->src_master = 1; | 1368 | slave->m_master = 1; |
1369 | slave->dst_master = 0; | 1369 | slave->p_master = 0; |
1370 | 1370 | ||
1371 | data->dma_slave = slave; | 1371 | data->dma_slave = slave; |
1372 | data->dma_filter = at32_mci_dma_filter; | 1372 | data->dma_filter = at32_mci_dma_filter; |
@@ -2061,16 +2061,16 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data, | |||
2061 | if (flags & AC97C_CAPTURE) { | 2061 | if (flags & AC97C_CAPTURE) { |
2062 | rx_dws->dma_dev = &dw_dmac0_device.dev; | 2062 | rx_dws->dma_dev = &dw_dmac0_device.dev; |
2063 | rx_dws->src_id = 3; | 2063 | rx_dws->src_id = 3; |
2064 | rx_dws->src_master = 0; | 2064 | rx_dws->m_master = 0; |
2065 | rx_dws->dst_master = 1; | 2065 | rx_dws->p_master = 1; |
2066 | } | 2066 | } |
2067 | 2067 | ||
2068 | /* Check if DMA slave interface for playback should be configured. */ | 2068 | /* Check if DMA slave interface for playback should be configured. */ |
2069 | if (flags & AC97C_PLAYBACK) { | 2069 | if (flags & AC97C_PLAYBACK) { |
2070 | tx_dws->dma_dev = &dw_dmac0_device.dev; | 2070 | tx_dws->dma_dev = &dw_dmac0_device.dev; |
2071 | tx_dws->dst_id = 4; | 2071 | tx_dws->dst_id = 4; |
2072 | tx_dws->src_master = 0; | 2072 | tx_dws->m_master = 0; |
2073 | tx_dws->dst_master = 1; | 2073 | tx_dws->p_master = 1; |
2074 | } | 2074 | } |
2075 | 2075 | ||
2076 | if (platform_device_add_data(pdev, data, | 2076 | if (platform_device_add_data(pdev, data, |
@@ -2141,8 +2141,8 @@ at32_add_device_abdac(unsigned int id, struct atmel_abdac_pdata *data) | |||
2141 | 2141 | ||
2142 | dws->dma_dev = &dw_dmac0_device.dev; | 2142 | dws->dma_dev = &dw_dmac0_device.dev; |
2143 | dws->dst_id = 2; | 2143 | dws->dst_id = 2; |
2144 | dws->src_master = 0; | 2144 | dws->m_master = 0; |
2145 | dws->dst_master = 1; | 2145 | dws->p_master = 1; |
2146 | 2146 | ||
2147 | if (platform_device_add_data(pdev, data, | 2147 | if (platform_device_add_data(pdev, data, |
2148 | sizeof(struct atmel_abdac_pdata))) | 2148 | sizeof(struct atmel_abdac_pdata))) |
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index 902034991517..80bdcabc293f 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c | |||
@@ -201,8 +201,8 @@ static struct sata_dwc_host_priv host_pvt; | |||
201 | static struct dw_dma_slave sata_dwc_dma_dws = { | 201 | static struct dw_dma_slave sata_dwc_dma_dws = { |
202 | .src_id = 0, | 202 | .src_id = 0, |
203 | .dst_id = 0, | 203 | .dst_id = 0, |
204 | .src_master = 0, | 204 | .m_master = 1, |
205 | .dst_master = 1, | 205 | .p_master = 0, |
206 | }; | 206 | }; |
207 | 207 | ||
208 | /* | 208 | /* |
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c index 97199b3c25a2..5bd7873a02c6 100644 --- a/drivers/dma/dw/core.c +++ b/drivers/dma/dw/core.c | |||
@@ -50,8 +50,8 @@ | |||
50 | | DWC_CTLL_SRC_MSIZE(_smsize) \ | 50 | | DWC_CTLL_SRC_MSIZE(_smsize) \ |
51 | | DWC_CTLL_LLP_D_EN \ | 51 | | DWC_CTLL_LLP_D_EN \ |
52 | | DWC_CTLL_LLP_S_EN \ | 52 | | DWC_CTLL_LLP_S_EN \ |
53 | | DWC_CTLL_DMS(_dwc->dst_master) \ | 53 | | DWC_CTLL_DMS(_dwc->p_master) \ |
54 | | DWC_CTLL_SMS(_dwc->src_master)); \ | 54 | | DWC_CTLL_SMS(_dwc->m_master)); \ |
55 | }) | 55 | }) |
56 | 56 | ||
57 | /* | 57 | /* |
@@ -709,8 +709,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, | |||
709 | 709 | ||
710 | dwc->direction = DMA_MEM_TO_MEM; | 710 | dwc->direction = DMA_MEM_TO_MEM; |
711 | 711 | ||
712 | data_width = min_t(unsigned int, dw->data_width[dwc->src_master], | 712 | data_width = dw->data_width[dwc->m_master]; |
713 | dw->data_width[dwc->dst_master]); | ||
714 | 713 | ||
715 | src_width = dst_width = min_t(unsigned int, data_width, | 714 | src_width = dst_width = min_t(unsigned int, data_width, |
716 | dwc_fast_ffs(src | dest | len)); | 715 | dwc_fast_ffs(src | dest | len)); |
@@ -802,7 +801,7 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | |||
802 | ctllo |= sconfig->device_fc ? DWC_CTLL_FC(DW_DMA_FC_P_M2P) : | 801 | ctllo |= sconfig->device_fc ? DWC_CTLL_FC(DW_DMA_FC_P_M2P) : |
803 | DWC_CTLL_FC(DW_DMA_FC_D_M2P); | 802 | DWC_CTLL_FC(DW_DMA_FC_D_M2P); |
804 | 803 | ||
805 | data_width = dw->data_width[dwc->src_master]; | 804 | data_width = dw->data_width[dwc->m_master]; |
806 | 805 | ||
807 | for_each_sg(sgl, sg, sg_len, i) { | 806 | for_each_sg(sgl, sg, sg_len, i) { |
808 | struct dw_desc *desc; | 807 | struct dw_desc *desc; |
@@ -859,7 +858,7 @@ slave_sg_todev_fill_desc: | |||
859 | ctllo |= sconfig->device_fc ? DWC_CTLL_FC(DW_DMA_FC_P_P2M) : | 858 | ctllo |= sconfig->device_fc ? DWC_CTLL_FC(DW_DMA_FC_P_P2M) : |
860 | DWC_CTLL_FC(DW_DMA_FC_D_P2M); | 859 | DWC_CTLL_FC(DW_DMA_FC_D_P2M); |
861 | 860 | ||
862 | data_width = dw->data_width[dwc->dst_master]; | 861 | data_width = dw->data_width[dwc->m_master]; |
863 | 862 | ||
864 | for_each_sg(sgl, sg, sg_len, i) { | 863 | for_each_sg(sgl, sg, sg_len, i) { |
865 | struct dw_desc *desc; | 864 | struct dw_desc *desc; |
@@ -937,8 +936,8 @@ bool dw_dma_filter(struct dma_chan *chan, void *param) | |||
937 | dwc->src_id = dws->src_id; | 936 | dwc->src_id = dws->src_id; |
938 | dwc->dst_id = dws->dst_id; | 937 | dwc->dst_id = dws->dst_id; |
939 | 938 | ||
940 | dwc->src_master = dws->src_master; | 939 | dwc->m_master = dws->m_master; |
941 | dwc->dst_master = dws->dst_master; | 940 | dwc->p_master = dws->p_master; |
942 | 941 | ||
943 | return true; | 942 | return true; |
944 | } | 943 | } |
@@ -1227,8 +1226,8 @@ static void dwc_free_chan_resources(struct dma_chan *chan) | |||
1227 | dwc->src_id = 0; | 1226 | dwc->src_id = 0; |
1228 | dwc->dst_id = 0; | 1227 | dwc->dst_id = 0; |
1229 | 1228 | ||
1230 | dwc->src_master = 0; | 1229 | dwc->m_master = 0; |
1231 | dwc->dst_master = 0; | 1230 | dwc->p_master = 0; |
1232 | 1231 | ||
1233 | dwc->initialized = false; | 1232 | dwc->initialized = false; |
1234 | 1233 | ||
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c index 26edbe3a27ac..23616c57645c 100644 --- a/drivers/dma/dw/platform.c +++ b/drivers/dma/dw/platform.c | |||
@@ -42,13 +42,13 @@ static struct dma_chan *dw_dma_of_xlate(struct of_phandle_args *dma_spec, | |||
42 | 42 | ||
43 | slave.src_id = dma_spec->args[0]; | 43 | slave.src_id = dma_spec->args[0]; |
44 | slave.dst_id = dma_spec->args[0]; | 44 | slave.dst_id = dma_spec->args[0]; |
45 | slave.src_master = dma_spec->args[1]; | 45 | slave.m_master = dma_spec->args[1]; |
46 | slave.dst_master = dma_spec->args[2]; | 46 | slave.p_master = dma_spec->args[2]; |
47 | 47 | ||
48 | if (WARN_ON(slave.src_id >= DW_DMA_MAX_NR_REQUESTS || | 48 | if (WARN_ON(slave.src_id >= DW_DMA_MAX_NR_REQUESTS || |
49 | slave.dst_id >= DW_DMA_MAX_NR_REQUESTS || | 49 | slave.dst_id >= DW_DMA_MAX_NR_REQUESTS || |
50 | slave.src_master >= dw->nr_masters || | 50 | slave.m_master >= dw->nr_masters || |
51 | slave.dst_master >= dw->nr_masters)) | 51 | slave.p_master >= dw->nr_masters)) |
52 | return NULL; | 52 | return NULL; |
53 | 53 | ||
54 | dma_cap_zero(cap); | 54 | dma_cap_zero(cap); |
@@ -66,8 +66,8 @@ static bool dw_dma_acpi_filter(struct dma_chan *chan, void *param) | |||
66 | .dma_dev = dma_spec->dev, | 66 | .dma_dev = dma_spec->dev, |
67 | .src_id = dma_spec->slave_id, | 67 | .src_id = dma_spec->slave_id, |
68 | .dst_id = dma_spec->slave_id, | 68 | .dst_id = dma_spec->slave_id, |
69 | .src_master = 1, | 69 | .m_master = 0, |
70 | .dst_master = 0, | 70 | .p_master = 1, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | return dw_dma_filter(chan, &slave); | 73 | return dw_dma_filter(chan, &slave); |
diff --git a/drivers/dma/dw/regs.h b/drivers/dma/dw/regs.h index 0a50c18d85b8..a63d62bbffe2 100644 --- a/drivers/dma/dw/regs.h +++ b/drivers/dma/dw/regs.h | |||
@@ -249,8 +249,8 @@ struct dw_dma_chan { | |||
249 | /* custom slave configuration */ | 249 | /* custom slave configuration */ |
250 | u8 src_id; | 250 | u8 src_id; |
251 | u8 dst_id; | 251 | u8 dst_id; |
252 | u8 src_master; | 252 | u8 m_master; |
253 | u8 dst_master; | 253 | u8 p_master; |
254 | 254 | ||
255 | /* configuration passed via .device_config */ | 255 | /* configuration passed via .device_config */ |
256 | struct dma_slave_config dma_sconfig; | 256 | struct dma_slave_config dma_sconfig; |
diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c index 520ed1dd5780..4fd7f9802f1b 100644 --- a/drivers/spi/spi-pxa2xx-pci.c +++ b/drivers/spi/spi-pxa2xx-pci.c | |||
@@ -144,16 +144,16 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev, | |||
144 | struct dw_dma_slave *slave = c->tx_param; | 144 | struct dw_dma_slave *slave = c->tx_param; |
145 | 145 | ||
146 | slave->dma_dev = &dma_dev->dev; | 146 | slave->dma_dev = &dma_dev->dev; |
147 | slave->src_master = 1; | 147 | slave->m_master = 0; |
148 | slave->dst_master = 0; | 148 | slave->p_master = 1; |
149 | } | 149 | } |
150 | 150 | ||
151 | if (c->rx_param) { | 151 | if (c->rx_param) { |
152 | struct dw_dma_slave *slave = c->rx_param; | 152 | struct dw_dma_slave *slave = c->rx_param; |
153 | 153 | ||
154 | slave->dma_dev = &dma_dev->dev; | 154 | slave->dma_dev = &dma_dev->dev; |
155 | slave->src_master = 1; | 155 | slave->m_master = 0; |
156 | slave->dst_master = 0; | 156 | slave->p_master = 1; |
157 | } | 157 | } |
158 | 158 | ||
159 | spi_pdata.dma_filter = lpss_dma_filter; | 159 | spi_pdata.dma_filter = lpss_dma_filter; |
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index 98862aa5bb58..5eea74d7f9f4 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c | |||
@@ -1454,13 +1454,13 @@ byt_serial_setup(struct serial_private *priv, | |||
1454 | return -EINVAL; | 1454 | return -EINVAL; |
1455 | } | 1455 | } |
1456 | 1456 | ||
1457 | rx_param->src_master = 1; | 1457 | rx_param->m_master = 0; |
1458 | rx_param->dst_master = 0; | 1458 | rx_param->p_master = 1; |
1459 | 1459 | ||
1460 | dma->rxconf.src_maxburst = 16; | 1460 | dma->rxconf.src_maxburst = 16; |
1461 | 1461 | ||
1462 | tx_param->src_master = 1; | 1462 | tx_param->m_master = 0; |
1463 | tx_param->dst_master = 0; | 1463 | tx_param->p_master = 1; |
1464 | 1464 | ||
1465 | dma->txconf.dst_maxburst = 16; | 1465 | dma->txconf.dst_maxburst = 16; |
1466 | 1466 | ||
diff --git a/include/linux/platform_data/dma-dw.h b/include/linux/platform_data/dma-dw.h index 03b6095d3b18..b881b978e486 100644 --- a/include/linux/platform_data/dma-dw.h +++ b/include/linux/platform_data/dma-dw.h | |||
@@ -21,15 +21,15 @@ | |||
21 | * @dma_dev: required DMA master device | 21 | * @dma_dev: required DMA master device |
22 | * @src_id: src request line | 22 | * @src_id: src request line |
23 | * @dst_id: dst request line | 23 | * @dst_id: dst request line |
24 | * @src_master: src master for transfers on allocated channel. | 24 | * @m_master: memory master for transfers on allocated channel |
25 | * @dst_master: dest master for transfers on allocated channel. | 25 | * @p_master: peripheral master for transfers on allocated channel |
26 | */ | 26 | */ |
27 | struct dw_dma_slave { | 27 | struct dw_dma_slave { |
28 | struct device *dma_dev; | 28 | struct device *dma_dev; |
29 | u8 src_id; | 29 | u8 src_id; |
30 | u8 dst_id; | 30 | u8 dst_id; |
31 | u8 src_master; | 31 | u8 m_master; |
32 | u8 dst_master; | 32 | u8 p_master; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | /** | 35 | /** |