clk: bcm: rpi: Show clock id limit in error case
authorStefan Wahren <stefan.wahren@i2se.com>
Wed, 13 Jul 2022 15:49:53 +0000 (17:49 +0200)
committerStephen Boyd <sboyd@kernel.org>
Tue, 23 Aug 2022 22:51:18 +0000 (15:51 -0700)
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>
Link: https://lore.kernel.org/r/20220713154953.3336-4-stefan.wahren@i2se.com
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Ivan T. Ivanov <iivanov@suse.de>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/bcm/clk-raspberrypi.c

index 4df921d1e21ca9a8fba8475ad556e42f2b712577..876b37b8683c582ef56b0ce36e1e5ea8395d9fa2 100644 (file)
@@ -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;
                }