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

Commit 15f8c9af authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'spi/topic/loopback', 'spi/topic/meson-spicc',...

Merge remote-tracking branches 'spi/topic/loopback', 'spi/topic/meson-spicc', 'spi/topic/mtk' and 'spi/topic/omap2-mcspi' into spi-next
Loading
Loading
Loading
Loading
+31 −0
Original line number Original line Diff line number Diff line
@@ -20,3 +20,34 @@ Required properties:
		#address-cells = <1>;
		#address-cells = <1>;
		#size-cells = <0>;
		#size-cells = <0>;
	};
	};

* SPICC (SPI Communication Controller)

The Meson SPICC is generic SPI controller for general purpose Full-Duplex
communications with dedicated 16 words RX/TX PIO FIFOs.

Required properties:
 - compatible: should be "amlogic,meson-gx-spicc" on Amlogic GX SoCs.
 - reg: physical base address and length of the controller registers
 - interrupts: The interrupt specifier
 - clock-names: Must contain "core"
 - clocks: phandle of the input clock for the baud rate generator
 - #address-cells: should be 1
 - #size-cells: should be 0

Optional properties:
 - resets: phandle of the internal reset line

See ../spi/spi-bus.txt for more details on SPI bus master and slave devices
required and optional properties.

Example :
	spi@c1108d80 {
		compatible = "amlogic,meson-gx-spicc";
		reg = <0xc1108d80 0x80>;
		interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
		clock-names = "core";
		clocks = <&clk81>;
		#address-cells = <1>;
		#size-cells = <0>;
	};
+2 −0
Original line number Original line Diff line number Diff line
@@ -3,7 +3,9 @@ Binding for MTK SPI controller
Required properties:
Required properties:
- compatible: should be one of the following.
- compatible: should be one of the following.
    - mediatek,mt2701-spi: for mt2701 platforms
    - mediatek,mt2701-spi: for mt2701 platforms
    - mediatek,mt2712-spi: for mt2712 platforms
    - mediatek,mt6589-spi: for mt6589 platforms
    - mediatek,mt6589-spi: for mt6589 platforms
    - mediatek,mt7622-spi: for mt7622 platforms
    - mediatek,mt8135-spi: for mt8135 platforms
    - mediatek,mt8135-spi: for mt8135 platforms
    - mediatek,mt8173-spi: for mt8173 platforms
    - mediatek,mt8173-spi: for mt8173 platforms


+7 −0
Original line number Original line Diff line number Diff line
@@ -393,6 +393,13 @@ config SPI_FSL_ESPI
	  From MPC8536, 85xx platform uses the controller, and all P10xx,
	  From MPC8536, 85xx platform uses the controller, and all P10xx,
	  P20xx, P30xx,P40xx, P50xx uses this controller.
	  P20xx, P30xx,P40xx, P50xx uses this controller.


config SPI_MESON_SPICC
	tristate "Amlogic Meson SPICC controller"
	depends on ARCH_MESON || COMPILE_TEST
	help
	  This enables master mode support for the SPICC (SPI communication
	  controller) available in Amlogic Meson SoCs.

config SPI_MESON_SPIFC
config SPI_MESON_SPIFC
	tristate "Amlogic Meson SPIFC controller"
	tristate "Amlogic Meson SPIFC controller"
	depends on ARCH_MESON || COMPILE_TEST
	depends on ARCH_MESON || COMPILE_TEST
+1 −0
Original line number Original line Diff line number Diff line
@@ -53,6 +53,7 @@ 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
obj-$(CONFIG_SPI_MESON_SPICC)		+= spi-meson-spicc.o
obj-$(CONFIG_SPI_MESON_SPIFC)		+= spi-meson-spifc.o
obj-$(CONFIG_SPI_MESON_SPIFC)		+= spi-meson-spifc.o
obj-$(CONFIG_SPI_MPC512x_PSC)		+= spi-mpc512x-psc.o
obj-$(CONFIG_SPI_MPC512x_PSC)		+= spi-mpc512x-psc.o
obj-$(CONFIG_SPI_MPC52xx_PSC)		+= spi-mpc52xx-psc.o
obj-$(CONFIG_SPI_MPC52xx_PSC)		+= spi-mpc52xx-psc.o
+7 −7
Original line number Original line Diff line number Diff line
@@ -894,7 +894,7 @@ int spi_test_execute_msg(struct spi_device *spi, struct spi_test *test,
		test->elapsed_time = ktime_to_ns(ktime_sub(ktime_get(), start));
		test->elapsed_time = ktime_to_ns(ktime_sub(ktime_get(), start));
		if (ret == -ETIMEDOUT) {
		if (ret == -ETIMEDOUT) {
			dev_info(&spi->dev,
			dev_info(&spi->dev,
				 "spi-message timed out - reruning...\n");
				 "spi-message timed out - rerunning...\n");
			/* rerun after a few explicit schedules */
			/* rerun after a few explicit schedules */
			for (i = 0; i < 16; i++)
			for (i = 0; i < 16; i++)
				schedule();
				schedule();
@@ -1021,10 +1021,9 @@ int spi_test_run_tests(struct spi_device *spi,
		rx = vmalloc(SPI_TEST_MAX_SIZE_PLUS);
		rx = vmalloc(SPI_TEST_MAX_SIZE_PLUS);
	else
	else
		rx = kzalloc(SPI_TEST_MAX_SIZE_PLUS, GFP_KERNEL);
		rx = kzalloc(SPI_TEST_MAX_SIZE_PLUS, GFP_KERNEL);
	if (!rx) {
	if (!rx)
		ret = -ENOMEM;
		return -ENOMEM;
		goto out;

	}


	if (use_vmalloc)
	if (use_vmalloc)
		tx = vmalloc(SPI_TEST_MAX_SIZE_PLUS);
		tx = vmalloc(SPI_TEST_MAX_SIZE_PLUS);
@@ -1032,7 +1031,7 @@ int spi_test_run_tests(struct spi_device *spi,
		tx = kzalloc(SPI_TEST_MAX_SIZE_PLUS, GFP_KERNEL);
		tx = kzalloc(SPI_TEST_MAX_SIZE_PLUS, GFP_KERNEL);
	if (!tx) {
	if (!tx) {
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto out;
		goto err_tx;
	}
	}


	/* now run the individual tests in the table */
	/* now run the individual tests in the table */
@@ -1057,8 +1056,9 @@ int spi_test_run_tests(struct spi_device *spi,
	}
	}


out:
out:
	kvfree(rx);
	kvfree(tx);
	kvfree(tx);
err_tx:
	kvfree(rx);
	return ret;
	return ret;
}
}
EXPORT_SYMBOL_GPL(spi_test_run_tests);
EXPORT_SYMBOL_GPL(spi_test_run_tests);
Loading