[PATCH v2 0/5] Rockchip: Allow to silent TPL/SPL debug console

Currently it is not possible to completely silent the debug console in i.e. PX30, what might be required in some embedded devices Disabling DEBUG_UART results in errors, due to missing symbols. In particular, rockchip sdram driver performs calls to debug_uart functions (i.e. printascii), defined directly in serial driver. This patch series fixes the dependencies in Kconfig and provides dummy implementation of debug_uart functions that are linked in case serial driver is not used.
changes in v2: - Update commit titles - Create separate SPL and TPL symbols for RAM_ROCKCHIP_DEBUG
Lukasz Czechowski (5): debug_uart: Replace debug functions with dummies if CONFIG_DEBUG_UART is not set ram: rockchip: Fix dependency of RAM_ROCKCHIP_DEBUG ram: rockchip: Add separate RAM_ROCKCHIP_DEBUG config for TPL/SPL rockchip: px30: Weaken dependency TPL/SPL serial rockchip: px30: Fix hard dependency to DEBUG_UART_BOARD_INIT
arch/arm/mach-rockchip/Kconfig | 5 ++--- configs/anbernic-rgxx3-rk3566_defconfig | 1 + configs/neu2-io-rv1126_defconfig | 2 ++ configs/roc-pc-mezzanine-rk3399_defconfig | 2 ++ configs/roc-pc-rk3399_defconfig | 2 ++ configs/rock-pi-n10-rk3399pro_defconfig | 2 ++ configs/sonoff-ihost-rv1126_defconfig | 2 ++ drivers/ram/rockchip/Kconfig | 25 +++++++++++++++++++++++ drivers/ram/rockchip/sdram_common.c | 2 +- drivers/ram/rockchip/sdram_rk3399.c | 4 ++-- drivers/ram/rockchip/sdram_rv1126.c | 10 ++++----- include/debug_uart.h | 16 +++++++++++++++ 12 files changed, 62 insertions(+), 11 deletions(-)

In case DEBUG UART is not used, define dummy macros replacing the actual function implementations that will not be available. This allows to compile code and avoid linker errors. Because the DEBUG_UART_FUNCS macro should not be used if DEBUG UART is not available, redefine it to generate compilation warning.
Signed-off-by: Lukasz Czechowski lukasz.czechowski@thaumatec.com
Reviewed-by: Simon Glass sjg@chromium.org --- include/debug_uart.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/include/debug_uart.h b/include/debug_uart.h index 714b369e6fe..dc0f1aa4c98 100644 --- a/include/debug_uart.h +++ b/include/debug_uart.h @@ -128,6 +128,8 @@ void printdec(unsigned int value); (1 << CONFIG_DEBUG_UART_SHIFT), \ CONFIG_DEBUG_UART_SHIFT)
+#ifdef CONFIG_DEBUG_UART + /* * Now define some functions - this should be inserted into the serial driver */ @@ -197,4 +199,18 @@ void printdec(unsigned int value); _DEBUG_UART_ANNOUNCE \ } \
+#else + +#define DEBUG_UART_FUNCS \ + #warning "DEBUG_UART not defined!" + +#define printch(ch) do{}while(0); +#define printascii(str) do{}while(0); +#define printhex2(value) do{}while(0); +#define printhex4(value) do{}while(0); +#define printhex8(value) do{}while(0); +#define printdec(value) do{}while(0); + +#endif + #endif

On 2024/9/4 00:38, Lukasz Czechowski wrote:
In case DEBUG UART is not used, define dummy macros replacing the actual function implementations that will not be available. This allows to compile code and avoid linker errors. Because the DEBUG_UART_FUNCS macro should not be used if DEBUG UART is not available, redefine it to generate compilation warning.
Signed-off-by: Lukasz Czechowski lukasz.czechowski@thaumatec.com
Reviewed-by: Simon Glass sjg@chromium.org
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
include/debug_uart.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/include/debug_uart.h b/include/debug_uart.h index 714b369e6fe..dc0f1aa4c98 100644 --- a/include/debug_uart.h +++ b/include/debug_uart.h @@ -128,6 +128,8 @@ void printdec(unsigned int value); (1 << CONFIG_DEBUG_UART_SHIFT), \ CONFIG_DEBUG_UART_SHIFT)
+#ifdef CONFIG_DEBUG_UART
- /*
*/
- Now define some functions - this should be inserted into the serial driver
@@ -197,4 +199,18 @@ void printdec(unsigned int value); _DEBUG_UART_ANNOUNCE \ } \
+#else
+#define DEBUG_UART_FUNCS \
- #warning "DEBUG_UART not defined!"
+#define printch(ch) do{}while(0); +#define printascii(str) do{}while(0); +#define printhex2(value) do{}while(0); +#define printhex4(value) do{}while(0); +#define printhex8(value) do{}while(0); +#define printdec(value) do{}while(0);
+#endif
- #endif

The RAM_ROCKCHIP_DEBUG can be used only if DEBUG_UART is available, otherwise it won't have any effect.
Signed-off-by: Lukasz Czechowski lukasz.czechowski@thaumatec.com --- drivers/ram/rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/ram/rockchip/Kconfig b/drivers/ram/rockchip/Kconfig index 67c63ecba04..d707d09c1c8 100644 --- a/drivers/ram/rockchip/Kconfig +++ b/drivers/ram/rockchip/Kconfig @@ -15,6 +15,7 @@ if RAM_ROCKCHIP
config RAM_ROCKCHIP_DEBUG bool "Rockchip ram drivers debugging" + depends on DEBUG_UART default y help This enables debugging ram driver API's for the platforms

On 2024/9/4 00:38, Lukasz Czechowski wrote:
The RAM_ROCKCHIP_DEBUG can be used only if DEBUG_UART is available, otherwise it won't have any effect.
Signed-off-by: Lukasz Czechowski lukasz.czechowski@thaumatec.com
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
drivers/ram/rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/ram/rockchip/Kconfig b/drivers/ram/rockchip/Kconfig index 67c63ecba04..d707d09c1c8 100644 --- a/drivers/ram/rockchip/Kconfig +++ b/drivers/ram/rockchip/Kconfig @@ -15,6 +15,7 @@ if RAM_ROCKCHIP
config RAM_ROCKCHIP_DEBUG bool "Rockchip ram drivers debugging"
- depends on DEBUG_UART default y help This enables debugging ram driver API's for the platforms

Introduce new config symbols TPL_RAM_ROCKCHIP_DEBUG and SPL_RAM_ROCKCHIP_DEBUG to allow for better dependencies control of RAM driver debugging configuration. Add negative dependencies to TPL_SILENT_CONSOLE and SPL_SILENT_CONSOLE, respectively.
Replace IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG) directives with CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG) to utilize the configuration changes.
Update defconfigs of affected boards so that behavior is not changed.
Signed-off-by: Lukasz Czechowski lukasz.czechowski@thaumatec.com --- configs/anbernic-rgxx3-rk3566_defconfig | 1 + configs/neu2-io-rv1126_defconfig | 2 ++ configs/roc-pc-mezzanine-rk3399_defconfig | 2 ++ configs/roc-pc-rk3399_defconfig | 2 ++ configs/rock-pi-n10-rk3399pro_defconfig | 2 ++ configs/sonoff-ihost-rv1126_defconfig | 2 ++ drivers/ram/rockchip/Kconfig | 24 +++++++++++++++++++++++ drivers/ram/rockchip/sdram_common.c | 2 +- drivers/ram/rockchip/sdram_rk3399.c | 4 ++-- drivers/ram/rockchip/sdram_rv1126.c | 10 +++++----- 10 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/configs/anbernic-rgxx3-rk3566_defconfig b/configs/anbernic-rgxx3-rk3566_defconfig index a03509bf467..4392bb5af00 100644 --- a/configs/anbernic-rgxx3-rk3566_defconfig +++ b/configs/anbernic-rgxx3-rk3566_defconfig @@ -68,6 +68,7 @@ CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_SPL_RAM=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set # CONFIG_RNG_SMCCC_TRNG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/neu2-io-rv1126_defconfig b/configs/neu2-io-rv1126_defconfig index 2a4c9b45a04..1bdf99887b3 100644 --- a/configs/neu2-io-rv1126_defconfig +++ b/configs/neu2-io-rv1126_defconfig @@ -46,6 +46,8 @@ CONFIG_MMC_DW_ROCKCHIP=y CONFIG_REGULATOR_PWM=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y diff --git a/configs/roc-pc-mezzanine-rk3399_defconfig b/configs/roc-pc-mezzanine-rk3399_defconfig index a57899bfdfa..45c4975e452 100644 --- a/configs/roc-pc-mezzanine-rk3399_defconfig +++ b/configs/roc-pc-mezzanine-rk3399_defconfig @@ -66,6 +66,8 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_RAM_ROCKCHIP_LPDDR4=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index b45f0e0a899..3f2d5650249 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -63,6 +63,8 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_RAM_ROCKCHIP_LPDDR4=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/rock-pi-n10-rk3399pro_defconfig b/configs/rock-pi-n10-rk3399pro_defconfig index ec995a54a0e..d4ba628e428 100644 --- a/configs/rock-pi-n10-rk3399pro_defconfig +++ b/configs/rock-pi-n10-rk3399pro_defconfig @@ -52,6 +52,8 @@ CONFIG_PMIC_RK8XX=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550_MEM32=y diff --git a/configs/sonoff-ihost-rv1126_defconfig b/configs/sonoff-ihost-rv1126_defconfig index 4890644c7e6..1b10cded8fd 100644 --- a/configs/sonoff-ihost-rv1126_defconfig +++ b/configs/sonoff-ihost-rv1126_defconfig @@ -47,6 +47,8 @@ CONFIG_MMC_DW_ROCKCHIP=y CONFIG_REGULATOR_PWM=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y diff --git a/drivers/ram/rockchip/Kconfig b/drivers/ram/rockchip/Kconfig index d707d09c1c8..5e069dca3be 100644 --- a/drivers/ram/rockchip/Kconfig +++ b/drivers/ram/rockchip/Kconfig @@ -24,6 +24,30 @@ config RAM_ROCKCHIP_DEBUG This is an option for developers to understand the ram drivers initialization, configurations and etc.
+config SPL_RAM_ROCKCHIP_DEBUG + bool "Rockchip ram drivers debugging in SPL" + depends on DEBUG_UART + depends on SPL && SPL_RAM && !SPL_SILENT_CONSOLE + default y + help + This enables debugging ram driver API's for the platforms + based on Rockchip SoCs. + + This is an option for developers to understand the ram drivers + initialization, configurations and etc. + +config TPL_RAM_ROCKCHIP_DEBUG + bool "Rockchip ram drivers debugging in TPL" + depends on DEBUG_UART + depends on TPL && TPL_RAM && !TPL_SILENT_CONSOLE + default y + help + This enables debugging ram driver API's for the platforms + based on Rockchip SoCs. + + This is an option for developers to understand the ram drivers + initialization, configurations and etc. + config RAM_ROCKCHIP_DDR4 bool "DDR4 support for Rockchip SoCs" help diff --git a/drivers/ram/rockchip/sdram_common.c b/drivers/ram/rockchip/sdram_common.c index b7a8fce607c..c2a6310388c 100644 --- a/drivers/ram/rockchip/sdram_common.c +++ b/drivers/ram/rockchip/sdram_common.c @@ -10,7 +10,7 @@ #include <asm/arch-rockchip/sdram.h> #include <asm/arch-rockchip/sdram_common.h>
-#ifdef CONFIG_RAM_ROCKCHIP_DEBUG +#if CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG) void sdram_print_dram_type(unsigned char dramtype) { switch (dramtype) { diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 45270e27184..99a1cc6c174 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -2558,7 +2558,7 @@ static int lpddr4_set_rate(struct dram_info *dram, lpddr4_set_ctl(dram, params, ctl_fn, dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) + if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) printf("%s: change freq to %dMHz %d, %d\n", __func__, dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq / MHz, ctl_fn, phy_fn); @@ -2980,7 +2980,7 @@ static int sdram_init(struct dram_info *dram, continue; }
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { + if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printf("Channel "); printf(channel ? "1: " : "0: "); } diff --git a/drivers/ram/rockchip/sdram_rv1126.c b/drivers/ram/rockchip/sdram_rv1126.c index 4fbb088a8d9..14e1df71ae4 100644 --- a/drivers/ram/rockchip/sdram_rv1126.c +++ b/drivers/ram/rockchip/sdram_rv1126.c @@ -3375,7 +3375,7 @@ static void ddr_set_rate_for_fsp(struct dram_info *dram, if (get_wrlvl_val(dram, sdram_params)) printascii("get wrlvl value fail\n");
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { + if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f1); printascii("MHz\n"); @@ -3383,21 +3383,21 @@ static void ddr_set_rate_for_fsp(struct dram_info *dram, ddr_set_rate(&dram_info, sdram_params, f1, sdram_params->base.ddr_freq, 1, 1, 1);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { + if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f2); printascii("MHz\n"); } ddr_set_rate(&dram_info, sdram_params, f2, f1, 2, 0, 1);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { + if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f3); printascii("MHz\n"); } ddr_set_rate(&dram_info, sdram_params, f3, f2, 3, 1, 1);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { + if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f0); printascii("MHz(final freq)\n"); @@ -3493,7 +3493,7 @@ static int rv1126_dmc_init(struct udevice *dev) save_rw_trn_result_to_ddr(&rw_trn_result); #endif
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) + if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) printascii("out\n");
return ret;

Hi Lukasz,
On 2024/9/4 00:38, Lukasz Czechowski wrote:
Introduce new config symbols TPL_RAM_ROCKCHIP_DEBUG and SPL_RAM_ROCKCHIP_DEBUG to allow for better dependencies control of RAM driver debugging configuration.
The RAM_ROCKCHIP_DEBUG should enough because this only happen when ram driver
running the initialization, and this init process always only run only once for all SoCs.
RAM_ROCKCHIP_DEBUG depends on DEBUG_UART is the correct and no need to add more
other dependency.
Add negative dependencies to TPL_SILENT_CONSOLE and SPL_SILENT_CONSOLE, respectively.
I believe this is he main target, you want to control the UART output by SILENT_CONTROL,
but the RAM_DEBUG should follow the DEBUG_UART.
So I think this patch is no need, please drop it.
Thanks, - Kever
Replace IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG) directives with CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG) to utilize the configuration changes.
Update defconfigs of affected boards so that behavior is not changed.
Signed-off-by: Lukasz Czechowskilukasz.czechowski@thaumatec.com
configs/anbernic-rgxx3-rk3566_defconfig | 1 + configs/neu2-io-rv1126_defconfig | 2 ++ configs/roc-pc-mezzanine-rk3399_defconfig | 2 ++ configs/roc-pc-rk3399_defconfig | 2 ++ configs/rock-pi-n10-rk3399pro_defconfig | 2 ++ configs/sonoff-ihost-rv1126_defconfig | 2 ++ drivers/ram/rockchip/Kconfig | 24 +++++++++++++++++++++++ drivers/ram/rockchip/sdram_common.c | 2 +- drivers/ram/rockchip/sdram_rk3399.c | 4 ++-- drivers/ram/rockchip/sdram_rv1126.c | 10 +++++----- 10 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/configs/anbernic-rgxx3-rk3566_defconfig b/configs/anbernic-rgxx3-rk3566_defconfig index a03509bf467..4392bb5af00 100644 --- a/configs/anbernic-rgxx3-rk3566_defconfig +++ b/configs/anbernic-rgxx3-rk3566_defconfig @@ -68,6 +68,7 @@ CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_SPL_RAM=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set # CONFIG_RNG_SMCCC_TRNG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/neu2-io-rv1126_defconfig b/configs/neu2-io-rv1126_defconfig index 2a4c9b45a04..1bdf99887b3 100644 --- a/configs/neu2-io-rv1126_defconfig +++ b/configs/neu2-io-rv1126_defconfig @@ -46,6 +46,8 @@ CONFIG_MMC_DW_ROCKCHIP=y CONFIG_REGULATOR_PWM=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y diff --git a/configs/roc-pc-mezzanine-rk3399_defconfig b/configs/roc-pc-mezzanine-rk3399_defconfig index a57899bfdfa..45c4975e452 100644 --- a/configs/roc-pc-mezzanine-rk3399_defconfig +++ b/configs/roc-pc-mezzanine-rk3399_defconfig @@ -66,6 +66,8 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_RAM_ROCKCHIP_LPDDR4=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index b45f0e0a899..3f2d5650249 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -63,6 +63,8 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_RAM_ROCKCHIP_LPDDR4=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/rock-pi-n10-rk3399pro_defconfig b/configs/rock-pi-n10-rk3399pro_defconfig index ec995a54a0e..d4ba628e428 100644 --- a/configs/rock-pi-n10-rk3399pro_defconfig +++ b/configs/rock-pi-n10-rk3399pro_defconfig @@ -52,6 +52,8 @@ CONFIG_PMIC_RK8XX=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550_MEM32=y diff --git a/configs/sonoff-ihost-rv1126_defconfig b/configs/sonoff-ihost-rv1126_defconfig index 4890644c7e6..1b10cded8fd 100644 --- a/configs/sonoff-ihost-rv1126_defconfig +++ b/configs/sonoff-ihost-rv1126_defconfig @@ -47,6 +47,8 @@ CONFIG_MMC_DW_ROCKCHIP=y CONFIG_REGULATOR_PWM=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y diff --git a/drivers/ram/rockchip/Kconfig b/drivers/ram/rockchip/Kconfig index d707d09c1c8..5e069dca3be 100644 --- a/drivers/ram/rockchip/Kconfig +++ b/drivers/ram/rockchip/Kconfig @@ -24,6 +24,30 @@ config RAM_ROCKCHIP_DEBUG This is an option for developers to understand the ram drivers initialization, configurations and etc.
+config SPL_RAM_ROCKCHIP_DEBUG
- bool "Rockchip ram drivers debugging in SPL"
- depends on DEBUG_UART
- depends on SPL && SPL_RAM && !SPL_SILENT_CONSOLE
- default y
- help
This enables debugging ram driver API's for the platforms
based on Rockchip SoCs.
This is an option for developers to understand the ram drivers
initialization, configurations and etc.
+config TPL_RAM_ROCKCHIP_DEBUG
- bool "Rockchip ram drivers debugging in TPL"
- depends on DEBUG_UART
- depends on TPL && TPL_RAM && !TPL_SILENT_CONSOLE
- default y
- help
This enables debugging ram driver API's for the platforms
based on Rockchip SoCs.
This is an option for developers to understand the ram drivers
initialization, configurations and etc.
- config RAM_ROCKCHIP_DDR4 bool "DDR4 support for Rockchip SoCs" help
diff --git a/drivers/ram/rockchip/sdram_common.c b/drivers/ram/rockchip/sdram_common.c index b7a8fce607c..c2a6310388c 100644 --- a/drivers/ram/rockchip/sdram_common.c +++ b/drivers/ram/rockchip/sdram_common.c @@ -10,7 +10,7 @@ #include <asm/arch-rockchip/sdram.h> #include <asm/arch-rockchip/sdram_common.h>
-#ifdef CONFIG_RAM_ROCKCHIP_DEBUG +#if CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG) void sdram_print_dram_type(unsigned char dramtype) { switch (dramtype) { diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 45270e27184..99a1cc6c174 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -2558,7 +2558,7 @@ static int lpddr4_set_rate(struct dram_info *dram, lpddr4_set_ctl(dram, params, ctl_fn, dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG))
- if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) printf("%s: change freq to %dMHz %d, %d\n", __func__, dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq / MHz, ctl_fn, phy_fn);
@@ -2980,7 +2980,7 @@ static int sdram_init(struct dram_info *dram, continue; }
if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
}if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printf("Channel "); printf(channel ? "1: " : "0: ");
diff --git a/drivers/ram/rockchip/sdram_rv1126.c b/drivers/ram/rockchip/sdram_rv1126.c index 4fbb088a8d9..14e1df71ae4 100644 --- a/drivers/ram/rockchip/sdram_rv1126.c +++ b/drivers/ram/rockchip/sdram_rv1126.c @@ -3375,7 +3375,7 @@ static void ddr_set_rate_for_fsp(struct dram_info *dram, if (get_wrlvl_val(dram, sdram_params)) printascii("get wrlvl value fail\n");
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
- if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f1); printascii("MHz\n");
@@ -3383,21 +3383,21 @@ static void ddr_set_rate_for_fsp(struct dram_info *dram, ddr_set_rate(&dram_info, sdram_params, f1, sdram_params->base.ddr_freq, 1, 1, 1);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
- if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f2); printascii("MHz\n"); } ddr_set_rate(&dram_info, sdram_params, f2, f1, 2, 0, 1);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
- if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f3); printascii("MHz\n"); } ddr_set_rate(&dram_info, sdram_params, f3, f2, 3, 1, 1);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
- if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f0); printascii("MHz(final freq)\n");
@@ -3493,7 +3493,7 @@ static int rv1126_dmc_init(struct udevice *dev) save_rw_trn_result_to_ddr(&rw_trn_result); #endif
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG))
if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) printascii("out\n");
return ret;

Hi Kever, Thanks for the review. This patch is indeed intended to disallow enabling RAM_ROCKCHIP_DEBUG when SILENT_CONSOLE is enabled and control what is printed on the debug console more independently. Patch was created in response to review of patchset v1, and implements change suggested by Quentin Schulz quentin.schulz@cherry.de. The additional complexity with new TPL/SPL symbols had been added because we couldn't simply add i.e. `depends on !TPL_SILENT_CONSOLE if TPL` and `depends on !SPL_SILENT_CONSOLE if SPL`. @Quentin, is it fine with you that we can drop this change?
Best regards, Lukasz
wt., 10 wrz 2024 o 11:51 Kever Yang kever.yang@rock-chips.com napisał(a):
Hi Lukasz,
On 2024/9/4 00:38, Lukasz Czechowski wrote:
Introduce new config symbols TPL_RAM_ROCKCHIP_DEBUG and SPL_RAM_ROCKCHIP_DEBUG to allow for better dependencies control of RAM driver debugging configuration.
The RAM_ROCKCHIP_DEBUG should enough because this only happen when ram driver
running the initialization, and this init process always only run only once for all SoCs.
RAM_ROCKCHIP_DEBUG depends on DEBUG_UART is the correct and no need to add more
other dependency.
Add negative dependencies to TPL_SILENT_CONSOLE and SPL_SILENT_CONSOLE, respectively.
I believe this is he main target, you want to control the UART output by SILENT_CONTROL,
but the RAM_DEBUG should follow the DEBUG_UART.
So I think this patch is no need, please drop it.
Thanks,
- Kever
Replace IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG) directives with CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG) to utilize the configuration changes.
Update defconfigs of affected boards so that behavior is not changed.
Signed-off-by: Lukasz Czechowski lukasz.czechowski@thaumatec.com
configs/anbernic-rgxx3-rk3566_defconfig | 1 + configs/neu2-io-rv1126_defconfig | 2 ++ configs/roc-pc-mezzanine-rk3399_defconfig | 2 ++ configs/roc-pc-rk3399_defconfig | 2 ++ configs/rock-pi-n10-rk3399pro_defconfig | 2 ++ configs/sonoff-ihost-rv1126_defconfig | 2 ++ drivers/ram/rockchip/Kconfig | 24 +++++++++++++++++++++++ drivers/ram/rockchip/sdram_common.c | 2 +- drivers/ram/rockchip/sdram_rk3399.c | 4 ++-- drivers/ram/rockchip/sdram_rv1126.c | 10 +++++----- 10 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/configs/anbernic-rgxx3-rk3566_defconfig b/configs/anbernic-rgxx3-rk3566_defconfig index a03509bf467..4392bb5af00 100644 --- a/configs/anbernic-rgxx3-rk3566_defconfig +++ b/configs/anbernic-rgxx3-rk3566_defconfig @@ -68,6 +68,7 @@ CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_SPL_RAM=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set # CONFIG_RNG_SMCCC_TRNG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/neu2-io-rv1126_defconfig b/configs/neu2-io-rv1126_defconfig index 2a4c9b45a04..1bdf99887b3 100644 --- a/configs/neu2-io-rv1126_defconfig +++ b/configs/neu2-io-rv1126_defconfig @@ -46,6 +46,8 @@ CONFIG_MMC_DW_ROCKCHIP=y CONFIG_REGULATOR_PWM=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y diff --git a/configs/roc-pc-mezzanine-rk3399_defconfig b/configs/roc-pc-mezzanine-rk3399_defconfig index a57899bfdfa..45c4975e452 100644 --- a/configs/roc-pc-mezzanine-rk3399_defconfig +++ b/configs/roc-pc-mezzanine-rk3399_defconfig @@ -66,6 +66,8 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_RAM_ROCKCHIP_LPDDR4=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index b45f0e0a899..3f2d5650249 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -63,6 +63,8 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_RAM_ROCKCHIP_LPDDR4=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/rock-pi-n10-rk3399pro_defconfig b/configs/rock-pi-n10-rk3399pro_defconfig index ec995a54a0e..d4ba628e428 100644 --- a/configs/rock-pi-n10-rk3399pro_defconfig +++ b/configs/rock-pi-n10-rk3399pro_defconfig @@ -52,6 +52,8 @@ CONFIG_PMIC_RK8XX=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550_MEM32=y diff --git a/configs/sonoff-ihost-rv1126_defconfig b/configs/sonoff-ihost-rv1126_defconfig index 4890644c7e6..1b10cded8fd 100644 --- a/configs/sonoff-ihost-rv1126_defconfig +++ b/configs/sonoff-ihost-rv1126_defconfig @@ -47,6 +47,8 @@ CONFIG_MMC_DW_ROCKCHIP=y CONFIG_REGULATOR_PWM=y CONFIG_PWM_ROCKCHIP=y # CONFIG_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_SPL_RAM_ROCKCHIP_DEBUG is not set +# CONFIG_TPL_RAM_ROCKCHIP_DEBUG is not set CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y diff --git a/drivers/ram/rockchip/Kconfig b/drivers/ram/rockchip/Kconfig index d707d09c1c8..5e069dca3be 100644 --- a/drivers/ram/rockchip/Kconfig +++ b/drivers/ram/rockchip/Kconfig @@ -24,6 +24,30 @@ config RAM_ROCKCHIP_DEBUG This is an option for developers to understand the ram drivers initialization, configurations and etc.
+config SPL_RAM_ROCKCHIP_DEBUG
- bool "Rockchip ram drivers debugging in SPL"
- depends on DEBUG_UART
- depends on SPL && SPL_RAM && !SPL_SILENT_CONSOLE
- default y
- help
- This enables debugging ram driver API's for the platforms
- based on Rockchip SoCs.
- This is an option for developers to understand the ram drivers
- initialization, configurations and etc.
+config TPL_RAM_ROCKCHIP_DEBUG
- bool "Rockchip ram drivers debugging in TPL"
- depends on DEBUG_UART
- depends on TPL && TPL_RAM && !TPL_SILENT_CONSOLE
- default y
- help
- This enables debugging ram driver API's for the platforms
- based on Rockchip SoCs.
- This is an option for developers to understand the ram drivers
- initialization, configurations and etc.
config RAM_ROCKCHIP_DDR4 bool "DDR4 support for Rockchip SoCs" help diff --git a/drivers/ram/rockchip/sdram_common.c b/drivers/ram/rockchip/sdram_common.c index b7a8fce607c..c2a6310388c 100644 --- a/drivers/ram/rockchip/sdram_common.c +++ b/drivers/ram/rockchip/sdram_common.c @@ -10,7 +10,7 @@ #include <asm/arch-rockchip/sdram.h> #include <asm/arch-rockchip/sdram_common.h>
-#ifdef CONFIG_RAM_ROCKCHIP_DEBUG +#if CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG) void sdram_print_dram_type(unsigned char dramtype) { switch (dramtype) { diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 45270e27184..99a1cc6c174 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -2558,7 +2558,7 @@ static int lpddr4_set_rate(struct dram_info *dram, lpddr4_set_ctl(dram, params, ctl_fn, dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG))
- if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) printf("%s: change freq to %dMHz %d, %d\n", __func__, dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq / MHz, ctl_fn, phy_fn);
@@ -2980,7 +2980,7 @@ static int sdram_init(struct dram_info *dram, continue; }
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
- if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printf("Channel "); printf(channel ? "1: " : "0: "); }
diff --git a/drivers/ram/rockchip/sdram_rv1126.c b/drivers/ram/rockchip/sdram_rv1126.c index 4fbb088a8d9..14e1df71ae4 100644 --- a/drivers/ram/rockchip/sdram_rv1126.c +++ b/drivers/ram/rockchip/sdram_rv1126.c @@ -3375,7 +3375,7 @@ static void ddr_set_rate_for_fsp(struct dram_info *dram, if (get_wrlvl_val(dram, sdram_params)) printascii("get wrlvl value fail\n");
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
- if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f1); printascii("MHz\n");
@@ -3383,21 +3383,21 @@ static void ddr_set_rate_for_fsp(struct dram_info *dram, ddr_set_rate(&dram_info, sdram_params, f1, sdram_params->base.ddr_freq, 1, 1, 1);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
- if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f2); printascii("MHz\n"); } ddr_set_rate(&dram_info, sdram_params, f2, f1, 2, 0, 1);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
- if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f3); printascii("MHz\n"); } ddr_set_rate(&dram_info, sdram_params, f3, f2, 3, 1, 1);
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
- if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) { printascii("change to: "); printdec(f0); printascii("MHz(final freq)\n");
@@ -3493,7 +3493,7 @@ static int rv1126_dmc_init(struct udevice *dev) save_rw_trn_result_to_ddr(&rw_trn_result); #endif
- if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG))
if (CONFIG_IS_ENABLED(RAM_ROCKCHIP_DEBUG)) printascii("out\n");
return ret;

Hi Kever, Lukasz,
On 9/10/24 5:17 PM, Łukasz Czechowski wrote:
Hi Kever, Thanks for the review. This patch is indeed intended to disallow enabling RAM_ROCKCHIP_DEBUG when SILENT_CONSOLE is enabled and control what is printed on the debug console more independently. Patch was created in response to review of patchset v1, and implements change suggested by Quentin Schulz quentin.schulz@cherry.de. The additional complexity with new TPL/SPL symbols had been added because we couldn't simply add i.e. `depends on !TPL_SILENT_CONSOLE if TPL` and `depends on !SPL_SILENT_CONSOLE if SPL`. @Quentin, is it fine with you that we can drop this change?
Best regards, Lukasz
@Lukasz, please use interleaved style instead of top posting.
c.f. https://www.kernel.org/doc/html/latest/process/submitting-patches.html#use-t... and https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
You also may want to look into your mail client as Kever's answer is now at the same level as your original patch instead of a quote within a quote making it harder to know who wrote what and when.
wt., 10 wrz 2024 o 11:51 Kever Yang kever.yang@rock-chips.com napisał(a):
Hi Lukasz,
On 2024/9/4 00:38, Lukasz Czechowski wrote:
Introduce new config symbols TPL_RAM_ROCKCHIP_DEBUG and SPL_RAM_ROCKCHIP_DEBUG to allow for better dependencies control of RAM driver debugging configuration.
The RAM_ROCKCHIP_DEBUG should enough because this only happen when ram driver
running the initialization, and this init process always only run only once for all SoCs.
RAM_ROCKCHIP_DEBUG depends on DEBUG_UART is the correct and no need to add more
other dependency.
Add negative dependencies to TPL_SILENT_CONSOLE and SPL_SILENT_CONSOLE, respectively.
I believe this is he main target, you want to control the UART output by SILENT_CONTROL,
but the RAM_DEBUG should follow the DEBUG_UART.
So I think this patch is no need, please drop it.
I have this gut feeling we shouldn't drop this patch but I couldn't find anything that would either confirm or contradict this gut feeling in the hour I looked.
I assume one wouldn't enable DEBUG_UART when one wants a silent console in the first stage (TPL or SPL, whatever that is) which is usually where DRAM happens (that may change with VBE I believe? but we're not entirely there yet). So I guess the dependency on DEBUG_UART is actually "stronger" than a dependency on TPL/SPL_SILENT_CONSOLE and therefore we should be able to drop this patch.
Cheers, Quentin

Allow to disable serial console in TPL and SPL. Weak dependency to SPL_SERIAL and TPL_SERIAL is also used in other Rockchip boards.
Signed-off-by: Lukasz Czechowski lukasz.czechowski@thaumatec.com
Reviewed-by: Quentin Schulz quentin.schulz@cherry.de --- arch/arm/mach-rockchip/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index fc1b638ff01..47a6275d45f 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -11,8 +11,8 @@ config ROCKCHIP_PX30 select TPL_TINY_FRAMEWORK if TPL select TPL_NEEDS_SEPARATE_STACK if TPL imply SPL_SEPARATE_BSS - select SPL_SERIAL - select TPL_SERIAL + imply SPL_SERIAL + imply TPL_SERIAL select DEBUG_UART_BOARD_INIT imply ROCKCHIP_COMMON_BOARD imply SPL_ROCKCHIP_COMMON_BOARD

On 2024/9/4 00:38, Lukasz Czechowski wrote:
Allow to disable serial console in TPL and SPL. Weak dependency to SPL_SERIAL and TPL_SERIAL is also used in other Rockchip boards.
Signed-off-by: Lukasz Czechowski lukasz.czechowski@thaumatec.com
Reviewed-by: Quentin Schulz quentin.schulz@cherry.de
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
arch/arm/mach-rockchip/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index fc1b638ff01..47a6275d45f 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -11,8 +11,8 @@ config ROCKCHIP_PX30 select TPL_TINY_FRAMEWORK if TPL select TPL_NEEDS_SEPARATE_STACK if TPL imply SPL_SEPARATE_BSS
- select SPL_SERIAL
- select TPL_SERIAL
- imply SPL_SERIAL
- imply TPL_SERIAL select DEBUG_UART_BOARD_INIT imply ROCKCHIP_COMMON_BOARD imply SPL_ROCKCHIP_COMMON_BOARD

Because DEBUG_UART_BOARD_INIT depends on DEBUG_UART, hard dependency to DEBUG_UART_BOARD_INIT in ROCKCHIP_PX30 can cause warnings if DEBUG_UART is disabled. The DEBUG_UART_BOARD_INIT is already implied by ARCH_ROCKCHIP entry. Remove hard dependency from ROCKCHIP_PX30, so that it will be consistent with other rockchip boards.
Signed-off-by: Lukasz Czechowski lukasz.czechowski@thaumatec.com
Reviewed-by: Quentin Schulz quentin.schulz@cherry.de --- arch/arm/mach-rockchip/Kconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 47a6275d45f..c9aaf6d3476 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -13,7 +13,6 @@ config ROCKCHIP_PX30 imply SPL_SEPARATE_BSS imply SPL_SERIAL imply TPL_SERIAL - select DEBUG_UART_BOARD_INIT imply ROCKCHIP_COMMON_BOARD imply SPL_ROCKCHIP_COMMON_BOARD imply ARMV8_CRYPTO

On 2024/9/4 00:38, Lukasz Czechowski wrote:
Because DEBUG_UART_BOARD_INIT depends on DEBUG_UART, hard dependency to DEBUG_UART_BOARD_INIT in ROCKCHIP_PX30 can cause warnings if DEBUG_UART is disabled. The DEBUG_UART_BOARD_INIT is already implied by ARCH_ROCKCHIP entry. Remove hard dependency from ROCKCHIP_PX30, so that it will be consistent with other rockchip boards.
Signed-off-by: Lukasz Czechowski lukasz.czechowski@thaumatec.com
Reviewed-by: Quentin Schulz quentin.schulz@cherry.de
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
arch/arm/mach-rockchip/Kconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 47a6275d45f..c9aaf6d3476 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -13,7 +13,6 @@ config ROCKCHIP_PX30 imply SPL_SEPARATE_BSS imply SPL_SERIAL imply TPL_SERIAL
- select DEBUG_UART_BOARD_INIT imply ROCKCHIP_COMMON_BOARD imply SPL_ROCKCHIP_COMMON_BOARD imply ARMV8_CRYPTO
participants (4)
-
Kever Yang
-
Lukasz Czechowski
-
Quentin Schulz
-
Łukasz Czechowski