1 # SPDX-License-Identifier: GPL-2.0
4 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
5 select ARCH_MIGHT_HAVE_PC_PARPORT
6 select ARCH_NO_COHERENT_DMA_MMAP if !MMU
7 select HAVE_PATA_PLATFORM
9 select HAVE_IDE if HAS_IOPORT_MAP
11 select HAVE_MEMBLOCK_NODE_MAP
13 select ARCH_DISCARD_MEMBLOCK
15 select HAVE_GENERIC_DMA_COHERENT
16 select HAVE_ARCH_TRACEHOOK
17 select HAVE_PERF_EVENTS
18 select HAVE_DEBUG_BUGVERBOSE
19 select ARCH_HAVE_CUSTOM_GPIO_H
20 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
21 select ARCH_HAS_GCOV_PROFILE_ALL
22 select PERF_USE_VMALLOC
23 select HAVE_DEBUG_KMEMLEAK
24 select HAVE_KERNEL_GZIP
25 select CPU_NO_EFFICIENT_FFS
26 select HAVE_KERNEL_BZIP2
27 select HAVE_KERNEL_LZMA
29 select HAVE_KERNEL_LZO
31 select ARCH_WANT_IPC_PARSE_VERSION
32 select HAVE_SYSCALL_TRACEPOINTS
33 select HAVE_REGS_AND_STACK_ACCESS_API
34 select MAY_HAVE_SPARSE_IRQ
35 select IRQ_FORCED_THREADING
37 select GENERIC_ATOMIC64
38 select GENERIC_IRQ_SHOW
39 select GENERIC_SMP_IDLE_THREAD
40 select GENERIC_IDLE_POLL_SETUP
41 select GENERIC_CLOCKEVENTS
42 select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
43 select GENERIC_SCHED_CLOCK
44 select GENERIC_STRNCPY_FROM_USER
45 select GENERIC_STRNLEN_USER
46 select HAVE_MOD_ARCH_SPECIFIC if DWARF_UNWINDER
47 select MODULES_USE_ELF_RELA
50 select HAVE_ARCH_AUDITSYSCALL
51 select HAVE_FUTEX_CMPXCHG if FUTEX
53 select NEED_DMA_MAP_STATE
54 select NEED_SG_DMA_LENGTH
57 The SuperH is a RISC processor targeted for use in embedded systems
58 and consumer electronics; it was also used in the Sega Dreamcast
59 gaming console. The SuperH port has a home page at
60 <http://www.linux-sh.org/>.
63 def_bool "$(ARCH)" = "sh"
65 select HAVE_KRETPROBES
66 select HAVE_IOREMAP_PROT if MMU && !X2TLB
67 select HAVE_FUNCTION_TRACER
68 select HAVE_FTRACE_MCOUNT_RECORD
69 select HAVE_DYNAMIC_FTRACE
70 select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
71 select ARCH_WANT_IPC_PARSE_VERSION
72 select HAVE_FUNCTION_GRAPH_TRACER
74 select HAVE_HW_BREAKPOINT
75 select HAVE_MIXED_BREAKPOINTS_REGS
77 select ARCH_HIBERNATION_POSSIBLE if MMU
79 select HAVE_CC_STACKPROTECTOR
82 def_bool "$(ARCH)" = "sh64"
83 select HAVE_EXIT_THREAD
88 default "arch/sh/configs/shx3_defconfig" if SUPERH32
89 default "arch/sh/configs/cayman_defconfig" if SUPERH64
91 config RWSEM_GENERIC_SPINLOCK
94 config RWSEM_XCHGADD_ALGORITHM
99 depends on BUG && SUPERH32
105 config GENERIC_HWEIGHT
108 config GENERIC_CALIBRATE_DELAY
111 config GENERIC_LOCKBREAK
113 depends on SMP && PREEMPT
115 config ARCH_SUSPEND_POSSIBLE
118 config ARCH_HIBERNATION_POSSIBLE
121 config SYS_SUPPORTS_APM_EMULATION
123 select ARCH_SUSPEND_POSSIBLE
125 config SYS_SUPPORTS_HUGETLBFS
128 config SYS_SUPPORTS_SMP
131 config SYS_SUPPORTS_NUMA
134 config SYS_SUPPORTS_PCI
137 config STACKTRACE_SUPPORT
140 config LOCKDEP_SUPPORT
143 config ARCH_HAS_ILOG2_U32
146 config ARCH_HAS_ILOG2_U64
151 depends on !SH_CAYMAN && !SH_SH4202_MICRODEV && !SH_SHMIN && \
152 !SH_HP6XX && !SH_SOLUTION_ENGINE
163 config DMA_NONCOHERENT
164 def_bool !DMA_COHERENT
166 config PGTABLE_LEVELS
170 source "init/Kconfig"
172 source "kernel/Kconfig.freezer"
186 select UNCACHED_MAPPING
192 select OF_EARLY_FLATTREE
196 select CPU_HAS_INTEVT
199 select SYS_SUPPORTS_SH_TMU
203 select CPU_HAS_INTEVT
205 select CPU_HAS_FPU if !CPU_SH4AL_DSP
207 select SYS_SUPPORTS_SH_TMU
208 select SYS_SUPPORTS_HUGETLBFS if MMU
222 select SYS_SUPPORTS_SH_TMU
223 select SYS_SUPPORTS_HUGETLBFS if MMU
231 select SYS_SUPPORTS_SMP
232 select SYS_SUPPORTS_NUMA
236 select ARCH_SUSPEND_POSSIBLE
240 depends on CPU_SH4 || CPU_SH4A
247 prompt "Processor sub-type selection"
253 # SH-2 Processor Support
255 config CPU_SUBTYPE_SH7619
256 bool "Support SH7619 processor"
258 select SYS_SUPPORTS_SH_CMT
260 config CPU_SUBTYPE_J2
261 bool "Support J2 processor"
263 select SYS_SUPPORTS_SMP
264 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
266 # SH-2A Processor Support
268 config CPU_SUBTYPE_SH7201
269 bool "Support SH7201 processor"
272 select SYS_SUPPORTS_SH_MTU2
274 config CPU_SUBTYPE_SH7203
275 bool "Support SH7203 processor"
278 select SYS_SUPPORTS_SH_CMT
279 select SYS_SUPPORTS_SH_MTU2
282 config CPU_SUBTYPE_SH7206
283 bool "Support SH7206 processor"
285 select SYS_SUPPORTS_SH_CMT
286 select SYS_SUPPORTS_SH_MTU2
288 config CPU_SUBTYPE_SH7263
289 bool "Support SH7263 processor"
292 select SYS_SUPPORTS_SH_CMT
293 select SYS_SUPPORTS_SH_MTU2
295 config CPU_SUBTYPE_SH7264
296 bool "Support SH7264 processor"
299 select SYS_SUPPORTS_SH_CMT
300 select SYS_SUPPORTS_SH_MTU2
303 config CPU_SUBTYPE_SH7269
304 bool "Support SH7269 processor"
307 select SYS_SUPPORTS_SH_CMT
308 select SYS_SUPPORTS_SH_MTU2
311 config CPU_SUBTYPE_MXG
312 bool "Support MX-G processor"
314 select SYS_SUPPORTS_SH_MTU2
316 Select MX-G if running on an R8A03022BG part.
318 # SH-3 Processor Support
320 config CPU_SUBTYPE_SH7705
321 bool "Support SH7705 processor"
324 config CPU_SUBTYPE_SH7706
325 bool "Support SH7706 processor"
328 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU.
330 config CPU_SUBTYPE_SH7707
331 bool "Support SH7707 processor"
334 Select SH7707 if you have a 60 Mhz SH-3 HD6417707 CPU.
336 config CPU_SUBTYPE_SH7708
337 bool "Support SH7708 processor"
340 Select SH7708 if you have a 60 Mhz SH-3 HD6417708S or
341 if you have a 100 Mhz SH-3 HD6417708R CPU.
343 config CPU_SUBTYPE_SH7709
344 bool "Support SH7709 processor"
347 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU.
349 config CPU_SUBTYPE_SH7710
350 bool "Support SH7710 processor"
354 Select SH7710 if you have a SH3-DSP SH7710 CPU.
356 config CPU_SUBTYPE_SH7712
357 bool "Support SH7712 processor"
361 Select SH7712 if you have a SH3-DSP SH7712 CPU.
363 config CPU_SUBTYPE_SH7720
364 bool "Support SH7720 processor"
367 select SYS_SUPPORTS_SH_CMT
368 select USB_OHCI_SH if USB_OHCI_HCD
371 Select SH7720 if you have a SH3-DSP SH7720 CPU.
373 config CPU_SUBTYPE_SH7721
374 bool "Support SH7721 processor"
377 select SYS_SUPPORTS_SH_CMT
378 select USB_OHCI_SH if USB_OHCI_HCD
380 Select SH7721 if you have a SH3-DSP SH7721 CPU.
382 # SH-4 Processor Support
384 config CPU_SUBTYPE_SH7750
385 bool "Support SH7750 processor"
388 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
390 config CPU_SUBTYPE_SH7091
391 bool "Support SH7091 processor"
394 Select SH7091 if you have an SH-4 based Sega device (such as
395 the Dreamcast, Naomi, and Naomi 2).
397 config CPU_SUBTYPE_SH7750R
398 bool "Support SH7750R processor"
401 config CPU_SUBTYPE_SH7750S
402 bool "Support SH7750S processor"
405 config CPU_SUBTYPE_SH7751
406 bool "Support SH7751 processor"
409 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
410 or if you have a HD6417751R CPU.
412 config CPU_SUBTYPE_SH7751R
413 bool "Support SH7751R processor"
416 config CPU_SUBTYPE_SH7760
417 bool "Support SH7760 processor"
420 config CPU_SUBTYPE_SH4_202
421 bool "Support SH4-202 processor"
424 # SH-4A Processor Support
426 config CPU_SUBTYPE_SH7723
427 bool "Support SH7723 processor"
431 select ARCH_SPARSEMEM_ENABLE
432 select SYS_SUPPORTS_SH_CMT
435 Select SH7723 if you have an SH-MobileR2 CPU.
437 config CPU_SUBTYPE_SH7724
438 bool "Support SH7724 processor"
442 select ARCH_SPARSEMEM_ENABLE
443 select SYS_SUPPORTS_SH_CMT
446 Select SH7724 if you have an SH-MobileR2R CPU.
448 config CPU_SUBTYPE_SH7734
449 bool "Support SH7734 processor"
454 Select SH7734 if you have a SH4A SH7734 CPU.
456 config CPU_SUBTYPE_SH7757
457 bool "Support SH7757 processor"
462 Select SH7757 if you have a SH4A SH7757 CPU.
464 config CPU_SUBTYPE_SH7763
465 bool "Support SH7763 processor"
467 select USB_OHCI_SH if USB_OHCI_HCD
469 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
471 config CPU_SUBTYPE_SH7770
472 bool "Support SH7770 processor"
475 config CPU_SUBTYPE_SH7780
476 bool "Support SH7780 processor"
479 config CPU_SUBTYPE_SH7785
480 bool "Support SH7785 processor"
483 select ARCH_SPARSEMEM_ENABLE
484 select SYS_SUPPORTS_NUMA
487 config CPU_SUBTYPE_SH7786
488 bool "Support SH7786 processor"
491 select CPU_HAS_PTEAEX
492 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
493 select USB_OHCI_SH if USB_OHCI_HCD
494 select USB_EHCI_SH if USB_EHCI_HCD
497 config CPU_SUBTYPE_SHX3
498 bool "Support SH-X3 processor"
501 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
505 # SH4AL-DSP Processor Support
507 config CPU_SUBTYPE_SH7343
508 bool "Support SH7343 processor"
511 select SYS_SUPPORTS_SH_CMT
513 config CPU_SUBTYPE_SH7722
514 bool "Support SH7722 processor"
518 select ARCH_SPARSEMEM_ENABLE
519 select SYS_SUPPORTS_NUMA
520 select SYS_SUPPORTS_SH_CMT
523 config CPU_SUBTYPE_SH7366
524 bool "Support SH7366 processor"
528 select ARCH_SPARSEMEM_ENABLE
529 select SYS_SUPPORTS_NUMA
530 select SYS_SUPPORTS_SH_CMT
539 prompt "Processor sub-type selection"
541 # SH-5 Processor Support
543 config CPU_SUBTYPE_SH5_101
544 bool "Support SH5-101 processor"
547 config CPU_SUBTYPE_SH5_103
548 bool "Support SH5-103 processor"
555 source "arch/sh/mm/Kconfig"
557 source "arch/sh/Kconfig.cpu"
559 source "arch/sh/boards/Kconfig"
561 menu "Timer and clock configuration"
564 int "Peripheral clock frequency (in Hz)"
565 depends on SH_CLK_CPG_LEGACY
566 default "31250000" if CPU_SUBTYPE_SH7619
567 default "33333333" if CPU_SUBTYPE_SH7770 || \
568 CPU_SUBTYPE_SH7760 || \
569 CPU_SUBTYPE_SH7705 || \
570 CPU_SUBTYPE_SH7203 || \
571 CPU_SUBTYPE_SH7206 || \
572 CPU_SUBTYPE_SH7263 || \
574 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
575 default "66000000" if CPU_SUBTYPE_SH4_202
578 This option is used to specify the peripheral clock frequency.
579 This is necessary for determining the reference clock value on
580 platforms lacking an RTC.
585 config SH_CLK_CPG_LEGACY
586 depends on SH_CLK_CPG
587 def_bool y if !CPU_SUBTYPE_SH7785 && !ARCH_SHMOBILE && \
588 !CPU_SHX3 && !CPU_SUBTYPE_SH7757 && \
589 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
594 menu "CPU Frequency scaling"
595 source "drivers/cpufreq/Kconfig"
598 source "arch/sh/drivers/Kconfig"
602 menu "Kernel features"
604 source kernel/Kconfig.hz
607 bool "kexec system call (EXPERIMENTAL)"
608 depends on SUPERH32 && MMU
611 kexec is a system call that implements the ability to shutdown your
612 current kernel, and to start another kernel. It is like a reboot
613 but it is independent of the system firmware. And like a reboot
614 you can start any kernel with it, not just Linux.
616 The name comes from the similarity to the exec system call.
618 It is an ongoing process to be certain the hardware in a machine
619 is properly shutdown, so do not be surprised if this code does not
620 initially work for you. As of this writing the exact hardware
621 interface is strongly in flux, so no good recommendation can be
625 bool "kernel crash dumps (EXPERIMENTAL)"
626 depends on SUPERH32 && BROKEN_ON_SMP
628 Generate crash dump after being started by kexec.
629 This should be normally only set in special crash dump kernels
630 which are loaded in the main kernel with kexec-tools into
631 a specially reserved region and then later executed after
632 a crash by kdump/kexec. The crash dump kernel must be compiled
633 to a memory address not used by the main kernel using
636 For more details see Documentation/kdump/kdump.txt
639 bool "kexec jump (EXPERIMENTAL)"
640 depends on SUPERH32 && KEXEC && HIBERNATION
642 Jump between original kernel and kexeced kernel and invoke
645 config PHYSICAL_START
646 hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
649 This gives the physical address where the kernel is loaded
650 and is ordinarily the same as MEMORY_START.
652 Different values are primarily used in the case of kexec on panic
653 where the fail safe kernel needs to run at a different address
654 than the panic-ed kernel.
657 bool "Enable seccomp to safely compute untrusted bytecode"
660 This kernel feature is useful for number crunching applications
661 that may need to compute untrusted bytecode during their
662 execution. By using pipes or other transports made available to
663 the process as file descriptors supporting the read/write
664 syscalls, it's possible to isolate those applications in
665 their own address space using seccomp. Once seccomp is
666 enabled via prctl, it cannot be disabled and the task is only
667 allowed to execute a few safe syscalls defined by each seccomp
673 bool "Symmetric multi-processing support"
674 depends on SYS_SUPPORTS_SMP
676 This enables support for systems with more than one CPU. If you have
677 a system with only one CPU, say N. If you have a system with more
680 If you say N here, the kernel will run on uni- and multiprocessor
681 machines, but will use only one CPU of a multiprocessor machine. If
682 you say Y here, the kernel will run on many, but not all,
683 uniprocessor machines. On a uniprocessor machine, the kernel
684 will run faster if you say N here.
686 People using multiprocessor machines who say Y here should also say
687 Y to "Enhanced Real Time Clock Support", below.
689 See also <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO
690 available at <http://www.tldp.org/docs.html#howto>.
692 If you don't know what to do here, say N.
695 int "Maximum number of CPUs (2-32)"
698 default "4" if CPU_SUBTYPE_SHX3
701 This allows you to specify the maximum number of CPUs which this
702 kernel will support. The maximum supported value is 32 and the
703 minimum value which makes sense is 2.
705 This is purely to save memory - each supported CPU adds
706 approximately eight kilobytes to the kernel image.
709 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
712 Say Y here to experiment with turning CPUs off and on. CPUs
713 can be controlled through /sys/devices/system/cpu.
715 source "kernel/Kconfig.preempt"
719 depends on !SMP && SUPERH32
721 This enables support for gUSA (general UserSpace Atomicity).
722 This is the default implementation for both UP and non-ll/sc
723 CPUs, and is used by the libc, amongst others.
725 For additional information, design information can be found
726 in <http://lc.linux.or.jp/lc2002/papers/niibe0919p.pdf>.
728 This should only be disabled for special cases where alternate
729 atomicity implementations exist.
732 bool "Implement atomic operations by roll-back (gRB) (EXPERIMENTAL)"
733 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
735 Enabling this option will allow the kernel to implement some
736 atomic operations using a software implementation of load-locked/
737 store-conditional (LLSC). On machines which do not have hardware
738 LLSC, this should be more efficient than the other alternative of
739 disabling interrupts around the atomic sequence.
741 config HW_PERF_EVENTS
742 bool "Enable hardware performance counter support for perf events"
743 depends on PERF_EVENTS && CPU_HAS_PMU
746 Enable hardware performance counter support for perf events. If
747 disabled, perf events will use software events only.
749 source "drivers/sh/Kconfig"
755 config USE_BUILTIN_DTB
756 bool "Use builtin DTB"
758 depends on SH_DEVICE_TREE
760 Link a device tree blob for particular hardware into the kernel,
761 suppressing use of the DTB pointer provided by the bootloader.
762 This option should only be used with legacy bootloaders that are
763 not capable of providing a DTB to the kernel, or for experimental
764 hardware without stable device tree bindings.
766 config BUILTIN_DTB_SOURCE
767 string "Source file for builtin DTB"
769 depends on USE_BUILTIN_DTB
771 Base name (without suffix, relative to arch/sh/boot/dts) for the
772 a DTS file that will be used to produce the DTB linked into the
775 config ZERO_PAGE_OFFSET
777 default "0x00010000" if PAGE_SIZE_64KB || SH_RTS7751R2D || \
778 SH_7751_SOLUTION_ENGINE
779 default "0x00004000" if PAGE_SIZE_16KB || SH_SH03
780 default "0x00002000" if PAGE_SIZE_8KB
783 This sets the default offset of zero page.
785 config BOOT_LINK_OFFSET
787 default "0x00210000" if SH_SHMIN
788 default "0x00400000" if SH_CAYMAN
789 default "0x00810000" if SH_7780_SOLUTION_ENGINE
790 default "0x009e0000" if SH_TITAN
791 default "0x01800000" if SH_SDK7780
792 default "0x02000000" if SH_EDOSK7760
795 This option allows you to set the link address offset of the zImage.
796 This can be useful if you are on a board which has a small amount of
801 default "0x00001000" if PAGE_SIZE_4KB
802 default "0x00002000" if PAGE_SIZE_8KB
803 default "0x00004000" if PAGE_SIZE_16KB
804 default "0x00010000" if PAGE_SIZE_64KB
807 config ROMIMAGE_MMCIF
808 bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
809 depends on CPU_SUBTYPE_SH7724
811 Say Y here to include experimental MMCIF loading code in
812 romImage. With this enabled it is possible to write the romImage
813 kernel image to an MMC card and boot the kernel straight from
814 the reset vector. At reset the processor Mask ROM will load the
815 first part of the romImage which in turn loads the rest the kernel
816 image to RAM using the MMCIF hardware block.
819 prompt "Kernel command line"
821 default CMDLINE_OVERWRITE
823 Setting this option allows the kernel command line arguments
826 config CMDLINE_OVERWRITE
827 bool "Overwrite bootloader kernel arguments"
829 Given string will overwrite any arguments passed in by
832 config CMDLINE_EXTEND
833 bool "Extend bootloader kernel arguments"
835 Given string will be concatenated with arguments passed in
841 string "Kernel command line arguments string"
842 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
843 default "console=ttySC1,115200"
850 tristate "SuperHyway Bus support"
851 depends on CPU_SUBTYPE_SH4_202
854 bool "Maple Bus support"
855 depends on SH_DREAMCAST
857 The Maple Bus is SEGA's serial communication bus for peripherals
858 on the Dreamcast. Without this bus support you won't be able to
859 get your Dreamcast keyboard etc to work, so most users
860 probably want to say 'Y' here, unless you are only using the
861 Dreamcast with a serial line terminal or a remote network
866 depends on SYS_SUPPORTS_PCI
868 select GENERIC_PCI_IOMAP
869 select NO_GENERIC_PCI_IOPORT_MAP
871 Find out whether you have a PCI motherboard. PCI is the name of a
872 bus system, i.e. the way the CPU talks to the other stuff inside
873 your box. If you have PCI, say Y, otherwise N.
878 source "drivers/pci/Kconfig"
880 source "drivers/pcmcia/Kconfig"
884 menu "Executable file formats"
886 source "fs/Kconfig.binfmt"
890 menu "Power management options (EXPERIMENTAL)"
892 source "kernel/power/Kconfig"
894 source "drivers/cpuidle/Kconfig"
900 source "drivers/Kconfig"
904 source "arch/sh/Kconfig.debug"
906 source "security/Kconfig"
908 source "crypto/Kconfig"