spi: fsl: fix use of spisel_boot signal on MPC8309
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Fri, 27 Nov 2020 15:29:47 +0000 (16:29 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 30 Nov 2020 12:52:49 +0000 (12:52 +0000)
commit122541f2b10897b08f7f7e6db5f1eb693e51f0a1
tree8b1b566d2b012ab53f891249ea505d469c8604d3
parent7218838109fef61cdec988ff728e902d434c9cc5
spi: fsl: fix use of spisel_boot signal on MPC8309

Commit 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors")
broke the use of the SPISEL_BOOT signal as a chip select on the
MPC8309.

pdata->max_chipselect, which becomes master->num_chipselect, must be
initialized to take into account the possibility that there's one more
chip select in use than the number of GPIO chip selects.

Cc: stable@vger.kernel.org # v5.4+
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Linus Walleij <linus.walleij@linaro.org>
Fixes: 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors")
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Link: https://lore.kernel.org/r/20201127152947.376-1-rasmus.villemoes@prevas.dk
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-spi.c