1 # SPDX-License-Identifier: GPL-2.0
4 select ARCH_32BIT_OFF_T
5 select ARCH_HAVE_CUSTOM_GPIO_H
6 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
7 select ARCH_HAS_BINFMT_FLAT if !MMU
8 select ARCH_HAS_CPU_FINALIZE_INIT
9 select ARCH_HAS_GIGANTIC_PAGE
10 select ARCH_HAS_GCOV_PROFILE_ALL
11 select ARCH_HAS_PTE_SPECIAL
12 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
13 select ARCH_HIBERNATION_POSSIBLE if MMU
14 select ARCH_MIGHT_HAVE_PC_PARPORT
15 select ARCH_WANT_IPC_PARSE_VERSION
17 select CPU_NO_EFFICIENT_FFS
18 select DMA_DECLARE_COHERENT
19 select GENERIC_ATOMIC64
20 select GENERIC_CLOCKEVENTS
21 select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
22 select GENERIC_IDLE_POLL_SETUP
23 select GENERIC_IRQ_SHOW
24 select GENERIC_PCI_IOMAP if PCI
25 select GENERIC_SCHED_CLOCK
26 select GENERIC_STRNCPY_FROM_USER
27 select GENERIC_STRNLEN_USER
28 select GENERIC_SMP_IDLE_THREAD
29 select GUP_GET_PTE_LOW_HIGH if X2TLB
30 select HAVE_ARCH_AUDITSYSCALL
32 select HAVE_ARCH_SECCOMP_FILTER
33 select HAVE_ARCH_TRACEHOOK
34 select HAVE_DEBUG_BUGVERBOSE
35 select HAVE_DEBUG_KMEMLEAK
36 select HAVE_DYNAMIC_FTRACE
37 select HAVE_FAST_GUP if MMU
38 select HAVE_FUNCTION_GRAPH_TRACER
39 select HAVE_FUNCTION_TRACER
40 select HAVE_FUTEX_CMPXCHG if FUTEX
41 select HAVE_FTRACE_MCOUNT_RECORD
42 select HAVE_HW_BREAKPOINT
43 select HAVE_IDE if HAS_IOPORT_MAP
44 select HAVE_IOREMAP_PROT if MMU && !X2TLB
45 select HAVE_KERNEL_BZIP2
46 select HAVE_KERNEL_GZIP
47 select HAVE_KERNEL_LZMA
48 select HAVE_KERNEL_LZO
51 select HAVE_KRETPROBES
52 select HAVE_MIXED_BREAKPOINTS_REGS
53 select HAVE_MOD_ARCH_SPECIFIC if DWARF_UNWINDER
56 select HAVE_PATA_PLATFORM
57 select HAVE_PERF_EVENTS
58 select HAVE_REGS_AND_STACK_ACCESS_API
60 select HAVE_STACKPROTECTOR
61 select HAVE_SYSCALL_TRACEPOINTS
62 select IRQ_FORCED_THREADING
63 select MAY_HAVE_SPARSE_IRQ
64 select MODULES_USE_ELF_RELA
65 select NEED_SG_DMA_LENGTH
66 select NO_DMA if !MMU && !DMA_COHERENT
67 select NO_GENERIC_PCI_IOPORT_MAP if PCI
70 select PCI_DOMAINS if PCI
72 select PERF_USE_VMALLOC
77 The SuperH is a RISC processor targeted for use in embedded systems
78 and consumer electronics; it was also used in the Sega Dreamcast
79 gaming console. The SuperH port has a home page at
80 <http://www.linux-sh.org/>.
86 config GENERIC_HWEIGHT
89 config GENERIC_CALIBRATE_DELAY
92 config GENERIC_LOCKBREAK
94 depends on SMP && PREEMPTION
96 config ARCH_SUSPEND_POSSIBLE
99 config ARCH_HIBERNATION_POSSIBLE
102 config SYS_SUPPORTS_APM_EMULATION
104 select ARCH_SUSPEND_POSSIBLE
106 config SYS_SUPPORTS_HUGETLBFS
109 config SYS_SUPPORTS_SMP
112 config SYS_SUPPORTS_NUMA
115 config STACKTRACE_SUPPORT
118 config LOCKDEP_SUPPORT
121 config ARCH_HAS_ILOG2_U32
124 config ARCH_HAS_ILOG2_U64
129 depends on !SH_SH4202_MICRODEV && !SH_SHMIN && !SH_HP6XX && \
141 config DMA_NONCOHERENT
142 def_bool !NO_DMA && !DMA_COHERENT
143 select ARCH_HAS_DMA_PREP_COHERENT
144 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
145 select DMA_DIRECT_REMAP
147 config PGTABLE_LEVELS
163 select UNCACHED_MAPPING
169 select OF_EARLY_FLATTREE
173 select CPU_HAS_INTEVT
176 select SYS_SUPPORTS_SH_TMU
180 select CPU_HAS_INTEVT
182 select CPU_HAS_FPU if !CPU_SH4AL_DSP
184 select SYS_SUPPORTS_SH_TMU
185 select SYS_SUPPORTS_HUGETLBFS if MMU
202 select SYS_SUPPORTS_SMP
203 select SYS_SUPPORTS_NUMA
207 select ARCH_SUSPEND_POSSIBLE
211 depends on CPU_SH4 || CPU_SH4A
216 prompt "Processor sub-type selection"
222 # SH-2 Processor Support
224 config CPU_SUBTYPE_SH7619
225 bool "Support SH7619 processor"
227 select SYS_SUPPORTS_SH_CMT
229 config CPU_SUBTYPE_J2
230 bool "Support J2 processor"
232 select SYS_SUPPORTS_SMP
233 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
235 # SH-2A Processor Support
237 config CPU_SUBTYPE_SH7201
238 bool "Support SH7201 processor"
241 select SYS_SUPPORTS_SH_MTU2
243 config CPU_SUBTYPE_SH7203
244 bool "Support SH7203 processor"
247 select SYS_SUPPORTS_SH_CMT
248 select SYS_SUPPORTS_SH_MTU2
251 config CPU_SUBTYPE_SH7206
252 bool "Support SH7206 processor"
254 select SYS_SUPPORTS_SH_CMT
255 select SYS_SUPPORTS_SH_MTU2
257 config CPU_SUBTYPE_SH7263
258 bool "Support SH7263 processor"
261 select SYS_SUPPORTS_SH_CMT
262 select SYS_SUPPORTS_SH_MTU2
264 config CPU_SUBTYPE_SH7264
265 bool "Support SH7264 processor"
268 select SYS_SUPPORTS_SH_CMT
269 select SYS_SUPPORTS_SH_MTU2
272 config CPU_SUBTYPE_SH7269
273 bool "Support SH7269 processor"
276 select SYS_SUPPORTS_SH_CMT
277 select SYS_SUPPORTS_SH_MTU2
280 config CPU_SUBTYPE_MXG
281 bool "Support MX-G processor"
283 select SYS_SUPPORTS_SH_MTU2
285 Select MX-G if running on an R8A03022BG part.
287 # SH-3 Processor Support
289 config CPU_SUBTYPE_SH7705
290 bool "Support SH7705 processor"
293 config CPU_SUBTYPE_SH7706
294 bool "Support SH7706 processor"
297 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU.
299 config CPU_SUBTYPE_SH7707
300 bool "Support SH7707 processor"
303 Select SH7707 if you have a 60 Mhz SH-3 HD6417707 CPU.
305 config CPU_SUBTYPE_SH7708
306 bool "Support SH7708 processor"
309 Select SH7708 if you have a 60 Mhz SH-3 HD6417708S or
310 if you have a 100 Mhz SH-3 HD6417708R CPU.
312 config CPU_SUBTYPE_SH7709
313 bool "Support SH7709 processor"
316 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU.
318 config CPU_SUBTYPE_SH7710
319 bool "Support SH7710 processor"
323 Select SH7710 if you have a SH3-DSP SH7710 CPU.
325 config CPU_SUBTYPE_SH7712
326 bool "Support SH7712 processor"
330 Select SH7712 if you have a SH3-DSP SH7712 CPU.
332 config CPU_SUBTYPE_SH7720
333 bool "Support SH7720 processor"
336 select SYS_SUPPORTS_SH_CMT
337 select USB_OHCI_SH if USB_OHCI_HCD
340 Select SH7720 if you have a SH3-DSP SH7720 CPU.
342 config CPU_SUBTYPE_SH7721
343 bool "Support SH7721 processor"
346 select SYS_SUPPORTS_SH_CMT
347 select USB_OHCI_SH if USB_OHCI_HCD
349 Select SH7721 if you have a SH3-DSP SH7721 CPU.
351 # SH-4 Processor Support
353 config CPU_SUBTYPE_SH7750
354 bool "Support SH7750 processor"
357 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
359 config CPU_SUBTYPE_SH7091
360 bool "Support SH7091 processor"
363 Select SH7091 if you have an SH-4 based Sega device (such as
364 the Dreamcast, Naomi, and Naomi 2).
366 config CPU_SUBTYPE_SH7750R
367 bool "Support SH7750R processor"
370 config CPU_SUBTYPE_SH7750S
371 bool "Support SH7750S processor"
374 config CPU_SUBTYPE_SH7751
375 bool "Support SH7751 processor"
378 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
379 or if you have a HD6417751R CPU.
381 config CPU_SUBTYPE_SH7751R
382 bool "Support SH7751R processor"
385 config CPU_SUBTYPE_SH7760
386 bool "Support SH7760 processor"
389 config CPU_SUBTYPE_SH4_202
390 bool "Support SH4-202 processor"
393 # SH-4A Processor Support
395 config CPU_SUBTYPE_SH7723
396 bool "Support SH7723 processor"
400 select ARCH_SPARSEMEM_ENABLE
401 select SYS_SUPPORTS_SH_CMT
404 Select SH7723 if you have an SH-MobileR2 CPU.
406 config CPU_SUBTYPE_SH7724
407 bool "Support SH7724 processor"
411 select ARCH_SPARSEMEM_ENABLE
412 select SYS_SUPPORTS_SH_CMT
415 Select SH7724 if you have an SH-MobileR2R CPU.
417 config CPU_SUBTYPE_SH7734
418 bool "Support SH7734 processor"
423 Select SH7734 if you have a SH4A SH7734 CPU.
425 config CPU_SUBTYPE_SH7757
426 bool "Support SH7757 processor"
431 Select SH7757 if you have a SH4A SH7757 CPU.
433 config CPU_SUBTYPE_SH7763
434 bool "Support SH7763 processor"
436 select USB_OHCI_SH if USB_OHCI_HCD
438 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
440 config CPU_SUBTYPE_SH7770
441 bool "Support SH7770 processor"
444 config CPU_SUBTYPE_SH7780
445 bool "Support SH7780 processor"
448 config CPU_SUBTYPE_SH7785
449 bool "Support SH7785 processor"
452 select ARCH_SPARSEMEM_ENABLE
453 select SYS_SUPPORTS_NUMA
456 config CPU_SUBTYPE_SH7786
457 bool "Support SH7786 processor"
460 select CPU_HAS_PTEAEX
461 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
462 select USB_OHCI_SH if USB_OHCI_HCD
463 select USB_EHCI_SH if USB_EHCI_HCD
466 config CPU_SUBTYPE_SHX3
467 bool "Support SH-X3 processor"
470 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
474 # SH4AL-DSP Processor Support
476 config CPU_SUBTYPE_SH7343
477 bool "Support SH7343 processor"
480 select SYS_SUPPORTS_SH_CMT
482 config CPU_SUBTYPE_SH7722
483 bool "Support SH7722 processor"
487 select ARCH_SPARSEMEM_ENABLE
488 select SYS_SUPPORTS_NUMA
489 select SYS_SUPPORTS_SH_CMT
492 config CPU_SUBTYPE_SH7366
493 bool "Support SH7366 processor"
497 select ARCH_SPARSEMEM_ENABLE
498 select SYS_SUPPORTS_NUMA
499 select SYS_SUPPORTS_SH_CMT
503 source "arch/sh/mm/Kconfig"
505 source "arch/sh/Kconfig.cpu"
507 source "arch/sh/boards/Kconfig"
509 menu "Timer and clock configuration"
512 int "Peripheral clock frequency (in Hz)"
513 depends on SH_CLK_CPG_LEGACY
514 default "31250000" if CPU_SUBTYPE_SH7619
515 default "33333333" if CPU_SUBTYPE_SH7770 || \
516 CPU_SUBTYPE_SH7760 || \
517 CPU_SUBTYPE_SH7705 || \
518 CPU_SUBTYPE_SH7203 || \
519 CPU_SUBTYPE_SH7206 || \
520 CPU_SUBTYPE_SH7263 || \
522 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
523 default "66000000" if CPU_SUBTYPE_SH4_202
526 This option is used to specify the peripheral clock frequency.
527 This is necessary for determining the reference clock value on
528 platforms lacking an RTC.
533 config SH_CLK_CPG_LEGACY
534 depends on SH_CLK_CPG
535 def_bool y if !CPU_SUBTYPE_SH7785 && !ARCH_SHMOBILE && \
536 !CPU_SHX3 && !CPU_SUBTYPE_SH7757 && \
537 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
542 menu "CPU Frequency scaling"
543 source "drivers/cpufreq/Kconfig"
546 source "arch/sh/drivers/Kconfig"
550 menu "Kernel features"
552 source "kernel/Kconfig.hz"
555 bool "kexec system call (EXPERIMENTAL)"
559 kexec is a system call that implements the ability to shutdown your
560 current kernel, and to start another kernel. It is like a reboot
561 but it is independent of the system firmware. And like a reboot
562 you can start any kernel with it, not just Linux.
564 The name comes from the similarity to the exec system call.
566 It is an ongoing process to be certain the hardware in a machine
567 is properly shutdown, so do not be surprised if this code does not
568 initially work for you. As of this writing the exact hardware
569 interface is strongly in flux, so no good recommendation can be
573 bool "kernel crash dumps (EXPERIMENTAL)"
574 depends on BROKEN_ON_SMP
576 Generate crash dump after being started by kexec.
577 This should be normally only set in special crash dump kernels
578 which are loaded in the main kernel with kexec-tools into
579 a specially reserved region and then later executed after
580 a crash by kdump/kexec. The crash dump kernel must be compiled
581 to a memory address not used by the main kernel using
584 For more details see Documentation/admin-guide/kdump/kdump.rst
587 bool "kexec jump (EXPERIMENTAL)"
588 depends on KEXEC && HIBERNATION
590 Jump between original kernel and kexeced kernel and invoke
593 config PHYSICAL_START
594 hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
597 This gives the physical address where the kernel is loaded
598 and is ordinarily the same as MEMORY_START.
600 Different values are primarily used in the case of kexec on panic
601 where the fail safe kernel needs to run at a different address
602 than the panic-ed kernel.
605 bool "Symmetric multi-processing support"
606 depends on SYS_SUPPORTS_SMP
608 This enables support for systems with more than one CPU. If you have
609 a system with only one CPU, say N. If you have a system with more
612 If you say N here, the kernel will run on uni- and multiprocessor
613 machines, but will use only one CPU of a multiprocessor machine. If
614 you say Y here, the kernel will run on many, but not all,
615 uniprocessor machines. On a uniprocessor machine, the kernel
616 will run faster if you say N here.
618 People using multiprocessor machines who say Y here should also say
619 Y to "Enhanced Real Time Clock Support", below.
621 See also <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO
622 available at <https://www.tldp.org/docs.html#howto>.
624 If you don't know what to do here, say N.
627 int "Maximum number of CPUs (2-32)"
630 default "4" if CPU_SUBTYPE_SHX3
633 This allows you to specify the maximum number of CPUs which this
634 kernel will support. The maximum supported value is 32 and the
635 minimum value which makes sense is 2.
637 This is purely to save memory - each supported CPU adds
638 approximately eight kilobytes to the kernel image.
641 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
644 Say Y here to experiment with turning CPUs off and on. CPUs
645 can be controlled through /sys/devices/system/cpu.
651 This enables support for gUSA (general UserSpace Atomicity).
652 This is the default implementation for both UP and non-ll/sc
653 CPUs, and is used by the libc, amongst others.
655 For additional information, design information can be found
656 in <http://lc.linux.or.jp/lc2002/papers/niibe0919p.pdf>.
658 This should only be disabled for special cases where alternate
659 atomicity implementations exist.
662 bool "Implement atomic operations by roll-back (gRB) (EXPERIMENTAL)"
663 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
665 Enabling this option will allow the kernel to implement some
666 atomic operations using a software implementation of load-locked/
667 store-conditional (LLSC). On machines which do not have hardware
668 LLSC, this should be more efficient than the other alternative of
669 disabling interrupts around the atomic sequence.
671 config HW_PERF_EVENTS
672 bool "Enable hardware performance counter support for perf events"
673 depends on PERF_EVENTS && CPU_HAS_PMU
676 Enable hardware performance counter support for perf events. If
677 disabled, perf events will use software events only.
679 source "drivers/sh/Kconfig"
685 config USE_BUILTIN_DTB
686 bool "Use builtin DTB"
688 depends on SH_DEVICE_TREE
690 Link a device tree blob for particular hardware into the kernel,
691 suppressing use of the DTB pointer provided by the bootloader.
692 This option should only be used with legacy bootloaders that are
693 not capable of providing a DTB to the kernel, or for experimental
694 hardware without stable device tree bindings.
696 config BUILTIN_DTB_SOURCE
697 string "Source file for builtin DTB"
699 depends on USE_BUILTIN_DTB
701 Base name (without suffix, relative to arch/sh/boot/dts) for the
702 a DTS file that will be used to produce the DTB linked into the
705 config ZERO_PAGE_OFFSET
707 default "0x00010000" if PAGE_SIZE_64KB || SH_RTS7751R2D || \
708 SH_7751_SOLUTION_ENGINE
709 default "0x00004000" if PAGE_SIZE_16KB || SH_SH03
710 default "0x00002000" if PAGE_SIZE_8KB
713 This sets the default offset of zero page.
715 config BOOT_LINK_OFFSET
717 default "0x00210000" if SH_SHMIN
718 default "0x00810000" if SH_7780_SOLUTION_ENGINE
719 default "0x009e0000" if SH_TITAN
720 default "0x01800000" if SH_SDK7780
721 default "0x02000000" if SH_EDOSK7760
724 This option allows you to set the link address offset of the zImage.
725 This can be useful if you are on a board which has a small amount of
730 default "0x00001000" if PAGE_SIZE_4KB
731 default "0x00002000" if PAGE_SIZE_8KB
732 default "0x00004000" if PAGE_SIZE_16KB
733 default "0x00010000" if PAGE_SIZE_64KB
736 config ROMIMAGE_MMCIF
737 bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
738 depends on CPU_SUBTYPE_SH7724
740 Say Y here to include experimental MMCIF loading code in
741 romImage. With this enabled it is possible to write the romImage
742 kernel image to an MMC card and boot the kernel straight from
743 the reset vector. At reset the processor Mask ROM will load the
744 first part of the romImage which in turn loads the rest the kernel
745 image to RAM using the MMCIF hardware block.
748 prompt "Kernel command line"
750 default CMDLINE_OVERWRITE
752 Setting this option allows the kernel command line arguments
755 config CMDLINE_OVERWRITE
756 bool "Overwrite bootloader kernel arguments"
758 Given string will overwrite any arguments passed in by
761 config CMDLINE_EXTEND
762 bool "Extend bootloader kernel arguments"
764 Given string will be concatenated with arguments passed in
770 string "Kernel command line arguments string"
771 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
772 default "console=ttySC1,115200"
779 tristate "SuperHyway Bus support"
780 depends on CPU_SUBTYPE_SH4_202
783 bool "Maple Bus support"
784 depends on SH_DREAMCAST
786 The Maple Bus is SEGA's serial communication bus for peripherals
787 on the Dreamcast. Without this bus support you won't be able to
788 get your Dreamcast keyboard etc to work, so most users
789 probably want to say 'Y' here, unless you are only using the
790 Dreamcast with a serial line terminal or a remote network
795 menu "Power management options (EXPERIMENTAL)"
797 source "kernel/power/Kconfig"
799 source "drivers/cpuidle/Kconfig"