Skip to content

Commit 77ee3ba

Browse files
miquelraynalbroonie
authored andcommitted
spi: cadence-qspi: Use a default value for cdns,fifo-width
Bindings expect 4 to be the default value for cdns,fifo-width. Said otherwise, if the property (which is not mandatory) is not provided, the OS, in order to comply with the bindings, should not error out and take 4 as default value. Comply with the bindings. This would have slighlty simplyfied my testing if it had been implemented correctly in the first place, but in practice it should have no impact on the existing boards using this controller, as they all set cdns,fifo-width to 4 explicitly in their upstream DTS. Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com> Tested-by: Santhosh Kumar K <s-k6@ti.com> Link: https://patch.msgid.link/20260122-schneider-6-19-rc1-qspi-v4-13-f9c21419a3e6@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 590f243 commit 77ee3ba

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/spi/spi-cadence-quadspi.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,10 +1598,8 @@ static int cqspi_of_get_pdata(struct cqspi_st *cqspi)
15981598
cqspi->fifo_depth = 0;
15991599
}
16001600

1601-
if (of_property_read_u32(np, "cdns,fifo-width", &cqspi->fifo_width)) {
1602-
dev_err(dev, "couldn't determine fifo-width\n");
1603-
return -ENXIO;
1604-
}
1601+
if (of_property_read_u32(np, "cdns,fifo-width", &cqspi->fifo_width))
1602+
cqspi->fifo_width = 4;
16051603

16061604
if (of_property_read_u32(np, "cdns,trigger-address",
16071605
&cqspi->trigger_address)) {

0 commit comments

Comments
 (0)