From 0f90b1e715f8abe41b0875752eb184f46032ff11 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 9 Feb 2026 09:30:18 +0800 Subject: treewide: Clean up DECLARE_GLOBAL_DATA_PTR usage Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h. Headers should be included directly by the files that need them, rather than indirectly via global_data.h. Reviewed-by: Patrice Chotard #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal #TI boards Acked-by: Yao Zi #TH1520 Signed-off-by: Peng Fan --- drivers/timer/ostm_timer.c | 3 --- drivers/timer/sp804_timer.c | 3 --- 2 files changed, 6 deletions(-) (limited to 'drivers/timer') diff --git a/drivers/timer/ostm_timer.c b/drivers/timer/ostm_timer.c index 314f956cdfb..3841d3c90d0 100644 --- a/drivers/timer/ostm_timer.c +++ b/drivers/timer/ostm_timer.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include @@ -22,8 +21,6 @@ #define OSTM_CTL 0x20 #define OSTM_CTL_D BIT(1) -DECLARE_GLOBAL_DATA_PTR; - struct ostm_priv { fdt_addr_t regs; }; diff --git a/drivers/timer/sp804_timer.c b/drivers/timer/sp804_timer.c index 3e57f4b98ba..05532e3330c 100644 --- a/drivers/timer/sp804_timer.c +++ b/drivers/timer/sp804_timer.c @@ -8,15 +8,12 @@ #include #include #include -#include #include #include #include #include #include -DECLARE_GLOBAL_DATA_PTR; - #define SP804_TIMERX_LOAD 0x00 #define SP804_TIMERX_VALUE 0x04 #define SP804_TIMERX_CONTROL 0x08 -- cgit v1.3.1 From c54a0a8ed901eff9e3e458dd3cc49da565753357 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 16 Mar 2026 19:24:46 -0600 Subject: timer: Correct Kconfig entry for XILINX_TIMER As exposed by "make randconfig", we have an issue with the dependencies for XILINX_TIMER. This symbol is a case where we have one that covers both main U-Boot and SPL. In this case, we need to select SPL_REGMAP not when SPL is enabled but rather when SPL_TIMER is enabled (and in turn, SPL_DM). Signed-off-by: Tom Rini Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/20260317012446.4162630-1-trini@konsulko.com --- drivers/timer/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/timer') diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig index a84a0dc0539..9ffda4aca86 100644 --- a/drivers/timer/Kconfig +++ b/drivers/timer/Kconfig @@ -328,7 +328,7 @@ config XILINX_TIMER bool "Xilinx timer support" depends on TIMER select REGMAP - select SPL_REGMAP if SPL + select SPL_REGMAP if SPL_TIMER help Select this to enable support for the timer found on any Xilinx boards (axi timer). -- cgit v1.3.1 From 5c4357e902674a87182b1652739062040f7a6450 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 16 Mar 2026 19:24:44 -0600 Subject: timer: Correct dependencies for SPL_TIMER As exposed by "make randconfig", we have an issue with the dependencies for SPL_TIMER. This depends not just on SPL but also SPL_DM to function, so add that. Signed-off-by: Tom Rini --- drivers/timer/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/timer') diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig index 9ffda4aca86..500a25638a9 100644 --- a/drivers/timer/Kconfig +++ b/drivers/timer/Kconfig @@ -11,7 +11,7 @@ config TIMER config SPL_TIMER bool "Enable driver model for timer drivers in SPL" - depends on TIMER && SPL + depends on TIMER && SPL && SPL_DM help Enable support for timer drivers in SPL. These can be used to get a timer value when in SPL, or perhaps for implementing a delay -- cgit v1.3.1