1 # SPDX-License-Identifier: GPL-2.0
4 select ARCH_HAS_BINFMT_FLAT if !MMU
5 select ARCH_HAS_PTE_SPECIAL
6 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
7 select ARCH_MIGHT_HAVE_PC_PARPORT
8 select HAVE_PATA_PLATFORM
10 select DMA_DECLARE_COHERENT
11 select HAVE_IDE if HAS_IOPORT_MAP
13 select HAVE_ARCH_TRACEHOOK
14 select HAVE_PERF_EVENTS
15 select HAVE_DEBUG_BUGVERBOSE
16 select HAVE_FAST_GUP if MMU
17 select ARCH_HAVE_CUSTOM_GPIO_H
18 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
19 select ARCH_HAS_GCOV_PROFILE_ALL
20 select PERF_USE_VMALLOC
21 select HAVE_DEBUG_KMEMLEAK
22 select HAVE_KERNEL_GZIP
23 select CPU_NO_EFFICIENT_FFS
24 select HAVE_KERNEL_BZIP2
25 select HAVE_KERNEL_LZMA
27 select HAVE_KERNEL_LZO
29 select ARCH_WANT_IPC_PARSE_VERSION
30 select HAVE_SYSCALL_TRACEPOINTS
31 select HAVE_REGS_AND_STACK_ACCESS_API
32 select MAY_HAVE_SPARSE_IRQ
33 select IRQ_FORCED_THREADING
35 select GENERIC_ATOMIC64
36 select GENERIC_IRQ_SHOW
37 select GENERIC_SMP_IDLE_THREAD
38 select GENERIC_IDLE_POLL_SETUP
39 select GENERIC_CLOCKEVENTS
40 select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
41 select GENERIC_PCI_IOMAP if PCI
42 select GENERIC_SCHED_CLOCK
43 select GENERIC_STRNCPY_FROM_USER
44 select GENERIC_STRNLEN_USER
45 select HAVE_MOD_ARCH_SPECIFIC if DWARF_UNWINDER
46 select MODULES_USE_ELF_RELA
47 select NO_GENERIC_PCI_IOPORT_MAP if PCI
50 select PCI_DOMAINS if PCI
51 select HAVE_ARCH_AUDITSYSCALL
52 select HAVE_FUTEX_CMPXCHG if FUTEX
54 select NEED_SG_DMA_LENGTH
55 select ARCH_HAS_GIGANTIC_PAGE
58 The SuperH is a RISC processor targeted for use in embedded systems
59 and consumer electronics; it was also used in the Sega Dreamcast
60 gaming console. The SuperH port has a home page at
61 <http://www.linux-sh.org/>.
64 def_bool "$(ARCH)" = "sh"
65 select ARCH_32BIT_OFF_T
66 select GUP_GET_PTE_LOW_HIGH if X2TLB
68 select HAVE_KRETPROBES
69 select HAVE_IOREMAP_PROT if MMU && !X2TLB
70 select HAVE_FUNCTION_TRACER
71 select HAVE_FTRACE_MCOUNT_RECORD
72 select HAVE_DYNAMIC_FTRACE
73 select ARCH_WANT_IPC_PARSE_VERSION
74 select HAVE_FUNCTION_GRAPH_TRACER
76 select HAVE_HW_BREAKPOINT
77 select HAVE_MIXED_BREAKPOINTS_REGS
79 select ARCH_HIBERNATION_POSSIBLE if MMU
81 select HAVE_STACKPROTECTOR
84 def_bool "$(ARCH)" = "sh64"
85 select HAVE_EXIT_THREAD
90 depends on BUG && SUPERH32
96 config GENERIC_HWEIGHT
99 config GENERIC_CALIBRATE_DELAY
102 config GENERIC_LOCKBREAK
104 depends on SMP && PREEMPTION
106 config ARCH_SUSPEND_POSSIBLE
109 config ARCH_HIBERNATION_POSSIBLE
112 config SYS_SUPPORTS_APM_EMULATION
114 select ARCH_SUSPEND_POSSIBLE
116 config SYS_SUPPORTS_HUGETLBFS
119 config SYS_SUPPORTS_SMP
122 config SYS_SUPPORTS_NUMA
125 config STACKTRACE_SUPPORT
128 config LOCKDEP_SUPPORT
131 config ARCH_HAS_ILOG2_U32
134 config ARCH_HAS_ILOG2_U64
139 depends on !SH_CAYMAN && !SH_SH4202_MICRODEV && !SH_SHMIN && \
140 !SH_HP6XX && !SH_SOLUTION_ENGINE
151 config DMA_NONCOHERENT
152 def_bool !DMA_COHERENT
153 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
155 config PGTABLE_LEVELS
171 select UNCACHED_MAPPING
177 select OF_EARLY_FLATTREE
181 select CPU_HAS_INTEVT
184 select SYS_SUPPORTS_SH_TMU
188 select CPU_HAS_INTEVT
190 select CPU_HAS_FPU if !CPU_SH4AL_DSP
192 select SYS_SUPPORTS_SH_TMU
193 select SYS_SUPPORTS_HUGETLBFS if MMU
207 select SYS_SUPPORTS_SH_TMU
208 select SYS_SUPPORTS_HUGETLBFS if MMU
216 select SYS_SUPPORTS_SMP
217 select SYS_SUPPORTS_NUMA
221 select ARCH_SUSPEND_POSSIBLE
225 depends on CPU_SH4 || CPU_SH4A
232 prompt "Processor sub-type selection"
238 # SH-2 Processor Support
240 config CPU_SUBTYPE_SH7619
241 bool "Support SH7619 processor"
243 select SYS_SUPPORTS_SH_CMT
245 config CPU_SUBTYPE_J2
246 bool "Support J2 processor"
248 select SYS_SUPPORTS_SMP
249 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
251 # SH-2A Processor Support
253 config CPU_SUBTYPE_SH7201
254 bool "Support SH7201 processor"
257 select SYS_SUPPORTS_SH_MTU2
259 config CPU_SUBTYPE_SH7203
260 bool "Support SH7203 processor"
263 select SYS_SUPPORTS_SH_CMT
264 select SYS_SUPPORTS_SH_MTU2
267 config CPU_SUBTYPE_SH7206
268 bool "Support SH7206 processor"
270 select SYS_SUPPORTS_SH_CMT
271 select SYS_SUPPORTS_SH_MTU2
273 config CPU_SUBTYPE_SH7263
274 bool "Support SH7263 processor"
277 select SYS_SUPPORTS_SH_CMT
278 select SYS_SUPPORTS_SH_MTU2
280 config CPU_SUBTYPE_SH7264
281 bool "Support SH7264 processor"
284 select SYS_SUPPORTS_SH_CMT
285 select SYS_SUPPORTS_SH_MTU2
288 config CPU_SUBTYPE_SH7269
289 bool "Support SH7269 processor"
292 select SYS_SUPPORTS_SH_CMT
293 select SYS_SUPPORTS_SH_MTU2
296 config CPU_SUBTYPE_MXG
297 bool "Support MX-G processor"
299 select SYS_SUPPORTS_SH_MTU2
301 Select MX-G if running on an R8A03022BG part.
303 # SH-3 Processor Support
305 config CPU_SUBTYPE_SH7705
306 bool "Support SH7705 processor"
309 config CPU_SUBTYPE_SH7706
310 bool "Support SH7706 processor"
313 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU.
315 config CPU_SUBTYPE_SH7707
316 bool "Support SH7707 processor"
319 Select SH7707 if you have a 60 Mhz SH-3 HD6417707 CPU.
321 config CPU_SUBTYPE_SH7708
322 bool "Support SH7708 processor"
325 Select SH7708 if you have a 60 Mhz SH-3 HD6417708S or
326 if you have a 100 Mhz SH-3 HD6417708R CPU.
328 config CPU_SUBTYPE_SH7709
329 bool "Support SH7709 processor"
332 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU.
334 config CPU_SUBTYPE_SH7710
335 bool "Support SH7710 processor"
339 Select SH7710 if you have a SH3-DSP SH7710 CPU.
341 config CPU_SUBTYPE_SH7712
342 bool "Support SH7712 processor"
346 Select SH7712 if you have a SH3-DSP SH7712 CPU.
348 config CPU_SUBTYPE_SH7720
349 bool "Support SH7720 processor"
352 select SYS_SUPPORTS_SH_CMT
353 select USB_OHCI_SH if USB_OHCI_HCD
356 Select SH7720 if you have a SH3-DSP SH7720 CPU.
358 config CPU_SUBTYPE_SH7721
359 bool "Support SH7721 processor"
362 select SYS_SUPPORTS_SH_CMT
363 select USB_OHCI_SH if USB_OHCI_HCD
365 Select SH7721 if you have a SH3-DSP SH7721 CPU.
367 # SH-4 Processor Support
369 config CPU_SUBTYPE_SH7750
370 bool "Support SH7750 processor"
373 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
375 config CPU_SUBTYPE_SH7091
376 bool "Support SH7091 processor"
379 Select SH7091 if you have an SH-4 based Sega device (such as
380 the Dreamcast, Naomi, and Naomi 2).
382 config CPU_SUBTYPE_SH7750R
383 bool "Support SH7750R processor"
386 config CPU_SUBTYPE_SH7750S
387 bool "Support SH7750S processor"
390 config CPU_SUBTYPE_SH7751
391 bool "Support SH7751 processor"
394 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
395 or if you have a HD6417751R CPU.
397 config CPU_SUBTYPE_SH7751R
398 bool "Support SH7751R processor"
401 config CPU_SUBTYPE_SH7760
402 bool "Support SH7760 processor"
405 config CPU_SUBTYPE_SH4_202
406 bool "Support SH4-202 processor"
409 # SH-4A Processor Support
411 config CPU_SUBTYPE_SH7723
412 bool "Support SH7723 processor"
416 select ARCH_SPARSEMEM_ENABLE
417 select SYS_SUPPORTS_SH_CMT
420 Select SH7723 if you have an SH-MobileR2 CPU.
422 config CPU_SUBTYPE_SH7724
423 bool "Support SH7724 processor"
427 select ARCH_SPARSEMEM_ENABLE
428 select SYS_SUPPORTS_SH_CMT
431 Select SH7724 if you have an SH-MobileR2R CPU.
433 config CPU_SUBTYPE_SH7734
434 bool "Support SH7734 processor"
439 Select SH7734 if you have a SH4A SH7734 CPU.
441 config CPU_SUBTYPE_SH7757
442 bool "Support SH7757 processor"
447 Select SH7757 if you have a SH4A SH7757 CPU.
449 config CPU_SUBTYPE_SH7763
450 bool "Support SH7763 processor"
452 select USB_OHCI_SH if USB_OHCI_HCD
454 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
456 config CPU_SUBTYPE_SH7770
457 bool "Support SH7770 processor"
460 config CPU_SUBTYPE_SH7780
461 bool "Support SH7780 processor"
464 config CPU_SUBTYPE_SH7785
465 bool "Support SH7785 processor"
468 select ARCH_SPARSEMEM_ENABLE
469 select SYS_SUPPORTS_NUMA
472 config CPU_SUBTYPE_SH7786
473 bool "Support SH7786 processor"
476 select CPU_HAS_PTEAEX
477 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
478 select USB_OHCI_SH if USB_OHCI_HCD
479 select USB_EHCI_SH if USB_EHCI_HCD
482 config CPU_SUBTYPE_SHX3
483 bool "Support SH-X3 processor"
486 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
490 # SH4AL-DSP Processor Support
492 config CPU_SUBTYPE_SH7343
493 bool "Support SH7343 processor"
496 select SYS_SUPPORTS_SH_CMT
498 config CPU_SUBTYPE_SH7722
499 bool "Support SH7722 processor"
503 select ARCH_SPARSEMEM_ENABLE
504 select SYS_SUPPORTS_NUMA
505 select SYS_SUPPORTS_SH_CMT
508 config CPU_SUBTYPE_SH7366
509 bool "Support SH7366 processor"
513 select ARCH_SPARSEMEM_ENABLE
514 select SYS_SUPPORTS_NUMA
515 select SYS_SUPPORTS_SH_CMT
524 prompt "Processor sub-type selection"
526 # SH-5 Processor Support
528 config CPU_SUBTYPE_SH5_101
529 bool "Support SH5-101 processor"
532 config CPU_SUBTYPE_SH5_103
533 bool "Support SH5-103 processor"
540 source "arch/sh/mm/Kconfig"
542 source "arch/sh/Kconfig.cpu"
544 source "arch/sh/boards/Kconfig"
546 menu "Timer and clock configuration"
549 int "Peripheral clock frequency (in Hz)"
550 depends on SH_CLK_CPG_LEGACY
551 default "31250000" if CPU_SUBTYPE_SH7619
552 default "33333333" if CPU_SUBTYPE_SH7770 || \
553 CPU_SUBTYPE_SH7760 || \
554 CPU_SUBTYPE_SH7705 || \
555 CPU_SUBTYPE_SH7203 || \
556 CPU_SUBTYPE_SH7206 || \
557 CPU_SUBTYPE_SH7263 || \
559 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
560 default "66000000" if CPU_SUBTYPE_SH4_202
563 This option is used to specify the peripheral clock frequency.
564 This is necessary for determining the reference clock value on
565 platforms lacking an RTC.
570 config SH_CLK_CPG_LEGACY
571 depends on SH_CLK_CPG
572 def_bool y if !CPU_SUBTYPE_SH7785 && !ARCH_SHMOBILE && \
573 !CPU_SHX3 && !CPU_SUBTYPE_SH7757 && \
574 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
579 menu "CPU Frequency scaling"
580 source "drivers/cpufreq/Kconfig"
583 source "arch/sh/drivers/Kconfig"
587 menu "Kernel features"
589 source "kernel/Kconfig.hz"
592 bool "kexec system call (EXPERIMENTAL)"
593 depends on SUPERH32 && MMU
596 kexec is a system call that implements the ability to shutdown your
597 current kernel, and to start another kernel. It is like a reboot
598 but it is independent of the system firmware. And like a reboot
599 you can start any kernel with it, not just Linux.
601 The name comes from the similarity to the exec system call.
603 It is an ongoing process to be certain the hardware in a machine
604 is properly shutdown, so do not be surprised if this code does not
605 initially work for you. As of this writing the exact hardware
606 interface is strongly in flux, so no good recommendation can be
610 bool "kernel crash dumps (EXPERIMENTAL)"
611 depends on SUPERH32 && BROKEN_ON_SMP
613 Generate crash dump after being started by kexec.
614 This should be normally only set in special crash dump kernels
615 which are loaded in the main kernel with kexec-tools into
616 a specially reserved region and then later executed after
617 a crash by kdump/kexec. The crash dump kernel must be compiled
618 to a memory address not used by the main kernel using
621 For more details see Documentation/admin-guide/kdump/kdump.rst
624 bool "kexec jump (EXPERIMENTAL)"
625 depends on SUPERH32 && KEXEC && HIBERNATION
627 Jump between original kernel and kexeced kernel and invoke
630 config PHYSICAL_START
631 hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
634 This gives the physical address where the kernel is loaded
635 and is ordinarily the same as MEMORY_START.
637 Different values are primarily used in the case of kexec on panic
638 where the fail safe kernel needs to run at a different address
639 than the panic-ed kernel.
642 bool "Enable seccomp to safely compute untrusted bytecode"
645 This kernel feature is useful for number crunching applications
646 that may need to compute untrusted bytecode during their
647 execution. By using pipes or other transports made available to
648 the process as file descriptors supporting the read/write
649 syscalls, it's possible to isolate those applications in
650 their own address space using seccomp. Once seccomp is
651 enabled via prctl, it cannot be disabled and the task is only
652 allowed to execute a few safe syscalls defined by each seccomp
658 bool "Symmetric multi-processing support"
659 depends on SYS_SUPPORTS_SMP
661 This enables support for systems with more than one CPU. If you have
662 a system with only one CPU, say N. If you have a system with more
665 If you say N here, the kernel will run on uni- and multiprocessor
666 machines, but will use only one CPU of a multiprocessor machine. If
667 you say Y here, the kernel will run on many, but not all,
668 uniprocessor machines. On a uniprocessor machine, the kernel
669 will run faster if you say N here.
671 People using multiprocessor machines who say Y here should also say
672 Y to "Enhanced Real Time Clock Support", below.
674 See also <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO
675 available at <http://www.tldp.org/docs.html#howto>.
677 If you don't know what to do here, say N.
680 int "Maximum number of CPUs (2-32)"
683 default "4" if CPU_SUBTYPE_SHX3
686 This allows you to specify the maximum number of CPUs which this
687 kernel will support. The maximum supported value is 32 and the
688 minimum value which makes sense is 2.
690 This is purely to save memory - each supported CPU adds
691 approximately eight kilobytes to the kernel image.
694 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
697 Say Y here to experiment with turning CPUs off and on. CPUs
698 can be controlled through /sys/devices/system/cpu.
702 depends on !SMP && SUPERH32
704 This enables support for gUSA (general UserSpace Atomicity).
705 This is the default implementation for both UP and non-ll/sc
706 CPUs, and is used by the libc, amongst others.
708 For additional information, design information can be found
709 in <http://lc.linux.or.jp/lc2002/papers/niibe0919p.pdf>.
711 This should only be disabled for special cases where alternate
712 atomicity implementations exist.
715 bool "Implement atomic operations by roll-back (gRB) (EXPERIMENTAL)"
716 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
718 Enabling this option will allow the kernel to implement some
719 atomic operations using a software implementation of load-locked/
720 store-conditional (LLSC). On machines which do not have hardware
721 LLSC, this should be more efficient than the other alternative of
722 disabling interrupts around the atomic sequence.
724 config HW_PERF_EVENTS
725 bool "Enable hardware performance counter support for perf events"
726 depends on PERF_EVENTS && CPU_HAS_PMU
729 Enable hardware performance counter support for perf events. If
730 disabled, perf events will use software events only.
732 source "drivers/sh/Kconfig"
738 config USE_BUILTIN_DTB
739 bool "Use builtin DTB"
741 depends on SH_DEVICE_TREE
743 Link a device tree blob for particular hardware into the kernel,
744 suppressing use of the DTB pointer provided by the bootloader.
745 This option should only be used with legacy bootloaders that are
746 not capable of providing a DTB to the kernel, or for experimental
747 hardware without stable device tree bindings.
749 config BUILTIN_DTB_SOURCE
750 string "Source file for builtin DTB"
752 depends on USE_BUILTIN_DTB
754 Base name (without suffix, relative to arch/sh/boot/dts) for the
755 a DTS file that will be used to produce the DTB linked into the
758 config ZERO_PAGE_OFFSET
760 default "0x00010000" if PAGE_SIZE_64KB || SH_RTS7751R2D || \
761 SH_7751_SOLUTION_ENGINE
762 default "0x00004000" if PAGE_SIZE_16KB || SH_SH03
763 default "0x00002000" if PAGE_SIZE_8KB
766 This sets the default offset of zero page.
768 config BOOT_LINK_OFFSET
770 default "0x00210000" if SH_SHMIN
771 default "0x00400000" if SH_CAYMAN
772 default "0x00810000" if SH_7780_SOLUTION_ENGINE
773 default "0x009e0000" if SH_TITAN
774 default "0x01800000" if SH_SDK7780
775 default "0x02000000" if SH_EDOSK7760
778 This option allows you to set the link address offset of the zImage.
779 This can be useful if you are on a board which has a small amount of
784 default "0x00001000" if PAGE_SIZE_4KB
785 default "0x00002000" if PAGE_SIZE_8KB
786 default "0x00004000" if PAGE_SIZE_16KB
787 default "0x00010000" if PAGE_SIZE_64KB
790 config ROMIMAGE_MMCIF
791 bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
792 depends on CPU_SUBTYPE_SH7724
794 Say Y here to include experimental MMCIF loading code in
795 romImage. With this enabled it is possible to write the romImage
796 kernel image to an MMC card and boot the kernel straight from
797 the reset vector. At reset the processor Mask ROM will load the
798 first part of the romImage which in turn loads the rest the kernel
799 image to RAM using the MMCIF hardware block.
802 prompt "Kernel command line"
804 default CMDLINE_OVERWRITE
806 Setting this option allows the kernel command line arguments
809 config CMDLINE_OVERWRITE
810 bool "Overwrite bootloader kernel arguments"
812 Given string will overwrite any arguments passed in by
815 config CMDLINE_EXTEND
816 bool "Extend bootloader kernel arguments"
818 Given string will be concatenated with arguments passed in
824 string "Kernel command line arguments string"
825 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
826 default "console=ttySC1,115200"
833 tristate "SuperHyway Bus support"
834 depends on CPU_SUBTYPE_SH4_202
837 bool "Maple Bus support"
838 depends on SH_DREAMCAST
840 The Maple Bus is SEGA's serial communication bus for peripherals
841 on the Dreamcast. Without this bus support you won't be able to
842 get your Dreamcast keyboard etc to work, so most users
843 probably want to say 'Y' here, unless you are only using the
844 Dreamcast with a serial line terminal or a remote network
849 menu "Power management options (EXPERIMENTAL)"
851 source "kernel/power/Kconfig"
853 source "drivers/cpuidle/Kconfig"