Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2016d52a authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/lantiq-ssc',...

Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/lantiq-ssc', 'spi/topic/mpc52xx', 'spi/topic/ppc4xx' and 'spi/topic/pxa2xx' into spi-next
Loading
Loading
Loading
Loading
+29 −0
Original line number Original line Diff line number Diff line
Lantiq Synchronous Serial Controller (SSC) SPI master driver

Required properties:
- compatible: "lantiq,ase-spi", "lantiq,falcon-spi", "lantiq,xrx100-spi"
- #address-cells: see spi-bus.txt
- #size-cells: see spi-bus.txt
- reg: address and length of the spi master registers
- interrupts: should contain the "spi_rx", "spi_tx" and "spi_err" interrupt.


Optional properties:
- clocks: spi clock phandle
- num-cs: see spi-bus.txt, set to 8 if unset
- base-cs: the number of the first chip select, set to 1 if unset.

Example:


spi: spi@E100800 {
	compatible = "lantiq,xrx200-spi", "lantiq,xrx100-spi";
	reg = <0xE100800 0x100>;
	interrupt-parent = <&icu0>;
	interrupts = <22 23 24>;
	interrupt-names = "spi_rx", "spi_tx", "spi_err";
	#address-cells = <1>;
	#size-cells = <1>;
	num-cs = <6>;
	base-cs = <1>;
};
+8 −0
Original line number Original line Diff line number Diff line
@@ -417,6 +417,14 @@ config SPI_NUC900
	help
	help
	  SPI driver for Nuvoton NUC900 series ARM SoCs
	  SPI driver for Nuvoton NUC900 series ARM SoCs


config SPI_LANTIQ_SSC
	tristate "Lantiq SSC SPI controller"
	depends on LANTIQ || COMPILE_TEST
	help
	  This driver supports the Lantiq SSC SPI controller in master
	  mode. This controller is found on Intel (former Lantiq) SoCs like
	  the Danube, Falcon, xRX200, xRX300.

config SPI_OC_TINY
config SPI_OC_TINY
	tristate "OpenCores tiny SPI"
	tristate "OpenCores tiny SPI"
	depends on GPIOLIB || COMPILE_TEST
	depends on GPIOLIB || COMPILE_TEST
+1 −0
Original line number Original line Diff line number Diff line
@@ -49,6 +49,7 @@ obj-$(CONFIG_SPI_FSL_SPI) += spi-fsl-spi.o
obj-$(CONFIG_SPI_GPIO)			+= spi-gpio.o
obj-$(CONFIG_SPI_GPIO)			+= spi-gpio.o
obj-$(CONFIG_SPI_IMG_SPFI)		+= spi-img-spfi.o
obj-$(CONFIG_SPI_IMG_SPFI)		+= spi-img-spfi.o
obj-$(CONFIG_SPI_IMX)			+= spi-imx.o
obj-$(CONFIG_SPI_IMX)			+= spi-imx.o
obj-$(CONFIG_SPI_LANTIQ_SSC)		+= spi-lantiq-ssc.o
obj-$(CONFIG_SPI_JCORE)			+= spi-jcore.o
obj-$(CONFIG_SPI_JCORE)			+= spi-jcore.o
obj-$(CONFIG_SPI_LM70_LLP)		+= spi-lm70llp.o
obj-$(CONFIG_SPI_LM70_LLP)		+= spi-lm70llp.o
obj-$(CONFIG_SPI_LP8841_RTC)		+= spi-lp8841-rtc.o
obj-$(CONFIG_SPI_LP8841_RTC)		+= spi-lp8841-rtc.o
+8 −8
Original line number Original line Diff line number Diff line
@@ -211,7 +211,7 @@ static bool spi_imx_can_dma(struct spi_master *master, struct spi_device *spi,
			 struct spi_transfer *transfer)
			 struct spi_transfer *transfer)
{
{
	struct spi_imx_data *spi_imx = spi_master_get_devdata(master);
	struct spi_imx_data *spi_imx = spi_master_get_devdata(master);
	unsigned int bpw;
	unsigned int bpw, i;


	if (!master->dma_rx)
	if (!master->dma_rx)
		return false;
		return false;
@@ -228,12 +228,16 @@ static bool spi_imx_can_dma(struct spi_master *master, struct spi_device *spi,
	if (bpw != 1 && bpw != 2 && bpw != 4)
	if (bpw != 1 && bpw != 2 && bpw != 4)
		return false;
		return false;


	if (transfer->len < spi_imx->wml * bpw)
	for (i = spi_imx_get_fifosize(spi_imx) / 2; i > 0; i--) {
		return false;
		if (!(transfer->len % (i * bpw)))
			break;
	}


	if (transfer->len % (spi_imx->wml * bpw))
	if (i == 0)
		return false;
		return false;


	spi_imx->wml = i;

	return true;
	return true;
}
}


@@ -837,10 +841,6 @@ static int spi_imx_dma_configure(struct spi_master *master,
	struct dma_slave_config rx = {}, tx = {};
	struct dma_slave_config rx = {}, tx = {};
	struct spi_imx_data *spi_imx = spi_master_get_devdata(master);
	struct spi_imx_data *spi_imx = spi_master_get_devdata(master);


	if (bytes_per_word == spi_imx->bytes_per_word)
		/* Same as last time */
		return 0;

	switch (bytes_per_word) {
	switch (bytes_per_word) {
	case 4:
	case 4:
		buswidth = DMA_SLAVE_BUSWIDTH_4_BYTES;
		buswidth = DMA_SLAVE_BUSWIDTH_4_BYTES;
+983 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading