spi: pxa2xx: Introduce DMA burst size support
Some masters may have different DMA burst size than hard coded default. In such case respect the value given by DMA burst size provided via platform data. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committed by
Mark Brown

parent
560ee7e910
commit
37821a82e6
@@ -34,6 +34,8 @@ struct pxa_spi_info {
|
||||
void *tx_param;
|
||||
void *rx_param;
|
||||
|
||||
int dma_burst_size;
|
||||
|
||||
int (*setup)(struct pci_dev *pdev, struct pxa_spi_info *c);
|
||||
};
|
||||
|
||||
@@ -132,6 +134,7 @@ static int mrfld_spi_setup(struct pci_dev *dev, struct pxa_spi_info *c)
|
||||
rx->dma_dev = &dma_dev->dev;
|
||||
|
||||
c->dma_filter = lpss_dma_filter;
|
||||
c->dma_burst_size = 8;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -222,6 +225,7 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
|
||||
spi_pdata.tx_param = c->tx_param;
|
||||
spi_pdata.rx_param = c->rx_param;
|
||||
spi_pdata.enable_dma = c->rx_param && c->tx_param;
|
||||
spi_pdata.dma_burst_size = c->dma_burst_size ? c->dma_burst_size : 1;
|
||||
|
||||
ssp = &spi_pdata.ssp;
|
||||
ssp->phys_base = pci_resource_start(dev, 0);
|
||||
|
Reference in New Issue
Block a user