From: Nikita Shubin Date: Sat, 19 Nov 2022 10:45:26 +0000 (+0300) Subject: ARM: ep93xx: DT for the Cirrus ep93xx SoC platforms X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1873ef5c4a7fc578753d3f000b7d7f63a43b6434;p=linux.git ARM: ep93xx: DT for the Cirrus ep93xx SoC platforms This adds compulsory device tree support to the Cirrus ep93xx ARMv4 platform. - We select PINCTRL_EP93xx - We select COMMON_CLK_EP93XX, as clock driver moved out of platfrom code - We select ARCH_HAS_RESET_CONTROLLER We have to leave all MACH optins as they are used for board checking before decomp, to turn off watchdog and fix ethernet. Signed-off-by: Nikita Shubin --- diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index 2c40996a444ba..29f0c9d50d40e 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig @@ -3,34 +3,26 @@ menuconfig ARCH_EP93XX bool "EP93xx-based" depends on ATAGS depends on ARCH_MULTI_V4T + # CONFIG_ARCH_MULTI_V7 is not set depends on CPU_LITTLE_ENDIAN + select ARCH_HAS_RESET_CONTROLLER select ARCH_SPARSEMEM_ENABLE select ARM_AMBA select ARM_VIC + select ARM_APPENDED_DTB # Old Redboot bootloaders deployed + select COMMON_CLK_EP93XX + select EP93XX_TIMER select CLKSRC_MMIO select CPU_ARM920T select GPIOLIB + select PINCTRL + select PINCTRL_EP93XX help This enables support for the Cirrus EP93xx series of CPUs. if ARCH_EP93XX -menu "Cirrus EP93xx Implementation Options" - -config EP93XX_SOC_COMMON - bool - default y - select SOC_BUS - select LEDS_GPIO_REGISTER - -comment "EP93xx Platforms" - -config MACH_ADSSPHERE - bool "Support ADS Sphere" - depends on UNUSED_BOARD_FILES - help - Say 'Y' here if you want your kernel to support the ADS - Sphere board. +menu "EP93xx Platforms" config MACH_BK3 bool "Support Liebherr BK3.1" @@ -98,62 +90,6 @@ config MACH_EDB9315A Say 'Y' here if you want your kernel to support the Cirrus Logic EDB9315A Evaluation Board. -config MACH_GESBC9312 - bool "Support Glomation GESBC-9312-sx" - depends on UNUSED_BOARD_FILES - help - Say 'Y' here if you want your kernel to support the Glomation - GESBC-9312-sx board. - -config MACH_MICRO9 - bool - -config MACH_MICRO9H - bool "Support Contec Micro9-High" - select MACH_MICRO9 - depends on UNUSED_BOARD_FILES - help - Say 'Y' here if you want your kernel to support the - Contec Micro9-High board. - -config MACH_MICRO9M - bool "Support Contec Micro9-Mid" - select MACH_MICRO9 - depends on UNUSED_BOARD_FILES - help - Say 'Y' here if you want your kernel to support the - Contec Micro9-Mid board. - -config MACH_MICRO9L - bool "Support Contec Micro9-Lite" - select MACH_MICRO9 - depends on UNUSED_BOARD_FILES - help - Say 'Y' here if you want your kernel to support the - Contec Micro9-Lite board. - -config MACH_MICRO9S - bool "Support Contec Micro9-Slim" - select MACH_MICRO9 - depends on UNUSED_BOARD_FILES - help - Say 'Y' here if you want your kernel to support the - Contec Micro9-Slim board. - -config MACH_SIM_ONE - bool "Support Simplemachines Sim.One board" - depends on UNUSED_BOARD_FILES - help - Say 'Y' here if you want your kernel to support the - Simplemachines Sim.One board. - -config MACH_SNAPPER_CL15 - bool "Support Bluewater Systems Snapper CL15 Module" - depends on UNUSED_BOARD_FILES - help - Say 'Y' here if you want your kernel to support the Bluewater - Systems Snapper CL15 Module. - config MACH_TS72XX bool "Support Technologic Systems TS-72xx SBC" help diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index cfad517fac466..e52ab80c45bea 100644 --- a/arch/arm/mach-ep93xx/Makefile +++ b/arch/arm/mach-ep93xx/Makefile @@ -2,15 +2,4 @@ # # Makefile for the linux kernel. # -obj-y := core.o clock.o timer-ep93xx.o - -obj-$(CONFIG_EP93XX_DMA) += dma.o - -obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o -obj-$(CONFIG_MACH_EDB93XX) += edb93xx.o -obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o -obj-$(CONFIG_MACH_MICRO9) += micro9.o -obj-$(CONFIG_MACH_SIM_ONE) += simone.o -obj-$(CONFIG_MACH_SNAPPER_CL15) += snappercl15.o -obj-$(CONFIG_MACH_TS72XX) += ts72xx.o -obj-$(CONFIG_MACH_VISION_EP9307)+= vision_ep9307.o +obj-y := board-dt.o diff --git a/arch/arm/mach-ep93xx/board-dt.c b/arch/arm/mach-ep93xx/board-dt.c new file mode 100644 index 0000000000000..3e4c1f28eb5dc --- /dev/null +++ b/arch/arm/mach-ep93xx/board-dt.c @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * EP93XX Device Tree boot support + */ +#include +#include +#include + +#include +#include +#include +#include + +#ifdef CONFIG_DEBUG_EP93XX +/* This is needed for LL-debug/earlyprintk/debug-macro.S */ +static struct map_desc ep93xx_io_desc[] __initdata = { + { + .virtual = CONFIG_DEBUG_UART_VIRT, + .pfn = __phys_to_pfn(CONFIG_DEBUG_UART_PHYS), + .length = SZ_4K, + .type = MT_DEVICE, + }, +}; + +static void __init ep93xx_map_io(void) +{ + iotable_init(ep93xx_io_desc, ARRAY_SIZE(ep93xx_io_desc)); +} +#else +#define ep93xx_map_io NULL +#endif + +static const char *ep93xx_board_compat[] = { + "cirrus,ep93xx", + NULL, +}; + +DT_MACHINE_START(EP93XX_DT, "EP93XX (Device Tree)") + .atag_offset = 0x100, + .dt_compat = ep93xx_board_compat, + .map_io = ep93xx_map_io, +MACHINE_END