Skip to contentSkip to conversation

rockchip: move ROCKCHIP_STIMER_BASE to Kconfig

PATCH Superseded Johan Jonker 2 participants 2 messages Dec 29, 2021

Subsystems (3)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rockchip: move ROCKCHIP_STIMER_BASE to Kconfig

Move ROCKCHIP_STIMER_BASE to Kconfig.

---
 arch/arm/mach-rockchip/Kconfig        | 15 +++++++++++++++
 arch/arm/mach-rockchip/px30/Kconfig   |  3 +++
 arch/arm/mach-rockchip/rk3036/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3128/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk322x/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3288/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3308/Kconfig | 10 ++++++----
 arch/arm/mach-rockchip/rk3328/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3368/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3399/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3568/Kconfig |  3 +++
 include/configs/px30_common.h         |  1 -
 include/configs/rk3036_common.h       |  1 -
 include/configs/rk3128_common.h       |  1 -
 include/configs/rk322x_common.h       |  1 -
 include/configs/rk3288_common.h       |  1 -
 include/configs/rk3308_common.h       |  1 -
 include/configs/rk3328_common.h       |  1 -
 include/configs/rk3368_common.h       |  1 -
 include/configs/rk3399_common.h       |  1 -
 include/configs/rk3568_common.h       |  1 -
 21 files changed, 48 insertions(+), 14 deletions(-)
arch/arm/mach-rockchip/Kconfig +15 -0
index da6871eb..7fafb63d 100644
@@ -343,6 +343,21 @@ config ROCKCHIP_BOOT_MODE_REG
 	  The Soc will enter to different boot mode(defined in asm/arch-rockchip/boot_mode.h)
 	  according to the value from this register.
 
+config ROCKCHIP_STIMER_BASE
+	hex "Rockchip secure timer base address"
+	depends on (ROCKCHIP_PX30||   \
+		    ROCKCHIP_RK3036|| \
+		    ROCKCHIP_RK3128|| \
+		    ROCKCHIP_RK322X|| \
+		    ROCKCHIP_RK3288|| \
+		    ROCKCHIP_RK3308|| \
+		    ROCKCHIP_RK3328|| \
+		    ROCKCHIP_RK3368|| \
+		    ROCKCHIP_RK3399|| \
+		    ROCKCHIP_RK3568)
+	help
+	  Rockchip secure timer base address.
+
 config ROCKCHIP_SPL_RESERVE_IRAM
 	hex "Size of IRAM reserved in SPL"
 	default 0
arch/arm/mach-rockchip/px30/Kconfig +3 -0
index aa5cc471..42cc111b 100644
@@ -30,6 +30,9 @@ config TARGET_PX30_CORE
 config ROCKCHIP_BOOT_MODE_REG
 	default 0xff010200
 
+config ROCKCHIP_STIMER_BASE
+	default 0xff220020
+
 config SYS_SOC
 	default "px30"
 
arch/arm/mach-rockchip/rk3036/Kconfig +3 -0
index b746795d..111531be 100644
@@ -16,6 +16,9 @@ endchoice
 config ROCKCHIP_BOOT_MODE_REG
 	default 0x200081c8
 
+config ROCKCHIP_STIMER_BASE
+	default 0x200440a0
+
 config SYS_SOC
 	default "rk3036"
 
arch/arm/mach-rockchip/rk3128/Kconfig +3 -0
index b867401c..9cc494eb 100644
@@ -16,6 +16,9 @@ endchoice
 config ROCKCHIP_BOOT_MODE_REG
 	default 0x100a0038
 
+config ROCKCHIP_STIMER_BASE
+	default 0x200440a0
+
 config SYS_SOC
 	default "rk3128"
 
arch/arm/mach-rockchip/rk322x/Kconfig +3 -0
index 6458cd55..058f848d 100644
@@ -8,6 +8,9 @@ config TARGET_EVB_RK3229
 config ROCKCHIP_BOOT_MODE_REG
 	default 0x110005c8
 
+config ROCKCHIP_STIMER_BASE
+	default 0x110d0020
+
 config SYS_SOC
 	default "rk322x"
 
arch/arm/mach-rockchip/rk3288/Kconfig +3 -0
index f37b1bdf..dd8c7826 100644
@@ -148,6 +148,9 @@ config ROCKCHIP_FAST_SPL
 config ROCKCHIP_BOOT_MODE_REG
 	default 0xff730094
 
+config ROCKCHIP_STIMER_BASE
+	default 0xff810020
+
 config SYS_SOC
 	default "rk3288"
 
arch/arm/mach-rockchip/rk3308/Kconfig +6 -4
index 8fa536e1..194353e4 100644
@@ -8,6 +8,12 @@ config TARGET_ROC_RK3308_CC
        bool "Firefly roc-rk3308-cc"
 	select BOARD_LATE_INIT
 
+config ROCKCHIP_BOOT_MODE_REG
+	default 0xff000500
+
+config ROCKCHIP_STIMER_BASE
+	default 0xff1b00a0
+
 config SYS_SOC
 	default "rk3308"
 
@@ -17,10 +23,6 @@ config SYS_MALLOC_F_LEN
 config SPL_SERIAL
 	default y
 
-config ROCKCHIP_BOOT_MODE_REG
-	default 0xff000500
-
-
 source "board/rockchip/evb_rk3308/Kconfig"
 source "board/firefly/firefly-rk3308/Kconfig"
 
arch/arm/mach-rockchip/rk3328/Kconfig +3 -0
index d13a1690..f6f1e06a 100644
@@ -15,6 +15,9 @@ endchoice
 config ROCKCHIP_BOOT_MODE_REG
 	default 0xff1005c8
 
+config ROCKCHIP_STIMER_BASE
+	default 0xff1d0020
+
 config SYS_SOC
 	default "rk3328"
 
arch/arm/mach-rockchip/rk3368/Kconfig +3 -0
index 78eb96df..104db367 100644
@@ -45,6 +45,9 @@ endchoice
 config ROCKCHIP_BOOT_MODE_REG
 	default 0xff738200
 
+config ROCKCHIP_STIMER_BASE
+	default 0xff830020
+
 config SYS_SOC
 	default "rk3368"
 
arch/arm/mach-rockchip/rk3399/Kconfig +3 -0
index 17628f91..4bc15c1b 100644
@@ -114,6 +114,9 @@ endchoice
 config ROCKCHIP_BOOT_MODE_REG
 	default 0xff320300
 
+config ROCKCHIP_STIMER_BASE
+	default 0xff8680a0
+
 config SYS_SOC
 	default "rk3399"
 
arch/arm/mach-rockchip/rk3568/Kconfig +3 -0
index 201c63c2..4e7c02cc 100644
@@ -9,6 +9,9 @@ config TARGET_EVB_RK3568
 config ROCKCHIP_BOOT_MODE_REG
 	default 0xfdc20200
 
+config ROCKCHIP_STIMER_BASE
+	default 0xfdd1c020
+
 config SYS_SOC
 	default "rk3568"
 
include/configs/px30_common.h +0 -1
index 09923871..dc609013 100644
@@ -12,7 +12,6 @@
 
 #define CONFIG_SYS_NS16550_MEM32
 
-#define CONFIG_ROCKCHIP_STIMER_BASE	0xff220020
 #define COUNTER_FREQUENCY		24000000
 
 /* FIXME: ff020000 is pmu_mem (10k), while ff0e0000 is regular int_mem */
include/configs/rk3036_common.h +0 -1
index b133d8ec..10cba727 100644
@@ -10,7 +10,6 @@
 
 #define CONFIG_SYS_CBSIZE		1024
 
-#define CONFIG_ROCKCHIP_STIMER_BASE	0x200440a0
 #define COUNTER_FREQUENCY		24000000
 #define CONFIG_SYS_ARCH_TIMER
 #define CONFIG_SYS_HZ_CLOCK		24000000
include/configs/rk3128_common.h +0 -1
index 8b7a0bbb..71f66d57 100644
@@ -11,7 +11,6 @@
 #define CONFIG_SYS_MAXARGS		16
 #define CONFIG_SYS_CBSIZE		1024
 
-#define CONFIG_ROCKCHIP_STIMER_BASE	0x200440a0
 #define COUNTER_FREQUENCY		24000000
 #define CONFIG_SYS_ARCH_TIMER
 #define CONFIG_SYS_HZ_CLOCK		24000000
include/configs/rk322x_common.h +0 -1
index a46b1ffe..aff24018 100644
@@ -11,7 +11,6 @@
 #define CONFIG_SYS_CBSIZE		1024
 #define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/*  64M */
 
-#define CONFIG_ROCKCHIP_STIMER_BASE	0x110d0020
 #define COUNTER_FREQUENCY		24000000
 #define CONFIG_SYS_ARCH_TIMER
 #define CONFIG_SYS_HZ_CLOCK		24000000
include/configs/rk3288_common.h +0 -1
index abbb2739..c781bc7e 100644
@@ -13,7 +13,6 @@
 
 #define CONFIG_SYS_CBSIZE		1024
 
-#define CONFIG_ROCKCHIP_STIMER_BASE	0xff810020
 #define COUNTER_FREQUENCY		24000000
 #define CONFIG_SYS_ARCH_TIMER
 #define CONFIG_SYS_HZ_CLOCK		24000000
include/configs/rk3308_common.h +0 -1
index 496f4628..edc535fe 100644
@@ -16,7 +16,6 @@
 
 #define CONFIG_SYS_NS16550_MEM32
 
-#define CONFIG_ROCKCHIP_STIMER_BASE	0xff1b00a0
 #define CONFIG_IRAM_BASE		0xfff80000
 #define CONFIG_SYS_INIT_SP_ADDR		0x00800000
 #define CONFIG_SPL_STACK		0x00400000
include/configs/rk3328_common.h +0 -1
index c1e26a01..8a5f0c89 100644
@@ -10,7 +10,6 @@
 
 #define CONFIG_IRAM_BASE		0xff090000
 
-#define CONFIG_ROCKCHIP_STIMER_BASE    0xff1d0020
 #define COUNTER_FREQUENCY		24000000
 
 #define CONFIG_SYS_CBSIZE		1024
include/configs/rk3368_common.h +0 -1
index 8b239ca0..239296c1 100644
@@ -15,7 +15,6 @@
 #define SDRAM_MAX_SIZE			0xff000000
 #define CONFIG_SYS_CBSIZE		1024
 
-#define CONFIG_ROCKCHIP_STIMER_BASE	0xff830020
 #define COUNTER_FREQUENCY		24000000
 
 #define CONFIG_IRAM_BASE		0xff8c0000
include/configs/rk3399_common.h +0 -1
index ed72c8bb..4037dba5 100644
@@ -11,7 +11,6 @@
 #define CONFIG_SYS_CBSIZE		1024
 
 #define COUNTER_FREQUENCY               24000000
-#define CONFIG_ROCKCHIP_STIMER_BASE	0xff8680a0
 
 #define CONFIG_IRAM_BASE		0xff8c0000
 
include/configs/rk3568_common.h +0 -1
index afe5050e..705c3454 100644
@@ -11,7 +11,6 @@
 #define CONFIG_SYS_CBSIZE		1024
 
 #define COUNTER_FREQUENCY               24000000
-#define CONFIG_ROCKCHIP_STIMER_BASE	0xfdd1c020
 
 #define CONFIG_IRAM_BASE		0xfdcc0000
 
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Johan Jonker

Move ROCKCHIP_STIMER_BASE to Kconfig.

---
 arch/arm/mach-rockchip/Kconfig        | 15 +++++++++++++++
 arch/arm/mach-rockchip/px30/Kconfig   |  3 +++
 arch/arm/mach-rockchip/rk3036/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3128/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk322x/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3288/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3308/Kconfig | 10 ++++++----
 arch/arm/mach-rockchip/rk3328/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3368/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3399/Kconfig |  3 +++
 arch/arm/mach-rockchip/rk3568/Kconfig |  3 +++
 include/configs/px30_common.h         |  1 -
 include/configs/rk3036_common.h       |  1 -
 include/configs/rk3128_common.h       |  1 -
Quoted 8 lines
 include/configs/rk322x_common.h       |  1 -
 include/configs/rk3288_common.h       |  1 -
 include/configs/rk3308_common.h       |  1 -
 include/configs/rk3328_common.h       |  1 -
 include/configs/rk3368_common.h       |  1 -
 include/configs/rk3399_common.h       |  1 -
 include/configs/rk3568_common.h       |  1 -
 21 files changed, 48 insertions(+), 14 deletions(-)