]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: veyron: Add logging for power init
authorSimon Glass <sjg@chromium.org>
Thu, 27 Jun 2024 08:29:45 +0000 (09:29 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 28 Jun 2024 19:54:52 +0000 (13:54 -0600)
Add better logging for power init so that CONFIG_LOG_ERROR_RETURN can
be enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
board/google/veyron/veyron.c

index 32dbcdc4d10a56d8aada6cb3fae53120a7db84a1..6d4c9debdeea3eea44133f9ded56122cf2299956 100644 (file)
@@ -29,44 +29,38 @@ static int veyron_init(void)
        int ret;
 
        ret = regulator_get_by_platname("vdd_arm", &dev);
-       if (ret) {
-               debug("Cannot set regulator name\n");
-               return ret;
-       }
+       if (ret)
+               return log_msg_ret("vdd", ret);
 
        /* Slowly raise to max CPU voltage to prevent overshoot */
        ret = regulator_set_value(dev, 1200000);
        if (ret)
-               return ret;
+               return log_msg_ret("s12", ret);
        udelay(175); /* Must wait for voltage to stabilize, 2mV/us */
        ret = regulator_set_value(dev, 1400000);
        if (ret)
-               return ret;
+               return log_msg_ret("s14", ret);
        udelay(100); /* Must wait for voltage to stabilize, 2mV/us */
 
        ret = rockchip_get_clk(&clk.dev);
        if (ret)
-               return ret;
+               return log_msg_ret("clk", ret);
        clk.id = PLL_APLL;
        ret = clk_set_rate(&clk, 1800000000);
        if (IS_ERR_VALUE(ret))
-               return ret;
+               return log_msg_ret("s18", ret);
 
        ret = regulator_get_by_platname("vcc33_sd", &dev);
-       if (ret) {
-               debug("Cannot get regulator name\n");
-               return ret;
-       }
+       if (ret)
+               return log_msg_ret("vcc", ret);
 
        ret = regulator_set_value(dev, 3300000);
        if (ret)
-               return ret;
+               return log_msg_ret("s33", ret);
 
        ret = regulators_enable_boot_on(false);
-       if (ret) {
-               debug("%s: Cannot enable boot on regulators\n", __func__);
-               return ret;
-       }
+       if (ret)
+               return log_msg_ret("boo", ret);
 
        return 0;
 }
@@ -81,7 +75,7 @@ int board_early_init_r(void)
        if (!fdt_node_check_compatible(gd->fdt_blob, 0, "google,veyron")) {
                ret = veyron_init();
                if (ret)
-                       return ret;
+                       return log_msg_ret("vey", ret);
        }
 #endif
        /*