diff options
author | Ingo Molnar <mingo@kernel.org> | 2024-09-05 12:17:43 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2024-09-05 12:17:43 +0300 |
commit | 95c13662b65c562d4902ad9f810378261347a749 (patch) | |
tree | 036091f8615fdf2d00021709993b00790a630250 /drivers/spi/spi-hisi-kunpeng.c | |
parent | fe826cc2654e8561b64246325e6a51b62bf2488c (diff) | |
parent | 2ab9d830262c132ab5db2f571003d80850d56b2a (diff) | |
download | linux-95c13662b65c562d4902ad9f810378261347a749.tar.xz |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
This also refreshes the -rc1 based branch to -rc5.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/spi/spi-hisi-kunpeng.c')
-rw-r--r-- | drivers/spi/spi-hisi-kunpeng.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi-hisi-kunpeng.c b/drivers/spi/spi-hisi-kunpeng.c index 77e9738e42f6..16054695bdb0 100644 --- a/drivers/spi/spi-hisi-kunpeng.c +++ b/drivers/spi/spi-hisi-kunpeng.c @@ -481,6 +481,9 @@ static int hisi_spi_probe(struct platform_device *pdev) return -EINVAL; } + if (host->max_speed_hz == 0) + return dev_err_probe(dev, -EINVAL, "spi-max-frequency can't be 0\n"); + ret = device_property_read_u16(dev, "num-cs", &host->num_chipselect); if (ret) @@ -495,6 +498,7 @@ static int hisi_spi_probe(struct platform_device *pdev) host->transfer_one = hisi_spi_transfer_one; host->handle_err = hisi_spi_handle_err; host->dev.fwnode = dev->fwnode; + host->min_speed_hz = DIV_ROUND_UP(host->max_speed_hz, CLK_DIV_MAX); hisi_spi_hw_init(hs); |