struct pxa_spi_info {
enum pxa_ssp_type type;
int port_id;
- int num_chipselect;
+ unsigned int num_chipselect;
unsigned long max_clk_rate;
/* DMA channel request parameters */
return 0;
}
+static int ce4100_spi_setup(struct pci_dev *dev, struct pxa_spi_info *c)
+{
+ c->num_chipselect = dev->devfn;
+ c->max_clk_rate = 3686400;
+
+ return 0;
+}
+
static int mrfld_spi_setup(struct pci_dev *dev, struct pxa_spi_info *c)
{
struct dw_dma_slave *tx, *rx;
[PORT_CE4100] = {
.type = PXA25x_SSP,
.port_id = -1,
- .num_chipselect = -1,
- .max_clk_rate = 3686400,
+ .setup = ce4100_spi_setup,
},
[PORT_BYT] = {
.type = LPSS_BYT_SSP,
}
memset(&spi_pdata, 0, sizeof(spi_pdata));
- spi_pdata.num_chipselect = (c->num_chipselect > 0) ? c->num_chipselect : dev->devfn;
+ spi_pdata.num_chipselect = c->num_chipselect;
spi_pdata.dma_filter = c->dma_filter;
spi_pdata.tx_param = c->tx_param;
spi_pdata.rx_param = c->rx_param;