diff mbox series

[3/3] clk: bcm: rpi: Show clock id limit in error case

Message ID 20220713154953.3336-4-stefan.wahren@i2se.com (mailing list archive)
State Accepted, archived
Headers show
Series clk: bcm: rpi: Fixes and improvement | expand

Commit Message

Stefan Wahren July 13, 2022, 3:49 p.m. UTC
The clock id limit will be extended in the future, so it would be
helpful to see the actual clock id limit in case the firmware
response has been rejected.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/clk/bcm/clk-raspberrypi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Florian Fainelli July 13, 2022, 4:33 p.m. UTC | #1
On 7/13/22 08:49, Stefan Wahren wrote:
> The clock id limit will be extended in the future, so it would be
> helpful to see the actual clock id limit in case the firmware
> response has been rejected.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Stephen Boyd Aug. 23, 2022, 10:51 p.m. UTC | #2
Quoting Stefan Wahren (2022-07-13 08:49:53)
> The clock id limit will be extended in the future, so it would be
> helpful to see the actual clock id limit in case the firmware
> response has been rejected.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---

Applied to clk-fixes
diff mbox series

Patch

diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index b3b629516182..676e5379ebce 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -365,7 +365,8 @@  static int raspberrypi_discover_clocks(struct raspberrypi_clk *rpi,
 		struct raspberrypi_clk_variant *variant;
 
 		if (clks->id > RPI_FIRMWARE_NUM_CLK_ID) {
-			dev_err(rpi->dev, "Unknown clock id: %u\n", clks->id);
+			dev_err(rpi->dev, "Unknown clock id: %u (max: %u)\n",
+					   clks->id, RPI_FIRMWARE_NUM_CLK_ID);
 			return -EINVAL;
 		}