Unverified Commit 110bc220 authored by Mark Brown's avatar Mark Brown
Browse files

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

parents 92bf2261 b3063203
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ static void dw_spi_bt1_dirmap_copy_from_map(void *to, void __iomem *from, size_t
	if (shift) {
		chunk = min_t(size_t, 4 - shift, len);
		data = readl_relaxed(from - shift);
		memcpy(to, &data + shift, chunk);
		memcpy(to, (char *)&data + shift, chunk);
		from += chunk;
		to += chunk;
		len -= chunk;
+1 −1
Original line number Diff line number Diff line
@@ -695,7 +695,7 @@ static void fsl_spi_cs_control(struct spi_device *spi, bool on)

		if (WARN_ON_ONCE(!pinfo->immr_spi_cs))
			return;
		iowrite32be(on ? SPI_BOOT_SEL_BIT : 0, pinfo->immr_spi_cs);
		iowrite32be(on ? 0 : SPI_BOOT_SEL_BIT, pinfo->immr_spi_cs);
	}
}

+21 −8
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ enum {
	PORT_BSW1,
	PORT_BSW2,
	PORT_CE4100,
	PORT_LPT,
	PORT_LPT0,
	PORT_LPT1,
};

struct pxa_spi_info {
@@ -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_rx_param = { .src_id = 9 };

static struct dw_dma_slave lpt_tx_param = { .dst_id = 0 };
static struct dw_dma_slave lpt_rx_param = { .src_id = 1 };
static struct dw_dma_slave lpt1_tx_param = { .dst_id = 0 };
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)
{
@@ -185,12 +188,19 @@ static struct pxa_spi_info spi_info_configs[] = {
		.num_chipselect = 1,
		.max_clk_rate = 50000000,
	},
	[PORT_LPT] = {
	[PORT_LPT0] = {
		.type = LPSS_LPT_SSP,
		.port_id = 0,
		.setup = lpss_spi_setup,
		.tx_param = &lpt_tx_param,
		.rx_param = &lpt_rx_param,
		.tx_param = &lpt0_tx_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[] = {
	{ PCI_VDEVICE(INTEL, 0x2290), PORT_BSW1 },
	{ PCI_VDEVICE(INTEL, 0x22ac), PORT_BSW2 },
	{ 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);

+4 −0
Original line number Diff line number Diff line
@@ -490,6 +490,10 @@ static void synquacer_spi_set_cs(struct spi_device *spi, bool enable)
	val &= ~(SYNQUACER_HSSPI_DMPSEL_CS_MASK <<
		 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);
}

+1 −1
Original line number Diff line number Diff line
@@ -1267,7 +1267,7 @@ static int spi_transfer_one_message(struct spi_controller *ctlr,
			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);

fallback_pio: