GNU Linux-libre 4.14.290-gnu1
[releases.git] / arch / nios2 / platform / Kconfig.platform
1 menu "Platform options"
2
3 comment "Memory settings"
4
5 config NIOS2_MEM_BASE
6         hex "Memory base address"
7         default "0x00000000"
8         help
9           This is the physical address of the memory that the kernel will run
10           from. This address is used to link the kernel and setup initial memory
11           management. You should take the raw memory address without any MMU
12           or cache bits set.
13           Please not that this address is used directly so you have to manually
14           do address translation if it's connected to a bridge.
15
16 comment "Device tree"
17
18 config NIOS2_DTB_AT_PHYS_ADDR
19         bool "DTB at physical address"
20         default n
21         help
22           When enabled you can select a physical address to load the dtb from.
23           Normally this address is passed by a bootloader such as u-boot but
24           using this you can use a devicetree without a bootloader.
25           This way you can store a devicetree in NOR flash or an onchip rom.
26           Please note that this address is used directly so you have to manually
27           do address translation if it's connected to a bridge. Also take into
28           account that when using an MMU you'd have to ad 0xC0000000 to your
29           address
30
31 config NIOS2_DTB_PHYS_ADDR
32         hex "DTB Address"
33         depends on NIOS2_DTB_AT_PHYS_ADDR
34         default "0xC0000000"
35         help
36           Physical address of a dtb blob.
37
38 config NIOS2_DTB_SOURCE_BOOL
39         bool "Compile and link device tree into kernel image"
40         depends on !COMPILE_TEST
41         default n
42         help
43           This allows you to specify a dts (device tree source) file
44           which will be compiled and linked into the kernel image.
45
46 config NIOS2_DTB_SOURCE
47         string "Device tree source file"
48         depends on NIOS2_DTB_SOURCE_BOOL
49         default ""
50         help
51           Absolute path to the device tree source (dts) file describing your
52           system.
53
54 comment "Nios II instructions"
55
56 config NIOS2_ARCH_REVISION
57         int "Select Nios II architecture revision"
58         range 1 2
59         default 1
60         help
61           Select between Nios II R1 and Nios II R2 . The architectures
62           are binary incompatible. Default is R1 .
63
64 config NIOS2_HW_MUL_SUPPORT
65         bool "Enable MUL instruction"
66         default n
67         help
68           Set to true if you configured the Nios II to include the MUL
69           instruction.  This will enable the -mhw-mul compiler flag.
70
71 config NIOS2_HW_MULX_SUPPORT
72         bool "Enable MULX instruction"
73         default n
74         help
75           Set to true if you configured the Nios II to include the MULX
76           instruction.  Enables the -mhw-mulx compiler flag.
77
78 config NIOS2_HW_DIV_SUPPORT
79         bool "Enable DIV instruction"
80         default n
81         help
82           Set to true if you configured the Nios II to include the DIV
83           instruction.  Enables the -mhw-div compiler flag.
84
85 config NIOS2_BMX_SUPPORT
86         bool "Enable BMX instructions"
87         depends on NIOS2_ARCH_REVISION = 2
88         default n
89         help
90           Set to true if you configured the Nios II R2 to include
91           the BMX Bit Manipulation Extension instructions. Enables
92           the -mbmx compiler flag.
93
94 config NIOS2_CDX_SUPPORT
95         bool "Enable CDX instructions"
96         depends on NIOS2_ARCH_REVISION = 2
97         default n
98         help
99           Set to true if you configured the Nios II R2 to include
100           the CDX Bit Manipulation Extension instructions. Enables
101           the -mcdx compiler flag.
102
103 config NIOS2_FPU_SUPPORT
104         bool "Custom floating point instr support"
105         default n
106         help
107           Enables the -mcustom-fpu-cfg=60-1 compiler flag.
108
109 config NIOS2_CI_SWAB_SUPPORT
110         bool "Byteswap custom instruction"
111         default n
112         help
113           Use the byteswap (endian converter) Nios II custom instruction provided
114           by Altera and which can be enabled in QSYS builder. This accelerates
115           endian conversions in the kernel (e.g. ntohs).
116
117 config NIOS2_CI_SWAB_NO
118         int "Byteswap custom instruction number" if NIOS2_CI_SWAB_SUPPORT
119         default 0
120         help
121           Number of the instruction as configured in QSYS Builder.
122
123 comment "Cache settings"
124
125 config CUSTOM_CACHE_SETTINGS
126         bool "Custom cache settings"
127         help
128           This option allows you to tweak the cache settings used during early
129           boot (where the information from device tree is not yet available).
130           There should be no reason to change these values. Linux will work
131           perfectly fine, even if the Nios II is configured with smaller caches.
132
133           Say N here unless you know what you are doing.
134
135 config NIOS2_DCACHE_SIZE
136         hex "D-Cache size" if CUSTOM_CACHE_SETTINGS
137         range 0x200 0x10000
138         default "0x800"
139         help
140           Maximum possible data cache size.
141
142 config NIOS2_DCACHE_LINE_SIZE
143         hex "D-Cache line size" if CUSTOM_CACHE_SETTINGS
144         range 0x10 0x20
145         default "0x20"
146         help
147           Minimum possible data cache line size.
148
149 config NIOS2_ICACHE_SIZE
150         hex "I-Cache size" if CUSTOM_CACHE_SETTINGS
151         range 0x200 0x10000
152         default "0x1000"
153         help
154           Maximum possible instruction cache size.
155
156 endmenu