1 # SPDX-License-Identifier: GPL-2.0
4 select ARCH_HAS_CPU_FINALIZE_INIT
5 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
6 select ARCH_MIGHT_HAVE_PC_PARPORT
7 select ARCH_NO_COHERENT_DMA_MMAP if !MMU
8 select HAVE_PATA_PLATFORM
10 select HAVE_IDE if HAS_IOPORT_MAP
12 select HAVE_MEMBLOCK_NODE_MAP
13 select ARCH_DISCARD_MEMBLOCK
15 select HAVE_GENERIC_DMA_COHERENT
16 select HAVE_ARCH_TRACEHOOK
17 select HAVE_DMA_API_DEBUG
18 select HAVE_PERF_EVENTS
19 select HAVE_DEBUG_BUGVERBOSE
20 select ARCH_HAVE_CUSTOM_GPIO_H
21 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
22 select ARCH_HAS_GCOV_PROFILE_ALL
23 select PERF_USE_VMALLOC
24 select HAVE_DEBUG_KMEMLEAK
25 select HAVE_KERNEL_GZIP
26 select CPU_NO_EFFICIENT_FFS
27 select HAVE_KERNEL_BZIP2
28 select HAVE_KERNEL_LZMA
30 select HAVE_KERNEL_LZO
32 select ARCH_WANT_IPC_PARSE_VERSION
33 select HAVE_SYSCALL_TRACEPOINTS
34 select HAVE_REGS_AND_STACK_ACCESS_API
35 select MAY_HAVE_SPARSE_IRQ
36 select IRQ_FORCED_THREADING
38 select GENERIC_ATOMIC64
39 select GENERIC_IRQ_SHOW
40 select GENERIC_SMP_IDLE_THREAD
41 select GENERIC_IDLE_POLL_SETUP
42 select GENERIC_CLOCKEVENTS
43 select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
44 select GENERIC_SCHED_CLOCK
45 select GENERIC_STRNCPY_FROM_USER
46 select GENERIC_STRNLEN_USER
47 select HAVE_MOD_ARCH_SPECIFIC if DWARF_UNWINDER
48 select MODULES_USE_ELF_RELA
51 select HAVE_ARCH_AUDITSYSCALL
52 select HAVE_FUTEX_CMPXCHG if FUTEX
55 The SuperH is a RISC processor targeted for use in embedded systems
56 and consumer electronics; it was also used in the Sega Dreamcast
57 gaming console. The SuperH port has a home page at
58 <http://www.linux-sh.org/>.
63 select HAVE_KRETPROBES
64 select HAVE_IOREMAP_PROT if MMU && !X2TLB
65 select HAVE_FUNCTION_TRACER
66 select HAVE_FTRACE_MCOUNT_RECORD
67 select HAVE_DYNAMIC_FTRACE
68 select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
69 select ARCH_WANT_IPC_PARSE_VERSION
70 select HAVE_FUNCTION_GRAPH_TRACER
72 select HAVE_HW_BREAKPOINT
73 select HAVE_MIXED_BREAKPOINTS_REGS
75 select ARCH_HIBERNATION_POSSIBLE if MMU
77 select HAVE_CC_STACKPROTECTOR
80 def_bool ARCH = "sh64"
81 select HAVE_EXIT_THREAD
86 default "arch/sh/configs/shx3_defconfig" if SUPERH32
87 default "arch/sh/configs/cayman_defconfig" if SUPERH64
89 config RWSEM_GENERIC_SPINLOCK
92 config RWSEM_XCHGADD_ALGORITHM
97 depends on BUG && SUPERH32
103 config GENERIC_HWEIGHT
106 config GENERIC_CALIBRATE_DELAY
109 config GENERIC_LOCKBREAK
111 depends on SMP && PREEMPT
113 config ARCH_SUSPEND_POSSIBLE
116 config ARCH_HIBERNATION_POSSIBLE
119 config SYS_SUPPORTS_APM_EMULATION
121 select ARCH_SUSPEND_POSSIBLE
123 config SYS_SUPPORTS_HUGETLBFS
126 config SYS_SUPPORTS_SMP
129 config SYS_SUPPORTS_NUMA
132 config SYS_SUPPORTS_PCI
135 config STACKTRACE_SUPPORT
138 config LOCKDEP_SUPPORT
141 config ARCH_HAS_ILOG2_U32
144 config ARCH_HAS_ILOG2_U64
149 depends on !SH_CAYMAN && !SH_SH4202_MICRODEV && !SH_SHMIN && \
150 !SH_HP6XX && !SH_SOLUTION_ENGINE
161 config DMA_NONCOHERENT
162 def_bool !DMA_COHERENT
164 config NEED_DMA_MAP_STATE
165 def_bool DMA_NONCOHERENT
167 config NEED_SG_DMA_LENGTH
170 config PGTABLE_LEVELS
174 source "init/Kconfig"
176 source "kernel/Kconfig.freezer"
190 select UNCACHED_MAPPING
196 select OF_EARLY_FLATTREE
200 select CPU_HAS_INTEVT
203 select SYS_SUPPORTS_SH_TMU
207 select CPU_HAS_INTEVT
209 select CPU_HAS_FPU if !CPU_SH4AL_DSP
211 select SYS_SUPPORTS_SH_TMU
212 select SYS_SUPPORTS_HUGETLBFS if MMU
226 select SYS_SUPPORTS_SH_TMU
227 select SYS_SUPPORTS_HUGETLBFS if MMU
235 select SYS_SUPPORTS_SMP
236 select SYS_SUPPORTS_NUMA
240 select ARCH_SUSPEND_POSSIBLE
244 depends on CPU_SH4 || CPU_SH4A
251 prompt "Processor sub-type selection"
257 # SH-2 Processor Support
259 config CPU_SUBTYPE_SH7619
260 bool "Support SH7619 processor"
262 select SYS_SUPPORTS_SH_CMT
264 config CPU_SUBTYPE_J2
265 bool "Support J2 processor"
267 select SYS_SUPPORTS_SMP
268 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
270 # SH-2A Processor Support
272 config CPU_SUBTYPE_SH7201
273 bool "Support SH7201 processor"
276 select SYS_SUPPORTS_SH_MTU2
278 config CPU_SUBTYPE_SH7203
279 bool "Support SH7203 processor"
282 select SYS_SUPPORTS_SH_CMT
283 select SYS_SUPPORTS_SH_MTU2
286 config CPU_SUBTYPE_SH7206
287 bool "Support SH7206 processor"
289 select SYS_SUPPORTS_SH_CMT
290 select SYS_SUPPORTS_SH_MTU2
292 config CPU_SUBTYPE_SH7263
293 bool "Support SH7263 processor"
296 select SYS_SUPPORTS_SH_CMT
297 select SYS_SUPPORTS_SH_MTU2
299 config CPU_SUBTYPE_SH7264
300 bool "Support SH7264 processor"
303 select SYS_SUPPORTS_SH_CMT
304 select SYS_SUPPORTS_SH_MTU2
307 config CPU_SUBTYPE_SH7269
308 bool "Support SH7269 processor"
311 select SYS_SUPPORTS_SH_CMT
312 select SYS_SUPPORTS_SH_MTU2
315 config CPU_SUBTYPE_MXG
316 bool "Support MX-G processor"
318 select SYS_SUPPORTS_SH_MTU2
320 Select MX-G if running on an R8A03022BG part.
322 # SH-3 Processor Support
324 config CPU_SUBTYPE_SH7705
325 bool "Support SH7705 processor"
328 config CPU_SUBTYPE_SH7706
329 bool "Support SH7706 processor"
332 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU.
334 config CPU_SUBTYPE_SH7707
335 bool "Support SH7707 processor"
338 Select SH7707 if you have a 60 Mhz SH-3 HD6417707 CPU.
340 config CPU_SUBTYPE_SH7708
341 bool "Support SH7708 processor"
344 Select SH7708 if you have a 60 Mhz SH-3 HD6417708S or
345 if you have a 100 Mhz SH-3 HD6417708R CPU.
347 config CPU_SUBTYPE_SH7709
348 bool "Support SH7709 processor"
351 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU.
353 config CPU_SUBTYPE_SH7710
354 bool "Support SH7710 processor"
358 Select SH7710 if you have a SH3-DSP SH7710 CPU.
360 config CPU_SUBTYPE_SH7712
361 bool "Support SH7712 processor"
365 Select SH7712 if you have a SH3-DSP SH7712 CPU.
367 config CPU_SUBTYPE_SH7720
368 bool "Support SH7720 processor"
371 select SYS_SUPPORTS_SH_CMT
372 select USB_OHCI_SH if USB_OHCI_HCD
375 Select SH7720 if you have a SH3-DSP SH7720 CPU.
377 config CPU_SUBTYPE_SH7721
378 bool "Support SH7721 processor"
381 select SYS_SUPPORTS_SH_CMT
382 select USB_OHCI_SH if USB_OHCI_HCD
384 Select SH7721 if you have a SH3-DSP SH7721 CPU.
386 # SH-4 Processor Support
388 config CPU_SUBTYPE_SH7750
389 bool "Support SH7750 processor"
392 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
394 config CPU_SUBTYPE_SH7091
395 bool "Support SH7091 processor"
398 Select SH7091 if you have an SH-4 based Sega device (such as
399 the Dreamcast, Naomi, and Naomi 2).
401 config CPU_SUBTYPE_SH7750R
402 bool "Support SH7750R processor"
405 config CPU_SUBTYPE_SH7750S
406 bool "Support SH7750S processor"
409 config CPU_SUBTYPE_SH7751
410 bool "Support SH7751 processor"
413 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
414 or if you have a HD6417751R CPU.
416 config CPU_SUBTYPE_SH7751R
417 bool "Support SH7751R processor"
420 config CPU_SUBTYPE_SH7760
421 bool "Support SH7760 processor"
424 config CPU_SUBTYPE_SH4_202
425 bool "Support SH4-202 processor"
428 # SH-4A Processor Support
430 config CPU_SUBTYPE_SH7723
431 bool "Support SH7723 processor"
435 select ARCH_SPARSEMEM_ENABLE
436 select SYS_SUPPORTS_SH_CMT
439 Select SH7723 if you have an SH-MobileR2 CPU.
441 config CPU_SUBTYPE_SH7724
442 bool "Support SH7724 processor"
446 select ARCH_SPARSEMEM_ENABLE
447 select SYS_SUPPORTS_SH_CMT
450 Select SH7724 if you have an SH-MobileR2R CPU.
452 config CPU_SUBTYPE_SH7734
453 bool "Support SH7734 processor"
458 Select SH7734 if you have a SH4A SH7734 CPU.
460 config CPU_SUBTYPE_SH7757
461 bool "Support SH7757 processor"
466 Select SH7757 if you have a SH4A SH7757 CPU.
468 config CPU_SUBTYPE_SH7763
469 bool "Support SH7763 processor"
471 select USB_OHCI_SH if USB_OHCI_HCD
473 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
475 config CPU_SUBTYPE_SH7770
476 bool "Support SH7770 processor"
479 config CPU_SUBTYPE_SH7780
480 bool "Support SH7780 processor"
483 config CPU_SUBTYPE_SH7785
484 bool "Support SH7785 processor"
487 select ARCH_SPARSEMEM_ENABLE
488 select SYS_SUPPORTS_NUMA
491 config CPU_SUBTYPE_SH7786
492 bool "Support SH7786 processor"
495 select CPU_HAS_PTEAEX
496 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
497 select USB_OHCI_SH if USB_OHCI_HCD
498 select USB_EHCI_SH if USB_EHCI_HCD
501 config CPU_SUBTYPE_SHX3
502 bool "Support SH-X3 processor"
505 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
509 # SH4AL-DSP Processor Support
511 config CPU_SUBTYPE_SH7343
512 bool "Support SH7343 processor"
515 select SYS_SUPPORTS_SH_CMT
517 config CPU_SUBTYPE_SH7722
518 bool "Support SH7722 processor"
522 select ARCH_SPARSEMEM_ENABLE
523 select SYS_SUPPORTS_NUMA
524 select SYS_SUPPORTS_SH_CMT
527 config CPU_SUBTYPE_SH7366
528 bool "Support SH7366 processor"
532 select ARCH_SPARSEMEM_ENABLE
533 select SYS_SUPPORTS_NUMA
534 select SYS_SUPPORTS_SH_CMT
543 prompt "Processor sub-type selection"
545 # SH-5 Processor Support
547 config CPU_SUBTYPE_SH5_101
548 bool "Support SH5-101 processor"
551 config CPU_SUBTYPE_SH5_103
552 bool "Support SH5-103 processor"
559 source "arch/sh/mm/Kconfig"
561 source "arch/sh/Kconfig.cpu"
563 source "arch/sh/boards/Kconfig"
565 menu "Timer and clock configuration"
568 int "Peripheral clock frequency (in Hz)"
569 depends on SH_CLK_CPG_LEGACY
570 default "31250000" if CPU_SUBTYPE_SH7619
571 default "33333333" if CPU_SUBTYPE_SH7770 || \
572 CPU_SUBTYPE_SH7760 || \
573 CPU_SUBTYPE_SH7705 || \
574 CPU_SUBTYPE_SH7203 || \
575 CPU_SUBTYPE_SH7206 || \
576 CPU_SUBTYPE_SH7263 || \
578 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
579 default "66000000" if CPU_SUBTYPE_SH4_202
582 This option is used to specify the peripheral clock frequency.
583 This is necessary for determining the reference clock value on
584 platforms lacking an RTC.
589 config SH_CLK_CPG_LEGACY
590 depends on SH_CLK_CPG
591 def_bool y if !CPU_SUBTYPE_SH7785 && !ARCH_SHMOBILE && \
592 !CPU_SHX3 && !CPU_SUBTYPE_SH7757 && \
593 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
598 menu "CPU Frequency scaling"
599 source "drivers/cpufreq/Kconfig"
602 source "arch/sh/drivers/Kconfig"
606 menu "Kernel features"
608 source kernel/Kconfig.hz
611 bool "kexec system call (EXPERIMENTAL)"
612 depends on SUPERH32 && MMU
615 kexec is a system call that implements the ability to shutdown your
616 current kernel, and to start another kernel. It is like a reboot
617 but it is independent of the system firmware. And like a reboot
618 you can start any kernel with it, not just Linux.
620 The name comes from the similarity to the exec system call.
622 It is an ongoing process to be certain the hardware in a machine
623 is properly shutdown, so do not be surprised if this code does not
624 initially work for you. As of this writing the exact hardware
625 interface is strongly in flux, so no good recommendation can be
629 bool "kernel crash dumps (EXPERIMENTAL)"
630 depends on SUPERH32 && BROKEN_ON_SMP
632 Generate crash dump after being started by kexec.
633 This should be normally only set in special crash dump kernels
634 which are loaded in the main kernel with kexec-tools into
635 a specially reserved region and then later executed after
636 a crash by kdump/kexec. The crash dump kernel must be compiled
637 to a memory address not used by the main kernel using
640 For more details see Documentation/kdump/kdump.txt
643 bool "kexec jump (EXPERIMENTAL)"
644 depends on SUPERH32 && KEXEC && HIBERNATION
646 Jump between original kernel and kexeced kernel and invoke
649 config PHYSICAL_START
650 hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
653 This gives the physical address where the kernel is loaded
654 and is ordinarily the same as MEMORY_START.
656 Different values are primarily used in the case of kexec on panic
657 where the fail safe kernel needs to run at a different address
658 than the panic-ed kernel.
661 bool "Enable seccomp to safely compute untrusted bytecode"
664 This kernel feature is useful for number crunching applications
665 that may need to compute untrusted bytecode during their
666 execution. By using pipes or other transports made available to
667 the process as file descriptors supporting the read/write
668 syscalls, it's possible to isolate those applications in
669 their own address space using seccomp. Once seccomp is
670 enabled via prctl, it cannot be disabled and the task is only
671 allowed to execute a few safe syscalls defined by each seccomp
677 bool "Symmetric multi-processing support"
678 depends on SYS_SUPPORTS_SMP
680 This enables support for systems with more than one CPU. If you have
681 a system with only one CPU, say N. If you have a system with more
684 If you say N here, the kernel will run on uni- and multiprocessor
685 machines, but will use only one CPU of a multiprocessor machine. If
686 you say Y here, the kernel will run on many, but not all,
687 uniprocessor machines. On a uniprocessor machine, the kernel
688 will run faster if you say N here.
690 People using multiprocessor machines who say Y here should also say
691 Y to "Enhanced Real Time Clock Support", below.
693 See also <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO
694 available at <http://www.tldp.org/docs.html#howto>.
696 If you don't know what to do here, say N.
699 int "Maximum number of CPUs (2-32)"
702 default "4" if CPU_SUBTYPE_SHX3
705 This allows you to specify the maximum number of CPUs which this
706 kernel will support. The maximum supported value is 32 and the
707 minimum value which makes sense is 2.
709 This is purely to save memory - each supported CPU adds
710 approximately eight kilobytes to the kernel image.
713 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
716 Say Y here to experiment with turning CPUs off and on. CPUs
717 can be controlled through /sys/devices/system/cpu.
719 source "kernel/Kconfig.preempt"
723 depends on !SMP && SUPERH32
725 This enables support for gUSA (general UserSpace Atomicity).
726 This is the default implementation for both UP and non-ll/sc
727 CPUs, and is used by the libc, amongst others.
729 For additional information, design information can be found
730 in <http://lc.linux.or.jp/lc2002/papers/niibe0919p.pdf>.
732 This should only be disabled for special cases where alternate
733 atomicity implementations exist.
736 bool "Implement atomic operations by roll-back (gRB) (EXPERIMENTAL)"
737 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
739 Enabling this option will allow the kernel to implement some
740 atomic operations using a software implementation of load-locked/
741 store-conditional (LLSC). On machines which do not have hardware
742 LLSC, this should be more efficient than the other alternative of
743 disabling interrupts around the atomic sequence.
745 config HW_PERF_EVENTS
746 bool "Enable hardware performance counter support for perf events"
747 depends on PERF_EVENTS && CPU_HAS_PMU
750 Enable hardware performance counter support for perf events. If
751 disabled, perf events will use software events only.
753 source "drivers/sh/Kconfig"
759 config USE_BUILTIN_DTB
760 bool "Use builtin DTB"
762 depends on SH_DEVICE_TREE
764 Link a device tree blob for particular hardware into the kernel,
765 suppressing use of the DTB pointer provided by the bootloader.
766 This option should only be used with legacy bootloaders that are
767 not capable of providing a DTB to the kernel, or for experimental
768 hardware without stable device tree bindings.
770 config BUILTIN_DTB_SOURCE
771 string "Source file for builtin DTB"
773 depends on USE_BUILTIN_DTB
775 Base name (without suffix, relative to arch/sh/boot/dts) for the
776 a DTS file that will be used to produce the DTB linked into the
779 config ZERO_PAGE_OFFSET
781 default "0x00010000" if PAGE_SIZE_64KB || SH_RTS7751R2D || \
782 SH_7751_SOLUTION_ENGINE
783 default "0x00004000" if PAGE_SIZE_16KB || SH_SH03
784 default "0x00002000" if PAGE_SIZE_8KB
787 This sets the default offset of zero page.
789 config BOOT_LINK_OFFSET
791 default "0x00210000" if SH_SHMIN
792 default "0x00400000" if SH_CAYMAN
793 default "0x00810000" if SH_7780_SOLUTION_ENGINE
794 default "0x009e0000" if SH_TITAN
795 default "0x01800000" if SH_SDK7780
796 default "0x02000000" if SH_EDOSK7760
799 This option allows you to set the link address offset of the zImage.
800 This can be useful if you are on a board which has a small amount of
805 default "0x00001000" if PAGE_SIZE_4KB
806 default "0x00002000" if PAGE_SIZE_8KB
807 default "0x00004000" if PAGE_SIZE_16KB
808 default "0x00010000" if PAGE_SIZE_64KB
811 config ROMIMAGE_MMCIF
812 bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
813 depends on CPU_SUBTYPE_SH7724
815 Say Y here to include experimental MMCIF loading code in
816 romImage. With this enabled it is possible to write the romImage
817 kernel image to an MMC card and boot the kernel straight from
818 the reset vector. At reset the processor Mask ROM will load the
819 first part of the romImage which in turn loads the rest the kernel
820 image to RAM using the MMCIF hardware block.
823 prompt "Kernel command line"
825 default CMDLINE_OVERWRITE
827 Setting this option allows the kernel command line arguments
830 config CMDLINE_OVERWRITE
831 bool "Overwrite bootloader kernel arguments"
833 Given string will overwrite any arguments passed in by
836 config CMDLINE_EXTEND
837 bool "Extend bootloader kernel arguments"
839 Given string will be concatenated with arguments passed in
845 string "Kernel command line arguments string"
846 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
847 default "console=ttySC1,115200"
854 tristate "SuperHyway Bus support"
855 depends on CPU_SUBTYPE_SH4_202
858 bool "Maple Bus support"
859 depends on SH_DREAMCAST
861 The Maple Bus is SEGA's serial communication bus for peripherals
862 on the Dreamcast. Without this bus support you won't be able to
863 get your Dreamcast keyboard etc to work, so most users
864 probably want to say 'Y' here, unless you are only using the
865 Dreamcast with a serial line terminal or a remote network
870 depends on SYS_SUPPORTS_PCI
872 select GENERIC_PCI_IOMAP
873 select NO_GENERIC_PCI_IOPORT_MAP
875 Find out whether you have a PCI motherboard. PCI is the name of a
876 bus system, i.e. the way the CPU talks to the other stuff inside
877 your box. If you have PCI, say Y, otherwise N.
882 source "drivers/pci/Kconfig"
884 source "drivers/pcmcia/Kconfig"
888 menu "Executable file formats"
890 source "fs/Kconfig.binfmt"
894 menu "Power management options (EXPERIMENTAL)"
896 source "kernel/power/Kconfig"
898 source "drivers/cpuidle/Kconfig"
904 source "drivers/Kconfig"
908 source "arch/sh/Kconfig.debug"
910 source "security/Kconfig"
912 source "crypto/Kconfig"