diff options
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-dw-mid.c | 7 | ||||
-rw-r--r-- | drivers/spi/spi-dw.c | 8 | ||||
-rw-r--r-- | drivers/spi/spi-ep93xx.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-omap-uwire.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi-orion.c | 5 | ||||
-rw-r--r-- | drivers/spi/spi-pl022.c | 6 | ||||
-rw-r--r-- | drivers/spi/spi-topcliff-pch.c | 4 |
7 files changed, 14 insertions, 21 deletions
diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c index 8418eb036651..b9f0192758d6 100644 --- a/drivers/spi/spi-dw-mid.c +++ b/drivers/spi/spi-dw-mid.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
25 | #include <linux/types.h> | ||
25 | 26 | ||
26 | #include "spi-dw.h" | 27 | #include "spi-dw.h" |
27 | 28 | ||
@@ -136,6 +137,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change) | |||
136 | txconf.dst_maxburst = LNW_DMA_MSIZE_16; | 137 | txconf.dst_maxburst = LNW_DMA_MSIZE_16; |
137 | txconf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | 138 | txconf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
138 | txconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; | 139 | txconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; |
140 | txconf.device_fc = false; | ||
139 | 141 | ||
140 | txchan->device->device_control(txchan, DMA_SLAVE_CONFIG, | 142 | txchan->device->device_control(txchan, DMA_SLAVE_CONFIG, |
141 | (unsigned long) &txconf); | 143 | (unsigned long) &txconf); |
@@ -144,7 +146,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change) | |||
144 | dws->tx_sgl.dma_address = dws->tx_dma; | 146 | dws->tx_sgl.dma_address = dws->tx_dma; |
145 | dws->tx_sgl.length = dws->len; | 147 | dws->tx_sgl.length = dws->len; |
146 | 148 | ||
147 | txdesc = txchan->device->device_prep_slave_sg(txchan, | 149 | txdesc = dmaengine_prep_slave_sg(txchan, |
148 | &dws->tx_sgl, | 150 | &dws->tx_sgl, |
149 | 1, | 151 | 1, |
150 | DMA_MEM_TO_DEV, | 152 | DMA_MEM_TO_DEV, |
@@ -158,6 +160,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change) | |||
158 | rxconf.src_maxburst = LNW_DMA_MSIZE_16; | 160 | rxconf.src_maxburst = LNW_DMA_MSIZE_16; |
159 | rxconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; | 161 | rxconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
160 | rxconf.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; | 162 | rxconf.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; |
163 | rxconf.device_fc = false; | ||
161 | 164 | ||
162 | rxchan->device->device_control(rxchan, DMA_SLAVE_CONFIG, | 165 | rxchan->device->device_control(rxchan, DMA_SLAVE_CONFIG, |
163 | (unsigned long) &rxconf); | 166 | (unsigned long) &rxconf); |
@@ -166,7 +169,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change) | |||
166 | dws->rx_sgl.dma_address = dws->rx_dma; | 169 | dws->rx_sgl.dma_address = dws->rx_dma; |
167 | dws->rx_sgl.length = dws->len; | 170 | dws->rx_sgl.length = dws->len; |
168 | 171 | ||
169 | rxdesc = rxchan->device->device_prep_slave_sg(rxchan, | 172 | rxdesc = dmaengine_prep_slave_sg(rxchan, |
170 | &dws->rx_sgl, | 173 | &dws->rx_sgl, |
171 | 1, | 174 | 1, |
172 | DMA_DEV_TO_MEM, | 175 | DMA_DEV_TO_MEM, |
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 082458d73ce9..d1a495f64e2d 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c | |||
@@ -63,12 +63,6 @@ struct chip_data { | |||
63 | }; | 63 | }; |
64 | 64 | ||
65 | #ifdef CONFIG_DEBUG_FS | 65 | #ifdef CONFIG_DEBUG_FS |
66 | static int spi_show_regs_open(struct inode *inode, struct file *file) | ||
67 | { | ||
68 | file->private_data = inode->i_private; | ||
69 | return 0; | ||
70 | } | ||
71 | |||
72 | #define SPI_REGS_BUFSIZE 1024 | 66 | #define SPI_REGS_BUFSIZE 1024 |
73 | static ssize_t spi_show_regs(struct file *file, char __user *user_buf, | 67 | static ssize_t spi_show_regs(struct file *file, char __user *user_buf, |
74 | size_t count, loff_t *ppos) | 68 | size_t count, loff_t *ppos) |
@@ -128,7 +122,7 @@ static ssize_t spi_show_regs(struct file *file, char __user *user_buf, | |||
128 | 122 | ||
129 | static const struct file_operations mrst_spi_regs_ops = { | 123 | static const struct file_operations mrst_spi_regs_ops = { |
130 | .owner = THIS_MODULE, | 124 | .owner = THIS_MODULE, |
131 | .open = spi_show_regs_open, | 125 | .open = simple_open, |
132 | .read = spi_show_regs, | 126 | .read = spi_show_regs, |
133 | .llseek = default_llseek, | 127 | .llseek = default_llseek, |
134 | }; | 128 | }; |
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index d46e55c720b7..6db2887852d6 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c | |||
@@ -633,8 +633,8 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_data_direction dir) | |||
633 | if (!nents) | 633 | if (!nents) |
634 | return ERR_PTR(-ENOMEM); | 634 | return ERR_PTR(-ENOMEM); |
635 | 635 | ||
636 | txd = chan->device->device_prep_slave_sg(chan, sgt->sgl, nents, | 636 | txd = dmaengine_prep_slave_sg(chan, sgt->sgl, nents, |
637 | slave_dirn, DMA_CTRL_ACK); | 637 | slave_dirn, DMA_CTRL_ACK); |
638 | if (!txd) { | 638 | if (!txd) { |
639 | dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); | 639 | dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); |
640 | return ERR_PTR(-ENOMEM); | 640 | return ERR_PTR(-ENOMEM); |
diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c index 610f7391456e..9b0d71696039 100644 --- a/drivers/spi/spi-omap-uwire.c +++ b/drivers/spi/spi-omap-uwire.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <linux/spi/spi_bitbang.h> | 47 | #include <linux/spi/spi_bitbang.h> |
48 | #include <linux/module.h> | 48 | #include <linux/module.h> |
49 | 49 | ||
50 | #include <asm/system.h> | ||
51 | #include <asm/irq.h> | 50 | #include <asm/irq.h> |
52 | #include <mach/hardware.h> | 51 | #include <mach/hardware.h> |
53 | #include <asm/io.h> | 52 | #include <asm/io.h> |
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index 13448c832c44..e496f799b7a9 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c | |||
@@ -359,11 +359,6 @@ static int orion_spi_setup(struct spi_device *spi) | |||
359 | 359 | ||
360 | orion_spi = spi_master_get_devdata(spi->master); | 360 | orion_spi = spi_master_get_devdata(spi->master); |
361 | 361 | ||
362 | /* Fix ac timing if required. */ | ||
363 | if (orion_spi->spi_info->enable_clock_fix) | ||
364 | orion_spi_setbits(orion_spi, ORION_SPI_IF_CONFIG_REG, | ||
365 | (1 << 14)); | ||
366 | |||
367 | if ((spi->max_speed_hz == 0) | 362 | if ((spi->max_speed_hz == 0) |
368 | || (spi->max_speed_hz > orion_spi->max_speed)) | 363 | || (spi->max_speed_hz > orion_spi->max_speed)) |
369 | spi->max_speed_hz = orion_spi->max_speed; | 364 | spi->max_speed_hz = orion_spi->max_speed; |
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index dc8485d1e883..96f0da66b185 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c | |||
@@ -880,10 +880,12 @@ static int configure_dma(struct pl022 *pl022) | |||
880 | struct dma_slave_config rx_conf = { | 880 | struct dma_slave_config rx_conf = { |
881 | .src_addr = SSP_DR(pl022->phybase), | 881 | .src_addr = SSP_DR(pl022->phybase), |
882 | .direction = DMA_DEV_TO_MEM, | 882 | .direction = DMA_DEV_TO_MEM, |
883 | .device_fc = false, | ||
883 | }; | 884 | }; |
884 | struct dma_slave_config tx_conf = { | 885 | struct dma_slave_config tx_conf = { |
885 | .dst_addr = SSP_DR(pl022->phybase), | 886 | .dst_addr = SSP_DR(pl022->phybase), |
886 | .direction = DMA_MEM_TO_DEV, | 887 | .direction = DMA_MEM_TO_DEV, |
888 | .device_fc = false, | ||
887 | }; | 889 | }; |
888 | unsigned int pages; | 890 | unsigned int pages; |
889 | int ret; | 891 | int ret; |
@@ -1017,7 +1019,7 @@ static int configure_dma(struct pl022 *pl022) | |||
1017 | goto err_tx_sgmap; | 1019 | goto err_tx_sgmap; |
1018 | 1020 | ||
1019 | /* Send both scatterlists */ | 1021 | /* Send both scatterlists */ |
1020 | rxdesc = rxchan->device->device_prep_slave_sg(rxchan, | 1022 | rxdesc = dmaengine_prep_slave_sg(rxchan, |
1021 | pl022->sgt_rx.sgl, | 1023 | pl022->sgt_rx.sgl, |
1022 | rx_sglen, | 1024 | rx_sglen, |
1023 | DMA_DEV_TO_MEM, | 1025 | DMA_DEV_TO_MEM, |
@@ -1025,7 +1027,7 @@ static int configure_dma(struct pl022 *pl022) | |||
1025 | if (!rxdesc) | 1027 | if (!rxdesc) |
1026 | goto err_rxdesc; | 1028 | goto err_rxdesc; |
1027 | 1029 | ||
1028 | txdesc = txchan->device->device_prep_slave_sg(txchan, | 1030 | txdesc = dmaengine_prep_slave_sg(txchan, |
1029 | pl022->sgt_tx.sgl, | 1031 | pl022->sgt_tx.sgl, |
1030 | tx_sglen, | 1032 | tx_sglen, |
1031 | DMA_MEM_TO_DEV, | 1033 | DMA_MEM_TO_DEV, |
diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c index 5c6fa5ed3366..ec47d3bdfd13 100644 --- a/drivers/spi/spi-topcliff-pch.c +++ b/drivers/spi/spi-topcliff-pch.c | |||
@@ -1099,7 +1099,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) | |||
1099 | sg_dma_address(sg) = dma->rx_buf_dma + sg->offset; | 1099 | sg_dma_address(sg) = dma->rx_buf_dma + sg->offset; |
1100 | } | 1100 | } |
1101 | sg = dma->sg_rx_p; | 1101 | sg = dma->sg_rx_p; |
1102 | desc_rx = dma->chan_rx->device->device_prep_slave_sg(dma->chan_rx, sg, | 1102 | desc_rx = dmaengine_prep_slave_sg(dma->chan_rx, sg, |
1103 | num, DMA_DEV_TO_MEM, | 1103 | num, DMA_DEV_TO_MEM, |
1104 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 1104 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
1105 | if (!desc_rx) { | 1105 | if (!desc_rx) { |
@@ -1158,7 +1158,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) | |||
1158 | sg_dma_address(sg) = dma->tx_buf_dma + sg->offset; | 1158 | sg_dma_address(sg) = dma->tx_buf_dma + sg->offset; |
1159 | } | 1159 | } |
1160 | sg = dma->sg_tx_p; | 1160 | sg = dma->sg_tx_p; |
1161 | desc_tx = dma->chan_tx->device->device_prep_slave_sg(dma->chan_tx, | 1161 | desc_tx = dmaengine_prep_slave_sg(dma->chan_tx, |
1162 | sg, num, DMA_MEM_TO_DEV, | 1162 | sg, num, DMA_MEM_TO_DEV, |
1163 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 1163 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
1164 | if (!desc_tx) { | 1164 | if (!desc_tx) { |