]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: advantech: correct SCU API usage
authorPeng Fan <peng.fan@nxp.com>
Thu, 15 Jun 2023 10:09:02 +0000 (18:09 +0800)
committerStefano Babic <sbabic@denx.de>
Thu, 13 Jul 2023 09:29:40 +0000 (11:29 +0200)
The return value is int type, not sc_err_t(u8), correct the usage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Oliver Graute <oliver.graute@kococonnector.com>
Reviewed-by: Oliver Graute <oliver.graute@kococonnector.com>
board/advantech/imx8qm_dmsse20_a1/spl.c
board/advantech/imx8qm_rom7720_a1/spl.c

index 7f2e972425b65486998654b5fe95aaba2071e789..f36caece7d7776a45e630e9e1c527d2bef857adf 100644 (file)
@@ -111,7 +111,7 @@ int board_mmc_init(struct bd_info *bis)
                switch (i) {
                case 0:
                        ret = sc_pm_set_resource_power_mode(-1, SC_R_SDHC_0, SC_PM_PW_MODE_ON);
-                       if (ret != SC_ERR_NONE)
+                       if (ret)
                                return ret;
 
                        imx8_iomux_setup_multiple_pads(emmc0, ARRAY_SIZE(emmc0));
@@ -120,10 +120,10 @@ int board_mmc_init(struct bd_info *bis)
                        break;
                case 1:
                        ret = sc_pm_set_resource_power_mode(-1, SC_R_SDHC_2, SC_PM_PW_MODE_ON);
-                       if (ret != SC_ERR_NONE)
+                       if (ret)
                                return ret;
                        ret = sc_pm_set_resource_power_mode(-1, SC_R_GPIO_4, SC_PM_PW_MODE_ON);
-                       if (ret != SC_ERR_NONE)
+                       if (ret)
                                return ret;
 
                        imx8_iomux_setup_multiple_pads(usdhc2_sd, ARRAY_SIZE(usdhc2_sd));
index b602437c35bcb016a6267054510f4ec3b7e36e6a..922bb0b7d434b96b1954b3cbfbca2fe8dd558d75 100644 (file)
@@ -112,7 +112,7 @@ int board_mmc_init(struct bd_info *bis)
                switch (i) {
                case 0:
                        ret = sc_pm_set_resource_power_mode(-1, SC_R_SDHC_0, SC_PM_PW_MODE_ON);
-                       if (ret != SC_ERR_NONE)
+                       if (ret)
                                return ret;
 
                        imx8_iomux_setup_multiple_pads(emmc0, ARRAY_SIZE(emmc0));
@@ -121,10 +121,10 @@ int board_mmc_init(struct bd_info *bis)
                        break;
                case 1:
                        ret = sc_pm_set_resource_power_mode(-1, SC_R_SDHC_2, SC_PM_PW_MODE_ON);
-                       if (ret != SC_ERR_NONE)
+                       if (ret)
                                return ret;
                        ret = sc_pm_set_resource_power_mode(-1, SC_R_GPIO_4, SC_PM_PW_MODE_ON);
-                       if (ret != SC_ERR_NONE)
+                       if (ret)
                                return ret;
 
                        imx8_iomux_setup_multiple_pads(usdhc2_sd, ARRAY_SIZE(usdhc2_sd));