aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-07-15 06:46:15 -0400
committerMark Brown <broonie@linaro.org>2013-07-15 06:46:15 -0400
commit52bc441ae7ecc2951d41fd72b63ce30ae51ba97c (patch)
tree6562a6b5bd3bce374084efb7572f54595ac38820
parent069e1572d78a154a342d7cf396a160823854747f (diff)
parent103ccee4ef1595468cf79c93068d253c7f2d85a8 (diff)
Merge remote-tracking branch 'spi/fix/setup' into spi-linus
-rw-r--r--drivers/spi/spi-altera.c12
-rw-r--r--drivers/spi/spi-nuc900.c13
2 files changed, 25 insertions, 0 deletions
diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
index 8a6bb37910da..81b9adb6e766 100644
--- a/drivers/spi/spi-altera.c
+++ b/drivers/spi/spi-altera.c
@@ -103,6 +103,16 @@ static void altera_spi_chipsel(struct spi_device *spi, int value)
103 } 103 }
104} 104}
105 105
106static int altera_spi_setupxfer(struct spi_device *spi, struct spi_transfer *t)
107{
108 return 0;
109}
110
111static int altera_spi_setup(struct spi_device *spi)
112{
113 return 0;
114}
115
106static inline unsigned int hw_txbyte(struct altera_spi *hw, int count) 116static inline unsigned int hw_txbyte(struct altera_spi *hw, int count)
107{ 117{
108 if (hw->tx) { 118 if (hw->tx) {
@@ -221,6 +231,7 @@ static int altera_spi_probe(struct platform_device *pdev)
221 master->bus_num = pdev->id; 231 master->bus_num = pdev->id;
222 master->num_chipselect = 16; 232 master->num_chipselect = 16;
223 master->mode_bits = SPI_CS_HIGH; 233 master->mode_bits = SPI_CS_HIGH;
234 master->setup = altera_spi_setup;
224 235
225 hw = spi_master_get_devdata(master); 236 hw = spi_master_get_devdata(master);
226 platform_set_drvdata(pdev, hw); 237 platform_set_drvdata(pdev, hw);
@@ -229,6 +240,7 @@ static int altera_spi_probe(struct platform_device *pdev)
229 hw->bitbang.master = spi_master_get(master); 240 hw->bitbang.master = spi_master_get(master);
230 if (!hw->bitbang.master) 241 if (!hw->bitbang.master)
231 return err; 242 return err;
243 hw->bitbang.setup_transfer = altera_spi_setupxfer;
232 hw->bitbang.chipselect = altera_spi_chipsel; 244 hw->bitbang.chipselect = altera_spi_chipsel;
233 hw->bitbang.txrx_bufs = altera_spi_txrx; 245 hw->bitbang.txrx_bufs = altera_spi_txrx;
234 246
diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c
index 2ad3d74ac021..150d85453c27 100644
--- a/drivers/spi/spi-nuc900.c
+++ b/drivers/spi/spi-nuc900.c
@@ -174,6 +174,17 @@ static void nuc900_spi_gobusy(struct nuc900_spi *hw)
174 spin_unlock_irqrestore(&hw->lock, flags); 174 spin_unlock_irqrestore(&hw->lock, flags);
175} 175}
176 176
177static int nuc900_spi_setupxfer(struct spi_device *spi,
178 struct spi_transfer *t)
179{
180 return 0;
181}
182
183static int nuc900_spi_setup(struct spi_device *spi)
184{
185 return 0;
186}
187
177static inline unsigned int hw_txbyte(struct nuc900_spi *hw, int count) 188static inline unsigned int hw_txbyte(struct nuc900_spi *hw, int count)
178{ 189{
179 return hw->tx ? hw->tx[count] : 0; 190 return hw->tx ? hw->tx[count] : 0;
@@ -366,8 +377,10 @@ static int nuc900_spi_probe(struct platform_device *pdev)
366 master->num_chipselect = hw->pdata->num_cs; 377 master->num_chipselect = hw->pdata->num_cs;
367 master->bus_num = hw->pdata->bus_num; 378 master->bus_num = hw->pdata->bus_num;
368 hw->bitbang.master = hw->master; 379 hw->bitbang.master = hw->master;
380 hw->bitbang.setup_transfer = nuc900_spi_setupxfer;
369 hw->bitbang.chipselect = nuc900_spi_chipsel; 381 hw->bitbang.chipselect = nuc900_spi_chipsel;
370 hw->bitbang.txrx_bufs = nuc900_spi_txrx; 382 hw->bitbang.txrx_bufs = nuc900_spi_txrx;
383 hw->bitbang.master->setup = nuc900_spi_setup;
371 384
372 hw->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 385 hw->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
373 if (hw->res == NULL) { 386 if (hw->res == NULL) {