File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,16 @@ static void altera_spi_chipsel(struct spi_device *spi, int value)
103
103
}
104
104
}
105
105
106
+ static int altera_spi_setupxfer (struct spi_device * spi , struct spi_transfer * t )
107
+ {
108
+ return 0 ;
109
+ }
110
+
111
+ static int altera_spi_setup (struct spi_device * spi )
112
+ {
113
+ return 0 ;
114
+ }
115
+
106
116
static inline unsigned int hw_txbyte (struct altera_spi * hw , int count )
107
117
{
108
118
if (hw -> tx ) {
@@ -221,6 +231,7 @@ static int altera_spi_probe(struct platform_device *pdev)
221
231
master -> bus_num = pdev -> id ;
222
232
master -> num_chipselect = 16 ;
223
233
master -> mode_bits = SPI_CS_HIGH ;
234
+ master -> setup = altera_spi_setup ;
224
235
225
236
hw = spi_master_get_devdata (master );
226
237
platform_set_drvdata (pdev , hw );
@@ -229,6 +240,7 @@ static int altera_spi_probe(struct platform_device *pdev)
229
240
hw -> bitbang .master = spi_master_get (master );
230
241
if (!hw -> bitbang .master )
231
242
return err ;
243
+ hw -> bitbang .setup_transfer = altera_spi_setupxfer ;
232
244
hw -> bitbang .chipselect = altera_spi_chipsel ;
233
245
hw -> bitbang .txrx_bufs = altera_spi_txrx ;
234
246
Original file line number Diff line number Diff line change @@ -174,6 +174,17 @@ static void nuc900_spi_gobusy(struct nuc900_spi *hw)
174
174
spin_unlock_irqrestore (& hw -> lock , flags );
175
175
}
176
176
177
+ static int nuc900_spi_setupxfer (struct spi_device * spi ,
178
+ struct spi_transfer * t )
179
+ {
180
+ return 0 ;
181
+ }
182
+
183
+ static int nuc900_spi_setup (struct spi_device * spi )
184
+ {
185
+ return 0 ;
186
+ }
187
+
177
188
static inline unsigned int hw_txbyte (struct nuc900_spi * hw , int count )
178
189
{
179
190
return hw -> tx ? hw -> tx [count ] : 0 ;
@@ -366,8 +377,10 @@ static int nuc900_spi_probe(struct platform_device *pdev)
366
377
master -> num_chipselect = hw -> pdata -> num_cs ;
367
378
master -> bus_num = hw -> pdata -> bus_num ;
368
379
hw -> bitbang .master = hw -> master ;
380
+ hw -> bitbang .setup_transfer = nuc900_spi_setupxfer ;
369
381
hw -> bitbang .chipselect = nuc900_spi_chipsel ;
370
382
hw -> bitbang .txrx_bufs = nuc900_spi_txrx ;
383
+ hw -> bitbang .master -> setup = nuc900_spi_setup ;
371
384
372
385
hw -> res = platform_get_resource (pdev , IORESOURCE_MEM , 0 );
373
386
if (hw -> res == NULL ) {
You can’t perform that action at this time.
0 commit comments