Commit b0c1936c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull spi updates from Mark Brown:
 "The major highlight this release is a refactoring of the core to allow
  us to run synchronous transfers in the context of the caller when
  there is no contention for the bus.  This improves performance in the
  very common case by eliminating context switches and reducing the
  number of hardware setup and teardown operations we need to perform.

  Other changes:

   - New drivers for DLN-2 USB-SPI adapter and ST SPI controllers.

   - A big round of cleanups, performance and feature improvements for
     the xilinx driver from Ricardo Ribalda Delgado.

   - A wide range of smaller cleanups, fixes and feature improvements
     throughout the subsystem"

* tag 'spi-v3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (68 commits)
  spi: mxs: cleanup wait_for_completion return handling
  spi: ti-qspi: cleanup wait_for_completion return handling
  spi: spi-imx: cleanup wait_for_completion handling
  spi: sh-msiof: cleanup wait_for_completion return handling
  spi: match var type to return type of wait_for_completion
  spi: spi-pxa2xx: only include mach/dma.h for legacy DMA
  spi: atmel: cleanup wait_for_completion return handling
  spi: fsl-dspi: Remove possible memory leak of 'chip'
  spi: sh-msiof: Update calculation of frequency dividing
  spi: spidev: Convert buf pointers for 32-bit compat SPI_IOC_MESSAGE(n)
  spi/xilinx: Fix access invalid memory on xilinx_spi_tx
  spi: Revert "spi/xilinx: Remove iowrite/ioread wrappers"
  spi/xilinx: Check number of slaves range
  spi/xilinx: Use polling mode on small transfers
  spi/xilinx: Remove remaining_words driver data variable
  spi/xilinx: Remove iowrite/ioread wrappers
  spi/xilinx: Convert bits_per_word in bytes_per_word
  spi/xilinx: Convert remainding_bytes in remaining words
  spi/xilinx: Make spi_tx and spi_rx simmetric
  spi/xilinx: Remove rx_fn and tx_fn pointer
  ...
parents f381f906 66886337
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -30,6 +30,22 @@ Optional properties:
			 specifiers, one for transmission, and one for
			 reception.
- dma-names            : Must contain a list of two DMA names, "tx" and "rx".
- renesas,dtdl         : delay sync signal (setup) in transmit mode.
			 Must contain one of the following values:
			 0   (no bit delay)
			 50  (0.5-clock-cycle delay)
			 100 (1-clock-cycle delay)
			 150 (1.5-clock-cycle delay)
			 200 (2-clock-cycle delay)

- renesas,syncdl       : delay sync signal (hold) in transmit mode.
			 Must contain one of the following values:
			 0   (no bit delay)
			 50  (0.5-clock-cycle delay)
			 100 (1-clock-cycle delay)
			 150 (1.5-clock-cycle delay)
			 200 (2-clock-cycle delay)
			 300 (3-clock-cycle delay)

Optional properties, deprecated for soctype-specific bindings:
- renesas,tx-fifo-size : Overrides the default tx fifo size given in words
+41 −0
Original line number Diff line number Diff line
* CSR SiRFprimaII Serial Peripheral Interface

Required properties:
- compatible : Should be "sirf,prima2-spi"
- reg : Offset and length of the register set for the device
- interrupts : Should contain SPI interrupt
- resets: phandle to the reset controller asserting this device in
          reset
  See ../reset/reset.txt for details.
- dmas : Must contain an entry for each entry in clock-names.
  See ../dma/dma.txt for details.
- dma-names : Must include the following entries:
  - rx
  - tx
- clocks : Must contain an entry for each entry in clock-names.
  See ../clocks/clock-bindings.txt for details.

- #address-cells: Number of cells required to define a chip select
                  address on the SPI bus. Should be set to 1.
- #size-cells:    Should be zero.

Optional properties:
- spi-max-frequency: Specifies maximum SPI clock frequency,
                     Units - Hz. Definition as per
                     Documentation/devicetree/bindings/spi/spi-bus.txt
- cs-gpios:     should specify GPIOs used for chipselects.

Example:

spi0: spi@b00d0000 {
	compatible = "sirf,prima2-spi";
	reg = <0xb00d0000 0x10000>;
	interrupts = <15>;
	dmas = <&dmac1 9>,
		<&dmac1 4>;
	dma-names = "rx", "tx";
	#address-cells = <1>;
	#size-cells = <0>;
	clocks = <&clks 19>;
	resets = <&rstc 26>;
};
+40 −0
Original line number Diff line number Diff line
STMicroelectronics SSC (SPI) Controller
---------------------------------------

Required properties:
- compatible	: "st,comms-ssc4-spi"
- reg		: Offset and length of the device's register set
- interrupts	: The interrupt specifier
- clock-names	: Must contain "ssc"
- clocks	: Must contain an entry for each name in clock-names
		    See ../clk/*
- pinctrl-names	: Uses "default", can use "sleep" if provided
		    See ../pinctrl/pinctrl-binding.txt

Optional properties:
- cs-gpios	: List of GPIO chip selects
		    See ../spi/spi-bus.txt

Child nodes represent devices on the SPI bus
  See ../spi/spi-bus.txt

Example:
	spi@9840000 {
		compatible	= "st,comms-ssc4-spi";
		reg		= <0x9840000 0x110>;
		interrupts	= <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
		clocks		= <&clk_s_c0_flexgen CLK_EXT2F_A9>;
		clock-names	= "ssc";
		pinctrl-0	= <&pinctrl_spi0_default>;
		pinctrl-names	= "default";
		cs-gpios	= <&pio17 5 0>;
		#address-cells	= <1>;
		#size-cells	= <0>;

		st95hf@0{
			compatible		= "st,st95hf";
			reg			= <0>;
			spi-max-frequency	= <1000000>;
			interrupts		= <2 IRQ_TYPE_EDGE_FALLING>;
		};
	};
+0 −1
Original line number Diff line number Diff line
@@ -293,7 +293,6 @@ static void mrst_power_off_unused_dev(struct pci_dev *dev)
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0801, mrst_power_off_unused_dev);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0809, mrst_power_off_unused_dev);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x080C, mrst_power_off_unused_dev);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0812, mrst_power_off_unused_dev);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0815, mrst_power_off_unused_dev);

/*
+19 −5
Original line number Diff line number Diff line
@@ -185,6 +185,16 @@ config SPI_DAVINCI
	help
	  SPI master controller for DaVinci/DA8x/OMAP-L/AM1x SPI modules.

config SPI_DLN2
       tristate "Diolan DLN-2 USB SPI adapter"
       depends on MFD_DLN2
       help
         If you say yes to this option, support will be included for Diolan
         DLN2, a USB to SPI interface.

         This driver can also be built as a module.  If so, the module
         will be called spi-dln2.

config SPI_EFM32
	tristate "EFM32 SPI controller"
	depends on OF && ARM && (ARCH_EFM32 || COMPILE_TEST)
@@ -279,7 +289,7 @@ config SPI_FSL_CPM
	depends on FSL_SOC

config SPI_FSL_SPI
	bool "Freescale SPI controller and Aeroflex Gaisler GRLIB SPI controller"
	tristate "Freescale SPI controller and Aeroflex Gaisler GRLIB SPI controller"
	depends on OF
	select SPI_FSL_LIB
	select SPI_FSL_CPM if FSL_SOC
@@ -292,7 +302,6 @@ config SPI_FSL_SPI

config SPI_FSL_DSPI
	tristate "Freescale DSPI controller"
	select SPI_BITBANG
	select REGMAP_MMIO
	depends on SOC_VF610 || COMPILE_TEST
	help
@@ -300,7 +309,7 @@ config SPI_FSL_DSPI
	  mode. VF610 platform uses the controller.

config SPI_FSL_ESPI
	bool "Freescale eSPI controller"
	tristate "Freescale eSPI controller"
	depends on FSL_SOC
	select SPI_FSL_LIB
	help
@@ -460,7 +469,6 @@ config SPI_S3C24XX_FIQ
config SPI_S3C64XX
	tristate "Samsung S3C64XX series type SPI"
	depends on (PLAT_SAMSUNG || ARCH_EXYNOS)
	select S3C64XX_PL080 if ARCH_S3C64XX
	help
	  SPI driver for Samsung S3C64XX and newer SoCs.

@@ -503,6 +511,13 @@ config SPI_SIRF
	help
	  SPI driver for CSR SiRFprimaII SoCs

config SPI_ST_SSC4
	tristate "STMicroelectronics SPI SSC-based driver"
	depends on ARCH_STI
	help
	  STMicroelectronics SoCs support for SPI. If you say yes to
	  this option, support will be included for the SSC driven SPI.

config SPI_SUN4I
	tristate "Allwinner A10 SoCs SPI controller"
	depends on ARCH_SUNXI || COMPILE_TEST
@@ -595,7 +610,6 @@ config SPI_XTENSA_XTFPGA
	  16 bit words in SPI mode 0, automatically asserting CS on transfer
	  start and deasserting on end.


config SPI_NUC900
	tristate "Nuvoton NUC900 series SPI"
	depends on ARCH_W90X900
Loading