spi: s3c64xx: allow FIFO depth to be determined from the compatible
authorTudor Ambarus <tudor.ambarus@linaro.org>
Fri, 16 Feb 2024 07:05:49 +0000 (07:05 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 5 Mar 2024 20:42:54 +0000 (20:42 +0000)
commit82b98fb8cd33db7793e3e695c44e4e75bca03b3e
treea01ab2aa645c50f75dffc9d69309db83a7b088ee
parent414d7b8c9147db7dc34c0e2bae2e2361b922dc07
spi: s3c64xx: allow FIFO depth to be determined from the compatible

There are SoCs that use the same FIFO depth for all the instances of the
SPI IP. See the fifo_lvl_mask defined for gs101 for example:
    .fifo_lvl_mask  = { 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
                        0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f},

Instead of specifying the FIFO depth with the same value for all 16
nodes in this case, allow such SoCs to infer the FIFO depth from the
compatible. There are other SoCs than can benefit of this, see:
{gs101, fsd, exynos850, s3c641, s3c2443}_spi_port_config.

The FIFO depth inferred from the compatible has a higher precedence than
the one that might be specified via device tree, the driver shall know
better.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Link: https://msgid.link/r/20240216070555.2483977-7-tudor.ambarus@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-s3c64xx.c