mbox series

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

Message ID 20240730032040.3156393-1-liudingyuan@huawei.com
Headers show
Series spi: hisi-kunpeng: Set verification for speed_hz and max_frequency | expand

Message

Devyn Liu July 30, 2024, 3:20 a.m. UTC
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(+)