Skip to content

Commit

Permalink
spi/pxa2xx-pci: Add support for Intel Braswell
Browse files Browse the repository at this point in the history
Instead of one port we have 3 ports and all of them can take advantage of
the shared DMA controller.

Signed-off-by: Mika Westerberg <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
westeri authored and Vinod Koul committed Sep 18, 2014
1 parent b729bf3 commit 39d3653
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions drivers/spi/spi-pxa2xx-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
enum {
PORT_CE4100,
PORT_BYT,
PORT_BSW0,
PORT_BSW1,
PORT_BSW2,
};

struct pxa_spi_info {
Expand All @@ -32,6 +35,13 @@ struct pxa_spi_info {
static struct dw_dma_slave byt_tx_param = { .dst_id = 0 };
static struct dw_dma_slave byt_rx_param = { .src_id = 1 };

static struct dw_dma_slave bsw0_tx_param = { .dst_id = 0 };
static struct dw_dma_slave bsw0_rx_param = { .src_id = 1 };
static struct dw_dma_slave bsw1_tx_param = { .dst_id = 6 };
static struct dw_dma_slave bsw1_rx_param = { .src_id = 7 };
static struct dw_dma_slave bsw2_tx_param = { .dst_id = 8 };
static struct dw_dma_slave bsw2_rx_param = { .src_id = 9 };

static bool lpss_dma_filter(struct dma_chan *chan, void *param)
{
struct dw_dma_slave *dws = param;
Expand All @@ -58,6 +68,30 @@ static struct pxa_spi_info spi_info_configs[] = {
.tx_param = &byt_tx_param,
.rx_param = &byt_rx_param,
},
[PORT_BSW0] = {
.type = LPSS_SSP,
.port_id = 0,
.num_chipselect = 1,
.max_clk_rate = 50000000,
.tx_param = &bsw0_tx_param,
.rx_param = &bsw0_rx_param,
},
[PORT_BSW1] = {
.type = LPSS_SSP,
.port_id = 1,
.num_chipselect = 1,
.max_clk_rate = 50000000,
.tx_param = &bsw1_tx_param,
.rx_param = &bsw1_rx_param,
},
[PORT_BSW2] = {
.type = LPSS_SSP,
.port_id = 2,
.num_chipselect = 1,
.max_clk_rate = 50000000,
.tx_param = &bsw2_tx_param,
.rx_param = &bsw2_rx_param,
},
};

static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
Expand Down Expand Up @@ -159,6 +193,9 @@ static void pxa2xx_spi_pci_remove(struct pci_dev *dev)
static const struct pci_device_id pxa2xx_spi_pci_devices[] = {
{ PCI_VDEVICE(INTEL, 0x2e6a), PORT_CE4100 },
{ PCI_VDEVICE(INTEL, 0x0f0e), PORT_BYT },
{ PCI_VDEVICE(INTEL, 0x228e), PORT_BSW0 },
{ PCI_VDEVICE(INTEL, 0x2290), PORT_BSW1 },
{ PCI_VDEVICE(INTEL, 0x22ac), PORT_BSW2 },
{ },
};
MODULE_DEVICE_TABLE(pci, pxa2xx_spi_pci_devices);
Expand Down

0 comments on commit 39d3653

Please sign in to comment.