projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b10fa3
)
spi: zynq-qspi: Anything else than CS0 is not supported yet
author
Miquel Raynal
<miquel.raynal@bootlin.com>
Fri, 8 Nov 2019 14:07:38 +0000
(15:07 +0100)
committer
Mark Brown
<broonie@kernel.org>
Fri, 8 Nov 2019 17:43:28 +0000
(17:43 +0000)
Unlike what the driver is currently advertizing, CS0 only can be used,
CS1 is not supported at all. Prevent people to use CS1.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/r/20191108140744.1734-2-miquel.raynal@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-zynq-qspi.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-zynq-qspi.c
b/drivers/spi/spi-zynq-qspi.c
index b1c56e9d7c94c5a88d36a6b4c58fa7d26e8abfd1..9f53ea08adf7abf97756870a21817437c86f0e1f 100644
(file)
--- a/
drivers/spi/spi-zynq-qspi.c
+++ b/
drivers/spi/spi-zynq-qspi.c
@@
-680,10
+680,14
@@
static int zynq_qspi_probe(struct platform_device *pdev)
ret = of_property_read_u32(np, "num-cs",
&num_cs);
- if (ret < 0)
+ if (ret < 0)
{
ctlr->num_chipselect = ZYNQ_QSPI_DEFAULT_NUM_CS;
- else
+ } else if (num_cs > ZYNQ_QSPI_DEFAULT_NUM_CS) {
+ dev_err(&pdev->dev, "anything but CS0 is not yet supported\n");
+ goto remove_master;
+ } else {
ctlr->num_chipselect = num_cs;
+ }
ctlr->mode_bits = SPI_RX_DUAL | SPI_RX_QUAD |
SPI_TX_DUAL | SPI_TX_QUAD;