aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-27 17:11:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-27 17:11:43 -0400
commit7ae0ae4a022b72f33d23ab6e858163d4b37400a5 (patch)
tree9524aef624dc4aaf1874c660fcd6d7a38b6cc615 /include/linux
parent607e11ab6654e167b1b0ec132cedc73e220f63c6 (diff)
parentdec34e8b676e14d4df041e3335d6082b247b834e (diff)
Merge tag 'spi-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown: "Quite a lot of cleanup and maintainence work going on this release in various drivers, and also a fix for a nasty locking issue in the core: - A fix for locking issues when external drivers explicitly locked the bus with spi_bus_lock() - we were using the same lock to both control access to the physical bus in multi-threaded I/O operations and exclude multiple callers. Confusion between these two caused us to have scenarios where we were dropping locks. These are fixed by splitting into two separate locks like should have been done originally, making everything much clearer and correct. - Support for DMA in spi_flash_read(). - Support for instantiating spidev on ACPI systems, including some test devices used in Windows validation. - Use of the core DMA mapping functionality in the McSPI driver. - Start of support for ThunderX SPI controllers, involving a very big set of changes to the Cavium driver. - Support for Braswell, Exynos 5433, Kaby Lake, Merrifield, RK3036, RK3228, RK3368 controllers" * tag 'spi-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (64 commits) spi: Split bus and I/O locking spi: octeon: Split driver into Octeon specific and common parts spi: octeon: Move include file from arch/mips to drivers/spi spi: octeon: Put register offsets into a struct spi: octeon: Store system clock freqency in struct octeon_spi spi: octeon: Convert driver to use readq()/writeq() functions spi: pic32-sqi: fixup wait_for_completion_timeout return handling spi: pic32: fixup wait_for_completion_timeout return handling spi: rockchip: limit transfers to (64K - 1) bytes spi: xilinx: Return IRQ_NONE if no interrupts were detected spi: xilinx: Handle errors from platform_get_irq() spi: s3c64xx: restore removed comments spi: s3c64xx: add Exynos5433 compatible for ioclk handling spi: s3c64xx: use error code from clk_prepare_enable() spi: s3c64xx: rename goto labels to meaningful names spi: s3c64xx: document the clocks and the clock-name property spi: s3c64xx: add exynos5433 spi compatible spi: s3c64xx: fix reference leak to master in s3c64xx_spi_remove() spi: spi-sh: Remove deprecated create_singlethread_workqueue spi: spi-topcliff-pch: Remove deprecated create_singlethread_workqueue ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/platform_data/spi-s3c64xx.h1
-rw-r--r--include/linux/spi/spi.h10
2 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/platform_data/spi-s3c64xx.h b/include/linux/platform_data/spi-s3c64xx.h
index fb5625bcca9a..5c1e21c87270 100644
--- a/include/linux/platform_data/spi-s3c64xx.h
+++ b/include/linux/platform_data/spi-s3c64xx.h
@@ -38,6 +38,7 @@ struct s3c64xx_spi_csinfo {
38struct s3c64xx_spi_info { 38struct s3c64xx_spi_info {
39 int src_clk_nr; 39 int src_clk_nr;
40 int num_cs; 40 int num_cs;
41 bool no_cs;
41 int (*cfg_gpio)(void); 42 int (*cfg_gpio)(void);
42 dma_filter_fn filter; 43 dma_filter_fn filter;
43 void *dma_tx; 44 void *dma_tx;
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 1f03483f61e5..072cb2aa2413 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -312,8 +312,9 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
312 * @flags: other constraints relevant to this driver 312 * @flags: other constraints relevant to this driver
313 * @max_transfer_size: function that returns the max transfer size for 313 * @max_transfer_size: function that returns the max transfer size for
314 * a &spi_device; may be %NULL, so the default %SIZE_MAX will be used. 314 * a &spi_device; may be %NULL, so the default %SIZE_MAX will be used.
315 * @io_mutex: mutex for physical bus access
315 * @bus_lock_spinlock: spinlock for SPI bus locking 316 * @bus_lock_spinlock: spinlock for SPI bus locking
316 * @bus_lock_mutex: mutex for SPI bus locking 317 * @bus_lock_mutex: mutex for exclusion of multiple callers
317 * @bus_lock_flag: indicates that the SPI bus is locked for exclusive use 318 * @bus_lock_flag: indicates that the SPI bus is locked for exclusive use
318 * @setup: updates the device mode and clocking records used by a 319 * @setup: updates the device mode and clocking records used by a
319 * device's SPI controller; protocol code may call this. This 320 * device's SPI controller; protocol code may call this. This
@@ -446,6 +447,9 @@ struct spi_master {
446 */ 447 */
447 size_t (*max_transfer_size)(struct spi_device *spi); 448 size_t (*max_transfer_size)(struct spi_device *spi);
448 449
450 /* I/O mutex */
451 struct mutex io_mutex;
452
449 /* lock and mutex for SPI bus locking */ 453 /* lock and mutex for SPI bus locking */
450 spinlock_t bus_lock_spinlock; 454 spinlock_t bus_lock_spinlock;
451 struct mutex bus_lock_mutex; 455 struct mutex bus_lock_mutex;
@@ -1143,6 +1147,8 @@ static inline ssize_t spi_w8r16be(struct spi_device *spi, u8 cmd)
1143 * @opcode_nbits: number of lines to send opcode 1147 * @opcode_nbits: number of lines to send opcode
1144 * @addr_nbits: number of lines to send address 1148 * @addr_nbits: number of lines to send address
1145 * @data_nbits: number of lines for data 1149 * @data_nbits: number of lines for data
1150 * @rx_sg: Scatterlist for receive data read from flash
1151 * @cur_msg_mapped: message has been mapped for DMA
1146 */ 1152 */
1147struct spi_flash_read_message { 1153struct spi_flash_read_message {
1148 void *buf; 1154 void *buf;
@@ -1155,6 +1161,8 @@ struct spi_flash_read_message {
1155 u8 opcode_nbits; 1161 u8 opcode_nbits;
1156 u8 addr_nbits; 1162 u8 addr_nbits;
1157 u8 data_nbits; 1163 u8 data_nbits;
1164 struct sg_table rx_sg;
1165 bool cur_msg_mapped;
1158}; 1166};
1159 1167
1160/* SPI core interface for flash read support */ 1168/* SPI core interface for flash read support */