From 02933626c7351db6f38cd72d85b47188655fbc85 Mon Sep 17 00:00:00 2001 From: Yao Zi Date: Fri, 7 Mar 2025 17:11:45 +0000 Subject: [PATCH 1/2] clk: sophgo: Fix return values of register updating helpers These helpers wrongly return the updated register value. As a non-zero value indicates failure, this causes various clock operations are considered failed. Correct the return value to constant zero, since these simple MMIO operations won't fail. This fixes clock enabling failures during booting process, In: serial@4140000 Out: serial@4140000 Err: serial@4140000 Net: Enable clock-controller@3002000 failed failed to enable clock 0 No ethernet found. which leads to misoperation of various peripherals. Fixes: 5f364e072e7 ("clk: sophgo: cv1800b: Add clock controller driver for cv1800b SoC") Tested-by: Yuguo Pei Signed-off-by: Yao Zi --- drivers/clk/sophgo/clk-common.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/sophgo/clk-common.h b/drivers/clk/sophgo/clk-common.h index 95b82e968d0..a9e83d0d689 100644 --- a/drivers/clk/sophgo/clk-common.h +++ b/drivers/clk/sophgo/clk-common.h @@ -45,12 +45,14 @@ static inline u32 cv1800b_clk_getbit(void *base, struct cv1800b_clk_regbit *bit) static inline u32 cv1800b_clk_setbit(void *base, struct cv1800b_clk_regbit *bit) { - return setbits_le32(base + bit->offset, BIT(bit->shift)); + setbits_le32(base + bit->offset, BIT(bit->shift)); + return 0; } static inline u32 cv1800b_clk_clrbit(void *base, struct cv1800b_clk_regbit *bit) { - return clrbits_le32(base + bit->offset, BIT(bit->shift)); + clrbits_le32(base + bit->offset, BIT(bit->shift)); + return 0; } static inline u32 cv1800b_clk_getfield(void *base, From b452ed448fb2ad44a4b0a07908a3673c25beb5d9 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 14 Mar 2025 19:28:38 -0600 Subject: [PATCH 2/2] openpiton: riscv64: Drop unnecessary 'imply SPL_RISCV_MMODE' As the code is today, we get a warning about "select" statements on "choice" options not doing anything. In this case, the option SPL_RISCV_MMODE is the default. Signed-off-by: Tom Rini Reviewed-by: Tianrui Wei --- board/openpiton/riscv64/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/board/openpiton/riscv64/Kconfig b/board/openpiton/riscv64/Kconfig index 21da1dc346d..e4bd8903aab 100644 --- a/board/openpiton/riscv64/Kconfig +++ b/board/openpiton/riscv64/Kconfig @@ -35,6 +35,5 @@ config BOARD_SPECIFIC_OPTIONS # dummy imply SPL_SMP imply SPL_MMC imply SMP - imply SPL_RISCV_MMODE endif