1 # SPDX-License-Identifier: GPL-2.0
4 select ARCH_HAS_PTE_SPECIAL
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
11 select HAVE_IDE if HAS_IOPORT_MAP
13 select HAVE_MEMBLOCK_NODE_MAP
15 select ARCH_DISCARD_MEMBLOCK
17 select HAVE_GENERIC_DMA_COHERENT
18 select HAVE_ARCH_TRACEHOOK
19 select HAVE_PERF_EVENTS
20 select HAVE_DEBUG_BUGVERBOSE
21 select ARCH_HAVE_CUSTOM_GPIO_H
22 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
23 select ARCH_HAS_GCOV_PROFILE_ALL
24 select PERF_USE_VMALLOC
25 select HAVE_DEBUG_KMEMLEAK
26 select HAVE_KERNEL_GZIP
27 select CPU_NO_EFFICIENT_FFS
28 select HAVE_KERNEL_BZIP2
29 select HAVE_KERNEL_LZMA
31 select HAVE_KERNEL_LZO
33 select ARCH_WANT_IPC_PARSE_VERSION
34 select HAVE_SYSCALL_TRACEPOINTS
35 select HAVE_REGS_AND_STACK_ACCESS_API
36 select MAY_HAVE_SPARSE_IRQ
37 select IRQ_FORCED_THREADING
39 select GENERIC_ATOMIC64
40 select GENERIC_IRQ_SHOW
41 select GENERIC_SMP_IDLE_THREAD
42 select GENERIC_IDLE_POLL_SETUP
43 select GENERIC_CLOCKEVENTS
44 select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
45 select GENERIC_SCHED_CLOCK
46 select GENERIC_STRNCPY_FROM_USER
47 select GENERIC_STRNLEN_USER
48 select HAVE_MOD_ARCH_SPECIFIC if DWARF_UNWINDER
49 select MODULES_USE_ELF_RELA
52 select HAVE_ARCH_AUDITSYSCALL
53 select HAVE_FUTEX_CMPXCHG if FUTEX
55 select NEED_SG_DMA_LENGTH
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"
66 select HAVE_KRETPROBES
67 select HAVE_IOREMAP_PROT if MMU && !X2TLB
68 select HAVE_FUNCTION_TRACER
69 select HAVE_FTRACE_MCOUNT_RECORD
70 select HAVE_DYNAMIC_FTRACE
71 select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
72 select ARCH_WANT_IPC_PARSE_VERSION
73 select HAVE_FUNCTION_GRAPH_TRACER
75 select HAVE_HW_BREAKPOINT
76 select HAVE_MIXED_BREAKPOINTS_REGS
78 select ARCH_HIBERNATION_POSSIBLE if MMU
80 select HAVE_STACKPROTECTOR
83 def_bool "$(ARCH)" = "sh64"
84 select HAVE_EXIT_THREAD
89 default "arch/sh/configs/shx3_defconfig" if SUPERH32
90 default "arch/sh/configs/cayman_defconfig" if SUPERH64
92 config RWSEM_GENERIC_SPINLOCK
95 config RWSEM_XCHGADD_ALGORITHM
100 depends on BUG && SUPERH32
106 config GENERIC_HWEIGHT
109 config GENERIC_CALIBRATE_DELAY
112 config GENERIC_LOCKBREAK
114 depends on SMP && PREEMPT
116 config ARCH_SUSPEND_POSSIBLE
119 config ARCH_HIBERNATION_POSSIBLE
122 config SYS_SUPPORTS_APM_EMULATION
124 select ARCH_SUSPEND_POSSIBLE
126 config SYS_SUPPORTS_HUGETLBFS
129 config SYS_SUPPORTS_SMP
132 config SYS_SUPPORTS_NUMA
135 config SYS_SUPPORTS_PCI
138 config STACKTRACE_SUPPORT
141 config LOCKDEP_SUPPORT
144 config ARCH_HAS_ILOG2_U32
147 config ARCH_HAS_ILOG2_U64
152 depends on !SH_CAYMAN && !SH_SH4202_MICRODEV && !SH_SHMIN && \
153 !SH_HP6XX && !SH_SOLUTION_ENGINE
164 config DMA_NONCOHERENT
165 def_bool !DMA_COHERENT
166 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
168 config PGTABLE_LEVELS
184 select UNCACHED_MAPPING
190 select OF_EARLY_FLATTREE
194 select CPU_HAS_INTEVT
197 select SYS_SUPPORTS_SH_TMU
201 select CPU_HAS_INTEVT
203 select CPU_HAS_FPU if !CPU_SH4AL_DSP
205 select SYS_SUPPORTS_SH_TMU
206 select SYS_SUPPORTS_HUGETLBFS if MMU
220 select SYS_SUPPORTS_SH_TMU
221 select SYS_SUPPORTS_HUGETLBFS if MMU
229 select SYS_SUPPORTS_SMP
230 select SYS_SUPPORTS_NUMA
234 select ARCH_SUSPEND_POSSIBLE
238 depends on CPU_SH4 || CPU_SH4A
245 prompt "Processor sub-type selection"
251 # SH-2 Processor Support
253 config CPU_SUBTYPE_SH7619
254 bool "Support SH7619 processor"
256 select SYS_SUPPORTS_SH_CMT
258 config CPU_SUBTYPE_J2
259 bool "Support J2 processor"
261 select SYS_SUPPORTS_SMP
262 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
264 # SH-2A Processor Support
266 config CPU_SUBTYPE_SH7201
267 bool "Support SH7201 processor"
270 select SYS_SUPPORTS_SH_MTU2
272 config CPU_SUBTYPE_SH7203
273 bool "Support SH7203 processor"
276 select SYS_SUPPORTS_SH_CMT
277 select SYS_SUPPORTS_SH_MTU2
280 config CPU_SUBTYPE_SH7206
281 bool "Support SH7206 processor"
283 select SYS_SUPPORTS_SH_CMT
284 select SYS_SUPPORTS_SH_MTU2
286 config CPU_SUBTYPE_SH7263
287 bool "Support SH7263 processor"
290 select SYS_SUPPORTS_SH_CMT
291 select SYS_SUPPORTS_SH_MTU2
293 config CPU_SUBTYPE_SH7264
294 bool "Support SH7264 processor"
297 select SYS_SUPPORTS_SH_CMT
298 select SYS_SUPPORTS_SH_MTU2
301 config CPU_SUBTYPE_SH7269
302 bool "Support SH7269 processor"
305 select SYS_SUPPORTS_SH_CMT
306 select SYS_SUPPORTS_SH_MTU2
309 config CPU_SUBTYPE_MXG
310 bool "Support MX-G processor"
312 select SYS_SUPPORTS_SH_MTU2
314 Select MX-G if running on an R8A03022BG part.
316 # SH-3 Processor Support
318 config CPU_SUBTYPE_SH7705
319 bool "Support SH7705 processor"
322 config CPU_SUBTYPE_SH7706
323 bool "Support SH7706 processor"
326 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU.
328 config CPU_SUBTYPE_SH7707
329 bool "Support SH7707 processor"
332 Select SH7707 if you have a 60 Mhz SH-3 HD6417707 CPU.
334 config CPU_SUBTYPE_SH7708
335 bool "Support SH7708 processor"
338 Select SH7708 if you have a 60 Mhz SH-3 HD6417708S or
339 if you have a 100 Mhz SH-3 HD6417708R CPU.
341 config CPU_SUBTYPE_SH7709
342 bool "Support SH7709 processor"
345 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU.
347 config CPU_SUBTYPE_SH7710
348 bool "Support SH7710 processor"
352 Select SH7710 if you have a SH3-DSP SH7710 CPU.
354 config CPU_SUBTYPE_SH7712
355 bool "Support SH7712 processor"
359 Select SH7712 if you have a SH3-DSP SH7712 CPU.
361 config CPU_SUBTYPE_SH7720
362 bool "Support SH7720 processor"
365 select SYS_SUPPORTS_SH_CMT
366 select USB_OHCI_SH if USB_OHCI_HCD
369 Select SH7720 if you have a SH3-DSP SH7720 CPU.
371 config CPU_SUBTYPE_SH7721
372 bool "Support SH7721 processor"
375 select SYS_SUPPORTS_SH_CMT
376 select USB_OHCI_SH if USB_OHCI_HCD
378 Select SH7721 if you have a SH3-DSP SH7721 CPU.
380 # SH-4 Processor Support
382 config CPU_SUBTYPE_SH7750
383 bool "Support SH7750 processor"
386 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
388 config CPU_SUBTYPE_SH7091
389 bool "Support SH7091 processor"
392 Select SH7091 if you have an SH-4 based Sega device (such as
393 the Dreamcast, Naomi, and Naomi 2).
395 config CPU_SUBTYPE_SH7750R
396 bool "Support SH7750R processor"
399 config CPU_SUBTYPE_SH7750S
400 bool "Support SH7750S processor"
403 config CPU_SUBTYPE_SH7751
404 bool "Support SH7751 processor"
407 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
408 or if you have a HD6417751R CPU.
410 config CPU_SUBTYPE_SH7751R
411 bool "Support SH7751R processor"
414 config CPU_SUBTYPE_SH7760
415 bool "Support SH7760 processor"
418 config CPU_SUBTYPE_SH4_202
419 bool "Support SH4-202 processor"
422 # SH-4A Processor Support
424 config CPU_SUBTYPE_SH7723
425 bool "Support SH7723 processor"
429 select ARCH_SPARSEMEM_ENABLE
430 select SYS_SUPPORTS_SH_CMT
433 Select SH7723 if you have an SH-MobileR2 CPU.
435 config CPU_SUBTYPE_SH7724
436 bool "Support SH7724 processor"
440 select ARCH_SPARSEMEM_ENABLE
441 select SYS_SUPPORTS_SH_CMT
444 Select SH7724 if you have an SH-MobileR2R CPU.
446 config CPU_SUBTYPE_SH7734
447 bool "Support SH7734 processor"
452 Select SH7734 if you have a SH4A SH7734 CPU.
454 config CPU_SUBTYPE_SH7757
455 bool "Support SH7757 processor"
460 Select SH7757 if you have a SH4A SH7757 CPU.
462 config CPU_SUBTYPE_SH7763
463 bool "Support SH7763 processor"
465 select USB_OHCI_SH if USB_OHCI_HCD
467 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
469 config CPU_SUBTYPE_SH7770
470 bool "Support SH7770 processor"
473 config CPU_SUBTYPE_SH7780
474 bool "Support SH7780 processor"
477 config CPU_SUBTYPE_SH7785
478 bool "Support SH7785 processor"
481 select ARCH_SPARSEMEM_ENABLE
482 select SYS_SUPPORTS_NUMA
485 config CPU_SUBTYPE_SH7786
486 bool "Support SH7786 processor"
489 select CPU_HAS_PTEAEX
490 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
491 select USB_OHCI_SH if USB_OHCI_HCD
492 select USB_EHCI_SH if USB_EHCI_HCD
495 config CPU_SUBTYPE_SHX3
496 bool "Support SH-X3 processor"
499 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
503 # SH4AL-DSP Processor Support
505 config CPU_SUBTYPE_SH7343
506 bool "Support SH7343 processor"
509 select SYS_SUPPORTS_SH_CMT
511 config CPU_SUBTYPE_SH7722
512 bool "Support SH7722 processor"
516 select ARCH_SPARSEMEM_ENABLE
517 select SYS_SUPPORTS_NUMA
518 select SYS_SUPPORTS_SH_CMT
521 config CPU_SUBTYPE_SH7366
522 bool "Support SH7366 processor"
526 select ARCH_SPARSEMEM_ENABLE
527 select SYS_SUPPORTS_NUMA
528 select SYS_SUPPORTS_SH_CMT
537 prompt "Processor sub-type selection"
539 # SH-5 Processor Support
541 config CPU_SUBTYPE_SH5_101
542 bool "Support SH5-101 processor"
545 config CPU_SUBTYPE_SH5_103
546 bool "Support SH5-103 processor"
553 source "arch/sh/mm/Kconfig"
555 source "arch/sh/Kconfig.cpu"
557 source "arch/sh/boards/Kconfig"
559 menu "Timer and clock configuration"
562 int "Peripheral clock frequency (in Hz)"
563 depends on SH_CLK_CPG_LEGACY
564 default "31250000" if CPU_SUBTYPE_SH7619
565 default "33333333" if CPU_SUBTYPE_SH7770 || \
566 CPU_SUBTYPE_SH7760 || \
567 CPU_SUBTYPE_SH7705 || \
568 CPU_SUBTYPE_SH7203 || \
569 CPU_SUBTYPE_SH7206 || \
570 CPU_SUBTYPE_SH7263 || \
572 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
573 default "66000000" if CPU_SUBTYPE_SH4_202
576 This option is used to specify the peripheral clock frequency.
577 This is necessary for determining the reference clock value on
578 platforms lacking an RTC.
583 config SH_CLK_CPG_LEGACY
584 depends on SH_CLK_CPG
585 def_bool y if !CPU_SUBTYPE_SH7785 && !ARCH_SHMOBILE && \
586 !CPU_SHX3 && !CPU_SUBTYPE_SH7757 && \
587 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
592 menu "CPU Frequency scaling"
593 source "drivers/cpufreq/Kconfig"
596 source "arch/sh/drivers/Kconfig"
600 menu "Kernel features"
602 source kernel/Kconfig.hz
605 bool "kexec system call (EXPERIMENTAL)"
606 depends on SUPERH32 && MMU
609 kexec is a system call that implements the ability to shutdown your
610 current kernel, and to start another kernel. It is like a reboot
611 but it is independent of the system firmware. And like a reboot
612 you can start any kernel with it, not just Linux.
614 The name comes from the similarity to the exec system call.
616 It is an ongoing process to be certain the hardware in a machine
617 is properly shutdown, so do not be surprised if this code does not
618 initially work for you. As of this writing the exact hardware
619 interface is strongly in flux, so no good recommendation can be
623 bool "kernel crash dumps (EXPERIMENTAL)"
624 depends on SUPERH32 && BROKEN_ON_SMP
626 Generate crash dump after being started by kexec.
627 This should be normally only set in special crash dump kernels
628 which are loaded in the main kernel with kexec-tools into
629 a specially reserved region and then later executed after
630 a crash by kdump/kexec. The crash dump kernel must be compiled
631 to a memory address not used by the main kernel using
634 For more details see Documentation/kdump/kdump.txt
637 bool "kexec jump (EXPERIMENTAL)"
638 depends on SUPERH32 && KEXEC && HIBERNATION
640 Jump between original kernel and kexeced kernel and invoke
643 config PHYSICAL_START
644 hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
647 This gives the physical address where the kernel is loaded
648 and is ordinarily the same as MEMORY_START.
650 Different values are primarily used in the case of kexec on panic
651 where the fail safe kernel needs to run at a different address
652 than the panic-ed kernel.
655 bool "Enable seccomp to safely compute untrusted bytecode"
658 This kernel feature is useful for number crunching applications
659 that may need to compute untrusted bytecode during their
660 execution. By using pipes or other transports made available to
661 the process as file descriptors supporting the read/write
662 syscalls, it's possible to isolate those applications in
663 their own address space using seccomp. Once seccomp is
664 enabled via prctl, it cannot be disabled and the task is only
665 allowed to execute a few safe syscalls defined by each seccomp
671 bool "Symmetric multi-processing support"
672 depends on SYS_SUPPORTS_SMP
674 This enables support for systems with more than one CPU. If you have
675 a system with only one CPU, say N. If you have a system with more
678 If you say N here, the kernel will run on uni- and multiprocessor
679 machines, but will use only one CPU of a multiprocessor machine. If
680 you say Y here, the kernel will run on many, but not all,
681 uniprocessor machines. On a uniprocessor machine, the kernel
682 will run faster if you say N here.
684 People using multiprocessor machines who say Y here should also say
685 Y to "Enhanced Real Time Clock Support", below.
687 See also <file:Documentation/lockup-watchdogs.txt> and the SMP-HOWTO
688 available at <http://www.tldp.org/docs.html#howto>.
690 If you don't know what to do here, say N.
693 int "Maximum number of CPUs (2-32)"
696 default "4" if CPU_SUBTYPE_SHX3
699 This allows you to specify the maximum number of CPUs which this
700 kernel will support. The maximum supported value is 32 and the
701 minimum value which makes sense is 2.
703 This is purely to save memory - each supported CPU adds
704 approximately eight kilobytes to the kernel image.
707 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
710 Say Y here to experiment with turning CPUs off and on. CPUs
711 can be controlled through /sys/devices/system/cpu.
715 depends on !SMP && SUPERH32
717 This enables support for gUSA (general UserSpace Atomicity).
718 This is the default implementation for both UP and non-ll/sc
719 CPUs, and is used by the libc, amongst others.
721 For additional information, design information can be found
722 in <http://lc.linux.or.jp/lc2002/papers/niibe0919p.pdf>.
724 This should only be disabled for special cases where alternate
725 atomicity implementations exist.
728 bool "Implement atomic operations by roll-back (gRB) (EXPERIMENTAL)"
729 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
731 Enabling this option will allow the kernel to implement some
732 atomic operations using a software implementation of load-locked/
733 store-conditional (LLSC). On machines which do not have hardware
734 LLSC, this should be more efficient than the other alternative of
735 disabling interrupts around the atomic sequence.
737 config HW_PERF_EVENTS
738 bool "Enable hardware performance counter support for perf events"
739 depends on PERF_EVENTS && CPU_HAS_PMU
742 Enable hardware performance counter support for perf events. If
743 disabled, perf events will use software events only.
745 source "drivers/sh/Kconfig"
751 config USE_BUILTIN_DTB
752 bool "Use builtin DTB"
754 depends on SH_DEVICE_TREE
756 Link a device tree blob for particular hardware into the kernel,
757 suppressing use of the DTB pointer provided by the bootloader.
758 This option should only be used with legacy bootloaders that are
759 not capable of providing a DTB to the kernel, or for experimental
760 hardware without stable device tree bindings.
762 config BUILTIN_DTB_SOURCE
763 string "Source file for builtin DTB"
765 depends on USE_BUILTIN_DTB
767 Base name (without suffix, relative to arch/sh/boot/dts) for the
768 a DTS file that will be used to produce the DTB linked into the
771 config ZERO_PAGE_OFFSET
773 default "0x00010000" if PAGE_SIZE_64KB || SH_RTS7751R2D || \
774 SH_7751_SOLUTION_ENGINE
775 default "0x00004000" if PAGE_SIZE_16KB || SH_SH03
776 default "0x00002000" if PAGE_SIZE_8KB
779 This sets the default offset of zero page.
781 config BOOT_LINK_OFFSET
783 default "0x00210000" if SH_SHMIN
784 default "0x00400000" if SH_CAYMAN
785 default "0x00810000" if SH_7780_SOLUTION_ENGINE
786 default "0x009e0000" if SH_TITAN
787 default "0x01800000" if SH_SDK7780
788 default "0x02000000" if SH_EDOSK7760
791 This option allows you to set the link address offset of the zImage.
792 This can be useful if you are on a board which has a small amount of
797 default "0x00001000" if PAGE_SIZE_4KB
798 default "0x00002000" if PAGE_SIZE_8KB
799 default "0x00004000" if PAGE_SIZE_16KB
800 default "0x00010000" if PAGE_SIZE_64KB
803 config ROMIMAGE_MMCIF
804 bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
805 depends on CPU_SUBTYPE_SH7724
807 Say Y here to include experimental MMCIF loading code in
808 romImage. With this enabled it is possible to write the romImage
809 kernel image to an MMC card and boot the kernel straight from
810 the reset vector. At reset the processor Mask ROM will load the
811 first part of the romImage which in turn loads the rest the kernel
812 image to RAM using the MMCIF hardware block.
815 prompt "Kernel command line"
817 default CMDLINE_OVERWRITE
819 Setting this option allows the kernel command line arguments
822 config CMDLINE_OVERWRITE
823 bool "Overwrite bootloader kernel arguments"
825 Given string will overwrite any arguments passed in by
828 config CMDLINE_EXTEND
829 bool "Extend bootloader kernel arguments"
831 Given string will be concatenated with arguments passed in
837 string "Kernel command line arguments string"
838 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
839 default "console=ttySC1,115200"
846 tristate "SuperHyway Bus support"
847 depends on CPU_SUBTYPE_SH4_202
850 bool "Maple Bus support"
851 depends on SH_DREAMCAST
853 The Maple Bus is SEGA's serial communication bus for peripherals
854 on the Dreamcast. Without this bus support you won't be able to
855 get your Dreamcast keyboard etc to work, so most users
856 probably want to say 'Y' here, unless you are only using the
857 Dreamcast with a serial line terminal or a remote network
862 depends on SYS_SUPPORTS_PCI
864 select GENERIC_PCI_IOMAP
865 select NO_GENERIC_PCI_IOPORT_MAP
867 Find out whether you have a PCI motherboard. PCI is the name of a
868 bus system, i.e. the way the CPU talks to the other stuff inside
869 your box. If you have PCI, say Y, otherwise N.
874 source "drivers/pci/Kconfig"
876 source "drivers/pcmcia/Kconfig"
880 menu "Power management options (EXPERIMENTAL)"
882 source "kernel/power/Kconfig"
884 source "drivers/cpuidle/Kconfig"