diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-03-19 12:45:37 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-03-25 07:29:42 -0400 |
commit | cf82e0e40525d3525445ada6569525cc44aad46f (patch) | |
tree | 4b6042576fc138698fddf22c9750265c3e98cb87 /arch/arm/mach-prima2 | |
parent | 275786b71d42bb54c03c15197128d7cb05d4dd8b (diff) |
ARM: sirf: enable multiplatform support
All the prerequisites are there now, so we can move sirf into multiplatform.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-prima2')
-rw-r--r-- | arch/arm/mach-prima2/Kconfig | 12 | ||||
-rw-r--r-- | arch/arm/mach-prima2/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-prima2/common.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/clkdev.h | 15 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/entry-macro.S | 22 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/hardware.h | 15 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/map.h | 18 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/timex.h | 14 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/uart.h | 29 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/uncompress.h | 41 | ||||
-rw-r--r-- | arch/arm/mach-prima2/lluart.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-prima2/platsmp.c | 1 |
12 files changed, 18 insertions, 156 deletions
diff --git a/arch/arm/mach-prima2/Kconfig b/arch/arm/mach-prima2/Kconfig index b3be7994a2b1..587c0bd70434 100644 --- a/arch/arm/mach-prima2/Kconfig +++ b/arch/arm/mach-prima2/Kconfig | |||
@@ -1,3 +1,15 @@ | |||
1 | config ARCH_SIRF | ||
2 | bool "CSR SiRF" if ARCH_MULTI_V7 | ||
3 | select ARCH_REQUIRE_GPIOLIB | ||
4 | select GENERIC_CLOCKEVENTS | ||
5 | select GENERIC_IRQ_CHIP | ||
6 | select MIGHT_HAVE_CACHE_L2X0 | ||
7 | select NO_IOPORT | ||
8 | select PINCTRL | ||
9 | select PINCTRL_SIRF | ||
10 | help | ||
11 | Support for CSR SiRFprimaII/Marco/Polo platforms | ||
12 | |||
1 | if ARCH_SIRF | 13 | if ARCH_SIRF |
2 | 14 | ||
3 | menu "CSR SiRF atlas6/primaII/Marco/Polo Specific Features" | 15 | menu "CSR SiRF atlas6/primaII/Marco/Polo Specific Features" |
diff --git a/arch/arm/mach-prima2/Makefile b/arch/arm/mach-prima2/Makefile index 52ac738881c8..7a6b4a323125 100644 --- a/arch/arm/mach-prima2/Makefile +++ b/arch/arm/mach-prima2/Makefile | |||
@@ -6,3 +6,5 @@ obj-$(CONFIG_CACHE_L2X0) += l2x0.o | |||
6 | obj-$(CONFIG_SUSPEND) += pm.o sleep.o | 6 | obj-$(CONFIG_SUSPEND) += pm.o sleep.o |
7 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 7 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
8 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 8 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
9 | |||
10 | CFLAGS_hotplug.o += -march=armv7-a | ||
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h index 54262cf063c6..81135cd88e54 100644 --- a/arch/arm/mach-prima2/common.h +++ b/arch/arm/mach-prima2/common.h | |||
@@ -13,6 +13,9 @@ | |||
13 | #include <asm/mach/time.h> | 13 | #include <asm/mach/time.h> |
14 | #include <asm/exception.h> | 14 | #include <asm/exception.h> |
15 | 15 | ||
16 | #define SIRFSOC_VA_BASE _AC(0xFEC00000, UL) | ||
17 | #define SIRFSOC_VA(x) (SIRFSOC_VA_BASE + ((x) & 0x00FFF000)) | ||
18 | |||
16 | extern struct smp_operations sirfsoc_smp_ops; | 19 | extern struct smp_operations sirfsoc_smp_ops; |
17 | extern void sirfsoc_secondary_startup(void); | 20 | extern void sirfsoc_secondary_startup(void); |
18 | extern void sirfsoc_cpu_die(unsigned int cpu); | 21 | extern void sirfsoc_cpu_die(unsigned int cpu); |
diff --git a/arch/arm/mach-prima2/include/mach/clkdev.h b/arch/arm/mach-prima2/include/mach/clkdev.h deleted file mode 100644 index 66932518b1b7..000000000000 --- a/arch/arm/mach-prima2/include/mach/clkdev.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/clkdev.h | ||
3 | * | ||
4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __MACH_CLKDEV_H | ||
10 | #define __MACH_CLKDEV_H | ||
11 | |||
12 | #define __clk_get(clk) ({ 1; }) | ||
13 | #define __clk_put(clk) do { } while (0) | ||
14 | |||
15 | #endif | ||
diff --git a/arch/arm/mach-prima2/include/mach/entry-macro.S b/arch/arm/mach-prima2/include/mach/entry-macro.S deleted file mode 100644 index 86434e7a5be9..000000000000 --- a/arch/arm/mach-prima2/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #include <mach/hardware.h> | ||
10 | |||
11 | #define SIRFSOC_INT_ID 0x38 | ||
12 | |||
13 | .macro get_irqnr_preamble, base, tmp | ||
14 | ldr \base, =sirfsoc_intc_base | ||
15 | ldr \base, [\base] | ||
16 | .endm | ||
17 | |||
18 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
19 | ldr \irqnr, [\base, #SIRFSOC_INT_ID] @ Get the highest priority irq | ||
20 | cmp \irqnr, #0x40 @ the irq num can't be larger than 0x3f | ||
21 | movges \irqnr, #0 | ||
22 | .endm | ||
diff --git a/arch/arm/mach-prima2/include/mach/hardware.h b/arch/arm/mach-prima2/include/mach/hardware.h deleted file mode 100644 index 105b96964f25..000000000000 --- a/arch/arm/mach-prima2/include/mach/hardware.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/hardware.h | ||
3 | * | ||
4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __MACH_HARDWARE_H__ | ||
10 | #define __MACH_HARDWARE_H__ | ||
11 | |||
12 | #include <asm/sizes.h> | ||
13 | #include <mach/map.h> | ||
14 | |||
15 | #endif | ||
diff --git a/arch/arm/mach-prima2/include/mach/map.h b/arch/arm/mach-prima2/include/mach/map.h deleted file mode 100644 index 6f243532570c..000000000000 --- a/arch/arm/mach-prima2/include/mach/map.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * memory & I/O static mapping definitions for CSR SiRFprimaII | ||
3 | * | ||
4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __MACH_PRIMA2_MAP_H__ | ||
10 | #define __MACH_PRIMA2_MAP_H__ | ||
11 | |||
12 | #include <linux/const.h> | ||
13 | |||
14 | #define SIRFSOC_VA_BASE _AC(0xFEC00000, UL) | ||
15 | |||
16 | #define SIRFSOC_VA(x) (SIRFSOC_VA_BASE + ((x) & 0x00FFF000)) | ||
17 | |||
18 | #endif | ||
diff --git a/arch/arm/mach-prima2/include/mach/timex.h b/arch/arm/mach-prima2/include/mach/timex.h deleted file mode 100644 index d6f98a75e562..000000000000 --- a/arch/arm/mach-prima2/include/mach/timex.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/timex.h | ||
3 | * | ||
4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __MACH_TIMEX_H__ | ||
10 | #define __MACH_TIMEX_H__ | ||
11 | |||
12 | #define CLOCK_TICK_RATE 1000000 | ||
13 | |||
14 | #endif | ||
diff --git a/arch/arm/mach-prima2/include/mach/uart.h b/arch/arm/mach-prima2/include/mach/uart.h deleted file mode 100644 index c10510d01a44..000000000000 --- a/arch/arm/mach-prima2/include/mach/uart.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/uart.h | ||
3 | * | ||
4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __MACH_PRIMA2_SIRFSOC_UART_H | ||
10 | #define __MACH_PRIMA2_SIRFSOC_UART_H | ||
11 | |||
12 | /* UART-1: used as serial debug port */ | ||
13 | #if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1) | ||
14 | #define SIRFSOC_UART1_PA_BASE 0xb0060000 | ||
15 | #elif defined(CONFIG_DEBUG_SIRFMARCO_UART1) | ||
16 | #define SIRFSOC_UART1_PA_BASE 0xcc060000 | ||
17 | #else | ||
18 | #define SIRFSOC_UART1_PA_BASE 0 | ||
19 | #endif | ||
20 | #define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000) | ||
21 | #define SIRFSOC_UART1_SIZE SZ_4K | ||
22 | |||
23 | #define SIRFSOC_UART_TXFIFO_STATUS 0x0114 | ||
24 | #define SIRFSOC_UART_TXFIFO_DATA 0x0118 | ||
25 | |||
26 | #define SIRFSOC_UART1_TXFIFO_FULL (1 << 5) | ||
27 | #define SIRFSOC_UART1_TXFIFO_EMPTY (1 << 6) | ||
28 | |||
29 | #endif | ||
diff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-prima2/include/mach/uncompress.h deleted file mode 100644 index d1513a33709a..000000000000 --- a/arch/arm/mach-prima2/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
10 | #define __ASM_ARCH_UNCOMPRESS_H | ||
11 | |||
12 | #include <linux/io.h> | ||
13 | #include <mach/hardware.h> | ||
14 | #include <mach/uart.h> | ||
15 | |||
16 | void arch_decomp_setup(void) | ||
17 | { | ||
18 | } | ||
19 | |||
20 | static __inline__ void putc(char c) | ||
21 | { | ||
22 | /* | ||
23 | * during kernel decompression, all mappings are flat: | ||
24 | * virt_addr == phys_addr | ||
25 | */ | ||
26 | if (!SIRFSOC_UART1_PA_BASE) | ||
27 | return; | ||
28 | |||
29 | while (__raw_readl((void __iomem *)SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_STATUS) | ||
30 | & SIRFSOC_UART1_TXFIFO_FULL) | ||
31 | barrier(); | ||
32 | |||
33 | __raw_writel(c, (void __iomem *)SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_DATA); | ||
34 | } | ||
35 | |||
36 | static inline void flush(void) | ||
37 | { | ||
38 | } | ||
39 | |||
40 | #endif | ||
41 | |||
diff --git a/arch/arm/mach-prima2/lluart.c b/arch/arm/mach-prima2/lluart.c index 7222481ef1c8..99c0c927ca4a 100644 --- a/arch/arm/mach-prima2/lluart.c +++ b/arch/arm/mach-prima2/lluart.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <asm/page.h> | 10 | #include <asm/page.h> |
11 | #include <asm/mach/map.h> | 11 | #include <asm/mach/map.h> |
12 | #include <mach/map.h> | 12 | #include "common.h" |
13 | 13 | ||
14 | #if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1) | 14 | #if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1) |
15 | #define SIRFSOC_UART1_PA_BASE 0xb0060000 | 15 | #define SIRFSOC_UART1_PA_BASE 0xb0060000 |
diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c index 4b788310f6a6..d52e322e616c 100644 --- a/arch/arm/mach-prima2/platsmp.c +++ b/arch/arm/mach-prima2/platsmp.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <asm/smp_scu.h> | 18 | #include <asm/smp_scu.h> |
19 | #include <asm/cacheflush.h> | 19 | #include <asm/cacheflush.h> |
20 | #include <asm/cputype.h> | 20 | #include <asm/cputype.h> |
21 | #include <mach/map.h> | ||
22 | 21 | ||
23 | #include "common.h" | 22 | #include "common.h" |
24 | 23 | ||