Commit 110bc220 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'spi/for-5.11' into spi-linus

parents 92bf2261 b3063203
...@@ -84,7 +84,7 @@ static void dw_spi_bt1_dirmap_copy_from_map(void *to, void __iomem *from, size_t ...@@ -84,7 +84,7 @@ static void dw_spi_bt1_dirmap_copy_from_map(void *to, void __iomem *from, size_t
if (shift) { if (shift) {
chunk = min_t(size_t, 4 - shift, len); chunk = min_t(size_t, 4 - shift, len);
data = readl_relaxed(from - shift); data = readl_relaxed(from - shift);
memcpy(to, &data + shift, chunk); memcpy(to, (char *)&data + shift, chunk);
from += chunk; from += chunk;
to += chunk; to += chunk;
len -= chunk; len -= chunk;
......
...@@ -695,7 +695,7 @@ static void fsl_spi_cs_control(struct spi_device *spi, bool on) ...@@ -695,7 +695,7 @@ static void fsl_spi_cs_control(struct spi_device *spi, bool on)
if (WARN_ON_ONCE(!pinfo->immr_spi_cs)) if (WARN_ON_ONCE(!pinfo->immr_spi_cs))
return; return;
iowrite32be(on ? SPI_BOOT_SEL_BIT : 0, pinfo->immr_spi_cs); iowrite32be(on ? 0 : SPI_BOOT_SEL_BIT, pinfo->immr_spi_cs);
} }
} }
......
...@@ -21,7 +21,8 @@ enum { ...@@ -21,7 +21,8 @@ enum {
PORT_BSW1, PORT_BSW1,
PORT_BSW2, PORT_BSW2,
PORT_CE4100, PORT_CE4100,
PORT_LPT, PORT_LPT0,
PORT_LPT1,
}; };
struct pxa_spi_info { struct pxa_spi_info {
...@@ -57,8 +58,10 @@ static struct dw_dma_slave bsw1_rx_param = { .src_id = 7 }; ...@@ -57,8 +58,10 @@ 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_tx_param = { .dst_id = 8 };
static struct dw_dma_slave bsw2_rx_param = { .src_id = 9 }; static struct dw_dma_slave bsw2_rx_param = { .src_id = 9 };
static struct dw_dma_slave lpt_tx_param = { .dst_id = 0 }; static struct dw_dma_slave lpt1_tx_param = { .dst_id = 0 };
static struct dw_dma_slave lpt_rx_param = { .src_id = 1 }; static struct dw_dma_slave lpt1_rx_param = { .src_id = 1 };
static struct dw_dma_slave lpt0_tx_param = { .dst_id = 2 };
static struct dw_dma_slave lpt0_rx_param = { .src_id = 3 };
static bool lpss_dma_filter(struct dma_chan *chan, void *param) static bool lpss_dma_filter(struct dma_chan *chan, void *param)
{ {
...@@ -185,12 +188,19 @@ static struct pxa_spi_info spi_info_configs[] = { ...@@ -185,12 +188,19 @@ static struct pxa_spi_info spi_info_configs[] = {
.num_chipselect = 1, .num_chipselect = 1,
.max_clk_rate = 50000000, .max_clk_rate = 50000000,
}, },
[PORT_LPT] = { [PORT_LPT0] = {
.type = LPSS_LPT_SSP, .type = LPSS_LPT_SSP,
.port_id = 0, .port_id = 0,
.setup = lpss_spi_setup, .setup = lpss_spi_setup,
.tx_param = &lpt_tx_param, .tx_param = &lpt0_tx_param,
.rx_param = &lpt_rx_param, .rx_param = &lpt0_rx_param,
},
[PORT_LPT1] = {
.type = LPSS_LPT_SSP,
.port_id = 1,
.setup = lpss_spi_setup,
.tx_param = &lpt1_tx_param,
.rx_param = &lpt1_rx_param,
}, },
}; };
...@@ -285,8 +295,11 @@ static const struct pci_device_id pxa2xx_spi_pci_devices[] = { ...@@ -285,8 +295,11 @@ static const struct pci_device_id pxa2xx_spi_pci_devices[] = {
{ PCI_VDEVICE(INTEL, 0x2290), PORT_BSW1 }, { PCI_VDEVICE(INTEL, 0x2290), PORT_BSW1 },
{ PCI_VDEVICE(INTEL, 0x22ac), PORT_BSW2 }, { PCI_VDEVICE(INTEL, 0x22ac), PORT_BSW2 },
{ PCI_VDEVICE(INTEL, 0x2e6a), PORT_CE4100 }, { PCI_VDEVICE(INTEL, 0x2e6a), PORT_CE4100 },
{ PCI_VDEVICE(INTEL, 0x9ce6), PORT_LPT }, { PCI_VDEVICE(INTEL, 0x9c65), PORT_LPT0 },
{ }, { PCI_VDEVICE(INTEL, 0x9c66), PORT_LPT1 },
{ PCI_VDEVICE(INTEL, 0x9ce5), PORT_LPT0 },
{ PCI_VDEVICE(INTEL, 0x9ce6), PORT_LPT1 },
{ }
}; };
MODULE_DEVICE_TABLE(pci, pxa2xx_spi_pci_devices); MODULE_DEVICE_TABLE(pci, pxa2xx_spi_pci_devices);
......
...@@ -490,6 +490,10 @@ static void synquacer_spi_set_cs(struct spi_device *spi, bool enable) ...@@ -490,6 +490,10 @@ static void synquacer_spi_set_cs(struct spi_device *spi, bool enable)
val &= ~(SYNQUACER_HSSPI_DMPSEL_CS_MASK << val &= ~(SYNQUACER_HSSPI_DMPSEL_CS_MASK <<
SYNQUACER_HSSPI_DMPSEL_CS_SHIFT); SYNQUACER_HSSPI_DMPSEL_CS_SHIFT);
val |= spi->chip_select << SYNQUACER_HSSPI_DMPSEL_CS_SHIFT; val |= spi->chip_select << SYNQUACER_HSSPI_DMPSEL_CS_SHIFT;
if (!enable)
val |= SYNQUACER_HSSPI_DMSTOP_STOP;
writel(val, sspi->regs + SYNQUACER_HSSPI_REG_DMSTART); writel(val, sspi->regs + SYNQUACER_HSSPI_REG_DMSTART);
} }
......
...@@ -1267,7 +1267,7 @@ static int spi_transfer_one_message(struct spi_controller *ctlr, ...@@ -1267,7 +1267,7 @@ static int spi_transfer_one_message(struct spi_controller *ctlr,
ptp_read_system_prets(xfer->ptp_sts); ptp_read_system_prets(xfer->ptp_sts);
} }
if (xfer->tx_buf || xfer->rx_buf) { if ((xfer->tx_buf || xfer->rx_buf) && xfer->len) {
reinit_completion(&ctlr->xfer_completion); reinit_completion(&ctlr->xfer_completion);
fallback_pio: fallback_pio:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment