diff options
author | Binghua Duan <binghua.duan@csr.com> | 2011-07-08 05:40:12 -0400 |
---|---|---|
committer | Barry Song <21cnbao@gmail.com> | 2011-07-08 19:19:28 -0400 |
commit | 02c981c07bc95ac1e42ec6c817f0c28cf3fe993a (patch) | |
tree | 3b0f9a368d7d3b4cef3eab9128a0c3d95e8188d4 /arch/arm/mach-prima2/include/mach | |
parent | f1bb20a8365f6753e0f7b6e94981ca2b662bae13 (diff) |
ARM: CSR: Adding CSR SiRFprimaII board support
SiRFprimaII is the latest generation application processor from CSR’s
Multifunction SoC product family. Designed around an ARM cortex A9 core,
high-speed memory bus, advanced 3D accelerator and full-HD multi-format
video decoder, SiRFprimaII is able to meet the needs of complicated
applications for modern multifunction devices that require heavy concurrent
applications and fluid user experience. Integrated with GPS baseband,
analog and PMU, this new platform is designed to provide a cost effective
solution for Automotive and Consumer markets.
This patch adds the basic support for this SoC and EVB board based on device
tree. It is following the ZYNQ of Xilinx in some degree.
Signed-off-by: Binghua Duan <Binghua.Duan@csr.com>
Signed-off-by: Rongjun Ying <Rongjun.Ying@csr.com>
Signed-off-by: Zhiwu Song <Zhiwu.Song@csr.com>
Signed-off-by: Yuping Luo <Yuping.Luo@csr.com>
Signed-off-by: Bin Shi <Bin.Shi@csr.com>
Signed-off-by: Huayi Li <Huayi.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-prima2/include/mach')
-rw-r--r-- | arch/arm/mach-prima2/include/mach/clkdev.h | 15 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/debug-macro.S | 29 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/entry-macro.S | 29 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/hardware.h | 15 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/io.h | 16 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/irqs.h | 17 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/map.h | 16 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/memory.h | 21 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/system.h | 29 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/timex.h | 14 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/uart.h | 23 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/uncompress.h | 40 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/vmalloc.h | 16 |
13 files changed, 280 insertions, 0 deletions
diff --git a/arch/arm/mach-prima2/include/mach/clkdev.h b/arch/arm/mach-prima2/include/mach/clkdev.h new file mode 100644 index 000000000000..66932518b1b7 --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/clkdev.h | |||
@@ -0,0 +1,15 @@ | |||
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/debug-macro.S b/arch/arm/mach-prima2/include/mach/debug-macro.S new file mode 100644 index 000000000000..bf75106333ff --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/debug-macro.S | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/debug-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 | #include <mach/uart.h> | ||
11 | |||
12 | .macro addruart, rp, rv | ||
13 | ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical | ||
14 | ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual | ||
15 | .endm | ||
16 | |||
17 | .macro senduart,rd,rx | ||
18 | str \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA] | ||
19 | .endm | ||
20 | |||
21 | .macro busyuart,rd,rx | ||
22 | .endm | ||
23 | |||
24 | .macro waituart,rd,rx | ||
25 | 1001: ldr \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS] | ||
26 | tst \rd, #SIRFSOC_UART1_TXFIFO_EMPTY | ||
27 | beq 1001b | ||
28 | .endm | ||
29 | |||
diff --git a/arch/arm/mach-prima2/include/mach/entry-macro.S b/arch/arm/mach-prima2/include/mach/entry-macro.S new file mode 100644 index 000000000000..1c8a50f102a7 --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/entry-macro.S | |||
@@ -0,0 +1,29 @@ | |||
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 | ||
23 | |||
24 | .macro disable_fiq | ||
25 | .endm | ||
26 | |||
27 | .macro arch_ret_to_user, tmp1, tmp2 | ||
28 | .endm | ||
29 | |||
diff --git a/arch/arm/mach-prima2/include/mach/hardware.h b/arch/arm/mach-prima2/include/mach/hardware.h new file mode 100644 index 000000000000..105b96964f25 --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/hardware.h | |||
@@ -0,0 +1,15 @@ | |||
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/io.h b/arch/arm/mach-prima2/include/mach/io.h new file mode 100644 index 000000000000..6c31e9ec279e --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/io.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/io.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_IO_H | ||
10 | #define __MACH_PRIMA2_IO_H | ||
11 | |||
12 | #define IO_SPACE_LIMIT ((resource_size_t)0) | ||
13 | |||
14 | #define __mem_pci(a) (a) | ||
15 | |||
16 | #endif | ||
diff --git a/arch/arm/mach-prima2/include/mach/irqs.h b/arch/arm/mach-prima2/include/mach/irqs.h new file mode 100644 index 000000000000..bb354f952fd6 --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/irqs.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/irqs.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_IRQS_H | ||
10 | #define __ASM_ARCH_IRQS_H | ||
11 | |||
12 | #define SIRFSOC_INTENAL_IRQ_START 0 | ||
13 | #define SIRFSOC_INTENAL_IRQ_END 59 | ||
14 | |||
15 | #define NR_IRQS 220 | ||
16 | |||
17 | #endif | ||
diff --git a/arch/arm/mach-prima2/include/mach/map.h b/arch/arm/mach-prima2/include/mach/map.h new file mode 100644 index 000000000000..66b1ae2e553f --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/map.h | |||
@@ -0,0 +1,16 @@ | |||
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 <mach/vmalloc.h> | ||
13 | |||
14 | #define SIRFSOC_VA(x) (VMALLOC_END + ((x) & 0x00FFF000)) | ||
15 | |||
16 | #endif | ||
diff --git a/arch/arm/mach-prima2/include/mach/memory.h b/arch/arm/mach-prima2/include/mach/memory.h new file mode 100644 index 000000000000..368cd5a0601a --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/memory.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2010 – 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_MEMORY_H | ||
10 | #define __ASM_ARCH_MEMORY_H | ||
11 | |||
12 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
13 | |||
14 | /* | ||
15 | * Restrict DMA-able region to workaround silicon limitation. | ||
16 | * The limitation restricts buffers available for DMA to SD/MMC | ||
17 | * hardware to be below 256MB | ||
18 | */ | ||
19 | #define ARM_DMA_ZONE_SIZE (SZ_256M) | ||
20 | |||
21 | #endif | ||
diff --git a/arch/arm/mach-prima2/include/mach/system.h b/arch/arm/mach-prima2/include/mach/system.h new file mode 100644 index 000000000000..0dbd257ad16d --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/system.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/system.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_SYSTEM_H__ | ||
10 | #define __MACH_SYSTEM_H__ | ||
11 | |||
12 | #include <linux/bitops.h> | ||
13 | #include <mach/hardware.h> | ||
14 | |||
15 | #define SIRFSOC_SYS_RST_BIT BIT(31) | ||
16 | |||
17 | extern void __iomem *sirfsoc_rstc_base; | ||
18 | |||
19 | static inline void arch_idle(void) | ||
20 | { | ||
21 | cpu_do_idle(); | ||
22 | } | ||
23 | |||
24 | static inline void arch_reset(char mode, const char *cmd) | ||
25 | { | ||
26 | writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base); | ||
27 | } | ||
28 | |||
29 | #endif | ||
diff --git a/arch/arm/mach-prima2/include/mach/timex.h b/arch/arm/mach-prima2/include/mach/timex.h new file mode 100644 index 000000000000..d6f98a75e562 --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/timex.h | |||
@@ -0,0 +1,14 @@ | |||
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 new file mode 100644 index 000000000000..c98b4d5ac24a --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/uart.h | |||
@@ -0,0 +1,23 @@ | |||
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 | #define SIRFSOC_UART1_PA_BASE 0xb0060000 | ||
14 | #define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000) | ||
15 | #define SIRFSOC_UART1_SIZE SZ_4K | ||
16 | |||
17 | #define SIRFSOC_UART_TXFIFO_STATUS 0x0114 | ||
18 | #define SIRFSOC_UART_TXFIFO_DATA 0x0118 | ||
19 | |||
20 | #define SIRFSOC_UART1_TXFIFO_FULL (1 << 5) | ||
21 | #define SIRFSOC_UART1_TXFIFO_EMPTY (1 << 6) | ||
22 | |||
23 | #endif | ||
diff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-prima2/include/mach/uncompress.h new file mode 100644 index 000000000000..83125c6a30b3 --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/uncompress.h | |||
@@ -0,0 +1,40 @@ | |||
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 | #define arch_decomp_wdog() | ||
21 | |||
22 | static __inline__ void putc(char c) | ||
23 | { | ||
24 | /* | ||
25 | * during kernel decompression, all mappings are flat: | ||
26 | * virt_addr == phys_addr | ||
27 | */ | ||
28 | while (__raw_readl(SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_STATUS) | ||
29 | & SIRFSOC_UART1_TXFIFO_FULL) | ||
30 | barrier(); | ||
31 | |||
32 | __raw_writel(c, SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_DATA); | ||
33 | } | ||
34 | |||
35 | static inline void flush(void) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | #endif | ||
40 | |||
diff --git a/arch/arm/mach-prima2/include/mach/vmalloc.h b/arch/arm/mach-prima2/include/mach/vmalloc.h new file mode 100644 index 000000000000..c9f90fec78e3 --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/vmalloc.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * arch/arm/ach-prima2/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (c) 2010 – 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __MACH_VMALLOC_H | ||
10 | #define __MACH_VMALLOC_H | ||
11 | |||
12 | #include <linux/const.h> | ||
13 | |||
14 | #define VMALLOC_END _AC(0xFEC00000, UL) | ||
15 | |||
16 | #endif | ||