[PATCH 0/2] spi: hisi-kunpeng: Set verification for speed_hz and max_frequency

From: Devyn Liu
Date: Mon Jul 29 2024 - 23:21:18 EST


The speed_hz is specified by user, while the max_frequency is a
firmware-provided parameter for the SPI controller. Both are used
in the calculation of clk_div. To avoid calculation results outside
of a reasonable range and to prevent division by zero errors,
configuration for validation of speed_hz and max_frequency is added
in the code.

Devyn Liu (2):
spi: hisi-kunpeng: Add validation for the minimum value of speed_hz
spi: hisi-kunpeng: Add verification for the max_frequency provided by
the firmware

drivers/spi/spi-hisi-kunpeng.c | 4 ++++
1 file changed, 4 insertions(+)

--
2.33.0