config LNX_KRNL_IMG_TEXT_OFFSET_BASE
default TEXT_BASE
+config ROCKCHIP_COMMON_STACK_ADDR
+ bool
+ depends on SPL_SHARES_INIT_SP_ADDR
+ select HAS_CUSTOM_SYS_INIT_SP_ADDR
+ imply SPL_LIBCOMMON_SUPPORT if SPL
+ imply SPL_LIBGENERIC_SUPPORT if SPL
+ imply SPL_ROCKCHIP_COMMON_BOARD if SPL
+ imply SPL_SYS_MALLOC_F if SPL
+ imply SPL_SYS_MALLOC_SIMPLE if SPL
+ imply TPL_LIBCOMMON_SUPPORT if TPL
+ imply TPL_LIBGENERIC_SUPPORT if TPL
+ imply TPL_ROCKCHIP_COMMON_BOARD if TPL
+ imply TPL_SYS_MALLOC_F if TPL
+ imply TPL_SYS_MALLOC_SIMPLE if TPL
+
source "arch/arm/mach-rockchip/px30/Kconfig"
source "arch/arm/mach-rockchip/rk3036/Kconfig"
source "arch/arm/mach-rockchip/rk3066/Kconfig"
source "arch/arm/mach-rockchip/rk3588/Kconfig"
source "arch/arm/mach-rockchip/rv1108/Kconfig"
source "arch/arm/mach-rockchip/rv1126/Kconfig"
+
+if ROCKCHIP_COMMON_STACK_ADDR && SPL_SHARES_INIT_SP_ADDR
+
+config CUSTOM_SYS_INIT_SP_ADDR
+ default 0x3f00000
+
+config SYS_MALLOC_F_LEN
+ default 0x10000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
+
+config SPL_SYS_MALLOC_F_LEN
+ default 0x8000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
+
+config TPL_SYS_MALLOC_F_LEN
+ default 0x4000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
+
+config TEXT_BASE
+ default 0x00200000 if ARM64
+
+config SPL_TEXT_BASE
+ default 0x0 if ARM64
+
+config SPL_HAS_BSS_LINKER_SECTION
+ default y if ARM64
+
+config SPL_BSS_START_ADDR
+ default 0x3f80000
+
+config SPL_BSS_MAX_SIZE
+ default 0x8000 if SPL_BSS_START_ADDR = 0x3f80000
+
+config SPL_STACK_R
+ default y if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
+
+config SPL_STACK_R_ADDR
+ default 0x3e00000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
+
+config SPL_STACK_R_MALLOC_SIMPLE_LEN
+ default 0x200000 if SPL_STACK_R_ADDR = 0x3e00000
+
+endif
endif