1 # SPDX-License-Identifier: GPL-2.0
4 select ARCH_32BIT_OFF_T
5 select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM && MMU
6 select ARCH_ENABLE_MEMORY_HOTREMOVE if SPARSEMEM && MMU
7 select ARCH_HAVE_CUSTOM_GPIO_H
8 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
9 select ARCH_HAS_BINFMT_FLAT if !MMU
10 select ARCH_HAS_GIGANTIC_PAGE
11 select ARCH_HAS_GCOV_PROFILE_ALL
12 select ARCH_HAS_PTE_SPECIAL
13 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
14 select ARCH_HIBERNATION_POSSIBLE if MMU
15 select ARCH_MIGHT_HAVE_PC_PARPORT
16 select ARCH_WANT_IPC_PARSE_VERSION
17 select CPU_NO_EFFICIENT_FFS
18 select DMA_DECLARE_COHERENT
19 select GENERIC_ATOMIC64
20 select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
21 select GENERIC_IDLE_POLL_SETUP
22 select GENERIC_IRQ_SHOW
23 select GENERIC_PCI_IOMAP if PCI
24 select GENERIC_SCHED_CLOCK
25 select GENERIC_STRNCPY_FROM_USER
26 select GENERIC_STRNLEN_USER
27 select GENERIC_SMP_IDLE_THREAD
28 select GUP_GET_PTE_LOW_HIGH if X2TLB
29 select HAVE_ARCH_AUDITSYSCALL
31 select HAVE_ARCH_SECCOMP_FILTER
32 select HAVE_ARCH_TRACEHOOK
33 select HAVE_DEBUG_BUGVERBOSE
34 select HAVE_DEBUG_KMEMLEAK
35 select HAVE_DYNAMIC_FTRACE
36 select HAVE_FAST_GUP if MMU
37 select HAVE_FUNCTION_GRAPH_TRACER
38 select HAVE_FUNCTION_TRACER
39 select HAVE_FUTEX_CMPXCHG if FUTEX
40 select HAVE_FTRACE_MCOUNT_RECORD
41 select HAVE_HW_BREAKPOINT
42 select HAVE_IDE if HAS_IOPORT_MAP
43 select HAVE_IOREMAP_PROT if MMU && !X2TLB
44 select HAVE_KERNEL_BZIP2
45 select HAVE_KERNEL_GZIP
46 select HAVE_KERNEL_LZMA
47 select HAVE_KERNEL_LZO
50 select HAVE_KRETPROBES
51 select HAVE_MIXED_BREAKPOINTS_REGS
52 select HAVE_MOD_ARCH_SPECIFIC if DWARF_UNWINDER
54 select HAVE_PATA_PLATFORM
55 select HAVE_PERF_EVENTS
56 select HAVE_REGS_AND_STACK_ACCESS_API
58 select HAVE_SOFTIRQ_ON_OWN_STACK if IRQSTACKS
59 select HAVE_STACKPROTECTOR
60 select HAVE_SYSCALL_TRACEPOINTS
61 select IRQ_FORCED_THREADING
62 select MAY_HAVE_SPARSE_IRQ
63 select MODULES_USE_ELF_RELA
64 select NEED_SG_DMA_LENGTH
65 select NO_DMA if !MMU && !DMA_COHERENT
66 select NO_GENERIC_PCI_IOPORT_MAP if PCI
69 select PCI_DOMAINS if PCI
71 select PERF_USE_VMALLOC
76 The SuperH is a RISC processor targeted for use in embedded systems
77 and consumer electronics; it was also used in the Sega Dreamcast
78 gaming console. The SuperH port has a home page at
79 <http://www.linux-sh.org/>.
85 config GENERIC_HWEIGHT
88 config GENERIC_CALIBRATE_DELAY
91 config GENERIC_LOCKBREAK
93 depends on SMP && PREEMPTION
95 config ARCH_SUSPEND_POSSIBLE
98 config ARCH_HIBERNATION_POSSIBLE
101 config SYS_SUPPORTS_APM_EMULATION
103 select ARCH_SUSPEND_POSSIBLE
105 config SYS_SUPPORTS_SMP
108 config SYS_SUPPORTS_NUMA
111 config STACKTRACE_SUPPORT
114 config LOCKDEP_SUPPORT
117 config ARCH_HAS_ILOG2_U32
120 config ARCH_HAS_ILOG2_U64
125 depends on !SH_SH4202_MICRODEV && !SH_SHMIN && !SH_HP6XX && \
137 config DMA_NONCOHERENT
138 def_bool !NO_DMA && !DMA_COHERENT
139 select ARCH_HAS_DMA_PREP_COHERENT
140 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
141 select DMA_DIRECT_REMAP
143 config PGTABLE_LEVELS
159 select UNCACHED_MAPPING
165 select OF_EARLY_FLATTREE
169 select CPU_HAS_INTEVT
172 select SYS_SUPPORTS_SH_TMU
176 select ARCH_SUPPORTS_HUGETLBFS if MMU
177 select CPU_HAS_INTEVT
179 select CPU_HAS_FPU if !CPU_SH4AL_DSP
181 select SYS_SUPPORTS_SH_TMU
198 select SYS_SUPPORTS_SMP
199 select SYS_SUPPORTS_NUMA
203 select ARCH_SUSPEND_POSSIBLE
207 depends on CPU_SH4 || CPU_SH4A
212 prompt "Processor sub-type selection"
218 # SH-2 Processor Support
220 config CPU_SUBTYPE_SH7619
221 bool "Support SH7619 processor"
223 select SYS_SUPPORTS_SH_CMT
225 config CPU_SUBTYPE_J2
226 bool "Support J2 processor"
228 select SYS_SUPPORTS_SMP
229 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
231 # SH-2A Processor Support
233 config CPU_SUBTYPE_SH7201
234 bool "Support SH7201 processor"
237 select SYS_SUPPORTS_SH_MTU2
239 config CPU_SUBTYPE_SH7203
240 bool "Support SH7203 processor"
243 select SYS_SUPPORTS_SH_CMT
244 select SYS_SUPPORTS_SH_MTU2
247 config CPU_SUBTYPE_SH7206
248 bool "Support SH7206 processor"
250 select SYS_SUPPORTS_SH_CMT
251 select SYS_SUPPORTS_SH_MTU2
253 config CPU_SUBTYPE_SH7263
254 bool "Support SH7263 processor"
257 select SYS_SUPPORTS_SH_CMT
258 select SYS_SUPPORTS_SH_MTU2
260 config CPU_SUBTYPE_SH7264
261 bool "Support SH7264 processor"
264 select SYS_SUPPORTS_SH_CMT
265 select SYS_SUPPORTS_SH_MTU2
268 config CPU_SUBTYPE_SH7269
269 bool "Support SH7269 processor"
272 select SYS_SUPPORTS_SH_CMT
273 select SYS_SUPPORTS_SH_MTU2
276 config CPU_SUBTYPE_MXG
277 bool "Support MX-G processor"
279 select SYS_SUPPORTS_SH_MTU2
281 Select MX-G if running on an R8A03022BG part.
283 # SH-3 Processor Support
285 config CPU_SUBTYPE_SH7705
286 bool "Support SH7705 processor"
289 config CPU_SUBTYPE_SH7706
290 bool "Support SH7706 processor"
293 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU.
295 config CPU_SUBTYPE_SH7707
296 bool "Support SH7707 processor"
299 Select SH7707 if you have a 60 Mhz SH-3 HD6417707 CPU.
301 config CPU_SUBTYPE_SH7708
302 bool "Support SH7708 processor"
305 Select SH7708 if you have a 60 Mhz SH-3 HD6417708S or
306 if you have a 100 Mhz SH-3 HD6417708R CPU.
308 config CPU_SUBTYPE_SH7709
309 bool "Support SH7709 processor"
312 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU.
314 config CPU_SUBTYPE_SH7710
315 bool "Support SH7710 processor"
319 Select SH7710 if you have a SH3-DSP SH7710 CPU.
321 config CPU_SUBTYPE_SH7712
322 bool "Support SH7712 processor"
326 Select SH7712 if you have a SH3-DSP SH7712 CPU.
328 config CPU_SUBTYPE_SH7720
329 bool "Support SH7720 processor"
332 select SYS_SUPPORTS_SH_CMT
333 select USB_OHCI_SH if USB_OHCI_HCD
336 Select SH7720 if you have a SH3-DSP SH7720 CPU.
338 config CPU_SUBTYPE_SH7721
339 bool "Support SH7721 processor"
342 select SYS_SUPPORTS_SH_CMT
343 select USB_OHCI_SH if USB_OHCI_HCD
345 Select SH7721 if you have a SH3-DSP SH7721 CPU.
347 # SH-4 Processor Support
349 config CPU_SUBTYPE_SH7750
350 bool "Support SH7750 processor"
353 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
355 config CPU_SUBTYPE_SH7091
356 bool "Support SH7091 processor"
359 Select SH7091 if you have an SH-4 based Sega device (such as
360 the Dreamcast, Naomi, and Naomi 2).
362 config CPU_SUBTYPE_SH7750R
363 bool "Support SH7750R processor"
366 config CPU_SUBTYPE_SH7750S
367 bool "Support SH7750S processor"
370 config CPU_SUBTYPE_SH7751
371 bool "Support SH7751 processor"
374 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
375 or if you have a HD6417751R CPU.
377 config CPU_SUBTYPE_SH7751R
378 bool "Support SH7751R processor"
381 config CPU_SUBTYPE_SH7760
382 bool "Support SH7760 processor"
385 config CPU_SUBTYPE_SH4_202
386 bool "Support SH4-202 processor"
389 # SH-4A Processor Support
391 config CPU_SUBTYPE_SH7723
392 bool "Support SH7723 processor"
396 select ARCH_SPARSEMEM_ENABLE
397 select SYS_SUPPORTS_SH_CMT
400 Select SH7723 if you have an SH-MobileR2 CPU.
402 config CPU_SUBTYPE_SH7724
403 bool "Support SH7724 processor"
407 select ARCH_SPARSEMEM_ENABLE
408 select SYS_SUPPORTS_SH_CMT
411 Select SH7724 if you have an SH-MobileR2R CPU.
413 config CPU_SUBTYPE_SH7734
414 bool "Support SH7734 processor"
419 Select SH7734 if you have a SH4A SH7734 CPU.
421 config CPU_SUBTYPE_SH7757
422 bool "Support SH7757 processor"
427 Select SH7757 if you have a SH4A SH7757 CPU.
429 config CPU_SUBTYPE_SH7763
430 bool "Support SH7763 processor"
432 select USB_OHCI_SH if USB_OHCI_HCD
434 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
436 config CPU_SUBTYPE_SH7770
437 bool "Support SH7770 processor"
440 config CPU_SUBTYPE_SH7780
441 bool "Support SH7780 processor"
444 config CPU_SUBTYPE_SH7785
445 bool "Support SH7785 processor"
448 select ARCH_SPARSEMEM_ENABLE
449 select SYS_SUPPORTS_NUMA
452 config CPU_SUBTYPE_SH7786
453 bool "Support SH7786 processor"
456 select CPU_HAS_PTEAEX
457 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
458 select USB_OHCI_SH if USB_OHCI_HCD
459 select USB_EHCI_SH if USB_EHCI_HCD
462 config CPU_SUBTYPE_SHX3
463 bool "Support SH-X3 processor"
466 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
470 # SH4AL-DSP Processor Support
472 config CPU_SUBTYPE_SH7343
473 bool "Support SH7343 processor"
476 select SYS_SUPPORTS_SH_CMT
478 config CPU_SUBTYPE_SH7722
479 bool "Support SH7722 processor"
483 select ARCH_SPARSEMEM_ENABLE
484 select SYS_SUPPORTS_NUMA
485 select SYS_SUPPORTS_SH_CMT
488 config CPU_SUBTYPE_SH7366
489 bool "Support SH7366 processor"
493 select ARCH_SPARSEMEM_ENABLE
494 select SYS_SUPPORTS_NUMA
495 select SYS_SUPPORTS_SH_CMT
499 source "arch/sh/mm/Kconfig"
501 source "arch/sh/Kconfig.cpu"
503 source "arch/sh/boards/Kconfig"
505 menu "Timer and clock configuration"
508 int "Peripheral clock frequency (in Hz)"
509 depends on SH_CLK_CPG_LEGACY
510 default "31250000" if CPU_SUBTYPE_SH7619
511 default "33333333" if CPU_SUBTYPE_SH7770 || \
512 CPU_SUBTYPE_SH7760 || \
513 CPU_SUBTYPE_SH7705 || \
514 CPU_SUBTYPE_SH7203 || \
515 CPU_SUBTYPE_SH7206 || \
516 CPU_SUBTYPE_SH7263 || \
518 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
519 default "66000000" if CPU_SUBTYPE_SH4_202
522 This option is used to specify the peripheral clock frequency.
523 This is necessary for determining the reference clock value on
524 platforms lacking an RTC.
529 config SH_CLK_CPG_LEGACY
530 depends on SH_CLK_CPG
531 def_bool y if !CPU_SUBTYPE_SH7785 && !ARCH_SHMOBILE && \
532 !CPU_SHX3 && !CPU_SUBTYPE_SH7757 && \
533 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
538 menu "CPU Frequency scaling"
539 source "drivers/cpufreq/Kconfig"
542 source "arch/sh/drivers/Kconfig"
546 menu "Kernel features"
548 source "kernel/Kconfig.hz"
551 bool "kexec system call (EXPERIMENTAL)"
555 kexec is a system call that implements the ability to shutdown your
556 current kernel, and to start another kernel. It is like a reboot
557 but it is independent of the system firmware. And like a reboot
558 you can start any kernel with it, not just Linux.
560 The name comes from the similarity to the exec system call.
562 It is an ongoing process to be certain the hardware in a machine
563 is properly shutdown, so do not be surprised if this code does not
564 initially work for you. As of this writing the exact hardware
565 interface is strongly in flux, so no good recommendation can be
569 bool "kernel crash dumps (EXPERIMENTAL)"
570 depends on BROKEN_ON_SMP
572 Generate crash dump after being started by kexec.
573 This should be normally only set in special crash dump kernels
574 which are loaded in the main kernel with kexec-tools into
575 a specially reserved region and then later executed after
576 a crash by kdump/kexec. The crash dump kernel must be compiled
577 to a memory address not used by the main kernel using
580 For more details see Documentation/admin-guide/kdump/kdump.rst
583 bool "kexec jump (EXPERIMENTAL)"
584 depends on KEXEC && HIBERNATION
586 Jump between original kernel and kexeced kernel and invoke
589 config PHYSICAL_START
590 hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
593 This gives the physical address where the kernel is loaded
594 and is ordinarily the same as MEMORY_START.
596 Different values are primarily used in the case of kexec on panic
597 where the fail safe kernel needs to run at a different address
598 than the panic-ed kernel.
601 bool "Symmetric multi-processing support"
602 depends on SYS_SUPPORTS_SMP
604 This enables support for systems with more than one CPU. If you have
605 a system with only one CPU, say N. If you have a system with more
608 If you say N here, the kernel will run on uni- and multiprocessor
609 machines, but will use only one CPU of a multiprocessor machine. If
610 you say Y here, the kernel will run on many, but not all,
611 uniprocessor machines. On a uniprocessor machine, the kernel
612 will run faster if you say N here.
614 People using multiprocessor machines who say Y here should also say
615 Y to "Enhanced Real Time Clock Support", below.
617 See also <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO
618 available at <https://www.tldp.org/docs.html#howto>.
620 If you don't know what to do here, say N.
623 int "Maximum number of CPUs (2-32)"
626 default "4" if CPU_SUBTYPE_SHX3
629 This allows you to specify the maximum number of CPUs which this
630 kernel will support. The maximum supported value is 32 and the
631 minimum value which makes sense is 2.
633 This is purely to save memory - each supported CPU adds
634 approximately eight kilobytes to the kernel image.
637 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
640 Say Y here to experiment with turning CPUs off and on. CPUs
641 can be controlled through /sys/devices/system/cpu.
647 This enables support for gUSA (general UserSpace Atomicity).
648 This is the default implementation for both UP and non-ll/sc
649 CPUs, and is used by the libc, amongst others.
651 For additional information, design information can be found
652 in <http://lc.linux.or.jp/lc2002/papers/niibe0919p.pdf>.
654 This should only be disabled for special cases where alternate
655 atomicity implementations exist.
658 bool "Implement atomic operations by roll-back (gRB) (EXPERIMENTAL)"
659 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
661 Enabling this option will allow the kernel to implement some
662 atomic operations using a software implementation of load-locked/
663 store-conditional (LLSC). On machines which do not have hardware
664 LLSC, this should be more efficient than the other alternative of
665 disabling interrupts around the atomic sequence.
667 config HW_PERF_EVENTS
668 bool "Enable hardware performance counter support for perf events"
669 depends on PERF_EVENTS && CPU_HAS_PMU
672 Enable hardware performance counter support for perf events. If
673 disabled, perf events will use software events only.
675 source "drivers/sh/Kconfig"
681 config USE_BUILTIN_DTB
682 bool "Use builtin DTB"
684 depends on SH_DEVICE_TREE
686 Link a device tree blob for particular hardware into the kernel,
687 suppressing use of the DTB pointer provided by the bootloader.
688 This option should only be used with legacy bootloaders that are
689 not capable of providing a DTB to the kernel, or for experimental
690 hardware without stable device tree bindings.
692 config BUILTIN_DTB_SOURCE
693 string "Source file for builtin DTB"
695 depends on USE_BUILTIN_DTB
697 Base name (without suffix, relative to arch/sh/boot/dts) for the
698 a DTS file that will be used to produce the DTB linked into the
701 config ZERO_PAGE_OFFSET
703 default "0x00010000" if PAGE_SIZE_64KB || SH_RTS7751R2D || \
704 SH_7751_SOLUTION_ENGINE
705 default "0x00004000" if PAGE_SIZE_16KB || SH_SH03
706 default "0x00002000" if PAGE_SIZE_8KB
709 This sets the default offset of zero page.
711 config BOOT_LINK_OFFSET
713 default "0x00210000" if SH_SHMIN
714 default "0x00810000" if SH_7780_SOLUTION_ENGINE
715 default "0x009e0000" if SH_TITAN
716 default "0x01800000" if SH_SDK7780
717 default "0x02000000" if SH_EDOSK7760
720 This option allows you to set the link address offset of the zImage.
721 This can be useful if you are on a board which has a small amount of
726 default "0x00001000" if PAGE_SIZE_4KB
727 default "0x00002000" if PAGE_SIZE_8KB
728 default "0x00004000" if PAGE_SIZE_16KB
729 default "0x00010000" if PAGE_SIZE_64KB
732 config ROMIMAGE_MMCIF
733 bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
734 depends on CPU_SUBTYPE_SH7724
736 Say Y here to include experimental MMCIF loading code in
737 romImage. With this enabled it is possible to write the romImage
738 kernel image to an MMC card and boot the kernel straight from
739 the reset vector. At reset the processor Mask ROM will load the
740 first part of the romImage which in turn loads the rest the kernel
741 image to RAM using the MMCIF hardware block.
744 prompt "Kernel command line"
746 default CMDLINE_OVERWRITE
748 Setting this option allows the kernel command line arguments
751 config CMDLINE_OVERWRITE
752 bool "Overwrite bootloader kernel arguments"
754 Given string will overwrite any arguments passed in by
757 config CMDLINE_EXTEND
758 bool "Extend bootloader kernel arguments"
760 Given string will be concatenated with arguments passed in
766 string "Kernel command line arguments string"
767 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
768 default "console=ttySC1,115200"
775 tristate "SuperHyway Bus support"
776 depends on CPU_SUBTYPE_SH4_202
779 bool "Maple Bus support"
780 depends on SH_DREAMCAST
782 The Maple Bus is SEGA's serial communication bus for peripherals
783 on the Dreamcast. Without this bus support you won't be able to
784 get your Dreamcast keyboard etc to work, so most users
785 probably want to say 'Y' here, unless you are only using the
786 Dreamcast with a serial line terminal or a remote network
791 menu "Power management options (EXPERIMENTAL)"
793 source "kernel/power/Kconfig"
795 source "drivers/cpuidle/Kconfig"