1 # SPDX-License-Identifier: GPL-2.0
4 select ARCH_HAS_CPU_FINALIZE_INIT
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 ARCH_NO_COHERENT_DMA_MMAP if !MMU
9 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
162 select DMA_DIRECT_OPS
165 config DMA_NONCOHERENT
166 def_bool !DMA_COHERENT
167 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
168 select DMA_NONCOHERENT_OPS
170 config PGTABLE_LEVELS
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/lockup-watchdogs.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.
717 depends on !SMP && SUPERH32
719 This enables support for gUSA (general UserSpace Atomicity).
720 This is the default implementation for both UP and non-ll/sc
721 CPUs, and is used by the libc, amongst others.
723 For additional information, design information can be found
724 in <http://lc.linux.or.jp/lc2002/papers/niibe0919p.pdf>.
726 This should only be disabled for special cases where alternate
727 atomicity implementations exist.
730 bool "Implement atomic operations by roll-back (gRB) (EXPERIMENTAL)"
731 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
733 Enabling this option will allow the kernel to implement some
734 atomic operations using a software implementation of load-locked/
735 store-conditional (LLSC). On machines which do not have hardware
736 LLSC, this should be more efficient than the other alternative of
737 disabling interrupts around the atomic sequence.
739 config HW_PERF_EVENTS
740 bool "Enable hardware performance counter support for perf events"
741 depends on PERF_EVENTS && CPU_HAS_PMU
744 Enable hardware performance counter support for perf events. If
745 disabled, perf events will use software events only.
747 source "drivers/sh/Kconfig"
753 config USE_BUILTIN_DTB
754 bool "Use builtin DTB"
756 depends on SH_DEVICE_TREE
758 Link a device tree blob for particular hardware into the kernel,
759 suppressing use of the DTB pointer provided by the bootloader.
760 This option should only be used with legacy bootloaders that are
761 not capable of providing a DTB to the kernel, or for experimental
762 hardware without stable device tree bindings.
764 config BUILTIN_DTB_SOURCE
765 string "Source file for builtin DTB"
767 depends on USE_BUILTIN_DTB
769 Base name (without suffix, relative to arch/sh/boot/dts) for the
770 a DTS file that will be used to produce the DTB linked into the
773 config ZERO_PAGE_OFFSET
775 default "0x00010000" if PAGE_SIZE_64KB || SH_RTS7751R2D || \
776 SH_7751_SOLUTION_ENGINE
777 default "0x00004000" if PAGE_SIZE_16KB || SH_SH03
778 default "0x00002000" if PAGE_SIZE_8KB
781 This sets the default offset of zero page.
783 config BOOT_LINK_OFFSET
785 default "0x00210000" if SH_SHMIN
786 default "0x00400000" if SH_CAYMAN
787 default "0x00810000" if SH_7780_SOLUTION_ENGINE
788 default "0x009e0000" if SH_TITAN
789 default "0x01800000" if SH_SDK7780
790 default "0x02000000" if SH_EDOSK7760
793 This option allows you to set the link address offset of the zImage.
794 This can be useful if you are on a board which has a small amount of
799 default "0x00001000" if PAGE_SIZE_4KB
800 default "0x00002000" if PAGE_SIZE_8KB
801 default "0x00004000" if PAGE_SIZE_16KB
802 default "0x00010000" if PAGE_SIZE_64KB
805 config ROMIMAGE_MMCIF
806 bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
807 depends on CPU_SUBTYPE_SH7724
809 Say Y here to include experimental MMCIF loading code in
810 romImage. With this enabled it is possible to write the romImage
811 kernel image to an MMC card and boot the kernel straight from
812 the reset vector. At reset the processor Mask ROM will load the
813 first part of the romImage which in turn loads the rest the kernel
814 image to RAM using the MMCIF hardware block.
817 prompt "Kernel command line"
819 default CMDLINE_OVERWRITE
821 Setting this option allows the kernel command line arguments
824 config CMDLINE_OVERWRITE
825 bool "Overwrite bootloader kernel arguments"
827 Given string will overwrite any arguments passed in by
830 config CMDLINE_EXTEND
831 bool "Extend bootloader kernel arguments"
833 Given string will be concatenated with arguments passed in
839 string "Kernel command line arguments string"
840 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
841 default "console=ttySC1,115200"
848 tristate "SuperHyway Bus support"
849 depends on CPU_SUBTYPE_SH4_202
852 bool "Maple Bus support"
853 depends on SH_DREAMCAST
855 The Maple Bus is SEGA's serial communication bus for peripherals
856 on the Dreamcast. Without this bus support you won't be able to
857 get your Dreamcast keyboard etc to work, so most users
858 probably want to say 'Y' here, unless you are only using the
859 Dreamcast with a serial line terminal or a remote network
864 depends on SYS_SUPPORTS_PCI
866 select GENERIC_PCI_IOMAP
867 select NO_GENERIC_PCI_IOPORT_MAP
869 Find out whether you have a PCI motherboard. PCI is the name of a
870 bus system, i.e. the way the CPU talks to the other stuff inside
871 your box. If you have PCI, say Y, otherwise N.
876 source "drivers/pci/Kconfig"
878 source "drivers/pcmcia/Kconfig"
882 menu "Power management options (EXPERIMENTAL)"
884 source "kernel/power/Kconfig"
886 source "drivers/cpuidle/Kconfig"