18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_cimenu "Platform options"
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_cicomment "Memory settings"
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciconfig NIOS2_MEM_BASE
78c2ecf20Sopenharmony_ci	hex "Memory base address"
88c2ecf20Sopenharmony_ci	default "0x00000000"
98c2ecf20Sopenharmony_ci	help
108c2ecf20Sopenharmony_ci	  This is the physical address of the memory that the kernel will run
118c2ecf20Sopenharmony_ci	  from. This address is used to link the kernel and setup initial memory
128c2ecf20Sopenharmony_ci	  management. You should take the raw memory address without any MMU
138c2ecf20Sopenharmony_ci	  or cache bits set.
148c2ecf20Sopenharmony_ci	  Please not that this address is used directly so you have to manually
158c2ecf20Sopenharmony_ci	  do address translation if it's connected to a bridge.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_cicomment "Device tree"
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciconfig NIOS2_DTB_AT_PHYS_ADDR
208c2ecf20Sopenharmony_ci	bool "DTB at physical address"
218c2ecf20Sopenharmony_ci	help
228c2ecf20Sopenharmony_ci	  When enabled you can select a physical address to load the dtb from.
238c2ecf20Sopenharmony_ci	  Normally this address is passed by a bootloader such as u-boot but
248c2ecf20Sopenharmony_ci	  using this you can use a devicetree without a bootloader.
258c2ecf20Sopenharmony_ci	  This way you can store a devicetree in NOR flash or an onchip rom.
268c2ecf20Sopenharmony_ci	  Please note that this address is used directly so you have to manually
278c2ecf20Sopenharmony_ci	  do address translation if it's connected to a bridge. Also take into
288c2ecf20Sopenharmony_ci	  account that when using an MMU you'd have to ad 0xC0000000 to your
298c2ecf20Sopenharmony_ci	  address
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciconfig NIOS2_DTB_PHYS_ADDR
328c2ecf20Sopenharmony_ci	hex "DTB Address"
338c2ecf20Sopenharmony_ci	depends on NIOS2_DTB_AT_PHYS_ADDR
348c2ecf20Sopenharmony_ci	default "0xC0000000"
358c2ecf20Sopenharmony_ci	help
368c2ecf20Sopenharmony_ci	  Physical address of a dtb blob.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciconfig NIOS2_DTB_SOURCE_BOOL
398c2ecf20Sopenharmony_ci	bool "Compile and link device tree into kernel image"
408c2ecf20Sopenharmony_ci	depends on !COMPILE_TEST
418c2ecf20Sopenharmony_ci	help
428c2ecf20Sopenharmony_ci	  This allows you to specify a dts (device tree source) file
438c2ecf20Sopenharmony_ci	  which will be compiled and linked into the kernel image.
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ciconfig NIOS2_DTB_SOURCE
468c2ecf20Sopenharmony_ci	string "Device tree source file"
478c2ecf20Sopenharmony_ci	depends on NIOS2_DTB_SOURCE_BOOL
488c2ecf20Sopenharmony_ci	default ""
498c2ecf20Sopenharmony_ci	help
508c2ecf20Sopenharmony_ci	  Absolute path to the device tree source (dts) file describing your
518c2ecf20Sopenharmony_ci	  system.
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_cicomment "Nios II instructions"
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ciconfig NIOS2_ARCH_REVISION
568c2ecf20Sopenharmony_ci	int "Select Nios II architecture revision"
578c2ecf20Sopenharmony_ci	range 1 2
588c2ecf20Sopenharmony_ci	default 1
598c2ecf20Sopenharmony_ci	help
608c2ecf20Sopenharmony_ci	  Select between Nios II R1 and Nios II R2 . The architectures
618c2ecf20Sopenharmony_ci	  are binary incompatible. Default is R1 .
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ciconfig NIOS2_HW_MUL_SUPPORT
648c2ecf20Sopenharmony_ci	bool "Enable MUL instruction"
658c2ecf20Sopenharmony_ci	help
668c2ecf20Sopenharmony_ci	  Set to true if you configured the Nios II to include the MUL
678c2ecf20Sopenharmony_ci	  instruction.  This will enable the -mhw-mul compiler flag.
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ciconfig NIOS2_HW_MULX_SUPPORT
708c2ecf20Sopenharmony_ci	bool "Enable MULX instruction"
718c2ecf20Sopenharmony_ci	help
728c2ecf20Sopenharmony_ci	  Set to true if you configured the Nios II to include the MULX
738c2ecf20Sopenharmony_ci	  instruction.  Enables the -mhw-mulx compiler flag.
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ciconfig NIOS2_HW_DIV_SUPPORT
768c2ecf20Sopenharmony_ci	bool "Enable DIV instruction"
778c2ecf20Sopenharmony_ci	help
788c2ecf20Sopenharmony_ci	  Set to true if you configured the Nios II to include the DIV
798c2ecf20Sopenharmony_ci	  instruction.  Enables the -mhw-div compiler flag.
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ciconfig NIOS2_BMX_SUPPORT
828c2ecf20Sopenharmony_ci	bool "Enable BMX instructions"
838c2ecf20Sopenharmony_ci	depends on NIOS2_ARCH_REVISION = 2
848c2ecf20Sopenharmony_ci	help
858c2ecf20Sopenharmony_ci	  Set to true if you configured the Nios II R2 to include
868c2ecf20Sopenharmony_ci	  the BMX Bit Manipulation Extension instructions. Enables
878c2ecf20Sopenharmony_ci	  the -mbmx compiler flag.
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ciconfig NIOS2_CDX_SUPPORT
908c2ecf20Sopenharmony_ci	bool "Enable CDX instructions"
918c2ecf20Sopenharmony_ci	depends on NIOS2_ARCH_REVISION = 2
928c2ecf20Sopenharmony_ci	help
938c2ecf20Sopenharmony_ci	  Set to true if you configured the Nios II R2 to include
948c2ecf20Sopenharmony_ci	  the CDX Bit Manipulation Extension instructions. Enables
958c2ecf20Sopenharmony_ci	  the -mcdx compiler flag.
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ciconfig NIOS2_FPU_SUPPORT
988c2ecf20Sopenharmony_ci	bool "Custom floating point instr support"
998c2ecf20Sopenharmony_ci	help
1008c2ecf20Sopenharmony_ci	  Enables the -mcustom-fpu-cfg=60-1 compiler flag.
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ciconfig NIOS2_CI_SWAB_SUPPORT
1038c2ecf20Sopenharmony_ci	bool "Byteswap custom instruction"
1048c2ecf20Sopenharmony_ci	help
1058c2ecf20Sopenharmony_ci	  Use the byteswap (endian converter) Nios II custom instruction provided
1068c2ecf20Sopenharmony_ci	  by Altera and which can be enabled in QSYS builder. This accelerates
1078c2ecf20Sopenharmony_ci	  endian conversions in the kernel (e.g. ntohs).
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ciconfig NIOS2_CI_SWAB_NO
1108c2ecf20Sopenharmony_ci	int "Byteswap custom instruction number" if NIOS2_CI_SWAB_SUPPORT
1118c2ecf20Sopenharmony_ci	default 0
1128c2ecf20Sopenharmony_ci	help
1138c2ecf20Sopenharmony_ci	  Number of the instruction as configured in QSYS Builder.
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_cicomment "Cache settings"
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ciconfig CUSTOM_CACHE_SETTINGS
1188c2ecf20Sopenharmony_ci	bool "Custom cache settings"
1198c2ecf20Sopenharmony_ci	help
1208c2ecf20Sopenharmony_ci	  This option allows you to tweak the cache settings used during early
1218c2ecf20Sopenharmony_ci	  boot (where the information from device tree is not yet available).
1228c2ecf20Sopenharmony_ci	  There should be no reason to change these values. Linux will work
1238c2ecf20Sopenharmony_ci	  perfectly fine, even if the Nios II is configured with smaller caches.
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ci	  Say N here unless you know what you are doing.
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ciconfig NIOS2_DCACHE_SIZE
1288c2ecf20Sopenharmony_ci	hex "D-Cache size" if CUSTOM_CACHE_SETTINGS
1298c2ecf20Sopenharmony_ci	range 0x200 0x10000
1308c2ecf20Sopenharmony_ci	default "0x800"
1318c2ecf20Sopenharmony_ci	help
1328c2ecf20Sopenharmony_ci	  Maximum possible data cache size.
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ciconfig NIOS2_DCACHE_LINE_SIZE
1358c2ecf20Sopenharmony_ci	hex "D-Cache line size" if CUSTOM_CACHE_SETTINGS
1368c2ecf20Sopenharmony_ci	range 0x10 0x20
1378c2ecf20Sopenharmony_ci	default "0x20"
1388c2ecf20Sopenharmony_ci	help
1398c2ecf20Sopenharmony_ci	  Minimum possible data cache line size.
1408c2ecf20Sopenharmony_ci
1418c2ecf20Sopenharmony_ciconfig NIOS2_ICACHE_SIZE
1428c2ecf20Sopenharmony_ci	hex "I-Cache size" if CUSTOM_CACHE_SETTINGS
1438c2ecf20Sopenharmony_ci	range 0x200 0x10000
1448c2ecf20Sopenharmony_ci	default "0x1000"
1458c2ecf20Sopenharmony_ci	help
1468c2ecf20Sopenharmony_ci	  Maximum possible instruction cache size.
1478c2ecf20Sopenharmony_ci
1488c2ecf20Sopenharmony_ciendmenu
149