diff mbox series

[V2,03/30] imx: toradex/colibri-imx8x: correct SCU API usage

Message ID 20230615100928.25767-4-peng.fan@oss.nxp.com
State Accepted
Commit aa6e698a7acd4d6db4be26661b1839ce417cbb20
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>
---
 board/toradex/colibri-imx8x/colibri-imx8x.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Stefano Babic July 11, 2023, 7:43 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>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c
index 52fc7a391bb..29efd8c6a53 100644
--- a/board/toradex/colibri-imx8x/colibri-imx8x.c
+++ b/board/toradex/colibri-imx8x/colibri-imx8x.c
@@ -43,9 +43,9 @@  static void setup_iomux_uart(void)
 static int is_imx8dx(void)
 {
 	u32 val = 0;
-	sc_err_t sc_err = sc_misc_otp_fuse_read(-1, 6, &val);
+	int sc_err = sc_misc_otp_fuse_read(-1, 6, &val);
 
-	if (sc_err == SC_ERR_NONE) {
+	if (sc_err) {
 		/* DX has two A35 cores disabled */
 		return (val & 0xf) != 0x0;
 	}
@@ -70,7 +70,7 @@  void board_mem_get_layout(u64 *phys_sdram_1_start,
 int board_early_init_f(void)
 {
 	sc_pm_clock_rate_t rate;
-	sc_err_t err = 0;
+	int err;
 
 	/*
 	 * This works around that having only UART3 up the baudrate is 1.2M
@@ -78,13 +78,13 @@  int board_early_init_f(void)
 	 */
 	rate = 80000000;
 	err = sc_pm_set_clock_rate(-1, SC_R_UART_0, SC_PM_CLK_PER, &rate);
-	if (err != SC_ERR_NONE)
+	if (err)
 		return 0;
 
 	/* Set UART3 clock root to 80 MHz and enable it */
 	rate = SC_80MHZ;
 	err = sc_pm_setup_uart(SC_R_UART_3, rate);
-	if (err != SC_ERR_NONE)
+	if (err)
 		return 0;
 
 	setup_iomux_uart();