Skip to content

Commit 2d2e7d1

Browse files
committed
Merge tag 'spi-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown: "A respun version of the merges for the pull request previously sent with a few additional fixes. The last two merges were fixed up by hand since the branches have moved on and currently have the prior merge in them. Quite a busy release for the SPI subsystem, mostly in cleanups big and small scattered through the stack rather than anything else: - New driver for the Broadcom BC63xx HSSPI controller - Fix duplicate device registration for ACPI - Conversion of s3c64xx to DMAEngine (this pulls in platform and DMA changes upon which the transiton depends) - Some small optimisations to reduce the amount of time we hold locks in the datapath, eliminate some redundant checks and the size of a spi_transfer - Lots of fixes, cleanups and general enhancements to drivers, especially the rspi and Atmel drivers" * tag 'spi-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (112 commits) spi: core: Fix transfer failure when master->transfer_one returns positive value spi: Correct set_cs() documentation spi: Clarify transfer_one() w.r.t. spi_finalize_current_transfer() spi: Spelling s/finised/finished/ spi: sc18is602: Convert to use bits_per_word_mask spi: Remove duplicate code to set default bits_per_word setting spi/pxa2xx: fix compilation warning when !CONFIG_PM_SLEEP spi: clps711x: Add MODULE_ALIAS to support module auto-loading spi: rspi: Add missing clk_disable() calls in error and cleanup paths spi: rspi: Spelling s/transmition/transmission/ spi: rspi: Add support for specifying CPHA/CPOL spi/pxa2xx: initialize DMA channels to -1 to prevent inadvertent match spi: rspi: Add more QSPI register documentation spi: rspi: Add more RSPI register documentation spi: rspi: Remove dependency on DMAE for SHMOBILE spi/s3c64xx: Correct indentation spi: sh: Use spi_sh_clear_bit() instead of open-coded spi: bitbang: Grammar s/make to make/to make/ spi: sh-hspi: Spelling s/recive/receive/ spi: core: Improve tx/rx_nbits check comments ...
2 parents 1533353 + 8b8b773 commit 2d2e7d1

53 files changed

Lines changed: 1491 additions & 1519 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/devicetree/bindings/spi/spi-bus.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ only 1(SINGLE), 2(DUAL) and 4(QUAD).
6767
Dual/Quad mode is not allowed when 3-wire mode is used.
6868

6969
If a gpio chipselect is used for the SPI slave the gpio number will be passed
70-
via the cs_gpio
70+
via the SPI master node cs-gpios property.
7171

7272
SPI example for an MPC5200 SPI bus:
7373
spi@f00 {

‎Documentation/devicetree/bindings/spi/ti_qspi.txt‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ TI QSPI controller.
33
Required properties:
44
- compatible : should be "ti,dra7xxx-qspi" or "ti,am4372-qspi".
55
- reg: Should contain QSPI registers location and length.
6+
- reg-names: Should contain the resource reg names.
7+
- qspi_base: Qspi configuration register Address space
8+
- qspi_mmap: Memory mapped Address space
9+
- (optional) qspi_ctrlmod: Control module Address space
10+
- interrupts: should contain the qspi interrupt number.
611
- #address-cells, #size-cells : Must be present if the device has sub-nodes
712
- ti,hwmods: Name of the hwmod associated to the QSPI
813

@@ -14,7 +19,8 @@ Example:
1419

1520
qspi: qspi@4b300000 {
1621
compatible = "ti,dra7xxx-qspi";
17-
reg = <0x4b300000 0x100>;
22+
reg = <0x47900000 0x100>, <0x30000000 0x3ffffff>;
23+
reg-names = "qspi_base", "qspi_mmap";
1824
#address-cells = <1>;
1925
#size-cells = <0>;
2026
spi-max-frequency = <25000000>;

‎Documentation/spi/spi-summary‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ SPI slave functions are usually not interoperable between vendors
3434
- It may also be used to stream data in either direction (half duplex),
3535
or both of them at the same time (full duplex).
3636

37-
- Some devices may use eight bit words. Others may different word
37+
- Some devices may use eight bit words. Others may use different word
3838
lengths, such as streams of 12-bit or 20-bit digital samples.
3939

4040
- Words are usually sent with their most significant bit (MSB) first,
@@ -121,7 +121,7 @@ active. So the master must set the clock to inactive before selecting
121121
a slave, and the slave can tell the chosen polarity by sampling the
122122
clock level when its select line goes active. That's why many devices
123123
support for example both modes 0 and 3: they don't care about polarity,
124-
and alway clock data in/out on rising clock edges.
124+
and always clock data in/out on rising clock edges.
125125

126126

127127
How do these driver programming interfaces work?
@@ -139,7 +139,7 @@ a command and then reading its response.
139139

140140
There are two types of SPI driver, here called:
141141

142-
Controller drivers ... controllers may be built in to System-On-Chip
142+
Controller drivers ... controllers may be built into System-On-Chip
143143
processors, and often support both Master and Slave roles.
144144
These drivers touch hardware registers and may use DMA.
145145
Or they can be PIO bitbangers, needing just GPIO pins.
@@ -548,7 +548,7 @@ SPI MASTER METHODS
548548
DEPRECATED METHODS
549549

550550
master->transfer(struct spi_device *spi, struct spi_message *message)
551-
This must not sleep. Its responsibility is arrange that the
551+
This must not sleep. Its responsibility is to arrange that the
552552
transfer happens and its complete() callback is issued. The two
553553
will normally happen later, after other transfers complete, and
554554
if the controller is idle it will need to be kickstarted. This

‎arch/arm/plat-samsung/include/plat/fiq.h‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎drivers/spi/Kconfig‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ config SPI_BCM63XX
118118
help
119119
Enable support for the SPI controller on the Broadcom BCM63xx SoCs.
120120

121+
config SPI_BCM63XX_HSSPI
122+
tristate "Broadcom BCM63XX HS SPI controller driver"
123+
depends on BCM63XX || COMPILE_TEST
124+
help
125+
This enables support for the High Speed SPI controller present on
126+
newer Broadcom BCM63XX SoCs.
127+
121128
config SPI_BITBANG
122129
tristate "Utilities for Bitbanging SPI masters"
123130
help
@@ -159,7 +166,6 @@ config SPI_DAVINCI
159166
tristate "Texas Instruments DaVinci/DA8x/OMAP-L/AM1x SoC SPI controller"
160167
depends on ARCH_DAVINCI || ARCH_KEYSTONE
161168
select SPI_BITBANG
162-
select TI_EDMA
163169
help
164170
SPI master controller for DaVinci/DA8x/OMAP-L/AM1x SPI modules.
165171

@@ -301,6 +307,7 @@ config SPI_OMAP_UWIRE
301307

302308
config SPI_OMAP24XX
303309
tristate "McSPI driver for OMAP"
310+
depends on ARM || ARM64 || AVR32 || HEXAGON || MIPS || SH
304311
depends on ARCH_OMAP2PLUS || COMPILE_TEST
305312
help
306313
SPI master controller for OMAP24XX and later Multichannel SPI
@@ -370,7 +377,7 @@ config SPI_PXA2XX_PCI
370377

371378
config SPI_RSPI
372379
tristate "Renesas RSPI controller"
373-
depends on (SUPERH || ARCH_SHMOBILE) && SH_DMAE_BASE
380+
depends on (SUPERH && SH_DMAE_BASE) || ARCH_SHMOBILE
374381
help
375382
SPI driver for Renesas RSPI blocks.
376383

@@ -407,7 +414,8 @@ config SPI_SC18IS602
407414

408415
config SPI_SH_MSIOF
409416
tristate "SuperH MSIOF SPI controller"
410-
depends on (SUPERH || ARCH_SHMOBILE) && HAVE_CLK
417+
depends on HAVE_CLK
418+
depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST
411419
select SPI_BITBANG
412420
help
413421
SPI driver for SuperH and SH Mobile MSIOF blocks.

‎drivers/spi/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ obj-$(CONFIG_SPI_ATH79) += spi-ath79.o
1616
obj-$(CONFIG_SPI_AU1550) += spi-au1550.o
1717
obj-$(CONFIG_SPI_BCM2835) += spi-bcm2835.o
1818
obj-$(CONFIG_SPI_BCM63XX) += spi-bcm63xx.o
19+
obj-$(CONFIG_SPI_BCM63XX_HSSPI) += spi-bcm63xx-hsspi.o
1920
obj-$(CONFIG_SPI_BFIN5XX) += spi-bfin5xx.o
2021
obj-$(CONFIG_SPI_BFIN_V3) += spi-bfin-v3.o
2122
obj-$(CONFIG_SPI_BFIN_SPORT) += spi-bfin-sport.o

‎drivers/spi/spi-altera.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ static int altera_spi_probe(struct platform_device *pdev)
220220

221221
/* setup the state for the bitbang driver */
222222
hw->bitbang.master = master;
223-
if (!hw->bitbang.master)
224-
return err;
225223
hw->bitbang.chipselect = altera_spi_chipsel;
226224
hw->bitbang.txrx_bufs = altera_spi_txrx;
227225

‎drivers/spi/spi-ath79.c‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -243,21 +243,21 @@ static int ath79_spi_probe(struct platform_device *pdev)
243243
goto err_put_master;
244244
}
245245

246-
sp->base = ioremap(r->start, resource_size(r));
246+
sp->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
247247
if (!sp->base) {
248248
ret = -ENXIO;
249249
goto err_put_master;
250250
}
251251

252-
sp->clk = clk_get(&pdev->dev, "ahb");
252+
sp->clk = devm_clk_get(&pdev->dev, "ahb");
253253
if (IS_ERR(sp->clk)) {
254254
ret = PTR_ERR(sp->clk);
255-
goto err_unmap;
255+
goto err_put_master;
256256
}
257257

258258
ret = clk_enable(sp->clk);
259259
if (ret)
260-
goto err_clk_put;
260+
goto err_put_master;
261261

262262
rate = DIV_ROUND_UP(clk_get_rate(sp->clk), MHZ);
263263
if (!rate) {
@@ -280,10 +280,6 @@ static int ath79_spi_probe(struct platform_device *pdev)
280280
ath79_spi_disable(sp);
281281
err_clk_disable:
282282
clk_disable(sp->clk);
283-
err_clk_put:
284-
clk_put(sp->clk);
285-
err_unmap:
286-
iounmap(sp->base);
287283
err_put_master:
288284
spi_master_put(sp->bitbang.master);
289285

@@ -297,8 +293,6 @@ static int ath79_spi_remove(struct platform_device *pdev)
297293
spi_bitbang_stop(&sp->bitbang);
298294
ath79_spi_disable(sp);
299295
clk_disable(sp->clk);
300-
clk_put(sp->clk);
301-
iounmap(sp->base);
302296
spi_master_put(sp->bitbang.master);
303297

304298
return 0;

0 commit comments

Comments
 (0)