diff options
author | Hal Feng <hal.feng@starfivetech.com> | 2024-06-06 06:01:58 +0300 |
---|---|---|
committer | Hal Feng <hal.feng@starfivetech.com> | 2024-06-06 06:09:52 +0300 |
commit | e5b262e548db0a41a128da8ee6945ce04a1f1f2c (patch) | |
tree | fd17153518fcc55d3264e9bb94e43818e2414611 | |
parent | 46db20b9cd19b6d5b2f5fbe72f846fee0ce12953 (diff) | |
download | linux-e5b262e548db0a41a128da8ee6945ce04a1f1f2c.tar.xz |
spi: pl022: Prompt warning when frequency does not support
Prompt warning when the frequency does not support.
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
-rw-r--r-- | drivers/spi/spi-pl022.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 1420c40fa815..1189b484b4f1 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -1803,6 +1803,10 @@ static int calculate_effective_freq(struct pl022 *pl022, int freq, struct WARN(!best_freq, "pl022: Matching cpsdvsr and scr not found for %d Hz rate \n", freq); + if (best_freq != freq) + dev_warn(&pl022->adev->dev, + "Requested frequency: %d Hz is unsupported,select by default %d Hz\n", + freq, best_freq); clk_freq->cpsdvsr = (u8) (best_cpsdvsr & 0xFF); clk_freq->scr = (u8) (best_scr & 0xFF); dev_dbg(&pl022->adev->dev, |