Commit 80f2e4cd authored by Gregory CLEMENT's avatar Gregory CLEMENT Committed by Thomas Bogendoerfer

MIPS: Share generic kernel code with other architecture

Some architectures might seek to utilize a significant portion of the
generic kernel code while maintaining independence from the generic
kernel due to specific peculiarities.

This patch allows for the reuse of core code, preventing unnecessary
duplication.
Suggested-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Reviewed-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 263909a7
...@@ -11,6 +11,7 @@ obj- := $(platform-y) ...@@ -11,6 +11,7 @@ obj- := $(platform-y)
# mips object files # mips object files
# The object files are linked as core-y files would be linked # The object files are linked as core-y files would be linked
obj-y += generic/
obj-y += kernel/ obj-y += kernel/
obj-y += mm/ obj-y += mm/
obj-y += net/ obj-y += net/
......
...@@ -109,6 +109,9 @@ config MIPS_FIXUP_BIGPHYS_ADDR ...@@ -109,6 +109,9 @@ config MIPS_FIXUP_BIGPHYS_ADDR
config MIPS_GENERIC config MIPS_GENERIC
bool bool
config MACH_GENERIC_CORE
bool
config MACH_INGENIC config MACH_INGENIC
bool bool
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
...@@ -145,6 +148,7 @@ config MIPS_GENERIC_KERNEL ...@@ -145,6 +148,7 @@ config MIPS_GENERIC_KERNEL
select DMA_NONCOHERENT select DMA_NONCOHERENT
select HAVE_PCI select HAVE_PCI
select IRQ_MIPS_CPU select IRQ_MIPS_CPU
select MACH_GENERIC_CORE
select MIPS_AUTO_PFN_OFFSET select MIPS_AUTO_PFN_OFFSET
select MIPS_CPU_SCACHE select MIPS_CPU_SCACHE
select MIPS_GIC select MIPS_GIC
...@@ -413,6 +417,7 @@ config MACH_INGENIC_SOC ...@@ -413,6 +417,7 @@ config MACH_INGENIC_SOC
bool "Ingenic SoC based machines" bool "Ingenic SoC based machines"
select MIPS_GENERIC select MIPS_GENERIC
select MACH_INGENIC select MACH_INGENIC
select MACH_GENERIC_CORE
select SYS_SUPPORTS_ZBOOT_UART16550 select SYS_SUPPORTS_ZBOOT_UART16550
select CPU_SUPPORTS_CPUFREQ select CPU_SUPPORTS_CPUFREQ
select MIPS_EXTERNAL_TIMER select MIPS_EXTERNAL_TIMER
...@@ -599,6 +604,7 @@ config RALINK ...@@ -599,6 +604,7 @@ config RALINK
config MACH_REALTEK_RTL config MACH_REALTEK_RTL
bool "Realtek RTL838x/RTL839x based machines" bool "Realtek RTL838x/RTL839x based machines"
select MIPS_GENERIC select MIPS_GENERIC
select MACH_GENERIC_CORE
select DMA_NONCOHERENT select DMA_NONCOHERENT
select IRQ_MIPS_CPU select IRQ_MIPS_CPU
select CSRC_R4K select CSRC_R4K
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
# Author: Paul Burton <paul.burton@mips.com> # Author: Paul Burton <paul.burton@mips.com>
# #
obj-y += init.o obj-$(CONFIG_MACH_GENERIC_CORE) += init.o
obj-y += irq.o obj-$(CONFIG_MACH_GENERIC_CORE) += irq.o
obj-y += proc.o obj-$(CONFIG_MACH_GENERIC_CORE) += proc.o
obj-$(CONFIG_YAMON_DT_SHIM) += yamon-dt.o obj-$(CONFIG_YAMON_DT_SHIM) += yamon-dt.o
obj-$(CONFIG_LEGACY_BOARD_SEAD3) += board-sead3.o obj-$(CONFIG_LEGACY_BOARD_SEAD3) += board-sead3.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment