diff options
Diffstat (limited to 'arch/arm/mach-loki/include/mach')
-rw-r--r-- | arch/arm/mach-loki/include/mach/debug-macro.S | 20 | ||||
-rw-r--r-- | arch/arm/mach-loki/include/mach/dma.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-loki/include/mach/entry-macro.S | 30 | ||||
-rw-r--r-- | arch/arm/mach-loki/include/mach/hardware.h | 15 | ||||
-rw-r--r-- | arch/arm/mach-loki/include/mach/io.h | 26 | ||||
-rw-r--r-- | arch/arm/mach-loki/include/mach/irqs.h | 58 | ||||
-rw-r--r-- | arch/arm/mach-loki/include/mach/loki.h | 97 | ||||
-rw-r--r-- | arch/arm/mach-loki/include/mach/memory.h | 14 | ||||
-rw-r--r-- | arch/arm/mach-loki/include/mach/system.h | 37 | ||||
-rw-r--r-- | arch/arm/mach-loki/include/mach/timex.h | 11 | ||||
-rw-r--r-- | arch/arm/mach-loki/include/mach/uncompress.h | 47 | ||||
-rw-r--r-- | arch/arm/mach-loki/include/mach/vmalloc.h | 5 |
12 files changed, 361 insertions, 0 deletions
diff --git a/arch/arm/mach-loki/include/mach/debug-macro.S b/arch/arm/mach-loki/include/mach/debug-macro.S new file mode 100644 index 000000000000..a8c20bd2f951 --- /dev/null +++ b/arch/arm/mach-loki/include/mach/debug-macro.S | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/include/mach/debug-macro.S | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #include <mach/loki.h> | ||
10 | |||
11 | .macro addruart,rx | ||
12 | mrc p15, 0, \rx, c1, c0 | ||
13 | tst \rx, #1 @ MMU enabled? | ||
14 | ldreq \rx, =LOKI_REGS_PHYS_BASE | ||
15 | ldrne \rx, =LOKI_REGS_VIRT_BASE | ||
16 | orr \rx, \rx, #0x00012000 | ||
17 | .endm | ||
18 | |||
19 | #define UART_SHIFT 2 | ||
20 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-loki/include/mach/dma.h b/arch/arm/mach-loki/include/mach/dma.h new file mode 100644 index 000000000000..40a8c178f10d --- /dev/null +++ b/arch/arm/mach-loki/include/mach/dma.h | |||
@@ -0,0 +1 @@ | |||
/* empty */ | |||
diff --git a/arch/arm/mach-loki/include/mach/entry-macro.S b/arch/arm/mach-loki/include/mach/entry-macro.S new file mode 100644 index 000000000000..332af38ec13c --- /dev/null +++ b/arch/arm/mach-loki/include/mach/entry-macro.S | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Marvell Loki (88RC8480) platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <mach/loki.h> | ||
12 | |||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_preamble, base, tmp | ||
20 | ldr \base, =IRQ_VIRT_BASE | ||
21 | .endm | ||
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | ldr \irqstat, [\base, #IRQ_CAUSE_OFF] | ||
25 | ldr \tmp, [\base, #IRQ_MASK_OFF] | ||
26 | mov \irqnr, #0 | ||
27 | ands \irqstat, \irqstat, \tmp | ||
28 | clzne \irqnr, \irqstat | ||
29 | rsbne \irqnr, \irqnr, #31 | ||
30 | .endm | ||
diff --git a/arch/arm/mach-loki/include/mach/hardware.h b/arch/arm/mach-loki/include/mach/hardware.h new file mode 100644 index 000000000000..d7bfc8f17729 --- /dev/null +++ b/arch/arm/mach-loki/include/mach/hardware.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/include/mach/hardware.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_HARDWARE_H | ||
10 | #define __ASM_ARCH_HARDWARE_H | ||
11 | |||
12 | #include "loki.h" | ||
13 | |||
14 | |||
15 | #endif | ||
diff --git a/arch/arm/mach-loki/include/mach/io.h b/arch/arm/mach-loki/include/mach/io.h new file mode 100644 index 000000000000..a373cd582c84 --- /dev/null +++ b/arch/arm/mach-loki/include/mach/io.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/include/mach/io.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_IO_H | ||
10 | #define __ASM_ARCH_IO_H | ||
11 | |||
12 | #include "loki.h" | ||
13 | |||
14 | #define IO_SPACE_LIMIT 0xffffffff | ||
15 | |||
16 | static inline void __iomem *__io(unsigned long addr) | ||
17 | { | ||
18 | return (void __iomem *)((addr - LOKI_PCIE0_IO_PHYS_BASE) | ||
19 | + LOKI_PCIE0_IO_VIRT_BASE); | ||
20 | } | ||
21 | |||
22 | #define __io(a) __io(a) | ||
23 | #define __mem_pci(a) (a) | ||
24 | |||
25 | |||
26 | #endif | ||
diff --git a/arch/arm/mach-loki/include/mach/irqs.h b/arch/arm/mach-loki/include/mach/irqs.h new file mode 100644 index 000000000000..9fbd3326867b --- /dev/null +++ b/arch/arm/mach-loki/include/mach/irqs.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/include/mach/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for Marvell Loki (88RC8480) SoCs | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_IRQS_H | ||
12 | #define __ASM_ARCH_IRQS_H | ||
13 | |||
14 | #include "loki.h" /* need GPIO_MAX */ | ||
15 | |||
16 | /* | ||
17 | * Interrupt Controller | ||
18 | */ | ||
19 | #define IRQ_LOKI_PCIE_A_CPU_DRBL 0 | ||
20 | #define IRQ_LOKI_CPU_PCIE_A_DRBL 1 | ||
21 | #define IRQ_LOKI_PCIE_B_CPU_DRBL 2 | ||
22 | #define IRQ_LOKI_CPU_PCIE_B_DRBL 3 | ||
23 | #define IRQ_LOKI_COM_A_ERR 6 | ||
24 | #define IRQ_LOKI_COM_A_IN 7 | ||
25 | #define IRQ_LOKI_COM_A_OUT 8 | ||
26 | #define IRQ_LOKI_COM_B_ERR 9 | ||
27 | #define IRQ_LOKI_COM_B_IN 10 | ||
28 | #define IRQ_LOKI_COM_B_OUT 11 | ||
29 | #define IRQ_LOKI_DMA_A 12 | ||
30 | #define IRQ_LOKI_DMA_B 13 | ||
31 | #define IRQ_LOKI_SAS_A 14 | ||
32 | #define IRQ_LOKI_SAS_B 15 | ||
33 | #define IRQ_LOKI_DDR 16 | ||
34 | #define IRQ_LOKI_XOR 17 | ||
35 | #define IRQ_LOKI_BRIDGE 18 | ||
36 | #define IRQ_LOKI_PCIE_A_ERR 20 | ||
37 | #define IRQ_LOKI_PCIE_A_INT 21 | ||
38 | #define IRQ_LOKI_PCIE_B_ERR 22 | ||
39 | #define IRQ_LOKI_PCIE_B_INT 23 | ||
40 | #define IRQ_LOKI_GBE_A_INT 24 | ||
41 | #define IRQ_LOKI_GBE_B_INT 25 | ||
42 | #define IRQ_LOKI_DEV_ERR 26 | ||
43 | #define IRQ_LOKI_UART0 27 | ||
44 | #define IRQ_LOKI_UART1 28 | ||
45 | #define IRQ_LOKI_TWSI 29 | ||
46 | #define IRQ_LOKI_GPIO_23_0 30 | ||
47 | #define IRQ_LOKI_GPIO_25_24 31 | ||
48 | |||
49 | /* | ||
50 | * Loki General Purpose Pins | ||
51 | */ | ||
52 | #define IRQ_LOKI_GPIO_START 32 | ||
53 | #define NR_GPIO_IRQS GPIO_MAX | ||
54 | |||
55 | #define NR_IRQS (IRQ_LOKI_GPIO_START + NR_GPIO_IRQS) | ||
56 | |||
57 | |||
58 | #endif | ||
diff --git a/arch/arm/mach-loki/include/mach/loki.h b/arch/arm/mach-loki/include/mach/loki.h new file mode 100644 index 000000000000..c00af6ba5578 --- /dev/null +++ b/arch/arm/mach-loki/include/mach/loki.h | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/include/mach/loki.h | ||
3 | * | ||
4 | * Generic definitions for Marvell Loki (88RC8480) SoC flavors | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_LOKI_H | ||
12 | #define __ASM_ARCH_LOKI_H | ||
13 | |||
14 | /* | ||
15 | * Marvell Loki (88RC8480) address maps. | ||
16 | * | ||
17 | * phys | ||
18 | * d0000000 on-chip peripheral registers | ||
19 | * e0000000 PCIe 0 Memory space | ||
20 | * e8000000 PCIe 1 Memory space | ||
21 | * f0000000 PCIe 0 I/O space | ||
22 | * f0100000 PCIe 1 I/O space | ||
23 | * | ||
24 | * virt phys size | ||
25 | * fed00000 d0000000 1M on-chip peripheral registers | ||
26 | * fee00000 f0000000 64K PCIe 0 I/O space | ||
27 | * fef00000 f0100000 64K PCIe 1 I/O space | ||
28 | */ | ||
29 | |||
30 | #define LOKI_REGS_PHYS_BASE 0xd0000000 | ||
31 | #define LOKI_REGS_VIRT_BASE 0xfed00000 | ||
32 | #define LOKI_REGS_SIZE SZ_1M | ||
33 | |||
34 | #define LOKI_PCIE0_IO_PHYS_BASE 0xf0000000 | ||
35 | #define LOKI_PCIE0_IO_VIRT_BASE 0xfee00000 | ||
36 | #define LOKI_PCIE0_IO_BUS_BASE 0x00000000 | ||
37 | #define LOKI_PCIE0_IO_SIZE SZ_64K | ||
38 | |||
39 | #define LOKI_PCIE1_IO_PHYS_BASE 0xf0100000 | ||
40 | #define LOKI_PCIE1_IO_VIRT_BASE 0xfef00000 | ||
41 | #define LOKI_PCIE1_IO_BUS_BASE 0x00000000 | ||
42 | #define LOKI_PCIE1_IO_SIZE SZ_64K | ||
43 | |||
44 | #define LOKI_PCIE0_MEM_PHYS_BASE 0xe0000000 | ||
45 | #define LOKI_PCIE0_MEM_SIZE SZ_128M | ||
46 | |||
47 | #define LOKI_PCIE1_MEM_PHYS_BASE 0xe8000000 | ||
48 | #define LOKI_PCIE1_MEM_SIZE SZ_128M | ||
49 | |||
50 | /* | ||
51 | * Register Map | ||
52 | */ | ||
53 | #define DEV_BUS_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x10000) | ||
54 | #define DEV_BUS_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x10000) | ||
55 | #define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000) | ||
56 | #define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000) | ||
57 | #define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100) | ||
58 | #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100) | ||
59 | |||
60 | #define BRIDGE_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x20000) | ||
61 | #define BRIDGE_REG(x) (BRIDGE_VIRT_BASE | (x)) | ||
62 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108) | ||
63 | #define SOFT_RESET_OUT_EN 0x00000004 | ||
64 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) | ||
65 | #define SOFT_RESET 0x00000001 | ||
66 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) | ||
67 | #define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114) | ||
68 | #define BRIDGE_INT_TIMER0 0x0002 | ||
69 | #define BRIDGE_INT_TIMER1 0x0004 | ||
70 | #define BRIDGE_INT_TIMER1_CLR 0x0004 | ||
71 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) | ||
72 | #define IRQ_CAUSE_OFF 0x0000 | ||
73 | #define IRQ_MASK_OFF 0x0004 | ||
74 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300) | ||
75 | |||
76 | #define PCIE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x30000) | ||
77 | |||
78 | #define PCIE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x40000) | ||
79 | |||
80 | #define SAS0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x80000) | ||
81 | |||
82 | #define SAS1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x90000) | ||
83 | |||
84 | #define GE0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xa0000) | ||
85 | #define GE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xa0000) | ||
86 | |||
87 | #define GE1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xb0000) | ||
88 | #define GE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xb0000) | ||
89 | |||
90 | #define DDR_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xf0000) | ||
91 | #define DDR_REG(x) (DDR_VIRT_BASE | (x)) | ||
92 | |||
93 | |||
94 | #define GPIO_MAX 8 | ||
95 | |||
96 | |||
97 | #endif | ||
diff --git a/arch/arm/mach-loki/include/mach/memory.h b/arch/arm/mach-loki/include/mach/memory.h new file mode 100644 index 000000000000..a39533ab489d --- /dev/null +++ b/arch/arm/mach-loki/include/mach/memory.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/include/mach/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | ||
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | #define PHYS_OFFSET UL(0x00000000) | ||
9 | |||
10 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
11 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
12 | |||
13 | |||
14 | #endif | ||
diff --git a/arch/arm/mach-loki/include/mach/system.h b/arch/arm/mach-loki/include/mach/system.h new file mode 100644 index 000000000000..8db1147d4ec5 --- /dev/null +++ b/arch/arm/mach-loki/include/mach/system.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/include/mach/system.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_SYSTEM_H | ||
10 | #define __ASM_ARCH_SYSTEM_H | ||
11 | |||
12 | #include <mach/hardware.h> | ||
13 | #include <mach/loki.h> | ||
14 | |||
15 | static inline void arch_idle(void) | ||
16 | { | ||
17 | cpu_do_idle(); | ||
18 | } | ||
19 | |||
20 | static inline void arch_reset(char mode) | ||
21 | { | ||
22 | /* | ||
23 | * Enable soft reset to assert RSTOUTn. | ||
24 | */ | ||
25 | writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK); | ||
26 | |||
27 | /* | ||
28 | * Assert soft reset. | ||
29 | */ | ||
30 | writel(SOFT_RESET, SYSTEM_SOFT_RESET); | ||
31 | |||
32 | while (1) | ||
33 | ; | ||
34 | } | ||
35 | |||
36 | |||
37 | #endif | ||
diff --git a/arch/arm/mach-loki/include/mach/timex.h b/arch/arm/mach-loki/include/mach/timex.h new file mode 100644 index 000000000000..9df210915297 --- /dev/null +++ b/arch/arm/mach-loki/include/mach/timex.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/include/mach/timex.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #define CLOCK_TICK_RATE (100 * HZ) | ||
10 | |||
11 | #define LOKI_TCLK 180000000 | ||
diff --git a/arch/arm/mach-loki/include/mach/uncompress.h b/arch/arm/mach-loki/include/mach/uncompress.h new file mode 100644 index 000000000000..90b2a7e65da3 --- /dev/null +++ b/arch/arm/mach-loki/include/mach/uncompress.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/include/mach/uncompress.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #include <linux/serial_reg.h> | ||
10 | #include <mach/loki.h> | ||
11 | |||
12 | #define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE) | ||
13 | |||
14 | static void putc(const char c) | ||
15 | { | ||
16 | unsigned char *base = SERIAL_BASE; | ||
17 | int i; | ||
18 | |||
19 | for (i = 0; i < 0x1000; i++) { | ||
20 | if (base[UART_LSR << 2] & UART_LSR_THRE) | ||
21 | break; | ||
22 | barrier(); | ||
23 | } | ||
24 | |||
25 | base[UART_TX << 2] = c; | ||
26 | } | ||
27 | |||
28 | static void flush(void) | ||
29 | { | ||
30 | unsigned char *base = SERIAL_BASE; | ||
31 | unsigned char mask; | ||
32 | int i; | ||
33 | |||
34 | mask = UART_LSR_TEMT | UART_LSR_THRE; | ||
35 | |||
36 | for (i = 0; i < 0x1000; i++) { | ||
37 | if ((base[UART_LSR << 2] & mask) == mask) | ||
38 | break; | ||
39 | barrier(); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /* | ||
44 | * nothing to do | ||
45 | */ | ||
46 | #define arch_decomp_setup() | ||
47 | #define arch_decomp_wdog() | ||
diff --git a/arch/arm/mach-loki/include/mach/vmalloc.h b/arch/arm/mach-loki/include/mach/vmalloc.h new file mode 100644 index 000000000000..8dc3bfcbf9f0 --- /dev/null +++ b/arch/arm/mach-loki/include/mach/vmalloc.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe800000 | ||