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
10 select DMA_DECLARE_COHERENT
11 select HAVE_IDE if HAS_IOPORT_MAP
12 select HAVE_MEMBLOCK_NODE_MAP
14 select HAVE_ARCH_TRACEHOOK
15 select HAVE_PERF_EVENTS
16 select HAVE_DEBUG_BUGVERBOSE
17 select ARCH_HAVE_CUSTOM_GPIO_H
18 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
19 select ARCH_HAS_GCOV_PROFILE_ALL
20 select PERF_USE_VMALLOC
21 select HAVE_DEBUG_KMEMLEAK
22 select HAVE_KERNEL_GZIP
23 select CPU_NO_EFFICIENT_FFS
24 select HAVE_KERNEL_BZIP2
25 select HAVE_KERNEL_LZMA
27 select HAVE_KERNEL_LZO
29 select ARCH_WANT_IPC_PARSE_VERSION
30 select HAVE_SYSCALL_TRACEPOINTS
31 select HAVE_REGS_AND_STACK_ACCESS_API
32 select MAY_HAVE_SPARSE_IRQ
33 select IRQ_FORCED_THREADING
35 select GENERIC_ATOMIC64
36 select GENERIC_IRQ_SHOW
37 select GENERIC_SMP_IDLE_THREAD
38 select GENERIC_IDLE_POLL_SETUP
39 select GENERIC_CLOCKEVENTS
40 select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
41 select GENERIC_PCI_IOMAP if PCI
42 select GENERIC_SCHED_CLOCK
43 select GENERIC_STRNCPY_FROM_USER
44 select GENERIC_STRNLEN_USER
45 select HAVE_MOD_ARCH_SPECIFIC if DWARF_UNWINDER
46 select MODULES_USE_ELF_RELA
47 select NO_GENERIC_PCI_IOPORT_MAP if PCI
50 select PCI_DOMAINS if PCI
51 select HAVE_ARCH_AUDITSYSCALL
52 select HAVE_FUTEX_CMPXCHG if FUTEX
54 select NEED_SG_DMA_LENGTH
55 select ARCH_HAS_GIGANTIC_PAGE
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"
65 select ARCH_32BIT_OFF_T
67 select HAVE_KRETPROBES
68 select HAVE_IOREMAP_PROT if MMU && !X2TLB
69 select HAVE_FUNCTION_TRACER
70 select HAVE_FTRACE_MCOUNT_RECORD
71 select HAVE_DYNAMIC_FTRACE
72 select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
73 select ARCH_WANT_IPC_PARSE_VERSION
74 select HAVE_FUNCTION_GRAPH_TRACER
76 select HAVE_HW_BREAKPOINT
77 select HAVE_MIXED_BREAKPOINTS_REGS
79 select ARCH_HIBERNATION_POSSIBLE if MMU
81 select HAVE_STACKPROTECTOR
84 def_bool "$(ARCH)" = "sh64"
85 select HAVE_EXIT_THREAD
90 default "arch/sh/configs/shx3_defconfig" if SUPERH32
91 default "arch/sh/configs/cayman_defconfig" if SUPERH64
95 depends on BUG && SUPERH32
101 config GENERIC_HWEIGHT
104 config GENERIC_CALIBRATE_DELAY
107 config GENERIC_LOCKBREAK
109 depends on SMP && PREEMPT
111 config ARCH_SUSPEND_POSSIBLE
114 config ARCH_HIBERNATION_POSSIBLE
117 config SYS_SUPPORTS_APM_EMULATION
119 select ARCH_SUSPEND_POSSIBLE
121 config SYS_SUPPORTS_HUGETLBFS
124 config SYS_SUPPORTS_SMP
127 config SYS_SUPPORTS_NUMA
130 config STACKTRACE_SUPPORT
133 config LOCKDEP_SUPPORT
136 config ARCH_HAS_ILOG2_U32
139 config ARCH_HAS_ILOG2_U64
144 depends on !SH_CAYMAN && !SH_SH4202_MICRODEV && !SH_SHMIN && \
145 !SH_HP6XX && !SH_SOLUTION_ENGINE
156 config DMA_NONCOHERENT
157 def_bool !DMA_COHERENT
158 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
160 config PGTABLE_LEVELS
176 select UNCACHED_MAPPING
182 select OF_EARLY_FLATTREE
186 select CPU_HAS_INTEVT
189 select SYS_SUPPORTS_SH_TMU
193 select CPU_HAS_INTEVT
195 select CPU_HAS_FPU if !CPU_SH4AL_DSP
197 select SYS_SUPPORTS_SH_TMU
198 select SYS_SUPPORTS_HUGETLBFS if MMU
212 select SYS_SUPPORTS_SH_TMU
213 select SYS_SUPPORTS_HUGETLBFS if MMU
221 select SYS_SUPPORTS_SMP
222 select SYS_SUPPORTS_NUMA
226 select ARCH_SUSPEND_POSSIBLE
230 depends on CPU_SH4 || CPU_SH4A
237 prompt "Processor sub-type selection"
243 # SH-2 Processor Support
245 config CPU_SUBTYPE_SH7619
246 bool "Support SH7619 processor"
248 select SYS_SUPPORTS_SH_CMT
250 config CPU_SUBTYPE_J2
251 bool "Support J2 processor"
253 select SYS_SUPPORTS_SMP
254 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
256 # SH-2A Processor Support
258 config CPU_SUBTYPE_SH7201
259 bool "Support SH7201 processor"
262 select SYS_SUPPORTS_SH_MTU2
264 config CPU_SUBTYPE_SH7203
265 bool "Support SH7203 processor"
268 select SYS_SUPPORTS_SH_CMT
269 select SYS_SUPPORTS_SH_MTU2
272 config CPU_SUBTYPE_SH7206
273 bool "Support SH7206 processor"
275 select SYS_SUPPORTS_SH_CMT
276 select SYS_SUPPORTS_SH_MTU2
278 config CPU_SUBTYPE_SH7263
279 bool "Support SH7263 processor"
282 select SYS_SUPPORTS_SH_CMT
283 select SYS_SUPPORTS_SH_MTU2
285 config CPU_SUBTYPE_SH7264
286 bool "Support SH7264 processor"
289 select SYS_SUPPORTS_SH_CMT
290 select SYS_SUPPORTS_SH_MTU2
293 config CPU_SUBTYPE_SH7269
294 bool "Support SH7269 processor"
297 select SYS_SUPPORTS_SH_CMT
298 select SYS_SUPPORTS_SH_MTU2
301 config CPU_SUBTYPE_MXG
302 bool "Support MX-G processor"
304 select SYS_SUPPORTS_SH_MTU2
306 Select MX-G if running on an R8A03022BG part.
308 # SH-3 Processor Support
310 config CPU_SUBTYPE_SH7705
311 bool "Support SH7705 processor"
314 config CPU_SUBTYPE_SH7706
315 bool "Support SH7706 processor"
318 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU.
320 config CPU_SUBTYPE_SH7707
321 bool "Support SH7707 processor"
324 Select SH7707 if you have a 60 Mhz SH-3 HD6417707 CPU.
326 config CPU_SUBTYPE_SH7708
327 bool "Support SH7708 processor"
330 Select SH7708 if you have a 60 Mhz SH-3 HD6417708S or
331 if you have a 100 Mhz SH-3 HD6417708R CPU.
333 config CPU_SUBTYPE_SH7709
334 bool "Support SH7709 processor"
337 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU.
339 config CPU_SUBTYPE_SH7710
340 bool "Support SH7710 processor"
344 Select SH7710 if you have a SH3-DSP SH7710 CPU.
346 config CPU_SUBTYPE_SH7712
347 bool "Support SH7712 processor"
351 Select SH7712 if you have a SH3-DSP SH7712 CPU.
353 config CPU_SUBTYPE_SH7720
354 bool "Support SH7720 processor"
357 select SYS_SUPPORTS_SH_CMT
358 select USB_OHCI_SH if USB_OHCI_HCD
361 Select SH7720 if you have a SH3-DSP SH7720 CPU.
363 config CPU_SUBTYPE_SH7721
364 bool "Support SH7721 processor"
367 select SYS_SUPPORTS_SH_CMT
368 select USB_OHCI_SH if USB_OHCI_HCD
370 Select SH7721 if you have a SH3-DSP SH7721 CPU.
372 # SH-4 Processor Support
374 config CPU_SUBTYPE_SH7750
375 bool "Support SH7750 processor"
378 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
380 config CPU_SUBTYPE_SH7091
381 bool "Support SH7091 processor"
384 Select SH7091 if you have an SH-4 based Sega device (such as
385 the Dreamcast, Naomi, and Naomi 2).
387 config CPU_SUBTYPE_SH7750R
388 bool "Support SH7750R processor"
391 config CPU_SUBTYPE_SH7750S
392 bool "Support SH7750S processor"
395 config CPU_SUBTYPE_SH7751
396 bool "Support SH7751 processor"
399 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
400 or if you have a HD6417751R CPU.
402 config CPU_SUBTYPE_SH7751R
403 bool "Support SH7751R processor"
406 config CPU_SUBTYPE_SH7760
407 bool "Support SH7760 processor"
410 config CPU_SUBTYPE_SH4_202
411 bool "Support SH4-202 processor"
414 # SH-4A Processor Support
416 config CPU_SUBTYPE_SH7723
417 bool "Support SH7723 processor"
421 select ARCH_SPARSEMEM_ENABLE
422 select SYS_SUPPORTS_SH_CMT
425 Select SH7723 if you have an SH-MobileR2 CPU.
427 config CPU_SUBTYPE_SH7724
428 bool "Support SH7724 processor"
432 select ARCH_SPARSEMEM_ENABLE
433 select SYS_SUPPORTS_SH_CMT
436 Select SH7724 if you have an SH-MobileR2R CPU.
438 config CPU_SUBTYPE_SH7734
439 bool "Support SH7734 processor"
444 Select SH7734 if you have a SH4A SH7734 CPU.
446 config CPU_SUBTYPE_SH7757
447 bool "Support SH7757 processor"
452 Select SH7757 if you have a SH4A SH7757 CPU.
454 config CPU_SUBTYPE_SH7763
455 bool "Support SH7763 processor"
457 select USB_OHCI_SH if USB_OHCI_HCD
459 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
461 config CPU_SUBTYPE_SH7770
462 bool "Support SH7770 processor"
465 config CPU_SUBTYPE_SH7780
466 bool "Support SH7780 processor"
469 config CPU_SUBTYPE_SH7785
470 bool "Support SH7785 processor"
473 select ARCH_SPARSEMEM_ENABLE
474 select SYS_SUPPORTS_NUMA
477 config CPU_SUBTYPE_SH7786
478 bool "Support SH7786 processor"
481 select CPU_HAS_PTEAEX
482 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
483 select USB_OHCI_SH if USB_OHCI_HCD
484 select USB_EHCI_SH if USB_EHCI_HCD
487 config CPU_SUBTYPE_SHX3
488 bool "Support SH-X3 processor"
491 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
495 # SH4AL-DSP Processor Support
497 config CPU_SUBTYPE_SH7343
498 bool "Support SH7343 processor"
501 select SYS_SUPPORTS_SH_CMT
503 config CPU_SUBTYPE_SH7722
504 bool "Support SH7722 processor"
508 select ARCH_SPARSEMEM_ENABLE
509 select SYS_SUPPORTS_NUMA
510 select SYS_SUPPORTS_SH_CMT
513 config CPU_SUBTYPE_SH7366
514 bool "Support SH7366 processor"
518 select ARCH_SPARSEMEM_ENABLE
519 select SYS_SUPPORTS_NUMA
520 select SYS_SUPPORTS_SH_CMT
529 prompt "Processor sub-type selection"
531 # SH-5 Processor Support
533 config CPU_SUBTYPE_SH5_101
534 bool "Support SH5-101 processor"
537 config CPU_SUBTYPE_SH5_103
538 bool "Support SH5-103 processor"
545 source "arch/sh/mm/Kconfig"
547 source "arch/sh/Kconfig.cpu"
549 source "arch/sh/boards/Kconfig"
551 menu "Timer and clock configuration"
554 int "Peripheral clock frequency (in Hz)"
555 depends on SH_CLK_CPG_LEGACY
556 default "31250000" if CPU_SUBTYPE_SH7619
557 default "33333333" if CPU_SUBTYPE_SH7770 || \
558 CPU_SUBTYPE_SH7760 || \
559 CPU_SUBTYPE_SH7705 || \
560 CPU_SUBTYPE_SH7203 || \
561 CPU_SUBTYPE_SH7206 || \
562 CPU_SUBTYPE_SH7263 || \
564 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
565 default "66000000" if CPU_SUBTYPE_SH4_202
568 This option is used to specify the peripheral clock frequency.
569 This is necessary for determining the reference clock value on
570 platforms lacking an RTC.
575 config SH_CLK_CPG_LEGACY
576 depends on SH_CLK_CPG
577 def_bool y if !CPU_SUBTYPE_SH7785 && !ARCH_SHMOBILE && \
578 !CPU_SHX3 && !CPU_SUBTYPE_SH7757 && \
579 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
584 menu "CPU Frequency scaling"
585 source "drivers/cpufreq/Kconfig"
588 source "arch/sh/drivers/Kconfig"
592 menu "Kernel features"
594 source "kernel/Kconfig.hz"
597 bool "kexec system call (EXPERIMENTAL)"
598 depends on SUPERH32 && MMU
601 kexec is a system call that implements the ability to shutdown your
602 current kernel, and to start another kernel. It is like a reboot
603 but it is independent of the system firmware. And like a reboot
604 you can start any kernel with it, not just Linux.
606 The name comes from the similarity to the exec system call.
608 It is an ongoing process to be certain the hardware in a machine
609 is properly shutdown, so do not be surprised if this code does not
610 initially work for you. As of this writing the exact hardware
611 interface is strongly in flux, so no good recommendation can be
615 bool "kernel crash dumps (EXPERIMENTAL)"
616 depends on SUPERH32 && BROKEN_ON_SMP
618 Generate crash dump after being started by kexec.
619 This should be normally only set in special crash dump kernels
620 which are loaded in the main kernel with kexec-tools into
621 a specially reserved region and then later executed after
622 a crash by kdump/kexec. The crash dump kernel must be compiled
623 to a memory address not used by the main kernel using
626 For more details see Documentation/kdump/kdump.txt
629 bool "kexec jump (EXPERIMENTAL)"
630 depends on SUPERH32 && KEXEC && HIBERNATION
632 Jump between original kernel and kexeced kernel and invoke
635 config PHYSICAL_START
636 hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
639 This gives the physical address where the kernel is loaded
640 and is ordinarily the same as MEMORY_START.
642 Different values are primarily used in the case of kexec on panic
643 where the fail safe kernel needs to run at a different address
644 than the panic-ed kernel.
647 bool "Enable seccomp to safely compute untrusted bytecode"
650 This kernel feature is useful for number crunching applications
651 that may need to compute untrusted bytecode during their
652 execution. By using pipes or other transports made available to
653 the process as file descriptors supporting the read/write
654 syscalls, it's possible to isolate those applications in
655 their own address space using seccomp. Once seccomp is
656 enabled via prctl, it cannot be disabled and the task is only
657 allowed to execute a few safe syscalls defined by each seccomp
663 bool "Symmetric multi-processing support"
664 depends on SYS_SUPPORTS_SMP
666 This enables support for systems with more than one CPU. If you have
667 a system with only one CPU, say N. If you have a system with more
670 If you say N here, the kernel will run on uni- and multiprocessor
671 machines, but will use only one CPU of a multiprocessor machine. If
672 you say Y here, the kernel will run on many, but not all,
673 uniprocessor machines. On a uniprocessor machine, the kernel
674 will run faster if you say N here.
676 People using multiprocessor machines who say Y here should also say
677 Y to "Enhanced Real Time Clock Support", below.
679 See also <file:Documentation/lockup-watchdogs.txt> and the SMP-HOWTO
680 available at <http://www.tldp.org/docs.html#howto>.
682 If you don't know what to do here, say N.
685 int "Maximum number of CPUs (2-32)"
688 default "4" if CPU_SUBTYPE_SHX3
691 This allows you to specify the maximum number of CPUs which this
692 kernel will support. The maximum supported value is 32 and the
693 minimum value which makes sense is 2.
695 This is purely to save memory - each supported CPU adds
696 approximately eight kilobytes to the kernel image.
699 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
702 Say Y here to experiment with turning CPUs off and on. CPUs
703 can be controlled through /sys/devices/system/cpu.
707 depends on !SMP && SUPERH32
709 This enables support for gUSA (general UserSpace Atomicity).
710 This is the default implementation for both UP and non-ll/sc
711 CPUs, and is used by the libc, amongst others.
713 For additional information, design information can be found
714 in <http://lc.linux.or.jp/lc2002/papers/niibe0919p.pdf>.
716 This should only be disabled for special cases where alternate
717 atomicity implementations exist.
720 bool "Implement atomic operations by roll-back (gRB) (EXPERIMENTAL)"
721 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
723 Enabling this option will allow the kernel to implement some
724 atomic operations using a software implementation of load-locked/
725 store-conditional (LLSC). On machines which do not have hardware
726 LLSC, this should be more efficient than the other alternative of
727 disabling interrupts around the atomic sequence.
729 config HW_PERF_EVENTS
730 bool "Enable hardware performance counter support for perf events"
731 depends on PERF_EVENTS && CPU_HAS_PMU
734 Enable hardware performance counter support for perf events. If
735 disabled, perf events will use software events only.
737 source "drivers/sh/Kconfig"
743 config USE_BUILTIN_DTB
744 bool "Use builtin DTB"
746 depends on SH_DEVICE_TREE
748 Link a device tree blob for particular hardware into the kernel,
749 suppressing use of the DTB pointer provided by the bootloader.
750 This option should only be used with legacy bootloaders that are
751 not capable of providing a DTB to the kernel, or for experimental
752 hardware without stable device tree bindings.
754 config BUILTIN_DTB_SOURCE
755 string "Source file for builtin DTB"
757 depends on USE_BUILTIN_DTB
759 Base name (without suffix, relative to arch/sh/boot/dts) for the
760 a DTS file that will be used to produce the DTB linked into the
763 config ZERO_PAGE_OFFSET
765 default "0x00010000" if PAGE_SIZE_64KB || SH_RTS7751R2D || \
766 SH_7751_SOLUTION_ENGINE
767 default "0x00004000" if PAGE_SIZE_16KB || SH_SH03
768 default "0x00002000" if PAGE_SIZE_8KB
771 This sets the default offset of zero page.
773 config BOOT_LINK_OFFSET
775 default "0x00210000" if SH_SHMIN
776 default "0x00400000" if SH_CAYMAN
777 default "0x00810000" if SH_7780_SOLUTION_ENGINE
778 default "0x009e0000" if SH_TITAN
779 default "0x01800000" if SH_SDK7780
780 default "0x02000000" if SH_EDOSK7760
783 This option allows you to set the link address offset of the zImage.
784 This can be useful if you are on a board which has a small amount of
789 default "0x00001000" if PAGE_SIZE_4KB
790 default "0x00002000" if PAGE_SIZE_8KB
791 default "0x00004000" if PAGE_SIZE_16KB
792 default "0x00010000" if PAGE_SIZE_64KB
795 config ROMIMAGE_MMCIF
796 bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
797 depends on CPU_SUBTYPE_SH7724
799 Say Y here to include experimental MMCIF loading code in
800 romImage. With this enabled it is possible to write the romImage
801 kernel image to an MMC card and boot the kernel straight from
802 the reset vector. At reset the processor Mask ROM will load the
803 first part of the romImage which in turn loads the rest the kernel
804 image to RAM using the MMCIF hardware block.
807 prompt "Kernel command line"
809 default CMDLINE_OVERWRITE
811 Setting this option allows the kernel command line arguments
814 config CMDLINE_OVERWRITE
815 bool "Overwrite bootloader kernel arguments"
817 Given string will overwrite any arguments passed in by
820 config CMDLINE_EXTEND
821 bool "Extend bootloader kernel arguments"
823 Given string will be concatenated with arguments passed in
829 string "Kernel command line arguments string"
830 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
831 default "console=ttySC1,115200"
838 tristate "SuperHyway Bus support"
839 depends on CPU_SUBTYPE_SH4_202
842 bool "Maple Bus support"
843 depends on SH_DREAMCAST
845 The Maple Bus is SEGA's serial communication bus for peripherals
846 on the Dreamcast. Without this bus support you won't be able to
847 get your Dreamcast keyboard etc to work, so most users
848 probably want to say 'Y' here, unless you are only using the
849 Dreamcast with a serial line terminal or a remote network
854 menu "Power management options (EXPERIMENTAL)"
856 source "kernel/power/Kconfig"
858 source "drivers/cpuidle/Kconfig"