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 HAVE_IDE if HAS_IOPORT_MAP
12 select HAVE_MEMBLOCK_NODE_MAP
14 select ARCH_DISCARD_MEMBLOCK
16 select HAVE_GENERIC_DMA_COHERENT
17 select HAVE_ARCH_TRACEHOOK
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
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_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
161 select DMA_DIRECT_OPS
164 config DMA_NONCOHERENT
165 def_bool !DMA_COHERENT
166 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
167 select DMA_NONCOHERENT_OPS
169 config PGTABLE_LEVELS
185 select UNCACHED_MAPPING
191 select OF_EARLY_FLATTREE
195 select CPU_HAS_INTEVT
198 select SYS_SUPPORTS_SH_TMU
202 select CPU_HAS_INTEVT
204 select CPU_HAS_FPU if !CPU_SH4AL_DSP
206 select SYS_SUPPORTS_SH_TMU
207 select SYS_SUPPORTS_HUGETLBFS if MMU
221 select SYS_SUPPORTS_SH_TMU
222 select SYS_SUPPORTS_HUGETLBFS if MMU
230 select SYS_SUPPORTS_SMP
231 select SYS_SUPPORTS_NUMA
235 select ARCH_SUSPEND_POSSIBLE
239 depends on CPU_SH4 || CPU_SH4A
246 prompt "Processor sub-type selection"
252 # SH-2 Processor Support
254 config CPU_SUBTYPE_SH7619
255 bool "Support SH7619 processor"
257 select SYS_SUPPORTS_SH_CMT
259 config CPU_SUBTYPE_J2
260 bool "Support J2 processor"
262 select SYS_SUPPORTS_SMP
263 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
265 # SH-2A Processor Support
267 config CPU_SUBTYPE_SH7201
268 bool "Support SH7201 processor"
271 select SYS_SUPPORTS_SH_MTU2
273 config CPU_SUBTYPE_SH7203
274 bool "Support SH7203 processor"
277 select SYS_SUPPORTS_SH_CMT
278 select SYS_SUPPORTS_SH_MTU2
281 config CPU_SUBTYPE_SH7206
282 bool "Support SH7206 processor"
284 select SYS_SUPPORTS_SH_CMT
285 select SYS_SUPPORTS_SH_MTU2
287 config CPU_SUBTYPE_SH7263
288 bool "Support SH7263 processor"
291 select SYS_SUPPORTS_SH_CMT
292 select SYS_SUPPORTS_SH_MTU2
294 config CPU_SUBTYPE_SH7264
295 bool "Support SH7264 processor"
298 select SYS_SUPPORTS_SH_CMT
299 select SYS_SUPPORTS_SH_MTU2
302 config CPU_SUBTYPE_SH7269
303 bool "Support SH7269 processor"
306 select SYS_SUPPORTS_SH_CMT
307 select SYS_SUPPORTS_SH_MTU2
310 config CPU_SUBTYPE_MXG
311 bool "Support MX-G processor"
313 select SYS_SUPPORTS_SH_MTU2
315 Select MX-G if running on an R8A03022BG part.
317 # SH-3 Processor Support
319 config CPU_SUBTYPE_SH7705
320 bool "Support SH7705 processor"
323 config CPU_SUBTYPE_SH7706
324 bool "Support SH7706 processor"
327 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU.
329 config CPU_SUBTYPE_SH7707
330 bool "Support SH7707 processor"
333 Select SH7707 if you have a 60 Mhz SH-3 HD6417707 CPU.
335 config CPU_SUBTYPE_SH7708
336 bool "Support SH7708 processor"
339 Select SH7708 if you have a 60 Mhz SH-3 HD6417708S or
340 if you have a 100 Mhz SH-3 HD6417708R CPU.
342 config CPU_SUBTYPE_SH7709
343 bool "Support SH7709 processor"
346 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU.
348 config CPU_SUBTYPE_SH7710
349 bool "Support SH7710 processor"
353 Select SH7710 if you have a SH3-DSP SH7710 CPU.
355 config CPU_SUBTYPE_SH7712
356 bool "Support SH7712 processor"
360 Select SH7712 if you have a SH3-DSP SH7712 CPU.
362 config CPU_SUBTYPE_SH7720
363 bool "Support SH7720 processor"
366 select SYS_SUPPORTS_SH_CMT
367 select USB_OHCI_SH if USB_OHCI_HCD
370 Select SH7720 if you have a SH3-DSP SH7720 CPU.
372 config CPU_SUBTYPE_SH7721
373 bool "Support SH7721 processor"
376 select SYS_SUPPORTS_SH_CMT
377 select USB_OHCI_SH if USB_OHCI_HCD
379 Select SH7721 if you have a SH3-DSP SH7721 CPU.
381 # SH-4 Processor Support
383 config CPU_SUBTYPE_SH7750
384 bool "Support SH7750 processor"
387 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
389 config CPU_SUBTYPE_SH7091
390 bool "Support SH7091 processor"
393 Select SH7091 if you have an SH-4 based Sega device (such as
394 the Dreamcast, Naomi, and Naomi 2).
396 config CPU_SUBTYPE_SH7750R
397 bool "Support SH7750R processor"
400 config CPU_SUBTYPE_SH7750S
401 bool "Support SH7750S processor"
404 config CPU_SUBTYPE_SH7751
405 bool "Support SH7751 processor"
408 Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
409 or if you have a HD6417751R CPU.
411 config CPU_SUBTYPE_SH7751R
412 bool "Support SH7751R processor"
415 config CPU_SUBTYPE_SH7760
416 bool "Support SH7760 processor"
419 config CPU_SUBTYPE_SH4_202
420 bool "Support SH4-202 processor"
423 # SH-4A Processor Support
425 config CPU_SUBTYPE_SH7723
426 bool "Support SH7723 processor"
430 select ARCH_SPARSEMEM_ENABLE
431 select SYS_SUPPORTS_SH_CMT
434 Select SH7723 if you have an SH-MobileR2 CPU.
436 config CPU_SUBTYPE_SH7724
437 bool "Support SH7724 processor"
441 select ARCH_SPARSEMEM_ENABLE
442 select SYS_SUPPORTS_SH_CMT
445 Select SH7724 if you have an SH-MobileR2R CPU.
447 config CPU_SUBTYPE_SH7734
448 bool "Support SH7734 processor"
453 Select SH7734 if you have a SH4A SH7734 CPU.
455 config CPU_SUBTYPE_SH7757
456 bool "Support SH7757 processor"
461 Select SH7757 if you have a SH4A SH7757 CPU.
463 config CPU_SUBTYPE_SH7763
464 bool "Support SH7763 processor"
466 select USB_OHCI_SH if USB_OHCI_HCD
468 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
470 config CPU_SUBTYPE_SH7770
471 bool "Support SH7770 processor"
474 config CPU_SUBTYPE_SH7780
475 bool "Support SH7780 processor"
478 config CPU_SUBTYPE_SH7785
479 bool "Support SH7785 processor"
482 select ARCH_SPARSEMEM_ENABLE
483 select SYS_SUPPORTS_NUMA
486 config CPU_SUBTYPE_SH7786
487 bool "Support SH7786 processor"
490 select CPU_HAS_PTEAEX
491 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
492 select USB_OHCI_SH if USB_OHCI_HCD
493 select USB_EHCI_SH if USB_EHCI_HCD
496 config CPU_SUBTYPE_SHX3
497 bool "Support SH-X3 processor"
500 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
504 # SH4AL-DSP Processor Support
506 config CPU_SUBTYPE_SH7343
507 bool "Support SH7343 processor"
510 select SYS_SUPPORTS_SH_CMT
512 config CPU_SUBTYPE_SH7722
513 bool "Support SH7722 processor"
517 select ARCH_SPARSEMEM_ENABLE
518 select SYS_SUPPORTS_NUMA
519 select SYS_SUPPORTS_SH_CMT
522 config CPU_SUBTYPE_SH7366
523 bool "Support SH7366 processor"
527 select ARCH_SPARSEMEM_ENABLE
528 select SYS_SUPPORTS_NUMA
529 select SYS_SUPPORTS_SH_CMT
538 prompt "Processor sub-type selection"
540 # SH-5 Processor Support
542 config CPU_SUBTYPE_SH5_101
543 bool "Support SH5-101 processor"
546 config CPU_SUBTYPE_SH5_103
547 bool "Support SH5-103 processor"
554 source "arch/sh/mm/Kconfig"
556 source "arch/sh/Kconfig.cpu"
558 source "arch/sh/boards/Kconfig"
560 menu "Timer and clock configuration"
563 int "Peripheral clock frequency (in Hz)"
564 depends on SH_CLK_CPG_LEGACY
565 default "31250000" if CPU_SUBTYPE_SH7619
566 default "33333333" if CPU_SUBTYPE_SH7770 || \
567 CPU_SUBTYPE_SH7760 || \
568 CPU_SUBTYPE_SH7705 || \
569 CPU_SUBTYPE_SH7203 || \
570 CPU_SUBTYPE_SH7206 || \
571 CPU_SUBTYPE_SH7263 || \
573 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
574 default "66000000" if CPU_SUBTYPE_SH4_202
577 This option is used to specify the peripheral clock frequency.
578 This is necessary for determining the reference clock value on
579 platforms lacking an RTC.
584 config SH_CLK_CPG_LEGACY
585 depends on SH_CLK_CPG
586 def_bool y if !CPU_SUBTYPE_SH7785 && !ARCH_SHMOBILE && \
587 !CPU_SHX3 && !CPU_SUBTYPE_SH7757 && \
588 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
593 menu "CPU Frequency scaling"
594 source "drivers/cpufreq/Kconfig"
597 source "arch/sh/drivers/Kconfig"
601 menu "Kernel features"
603 source kernel/Kconfig.hz
606 bool "kexec system call (EXPERIMENTAL)"
607 depends on SUPERH32 && MMU
610 kexec is a system call that implements the ability to shutdown your
611 current kernel, and to start another kernel. It is like a reboot
612 but it is independent of the system firmware. And like a reboot
613 you can start any kernel with it, not just Linux.
615 The name comes from the similarity to the exec system call.
617 It is an ongoing process to be certain the hardware in a machine
618 is properly shutdown, so do not be surprised if this code does not
619 initially work for you. As of this writing the exact hardware
620 interface is strongly in flux, so no good recommendation can be
624 bool "kernel crash dumps (EXPERIMENTAL)"
625 depends on SUPERH32 && BROKEN_ON_SMP
627 Generate crash dump after being started by kexec.
628 This should be normally only set in special crash dump kernels
629 which are loaded in the main kernel with kexec-tools into
630 a specially reserved region and then later executed after
631 a crash by kdump/kexec. The crash dump kernel must be compiled
632 to a memory address not used by the main kernel using
635 For more details see Documentation/kdump/kdump.txt
638 bool "kexec jump (EXPERIMENTAL)"
639 depends on SUPERH32 && KEXEC && HIBERNATION
641 Jump between original kernel and kexeced kernel and invoke
644 config PHYSICAL_START
645 hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
648 This gives the physical address where the kernel is loaded
649 and is ordinarily the same as MEMORY_START.
651 Different values are primarily used in the case of kexec on panic
652 where the fail safe kernel needs to run at a different address
653 than the panic-ed kernel.
656 bool "Enable seccomp to safely compute untrusted bytecode"
659 This kernel feature is useful for number crunching applications
660 that may need to compute untrusted bytecode during their
661 execution. By using pipes or other transports made available to
662 the process as file descriptors supporting the read/write
663 syscalls, it's possible to isolate those applications in
664 their own address space using seccomp. Once seccomp is
665 enabled via prctl, it cannot be disabled and the task is only
666 allowed to execute a few safe syscalls defined by each seccomp
672 bool "Symmetric multi-processing support"
673 depends on SYS_SUPPORTS_SMP
675 This enables support for systems with more than one CPU. If you have
676 a system with only one CPU, say N. If you have a system with more
679 If you say N here, the kernel will run on uni- and multiprocessor
680 machines, but will use only one CPU of a multiprocessor machine. If
681 you say Y here, the kernel will run on many, but not all,
682 uniprocessor machines. On a uniprocessor machine, the kernel
683 will run faster if you say N here.
685 People using multiprocessor machines who say Y here should also say
686 Y to "Enhanced Real Time Clock Support", below.
688 See also <file:Documentation/lockup-watchdogs.txt> and the SMP-HOWTO
689 available at <http://www.tldp.org/docs.html#howto>.
691 If you don't know what to do here, say N.
694 int "Maximum number of CPUs (2-32)"
697 default "4" if CPU_SUBTYPE_SHX3
700 This allows you to specify the maximum number of CPUs which this
701 kernel will support. The maximum supported value is 32 and the
702 minimum value which makes sense is 2.
704 This is purely to save memory - each supported CPU adds
705 approximately eight kilobytes to the kernel image.
708 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
711 Say Y here to experiment with turning CPUs off and on. CPUs
712 can be controlled through /sys/devices/system/cpu.
716 depends on !SMP && SUPERH32
718 This enables support for gUSA (general UserSpace Atomicity).
719 This is the default implementation for both UP and non-ll/sc
720 CPUs, and is used by the libc, amongst others.
722 For additional information, design information can be found
723 in <http://lc.linux.or.jp/lc2002/papers/niibe0919p.pdf>.
725 This should only be disabled for special cases where alternate
726 atomicity implementations exist.
729 bool "Implement atomic operations by roll-back (gRB) (EXPERIMENTAL)"
730 depends on GUSA && CPU_SH3 || (CPU_SH4 && !CPU_SH4A)
732 Enabling this option will allow the kernel to implement some
733 atomic operations using a software implementation of load-locked/
734 store-conditional (LLSC). On machines which do not have hardware
735 LLSC, this should be more efficient than the other alternative of
736 disabling interrupts around the atomic sequence.
738 config HW_PERF_EVENTS
739 bool "Enable hardware performance counter support for perf events"
740 depends on PERF_EVENTS && CPU_HAS_PMU
743 Enable hardware performance counter support for perf events. If
744 disabled, perf events will use software events only.
746 source "drivers/sh/Kconfig"
752 config USE_BUILTIN_DTB
753 bool "Use builtin DTB"
755 depends on SH_DEVICE_TREE
757 Link a device tree blob for particular hardware into the kernel,
758 suppressing use of the DTB pointer provided by the bootloader.
759 This option should only be used with legacy bootloaders that are
760 not capable of providing a DTB to the kernel, or for experimental
761 hardware without stable device tree bindings.
763 config BUILTIN_DTB_SOURCE
764 string "Source file for builtin DTB"
766 depends on USE_BUILTIN_DTB
768 Base name (without suffix, relative to arch/sh/boot/dts) for the
769 a DTS file that will be used to produce the DTB linked into the
772 config ZERO_PAGE_OFFSET
774 default "0x00010000" if PAGE_SIZE_64KB || SH_RTS7751R2D || \
775 SH_7751_SOLUTION_ENGINE
776 default "0x00004000" if PAGE_SIZE_16KB || SH_SH03
777 default "0x00002000" if PAGE_SIZE_8KB
780 This sets the default offset of zero page.
782 config BOOT_LINK_OFFSET
784 default "0x00210000" if SH_SHMIN
785 default "0x00400000" if SH_CAYMAN
786 default "0x00810000" if SH_7780_SOLUTION_ENGINE
787 default "0x009e0000" if SH_TITAN
788 default "0x01800000" if SH_SDK7780
789 default "0x02000000" if SH_EDOSK7760
792 This option allows you to set the link address offset of the zImage.
793 This can be useful if you are on a board which has a small amount of
798 default "0x00001000" if PAGE_SIZE_4KB
799 default "0x00002000" if PAGE_SIZE_8KB
800 default "0x00004000" if PAGE_SIZE_16KB
801 default "0x00010000" if PAGE_SIZE_64KB
804 config ROMIMAGE_MMCIF
805 bool "Include MMCIF loader in romImage (EXPERIMENTAL)"
806 depends on CPU_SUBTYPE_SH7724
808 Say Y here to include experimental MMCIF loading code in
809 romImage. With this enabled it is possible to write the romImage
810 kernel image to an MMC card and boot the kernel straight from
811 the reset vector. At reset the processor Mask ROM will load the
812 first part of the romImage which in turn loads the rest the kernel
813 image to RAM using the MMCIF hardware block.
816 prompt "Kernel command line"
818 default CMDLINE_OVERWRITE
820 Setting this option allows the kernel command line arguments
823 config CMDLINE_OVERWRITE
824 bool "Overwrite bootloader kernel arguments"
826 Given string will overwrite any arguments passed in by
829 config CMDLINE_EXTEND
830 bool "Extend bootloader kernel arguments"
832 Given string will be concatenated with arguments passed in
838 string "Kernel command line arguments string"
839 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
840 default "console=ttySC1,115200"
847 tristate "SuperHyway Bus support"
848 depends on CPU_SUBTYPE_SH4_202
851 bool "Maple Bus support"
852 depends on SH_DREAMCAST
854 The Maple Bus is SEGA's serial communication bus for peripherals
855 on the Dreamcast. Without this bus support you won't be able to
856 get your Dreamcast keyboard etc to work, so most users
857 probably want to say 'Y' here, unless you are only using the
858 Dreamcast with a serial line terminal or a remote network
863 depends on SYS_SUPPORTS_PCI
865 select GENERIC_PCI_IOMAP
866 select NO_GENERIC_PCI_IOPORT_MAP
868 Find out whether you have a PCI motherboard. PCI is the name of a
869 bus system, i.e. the way the CPU talks to the other stuff inside
870 your box. If you have PCI, say Y, otherwise N.
875 source "drivers/pci/Kconfig"
877 source "drivers/pcmcia/Kconfig"
881 menu "Power management options (EXPERIMENTAL)"
883 source "kernel/power/Kconfig"
885 source "drivers/cpuidle/Kconfig"