if ARCH_SSTAR

menu "SigmaStar arch features support"
	depends on ARCH_SSTAR

choice
	prompt "Specify SigmaStar SoC"
	default SSTAR_INFINITY7
	help
	   Select which SigmaStar SoC support

config SSTAR_MERCURY6P
	bool "SigmaStar mercury6p"
	select CPU_V7A

config SSTAR_INFINITY7
	bool "SigmaStar infinity7"
	select ARM64
endchoice

config SSTAR_BOOTING_PERF
	bool "booting time"
	default y

config SSTAR_VERSION_FPGA
	bool "FPGA version"
	default n

config SSTAR_VERSION_PZ1
	bool "Palladium version"
	default n
	help
	  This will disable some board settings.
	  And it will enable the system DCache to speed up kernel loading.

config SSTAR_BUILTIN_KERNEL_DTB
	bool "SigmaStar built-in dtb support"
	default y
	help
	  When Kernel use SigmaStar built-in dtb, uboot should pass
	  atags instead fdt to kernel from x0.

config SSTAR_KERNEL_ADDR_OFFSET
	hex "Address offset between kernel and uboot"
	default 0x0
	help
	  In some special cases, such as infinity7 we load kernel/fdt/initrd at
	  address base 0x20000000 but jump address base 0x1000000000 to start
	  kernel(those starting addr are mapped to same physical address).
	  uImage and android bootimage header only support spcify 32-bit wide
	  address for kernel&fdt&initrd. enable this config to support add
	  offset to those addr. use this config, must set env initrd_high and
	  fdt_high to -1UL to avoid initrd/fdt reloacate.

config SSTAR_DISABLE_FIXUP_DTB_MEMORY_NODE
	bool "disable fixup 'memory' node"
	default n
	help
	  Before cmd boot<i|z|m> jump Linux will fixup memory node, set the
	  memory node to the DRAM range used by uboot. enable this config to
	  disable this feature.

choice
	prompt "RAM chip size"
	default SSTAR_RAM_SIZE_64MB
	help
	  Select the size of the RAM.

config SSTAR_RAM_SIZE_16MB
	bool "16 MB"
	help
	  Choose this option if you have a 16 MB RAM chip.

config SSTAR_RAM_SIZE_48MB
	bool "48 MB"
	help
	  Choose this option if you have a 48 MB RAM chip.

config SSTAR_RAM_SIZE_64MB
	bool "64 MB"
	help
	  Choose this option if you have a 64 MB RAM chip.

config SSTAR_RAM_SIZE_128MB
	bool "128 MB"
	help
	  Choose this option if you have a 128 MB RAM chip.

config SSTAR_RAM_SIZE_256MB
	bool "256 MB"
	help
	  Choose this option if you have a 256 MB RAM chip.

config SSTAR_RAM_SIZE_2G
	bool "2 GB"
	help
	  Choose this option if you have a 2 GB RAM chip.
endchoice

config SSTAR_RAM_SIZE
	hex
	default 0x01000000 if SSTAR_RAM_SIZE_16MB
	default 0x03000000 if SSTAR_RAM_SIZE_46MB
	default 0x04000000 if SSTAR_RAM_SIZE_64MB
	default 0x08000000 if SSTAR_RAM_SIZE_128MB
	default 0x10000000 if SSTAR_RAM_SIZE_256MB
	default 0x80000000 if SSTAR_RAM_SIZE_2G

config SSTAR_LOAD_ADDR
	hex
	default 0x20D00000 if SSTAR_RAM_SIZE_16MB && SSTAR_DISABLE_CODE_RELOC
	default 0x22D00000 if SSTAR_RAM_SIZE_46MB && SSTAR_DISABLE_CODE_RELOC
	default 0x23D00000 if SSTAR_RAM_SIZE_64MB && SSTAR_DISABLE_CODE_RELOC
	default 0x27D00000 if SSTAR_RAM_SIZE_128MB && SSTAR_DISABLE_CODE_RELOC
	default 0x2FD00000 if SSTAR_RAM_SIZE_256MB && SSTAR_DISABLE_CODE_RELOC
	default 0x93D00000 if SSTAR_RAM_SIZE_2G && SSTAR_DISABLE_CODE_RELOC
	default 0x23D00000

config SSTAR_RUN_ADDR
	hex
	default 0x20E00000 if SSTAR_RAM_SIZE_16MB && SSTAR_DISABLE_CODE_RELOC
	default 0x22E00000 if SSTAR_RAM_SIZE_46MB && SSTAR_DISABLE_CODE_RELOC
	default 0x23E00000 if SSTAR_RAM_SIZE_64MB && SSTAR_DISABLE_CODE_RELOC
	default 0x27E00000 if SSTAR_RAM_SIZE_128MB && SSTAR_DISABLE_CODE_RELOC
	default 0x2FE00000 if SSTAR_RAM_SIZE_256MB && SSTAR_DISABLE_CODE_RELOC
	default 0x93E00000 if SSTAR_RAM_SIZE_2G && SSTAR_DISABLE_CODE_RELOC
	default 0x23E00000

config SSTAR_USE_TOOLCHAIN_DEFAULT_FLOAT_ABI
	bool "Use toolchain default float ABI"
	default n
	help
	  Enable uboot to use the same float ABI as toolchain

config SSTAR_64BIT_KERNEL_ENTRY
	bool "bootm support 64-bit wide ep"
	default n
	help
	  by defalut, bootm only support parse image header
	  with 32-bit wide kernel entry address,
	  use this feature to support64-bit wide entry.

config SSTAR_DISABLE_CODE_RELOC
	bool "disable code relocate at board_init_f"
	default y
	help
	  Support uboot keep stay at TEXT_START, no
	  been relocate boot flow

source "arch/arm/mach-sstar/mercury6p/Kconfig"
source "arch/arm/mach-sstar/infinity7/Kconfig"

endmenu
endif
