diff mbox series

[V2,06/30] imx: congatec/cgtqmx8: correct SCU API usage

Message ID 20230615100928.25767-7-peng.fan@oss.nxp.com
State Accepted
Commit c186596ac45e7b5521e6df5a9471793c763eb20b
Delegated to: Stefano Babic
Headers show
Series imx: misc update and fix | expand

Commit Message

Peng Fan (OSS) June 15, 2023, 10:09 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

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/congatec/cgtqmx8/cgtqmx8.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Stefano Babic July 11, 2023, 7:41 p.m. UTC | #1
> From: Peng Fan <peng.fan@nxp.com>
> 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>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/board/congatec/cgtqmx8/cgtqmx8.c b/board/congatec/cgtqmx8/cgtqmx8.c
index bedd1e03308..26189ff66f5 100644
--- a/board/congatec/cgtqmx8/cgtqmx8.c
+++ b/board/congatec/cgtqmx8/cgtqmx8.c
@@ -79,7 +79,7 @@  static void setup_iomux_uart(void)
 int board_early_init_f(void)
 {
 	/* sc_ipc_t ipcHndl = 0; */
-	sc_err_t scierr = 0;
+	int scierr;
 
 	/* When start u-boot in XEN VM, directly return */
 	/* if (IS_ENABLED(CONFIG_XEN)) */
@@ -89,19 +89,19 @@  int board_early_init_f(void)
 
 	/* Power up UART0, this is very early while power domain is not working */
 	scierr = sc_pm_set_resource_power_mode(-1, SC_R_UART_0, SC_PM_PW_MODE_ON);
-	if (scierr != SC_ERR_NONE)
+	if (scierr)
 		return 0;
 
 	/* Set UART0 clock root to 80 MHz */
 	sc_pm_clock_rate_t rate = 80000000;
 
 	scierr = sc_pm_set_clock_rate(-1, SC_R_UART_0, 2, &rate);
-	if (scierr != SC_ERR_NONE)
+	if (scierr)
 		return 0;
 
 	/* Enable UART0 clock root */
 	scierr = sc_pm_clock_enable(-1, SC_R_UART_0, 2, true, false);
-	if (scierr != SC_ERR_NONE)
+	if (scierr)
 		return 0;
 
 	setup_iomux_uart();