Skip to content

Commit 387798b

Browse files
author
Rob Herring
committed
ARM: initial multiplatform support
This lets us build a multiplatform kernel for experimental purposes. However, it will not be useful for any real work, because it relies on a number of useful things to be disabled for now: * SMP support must be turned off because of conflicting symbols. Marc Zyngier has proposed a solution by adding a new SOC operations structure to hold indirect function pointers for these, but that work is currently stalled * We turn on SPARSE_IRQ unconditionally, which is not supported on most platforms. Each of them is currently in a different state, but most are being worked on. * A common clock framework is in place since v3.4 but not yet being used. Work on this is on its way. * DEBUG_LL for early debugging is currently disabled. * THUMB2_KERNEL does not work with allyesconfig because the kernel gets too big [Rob Herring]: Rebased to not be dependent on the mass mach header rename. As a result, omap2plus, imx, mxs and ux500 are not converted. Highbank, picoxcell, mvebu, and socfpga are converted. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Rob Herring <[email protected]> Cc: Russell King <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Andrew Lunn <[email protected]> Acked-by: Jamie Iles <[email protected]> Cc: Dinh Nguyen <[email protected]>
1 parent 6eb5be3 commit 387798b

File tree

23 files changed

+200
-311
lines changed

23 files changed

+200
-311
lines changed

arch/arm/Kconfig

Lines changed: 57 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -254,26 +254,17 @@ config MMU
254254
#
255255
choice
256256
prompt "ARM system type"
257-
default ARCH_VERSATILE
257+
default ARCH_MULTIPLATFORM
258258

259-
config ARCH_SOCFPGA
260-
bool "Altera SOCFPGA family"
261-
select ARCH_WANT_OPTIONAL_GPIOLIB
262-
select ARM_AMBA
263-
select ARM_GIC
264-
select CACHE_L2X0
265-
select CLKDEV_LOOKUP
259+
config ARCH_MULTIPLATFORM
260+
bool "Allow multiple platforms to be selected"
261+
select ARM_PATCH_PHYS_VIRT
262+
select AUTO_ZRELADDR
266263
select COMMON_CLK
267-
select CPU_V7
268-
select DW_APB_TIMER
269-
select DW_APB_TIMER_OF
270-
select GENERIC_CLOCKEVENTS
271-
select GPIO_PL061 if GPIOLIB
272-
select HAVE_ARM_SCU
264+
select MULTI_IRQ_HANDLER
273265
select SPARSE_IRQ
274266
select USE_OF
275-
help
276-
This enables support for Altera SOCFPGA Cyclone V platform
267+
depends on MMU
277268

278269
config ARCH_INTEGRATOR
279270
bool "ARM Ltd. Integrator family"
@@ -370,24 +361,6 @@ config ARCH_BCMRING
370361
help
371362
Support for Broadcom's BCMRing platform.
372363

373-
config ARCH_HIGHBANK
374-
bool "Calxeda Highbank-based"
375-
select ARCH_WANT_OPTIONAL_GPIOLIB
376-
select ARM_AMBA
377-
select ARM_GIC
378-
select ARM_TIMER_SP804
379-
select CACHE_L2X0
380-
select CLKDEV_LOOKUP
381-
select COMMON_CLK
382-
select CPU_V7
383-
select GENERIC_CLOCKEVENTS
384-
select HAVE_ARM_SCU
385-
select HAVE_SMP
386-
select SPARSE_IRQ
387-
select USE_OF
388-
help
389-
Support for the Calxeda Highbank SoC based boards.
390-
391364
config ARCH_CLPS711X
392365
bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
393366
select CPU_ARM720T
@@ -568,18 +541,6 @@ config ARCH_IXP4XX
568541
help
569542
Support for Intel's IXP4XX (XScale) family of processors.
570543

571-
config ARCH_MVEBU
572-
bool "Marvell SOCs with Device Tree support"
573-
select GENERIC_CLOCKEVENTS
574-
select MULTI_IRQ_HANDLER
575-
select SPARSE_IRQ
576-
select CLKSRC_MMIO
577-
select GENERIC_IRQ_CHIP
578-
select IRQ_DOMAIN
579-
select COMMON_CLK
580-
help
581-
Support for the Marvell SoC Family with device tree support
582-
583544
config ARCH_DOVE
584545
bool "Marvell Dove"
585546
select CPU_V7
@@ -701,25 +662,6 @@ config ARCH_TEGRA
701662
This enables support for NVIDIA Tegra based systems (Tegra APX,
702663
Tegra 6xx and Tegra 2 series).
703664

704-
config ARCH_PICOXCELL
705-
bool "Picochip picoXcell"
706-
select ARCH_REQUIRE_GPIOLIB
707-
select ARM_PATCH_PHYS_VIRT
708-
select ARM_VIC
709-
select CPU_V6K
710-
select DW_APB_TIMER
711-
select DW_APB_TIMER_OF
712-
select GENERIC_CLOCKEVENTS
713-
select GENERIC_GPIO
714-
select HAVE_TCM
715-
select NO_IOPORT
716-
select SPARSE_IRQ
717-
select USE_OF
718-
help
719-
This enables support for systems based on the Picochip picoXcell
720-
family of Femtocell devices. The picoxcell support requires device tree
721-
for all boards.
722-
723665
config ARCH_PNX4008
724666
bool "Philips Nexperia PNX4008 Mobile"
725667
select CPU_ARM926T
@@ -1043,6 +985,49 @@ config ARCH_ZYNQ
1043985
Support for Xilinx Zynq ARM Cortex A9 Platform
1044986
endchoice
1045987

988+
menu "Multiple platform selection"
989+
depends on ARCH_MULTIPLATFORM
990+
991+
comment "CPU Core family selection"
992+
993+
config ARCH_MULTI_V4
994+
bool "ARMv4 based platforms (FA526, StrongARM)"
995+
select ARCH_MULTI_V4_V5
996+
depends on !ARCH_MULTI_V6_V7
997+
998+
config ARCH_MULTI_V4T
999+
bool "ARMv4T based platforms (ARM720T, ARM920T, ...)"
1000+
select ARCH_MULTI_V4_V5
1001+
depends on !ARCH_MULTI_V6_V7
1002+
1003+
config ARCH_MULTI_V5
1004+
bool "ARMv5 based platforms (ARM926T, XSCALE, PJ1, ...)"
1005+
select ARCH_MULTI_V4_V5
1006+
depends on !ARCH_MULTI_V6_V7
1007+
1008+
config ARCH_MULTI_V4_V5
1009+
bool
1010+
1011+
config ARCH_MULTI_V6
1012+
bool "ARMv6 based platforms (ARM11, Scorpion, ...)"
1013+
select CPU_V6
1014+
select ARCH_MULTI_V6_V7
1015+
1016+
config ARCH_MULTI_V7
1017+
bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)"
1018+
select CPU_V7
1019+
default y
1020+
select ARCH_MULTI_V6_V7
1021+
1022+
config ARCH_MULTI_V6_V7
1023+
bool
1024+
1025+
config ARCH_MULTI_CPU_AUTO
1026+
def_bool !(ARCH_MULTI_V4 || ARCH_MULTI_V4T || ARCH_MULTI_V6_V7)
1027+
select ARCH_MULTI_V5
1028+
1029+
endmenu
1030+
10461031
#
10471032
# This is sorted alphabetically by mach-* pathname. However, plat-*
10481033
# Kconfigs may be included either alphabetically (according to the
@@ -1070,6 +1055,8 @@ source "arch/arm/mach-gemini/Kconfig"
10701055

10711056
source "arch/arm/mach-h720x/Kconfig"
10721057

1058+
source "arch/arm/mach-highbank/Kconfig"
1059+
10731060
source "arch/arm/mach-integrator/Kconfig"
10741061

10751062
source "arch/arm/mach-iop32x/Kconfig"
@@ -1105,6 +1092,8 @@ source "arch/arm/mach-omap2/Kconfig"
11051092

11061093
source "arch/arm/mach-orion5x/Kconfig"
11071094

1095+
source "arch/arm/mach-picoxcell/Kconfig"
1096+
11081097
source "arch/arm/mach-pxa/Kconfig"
11091098
source "arch/arm/plat-pxa/Kconfig"
11101099

@@ -1117,6 +1106,8 @@ source "arch/arm/mach-sa1100/Kconfig"
11171106
source "arch/arm/plat-samsung/Kconfig"
11181107
source "arch/arm/plat-s3c24xx/Kconfig"
11191108

1109+
source "arch/arm/mach-socfpga/Kconfig"
1110+
11201111
source "arch/arm/plat-spear/Kconfig"
11211112

11221113
source "arch/arm/mach-s3c24xx/Kconfig"
@@ -2081,7 +2072,7 @@ endchoice
20812072

20822073
config XIP_KERNEL
20832074
bool "Kernel Execute-In-Place from ROM"
2084-
depends on !ZBOOT_ROM && !ARM_LPAE
2075+
depends on !ZBOOT_ROM && !ARM_LPAE && !ARCH_MULTIPLATFORM
20852076
help
20862077
Execute-In-Place allows the kernel to run from non-volatile storage
20872078
directly addressable by the CPU, such as NOR flash. This saves RAM

arch/arm/Kconfig.debug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ choice
359359

360360
config DEBUG_LL_UART_NONE
361361
bool "No low-level debugging UART"
362+
depends on !ARCH_MULTIPLATFORM
362363
help
363364
Say Y here if your platform doesn't provide a UART option
364365
below. This relies on your platform choosing the right UART

arch/arm/Makefile

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -135,84 +135,79 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
135135

136136
# Machine directory name. This list is sorted alphanumerically
137137
# by CONFIG_* macro name.
138-
machine-$(CONFIG_ARCH_AT91) := at91
139-
machine-$(CONFIG_ARCH_BCMRING) := bcmring
140-
machine-$(CONFIG_ARCH_CLPS711X) := clps711x
141-
machine-$(CONFIG_ARCH_CNS3XXX) := cns3xxx
142-
machine-$(CONFIG_ARCH_DAVINCI) := davinci
143-
machine-$(CONFIG_ARCH_DOVE) := dove
144-
machine-$(CONFIG_ARCH_EBSA110) := ebsa110
145-
machine-$(CONFIG_ARCH_EP93XX) := ep93xx
146-
machine-$(CONFIG_ARCH_GEMINI) := gemini
147-
machine-$(CONFIG_ARCH_H720X) := h720x
148-
machine-$(CONFIG_ARCH_HIGHBANK) := highbank
149-
machine-$(CONFIG_ARCH_INTEGRATOR) := integrator
150-
machine-$(CONFIG_ARCH_IOP13XX) := iop13xx
151-
machine-$(CONFIG_ARCH_IOP32X) := iop32x
152-
machine-$(CONFIG_ARCH_IOP33X) := iop33x
153-
machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
154-
machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood
155-
machine-$(CONFIG_ARCH_KS8695) := ks8695
156-
machine-$(CONFIG_ARCH_LPC32XX) := lpc32xx
157-
machine-$(CONFIG_ARCH_MMP) := mmp
158-
machine-$(CONFIG_ARCH_MSM) := msm
159-
machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
160-
machine-$(CONFIG_ARCH_IMX_V4_V5) := imx
161-
machine-$(CONFIG_ARCH_IMX_V6_V7) := imx
162-
machine-$(CONFIG_ARCH_MXS) := mxs
163-
machine-$(CONFIG_ARCH_MVEBU) := mvebu
164-
machine-$(CONFIG_ARCH_NETX) := netx
165-
machine-$(CONFIG_ARCH_NOMADIK) := nomadik
166-
machine-$(CONFIG_ARCH_OMAP1) := omap1
167-
machine-$(CONFIG_ARCH_OMAP2PLUS) := omap2
168-
machine-$(CONFIG_ARCH_ORION5X) := orion5x
169-
machine-$(CONFIG_ARCH_PICOXCELL) := picoxcell
170-
machine-$(CONFIG_ARCH_PNX4008) := pnx4008
171-
machine-$(CONFIG_ARCH_PRIMA2) := prima2
172-
machine-$(CONFIG_ARCH_PXA) := pxa
173-
machine-$(CONFIG_ARCH_REALVIEW) := realview
174-
machine-$(CONFIG_ARCH_RPC) := rpc
175-
machine-$(CONFIG_ARCH_S3C24XX) := s3c24xx s3c2412 s3c2440
176-
machine-$(CONFIG_ARCH_S3C64XX) := s3c64xx
177-
machine-$(CONFIG_ARCH_S5P64X0) := s5p64x0
178-
machine-$(CONFIG_ARCH_S5PC100) := s5pc100
179-
machine-$(CONFIG_ARCH_S5PV210) := s5pv210
180-
machine-$(CONFIG_ARCH_EXYNOS4) := exynos
181-
machine-$(CONFIG_ARCH_EXYNOS5) := exynos
182-
machine-$(CONFIG_ARCH_SA1100) := sa1100
183-
machine-$(CONFIG_ARCH_SHARK) := shark
184-
machine-$(CONFIG_ARCH_SHMOBILE) := shmobile
185-
machine-$(CONFIG_ARCH_TEGRA) := tegra
186-
machine-$(CONFIG_ARCH_U300) := u300
187-
machine-$(CONFIG_ARCH_U8500) := ux500
188-
machine-$(CONFIG_ARCH_VERSATILE) := versatile
189-
machine-$(CONFIG_ARCH_VEXPRESS) := vexpress
190-
machine-$(CONFIG_ARCH_VT8500) := vt8500
191-
machine-$(CONFIG_ARCH_W90X900) := w90x900
192-
machine-$(CONFIG_FOOTBRIDGE) := footbridge
193-
machine-$(CONFIG_ARCH_SOCFPGA) := socfpga
194-
machine-$(CONFIG_MACH_SPEAR1310) := spear13xx
195-
machine-$(CONFIG_MACH_SPEAR1340) := spear13xx
196-
machine-$(CONFIG_MACH_SPEAR300) := spear3xx
197-
machine-$(CONFIG_MACH_SPEAR310) := spear3xx
198-
machine-$(CONFIG_MACH_SPEAR320) := spear3xx
199-
machine-$(CONFIG_MACH_SPEAR600) := spear6xx
200-
machine-$(CONFIG_ARCH_ZYNQ) := zynq
138+
machine-$(CONFIG_ARCH_AT91) += at91
139+
machine-$(CONFIG_ARCH_BCMRING) += bcmring
140+
machine-$(CONFIG_ARCH_CLPS711X) += clps711x
141+
machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx
142+
machine-$(CONFIG_ARCH_DAVINCI) += davinci
143+
machine-$(CONFIG_ARCH_DOVE) += dove
144+
machine-$(CONFIG_ARCH_EBSA110) += ebsa110
145+
machine-$(CONFIG_ARCH_EP93XX) += ep93xx
146+
machine-$(CONFIG_ARCH_GEMINI) += gemini
147+
machine-$(CONFIG_ARCH_H720X) += h720x
148+
machine-$(CONFIG_ARCH_HIGHBANK) += highbank
149+
machine-$(CONFIG_ARCH_INTEGRATOR) += integrator
150+
machine-$(CONFIG_ARCH_IOP13XX) += iop13xx
151+
machine-$(CONFIG_ARCH_IOP32X) += iop32x
152+
machine-$(CONFIG_ARCH_IOP33X) += iop33x
153+
machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx
154+
machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood
155+
machine-$(CONFIG_ARCH_KS8695) += ks8695
156+
machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx
157+
machine-$(CONFIG_ARCH_MMP) += mmp
158+
machine-$(CONFIG_ARCH_MSM) += msm
159+
machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0
160+
machine-$(CONFIG_ARCH_MXC) += imx
161+
machine-$(CONFIG_ARCH_MXS) += mxs
162+
machine-$(CONFIG_ARCH_MVEBU) += mvebu
163+
machine-$(CONFIG_ARCH_NETX) += netx
164+
machine-$(CONFIG_ARCH_NOMADIK) += nomadik
165+
machine-$(CONFIG_ARCH_OMAP1) += omap1
166+
machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
167+
machine-$(CONFIG_ARCH_ORION5X) += orion5x
168+
machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell
169+
machine-$(CONFIG_ARCH_PNX4008) += pnx4008
170+
machine-$(CONFIG_ARCH_PRIMA2) += prima2
171+
machine-$(CONFIG_ARCH_PXA) += pxa
172+
machine-$(CONFIG_ARCH_REALVIEW) += realview
173+
machine-$(CONFIG_ARCH_RPC) += rpc
174+
machine-$(CONFIG_ARCH_S3C24XX) += s3c24xx s3c2412 s3c2440
175+
machine-$(CONFIG_ARCH_S3C64XX) += s3c64xx
176+
machine-$(CONFIG_ARCH_S5P64X0) += s5p64x0
177+
machine-$(CONFIG_ARCH_S5PC100) += s5pc100
178+
machine-$(CONFIG_ARCH_S5PV210) += s5pv210
179+
machine-$(CONFIG_ARCH_EXYNOS) += exynos
180+
machine-$(CONFIG_ARCH_SA1100) += sa1100
181+
machine-$(CONFIG_ARCH_SHARK) += shark
182+
machine-$(CONFIG_ARCH_SHMOBILE) += shmobile
183+
machine-$(CONFIG_ARCH_TEGRA) += tegra
184+
machine-$(CONFIG_ARCH_U300) += u300
185+
machine-$(CONFIG_ARCH_U8500) += ux500
186+
machine-$(CONFIG_ARCH_VERSATILE) += versatile
187+
machine-$(CONFIG_ARCH_VEXPRESS) += vexpress
188+
machine-$(CONFIG_ARCH_VT8500) += vt8500
189+
machine-$(CONFIG_ARCH_W90X900) += w90x900
190+
machine-$(CONFIG_FOOTBRIDGE) += footbridge
191+
machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
192+
machine-$(CONFIG_ARCH_SPEAR13XX) += spear13xx
193+
machine-$(CONFIG_ARCH_SPEAR3XX) += spear3xx
194+
machine-$(CONFIG_MACH_SPEAR600) += spear6xx
195+
machine-$(CONFIG_ARCH_ZYNQ) += zynq
201196

202197
# Platform directory name. This list is sorted alphanumerically
203198
# by CONFIG_* macro name.
204-
plat-$(CONFIG_ARCH_MXC) := mxc
205-
plat-$(CONFIG_ARCH_OMAP) := omap
206-
plat-$(CONFIG_ARCH_S3C64XX) := samsung
207-
plat-$(CONFIG_ARCH_ZYNQ) := versatile
208-
plat-$(CONFIG_PLAT_IOP) := iop
209-
plat-$(CONFIG_PLAT_NOMADIK) := nomadik
210-
plat-$(CONFIG_PLAT_ORION) := orion
211-
plat-$(CONFIG_PLAT_PXA) := pxa
212-
plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx samsung
213-
plat-$(CONFIG_PLAT_S5P) := samsung
214-
plat-$(CONFIG_PLAT_SPEAR) := spear
215-
plat-$(CONFIG_PLAT_VERSATILE) := versatile
199+
plat-$(CONFIG_ARCH_MXC) += mxc
200+
plat-$(CONFIG_ARCH_OMAP) += omap
201+
plat-$(CONFIG_ARCH_S3C64XX) += samsung
202+
plat-$(CONFIG_ARCH_ZYNQ) += versatile
203+
plat-$(CONFIG_PLAT_IOP) += iop
204+
plat-$(CONFIG_PLAT_NOMADIK) += nomadik
205+
plat-$(CONFIG_PLAT_ORION) += orion
206+
plat-$(CONFIG_PLAT_PXA) += pxa
207+
plat-$(CONFIG_PLAT_S3C24XX) += s3c24xx samsung
208+
plat-$(CONFIG_PLAT_S5P) += samsung
209+
plat-$(CONFIG_PLAT_SPEAR) += spear
210+
plat-$(CONFIG_PLAT_VERSATILE) += versatile
216211

217212
ifeq ($(CONFIG_ARCH_EBSA110),y)
218213
# This is what happens if you forget the IOCS16 line.
@@ -230,15 +225,20 @@ MACHINE := arch/arm/mach-$(word 1,$(machine-y))/
230225
else
231226
MACHINE :=
232227
endif
228+
ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y)
229+
MACHINE :=
230+
endif
233231

234232
machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
235233
platdirs := $(patsubst %,arch/arm/plat-%/,$(plat-y))
236234

235+
ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y)
237236
ifeq ($(KBUILD_SRC),)
238237
KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs) $(platdirs))
239238
else
240239
KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs))
241240
endif
241+
endif
242242

243243
export TEXT_OFFSET GZFLAGS MMUEXT
244244

arch/arm/boot/compressed/misc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ unsigned int __machine_arch_type;
2525
static void putstr(const char *ptr);
2626
extern void error(char *x);
2727

28+
#ifdef CONFIG_ARCH_MULTIPLATFORM
29+
static inline void putc(int c) {}
30+
static inline void flush(void) {}
31+
static inline void arch_decomp_setup(void) {}
32+
#else
2833
#include <mach/uncompress.h>
34+
#endif
2935

3036
#ifdef CONFIG_DEBUG_ICEDCC
3137

arch/arm/include/asm/timex.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
#define _ASMARM_TIMEX_H
1414

1515
#include <asm/arch_timer.h>
16+
#ifdef CONFIG_ARCH_MULTIPLATFORM
17+
#define CLOCK_TICK_RATE 1000000
18+
#else
1619
#include <mach/timex.h>
20+
#endif
1721

1822
typedef unsigned long cycles_t;
1923

0 commit comments

Comments
 (0)