aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 15:03:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 15:03:34 -0500
commitb859e7d13bcc18b56faa7e2f78db5ba8ab874a15 (patch)
tree2762ac481bc2b2a472832473b888fff3d7d9b9d4 /include/linux
parent709d9f09b6aee5828cb8f168f63030608176cd0e (diff)
parent0e647037fed5632e7c5989ec359ab84c676888ac (diff)
Merge tag 'spi-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown: "Not a huge amount going on this release, mainly new drivers (there's a couple more waiting that didn't quite make the cut for this release too): - An interface for querying if the current transfer is the last in a message, allowing controllers that need special handling for the final transfer to use the core message parsing. - Support for Amlogic Meson SPIFC, Imagination Technologies SFPI, Intel Quark X1000 and Samsung Exynos 7 controllers" * tag 'spi-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (38 commits) spi/s3c64xx: Remove redundant runtime PM management spi: fsl-spi: remove unused variable assignment spi: spi-fsl-spi: Return an error code in fsl_spi_do_one_msg() spi: core: Do not mangle error code from kthread_run() spi: fsl-espi: add (un)prepare_transfer_hardware calls to save power if SPI is not in use spi: fsl-(e)spi: migrate to generic master queueing spi/txx9: Deletion of an unnecessary check before the function call "clk_disable" spi: cadence: Fix 3-to-8 mux mode spi: cadence: Init HW after reading devicetree attributes spi: meson: Select REGMAP_MMIO spi: s3c64xx: add support for exynos7 SPI controller spi: spi-pxa2xx: SPI support for Intel Quark X1000 spi: meson: meson_spifc_setup_speed() can be static spi: spi-pxa2xx: Add helpers for regiseters' accessing spi: spi-mxs: Fix mapping from vmalloc-ed buffer to scatter list spi: atmel: introduce probe deferring spi: atmel: remove compat for non DT board when requesting dma chan spi: meson: Add support for Amlogic Meson SPIFC spi: meson: Add device tree bindings documentation for SPIFC spi: core: Add spi_transfer_is_last() helper ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pxa2xx_ssp.h20
-rw-r--r--include/linux/spi/spi.h6
2 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h
index f2b405116166..77aed9ea1d26 100644
--- a/include/linux/pxa2xx_ssp.h
+++ b/include/linux/pxa2xx_ssp.h
@@ -108,6 +108,25 @@
108#define SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..4] */ 108#define SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..4] */
109#endif 109#endif
110 110
111/* QUARK_X1000 SSCR0 bit definition */
112#define QUARK_X1000_SSCR0_DSS (0x1F) /* Data Size Select (mask) */
113#define QUARK_X1000_SSCR0_DataSize(x) ((x) - 1) /* Data Size Select [4..32] */
114#define QUARK_X1000_SSCR0_FRF (0x3 << 5) /* FRame Format (mask) */
115#define QUARK_X1000_SSCR0_Motorola (0x0 << 5) /* Motorola's Serial Peripheral Interface (SPI) */
116
117#define RX_THRESH_QUARK_X1000_DFLT 1
118#define TX_THRESH_QUARK_X1000_DFLT 16
119
120#define QUARK_X1000_SSSR_TFL_MASK (0x1F << 8) /* Transmit FIFO Level mask */
121#define QUARK_X1000_SSSR_RFL_MASK (0x1F << 13) /* Receive FIFO Level mask */
122
123#define QUARK_X1000_SSCR1_TFT (0x1F << 6) /* Transmit FIFO Threshold (mask) */
124#define QUARK_X1000_SSCR1_TxTresh(x) (((x) - 1) << 6) /* level [1..32] */
125#define QUARK_X1000_SSCR1_RFT (0x1F << 11) /* Receive FIFO Threshold (mask) */
126#define QUARK_X1000_SSCR1_RxTresh(x) (((x) - 1) << 11) /* level [1..32] */
127#define QUARK_X1000_SSCR1_STRF (1 << 17) /* Select FIFO or EFWR */
128#define QUARK_X1000_SSCR1_EFWR (1 << 16) /* Enable FIFO Write/Read */
129
111/* extra bits in PXA255, PXA26x and PXA27x SSP ports */ 130/* extra bits in PXA255, PXA26x and PXA27x SSP ports */
112#define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */ 131#define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */
113#define SSCR0_PSP (3 << 4) /* PSP - Programmable Serial Protocol */ 132#define SSCR0_PSP (3 << 4) /* PSP - Programmable Serial Protocol */
@@ -175,6 +194,7 @@ enum pxa_ssp_type {
175 PXA910_SSP, 194 PXA910_SSP,
176 CE4100_SSP, 195 CE4100_SSP,
177 LPSS_SSP, 196 LPSS_SSP,
197 QUARK_X1000_SSP,
178}; 198};
179 199
180struct ssp_device { 200struct ssp_device {
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 46d188a9947c..a6ef2a8e6de4 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -1049,4 +1049,10 @@ spi_unregister_device(struct spi_device *spi)
1049extern const struct spi_device_id * 1049extern const struct spi_device_id *
1050spi_get_device_id(const struct spi_device *sdev); 1050spi_get_device_id(const struct spi_device *sdev);
1051 1051
1052static inline bool
1053spi_transfer_is_last(struct spi_master *master, struct spi_transfer *xfer)
1054{
1055 return list_is_last(&xfer->transfer_list, &master->cur_msg->transfers);
1056}
1057
1052#endif /* __LINUX_SPI_H */ 1058#endif /* __LINUX_SPI_H */