From 01464226ac6089bd6a33f9899cc792c2355ebf39 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 28 Aug 2012 13:06:41 -0500 Subject: ARM: make mach/gpio.h headers optional Most platforms don't need mach/gpio.h and it prevents multi-platform kernel images. Add CONFIG_NEED_MACH_GPIO_H and make platforns select it if they need gpio.h. This is platforms that define __GPIOLIB_COMPLEX or have lots of implicit includes pulled in by mach/gpio.h. at91 and omap have gpio clean-up pending and can drop CONFIG_NEED_MACH_GPIO_H once that is in. Signed-off-by: Rob Herring Cc: Russell King Acked-by: Jason Cooper Acked-by: Linus Walleij --- arch/arm/mach-vexpress/include/mach/gpio.h | 1 - 1 file changed, 1 deletion(-) delete mode 100644 arch/arm/mach-vexpress/include/mach/gpio.h (limited to 'arch/arm/mach-vexpress') diff --git a/arch/arm/mach-vexpress/include/mach/gpio.h b/arch/arm/mach-vexpress/include/mach/gpio.h deleted file mode 100644 index 40a8c17..0000000 --- a/arch/arm/mach-vexpress/include/mach/gpio.h +++ /dev/null @@ -1 +0,0 @@ -/* empty */ -- cgit v1.1 From fa04e4dbd3a0e68b9daf07a096db369b5a92f1bf Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 31 Aug 2012 00:08:21 -0500 Subject: ARM: vexpress: move debug macros to include/debug Move vexpress debug-macro.S over to common debug macro directory. Signed-off-by: Rob Herring Cc: Pawel Moll --- arch/arm/mach-vexpress/include/mach/debug-macro.S | 84 ----------------------- 1 file changed, 84 deletions(-) delete mode 100644 arch/arm/mach-vexpress/include/mach/debug-macro.S (limited to 'arch/arm/mach-vexpress') diff --git a/arch/arm/mach-vexpress/include/mach/debug-macro.S b/arch/arm/mach-vexpress/include/mach/debug-macro.S deleted file mode 100644 index 9f509f5..0000000 --- a/arch/arm/mach-vexpress/include/mach/debug-macro.S +++ /dev/null @@ -1,84 +0,0 @@ -/* arch/arm/mach-realview/include/mach/debug-macro.S - * - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#define DEBUG_LL_PHYS_BASE 0x10000000 -#define DEBUG_LL_UART_OFFSET 0x00009000 - -#define DEBUG_LL_PHYS_BASE_RS1 0x1c000000 -#define DEBUG_LL_UART_OFFSET_RS1 0x00090000 - -#define DEBUG_LL_VIRT_BASE 0xf8000000 - -#if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT) - - .macro addruart,rp,rv,tmp - - @ Make an educated guess regarding the memory map: - @ - the original A9 core tile, which has MPCore peripherals - @ located at 0x1e000000, should use UART at 0x10009000 - @ - all other (RS1 complaint) tiles use UART mapped - @ at 0x1c090000 - mrc p15, 4, \tmp, c15, c0, 0 - cmp \tmp, #0x1e000000 - - @ Original memory map - moveq \rp, #DEBUG_LL_UART_OFFSET - orreq \rv, \rp, #DEBUG_LL_VIRT_BASE - orreq \rp, \rp, #DEBUG_LL_PHYS_BASE - - @ RS1 memory map - movne \rp, #DEBUG_LL_UART_OFFSET_RS1 - orrne \rv, \rp, #DEBUG_LL_VIRT_BASE - orrne \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1 - - .endm - -#include - -#elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CA9) - - .macro addruart,rp,rv,tmp - mov \rp, #DEBUG_LL_UART_OFFSET - orr \rv, \rp, #DEBUG_LL_VIRT_BASE - orr \rp, \rp, #DEBUG_LL_PHYS_BASE - .endm - -#include - -#elif defined(CONFIG_DEBUG_VEXPRESS_UART0_RS1) - - .macro addruart,rp,rv,tmp - mov \rp, #DEBUG_LL_UART_OFFSET_RS1 - orr \rv, \rp, #DEBUG_LL_VIRT_BASE - orr \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1 - .endm - -#include - -#else /* CONFIG_DEBUG_LL_UART_NONE */ - - .macro addruart, rp, rv, tmp - /* Safe dummy values */ - mov \rp, #0 - mov \rv, #DEBUG_LL_VIRT_BASE - .endm - - .macro senduart,rd,rx - .endm - - .macro waituart,rd,rx - .endm - - .macro busyuart,rd,rx - .endm - -#endif -- cgit v1.1 From 360a0cab50414ee30924917159066e69ee4b38d3 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 6 Sep 2012 13:32:38 -0500 Subject: ARM: move all dtb targets out of Makefile.boot In preparation to support multi-platform kernels, move all the dtb targets out of the mach Makefile.boot and into the arch/arm/boot/dts/Makefile which is closer to the sources. DTBs are only built when CONFIG_OF is enabled and now use top level CONFIG_ARCH_xxx instead of chip or board specific config options. Signed-off-by: Rob Herring Cc: Russell King Cc: Andrew Victor Cc: Nicolas Ferre Cc: Jean-Christophe Plagniol-Villard Cc: Kukjin Kim Cc: Sascha Hauer Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Acked-by: Shawn Guo Cc: Viresh Kumar Cc: Shiraz Hashim Cc: Rajeev Kumar Cc: Stephen Warren Cc: Srinidhi Kasagar Cc: Linus Walleij --- arch/arm/mach-vexpress/Makefile.boot | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch/arm/mach-vexpress') diff --git a/arch/arm/mach-vexpress/Makefile.boot b/arch/arm/mach-vexpress/Makefile.boot index 318d308..c6dd891 100644 --- a/arch/arm/mach-vexpress/Makefile.boot +++ b/arch/arm/mach-vexpress/Makefile.boot @@ -3,8 +3,3 @@ zreladdr-y += 0x60008000 params_phys-y := 0x60000100 initrd_phys-y := 0x60800000 - -dtb-$(CONFIG_ARCH_VEXPRESS_DT) += vexpress-v2p-ca5s.dtb \ - vexpress-v2p-ca9.dtb \ - vexpress-v2p-ca15-tc1.dtb \ - vexpress-v2p-ca15_a7.dtb -- cgit v1.1 From db6b672f983eff887c8be0fb2ceee1c02d867dea Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 7 May 2012 16:54:40 +0000 Subject: ARM: vexpress: remove dependency on mach/* headers Signed-off-by: Arnd Bergmann Cc: Pawel Moll --- arch/arm/mach-vexpress/ct-ca9x4.c | 1 + arch/arm/mach-vexpress/include/mach/irqs.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'arch/arm/mach-vexpress') diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index 61c4924..0e770e8 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c @@ -27,6 +27,7 @@ #include "core.h" #include +#include #include diff --git a/arch/arm/mach-vexpress/include/mach/irqs.h b/arch/arm/mach-vexpress/include/mach/irqs.h index 4b10ee7..f8f7f78 100644 --- a/arch/arm/mach-vexpress/include/mach/irqs.h +++ b/arch/arm/mach-vexpress/include/mach/irqs.h @@ -1,4 +1,6 @@ #define IRQ_LOCALTIMER 29 #define IRQ_LOCALWDOG 30 +#ifndef CONFIG_SPARSE_IRQ #define NR_IRQS 256 +#endif -- cgit v1.1 From 617276307cd4cdb9a95c77efaa3063695af63aa7 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 6 Sep 2012 13:43:04 -0500 Subject: ARM: vexpress: convert to multi-platform Convert vexpress to multi-platform. This always enables vexpress DT and makes it the default v7 platform. Signed-off-by: Rob Herring Cc: Pawel Moll --- arch/arm/mach-vexpress/Kconfig | 64 +++++++++--------- arch/arm/mach-vexpress/Makefile | 2 + arch/arm/mach-vexpress/Makefile.boot | 5 -- arch/arm/mach-vexpress/include/mach/timex.h | 23 ------- arch/arm/mach-vexpress/include/mach/uncompress.h | 86 ------------------------ arch/arm/mach-vexpress/v2m.c | 4 -- 6 files changed, 34 insertions(+), 150 deletions(-) delete mode 100644 arch/arm/mach-vexpress/Makefile.boot delete mode 100644 arch/arm/mach-vexpress/include/mach/timex.h delete mode 100644 arch/arm/mach-vexpress/include/mach/uncompress.h (limited to 'arch/arm/mach-vexpress') diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index fc3730f..c952960 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -1,38 +1,23 @@ -menu "Versatile Express platform type" - depends on ARCH_VEXPRESS - -config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA - bool "Enable A5 and A9 only errata work-arounds" - default y - select ARM_ERRATA_720789 - select ARM_ERRATA_751472 - select PL310_ERRATA_753970 if CACHE_PL310 - help - Provides common dependencies for Versatile Express platforms - based on Cortex-A5 and Cortex-A9 processors. In order to - build a working kernel, you must also enable relevant core - tile support or Flattened Device Tree based support options. - -config ARCH_VEXPRESS_CA9X4 - bool "Versatile Express Cortex-A9x4 tile" - select ARM_GIC - select CPU_V7 - select HAVE_SMP - select MIGHT_HAVE_CACHE_L2X0 - -config ARCH_VEXPRESS_DT - bool "Device Tree support for Versatile Express platforms" +config ARCH_VEXPRESS + bool "ARM Ltd. Versatile Express family" if ARCH_MULTI_V7 + select ARCH_WANT_OPTIONAL_GPIOLIB + select ARM_AMBA select ARM_GIC - select ARM_PATCH_PHYS_VIRT - select AUTO_ZRELADDR + select ARM_TIMER_SP804 + select CLKDEV_LOOKUP + select COMMON_CLK select CPU_V7 + select GENERIC_CLOCKEVENTS + select HAVE_CLK + select HAVE_PATA_PLATFORM select HAVE_SMP + select ICST select MIGHT_HAVE_CACHE_L2X0 - select USE_OF + select NO_IOPORT + select PLAT_VERSATILE + select PLAT_VERSATILE_CLCD + select REGULATOR_FIXED_VOLTAGE if REGULATOR help - New Versatile Express platforms require Flattened Device Tree to - be passed to the kernel. - This option enables support for systems using Cortex processor based ARM core and logic (FPGA) tiles on the Versatile Express motherboard, for example: @@ -48,7 +33,22 @@ config ARCH_VEXPRESS_DT platforms. The traditional (ATAGs) boot method is not usable on these boards with this option. - If your bootloader supports Flattened Device Tree based booting, - say Y here. +menu "Versatile Express platform type" + depends on ARCH_VEXPRESS + +config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA + bool "Enable A5 and A9 only errata work-arounds" + default y + select ARM_ERRATA_720789 + select ARM_ERRATA_751472 + select PL310_ERRATA_753970 if CACHE_PL310 + help + Provides common dependencies for Versatile Express platforms + based on Cortex-A5 and Cortex-A9 processors. In order to + build a working kernel, you must also enable relevant core + tile support or Flattened Device Tree based support options. + +config ARCH_VEXPRESS_CA9X4 + bool "Versatile Express Cortex-A9x4 tile" endmenu diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile index 90551b9..42703e8 100644 --- a/arch/arm/mach-vexpress/Makefile +++ b/arch/arm/mach-vexpress/Makefile @@ -1,6 +1,8 @@ # # Makefile for the linux kernel. # +ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ + -I$(srctree)/arch/arm/plat-versatile/include obj-y := v2m.o obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o diff --git a/arch/arm/mach-vexpress/Makefile.boot b/arch/arm/mach-vexpress/Makefile.boot deleted file mode 100644 index c6dd891..0000000 --- a/arch/arm/mach-vexpress/Makefile.boot +++ /dev/null @@ -1,5 +0,0 @@ -# Those numbers are used only by the non-DT V2P-CA9 platform -# The DT-enabled ones require CONFIG_AUTO_ZRELADDR=y - zreladdr-y += 0x60008000 -params_phys-y := 0x60000100 -initrd_phys-y := 0x60800000 diff --git a/arch/arm/mach-vexpress/include/mach/timex.h b/arch/arm/mach-vexpress/include/mach/timex.h deleted file mode 100644 index 00029ba..0000000 --- a/arch/arm/mach-vexpress/include/mach/timex.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * arch/arm/mach-vexpress/include/mach/timex.h - * - * RealView architecture timex specifications - * - * Copyright (C) 2003 ARM Limited - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#define CLOCK_TICK_RATE (50000000 / 16) diff --git a/arch/arm/mach-vexpress/include/mach/uncompress.h b/arch/arm/mach-vexpress/include/mach/uncompress.h deleted file mode 100644 index 1e472eb..0000000 --- a/arch/arm/mach-vexpress/include/mach/uncompress.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * arch/arm/mach-vexpress/include/mach/uncompress.h - * - * Copyright (C) 2003 ARM Limited - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) -#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c)) -#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30)) -#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18)) - -#define UART_BASE 0x10009000 -#define UART_BASE_RS1 0x1c090000 - -static unsigned long get_uart_base(void) -{ -#if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT) - unsigned long mpcore_periph; - - /* - * Make an educated guess regarding the memory map: - * - the original A9 core tile, which has MPCore peripherals - * located at 0x1e000000, should use UART at 0x10009000 - * - all other (RS1 complaint) tiles use UART mapped - * at 0x1c090000 - */ - asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (mpcore_periph)); - - if (mpcore_periph == 0x1e000000) - return UART_BASE; - else - return UART_BASE_RS1; -#elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CA9) - return UART_BASE; -#elif defined(CONFIG_DEBUG_VEXPRESS_UART0_RS1) - return UART_BASE_RS1; -#else - return 0; -#endif -} - -/* - * This does not append a newline - */ -static inline void putc(int c) -{ - unsigned long base = get_uart_base(); - - if (!base) - return; - - while (AMBA_UART_FR(base) & (1 << 5)) - barrier(); - - AMBA_UART_DR(base) = c; -} - -static inline void flush(void) -{ - unsigned long base = get_uart_base(); - - if (!base) - return; - - while (AMBA_UART_FR(base) & (1 << 3)) - barrier(); -} - -/* - * nothing to do - */ -#define arch_decomp_setup() -#define arch_decomp_wdog() diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 37608f2..2ca86c5 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c @@ -539,8 +539,6 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express") .restart = v2m_restart, MACHINE_END -#if defined(CONFIG_ARCH_VEXPRESS_DT) - static struct map_desc v2m_rs1_io_desc __initdata = { .virtual = V2M_PERIPH, .pfn = __phys_to_pfn(0x1c000000), @@ -671,5 +669,3 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") .handle_irq = gic_handle_irq, .restart = v2m_restart, MACHINE_END - -#endif -- cgit v1.1