aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-dove/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-dove/include')
-rw-r--r--arch/arm/mach-dove/include/mach/bridge-regs.h58
-rw-r--r--arch/arm/mach-dove/include/mach/debug-macro.S20
-rw-r--r--arch/arm/mach-dove/include/mach/dove.h180
-rw-r--r--arch/arm/mach-dove/include/mach/entry-macro.S39
-rw-r--r--arch/arm/mach-dove/include/mach/gpio.h49
-rw-r--r--arch/arm/mach-dove/include/mach/hardware.h26
-rw-r--r--arch/arm/mach-dove/include/mach/io.h20
-rw-r--r--arch/arm/mach-dove/include/mach/irqs.h101
-rw-r--r--arch/arm/mach-dove/include/mach/memory.h10
-rw-r--r--arch/arm/mach-dove/include/mach/pm.h54
-rw-r--r--arch/arm/mach-dove/include/mach/system.h36
-rw-r--r--arch/arm/mach-dove/include/mach/timex.h9
-rw-r--r--arch/arm/mach-dove/include/mach/uncompress.h37
-rw-r--r--arch/arm/mach-dove/include/mach/vmalloc.h5
14 files changed, 644 insertions, 0 deletions
diff --git a/arch/arm/mach-dove/include/mach/bridge-regs.h b/arch/arm/mach-dove/include/mach/bridge-regs.h
new file mode 100644
index 000000000000..214a4c31f069
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/bridge-regs.h
@@ -0,0 +1,58 @@
1/*
2 * arch/arm/mach-dove/include/mach/bridge-regs.h
3 *
4 * Mbus-L to Mbus Bridge Registers
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_BRIDGE_REGS_H
12#define __ASM_ARCH_BRIDGE_REGS_H
13
14#include <mach/dove.h>
15
16#define CPU_CONFIG (BRIDGE_VIRT_BASE | 0x0000)
17
18#define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104)
19#define CPU_CTRL_PCIE0_LINK 0x00000001
20#define CPU_RESET 0x00000002
21#define CPU_CTRL_PCIE1_LINK 0x00000008
22
23#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
24#define SOFT_RESET_OUT_EN 0x00000004
25
26#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
27#define SOFT_RESET 0x00000001
28
29#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
30#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
31#define BRIDGE_INT_TIMER0 0x0002
32#define BRIDGE_INT_TIMER1 0x0004
33#define BRIDGE_INT_TIMER1_CLR (~0x0004)
34
35#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
36#define IRQ_CAUSE_LOW_OFF 0x0000
37#define IRQ_MASK_LOW_OFF 0x0004
38#define FIQ_MASK_LOW_OFF 0x0008
39#define ENDPOINT_MASK_LOW_OFF 0x000c
40#define IRQ_CAUSE_HIGH_OFF 0x0010
41#define IRQ_MASK_HIGH_OFF 0x0014
42#define FIQ_MASK_HIGH_OFF 0x0018
43#define ENDPOINT_MASK_HIGH_OFF 0x001c
44#define PCIE_INTERRUPT_MASK_OFF 0x0020
45
46#define IRQ_MASK_LOW (IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)
47#define FIQ_MASK_LOW (IRQ_VIRT_BASE + FIQ_MASK_LOW_OFF)
48#define ENDPOINT_MASK_LOW (IRQ_VIRT_BASE + ENDPOINT_MASK_LOW_OFF)
49#define IRQ_MASK_HIGH (IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)
50#define FIQ_MASK_HIGH (IRQ_VIRT_BASE + FIQ_MASK_HIGH_OFF)
51#define ENDPOINT_MASK_HIGH (IRQ_VIRT_BASE + ENDPOINT_MASK_HIGH_OFF)
52#define PCIE_INTERRUPT_MASK (IRQ_VIRT_BASE + PCIE_INTERRUPT_MASK_OFF)
53
54#define POWER_MANAGEMENT (BRIDGE_VIRT_BASE | 0x011c)
55
56#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
57
58#endif
diff --git a/arch/arm/mach-dove/include/mach/debug-macro.S b/arch/arm/mach-dove/include/mach/debug-macro.S
new file mode 100644
index 000000000000..9b89ec7d3040
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/debug-macro.S
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-dove/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/bridge-regs.h>
10
11 .macro addruart,rx
12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled?
14 ldreq \rx, =DOVE_SB_REGS_PHYS_BASE
15 ldrne \rx, =DOVE_SB_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-dove/include/mach/dove.h b/arch/arm/mach-dove/include/mach/dove.h
new file mode 100644
index 000000000000..f6a08397f046
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/dove.h
@@ -0,0 +1,180 @@
1/*
2 * arch/arm/mach-dove/include/mach/dove.h
3 *
4 * Generic definitions for Marvell Dove 88AP510 SoC
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_DOVE_H
12#define __ASM_ARCH_DOVE_H
13
14#include <mach/vmalloc.h>
15
16/*
17 * Marvell Dove address maps.
18 *
19 * phys virt size
20 * c8000000 fdb00000 1M Cryptographic SRAM
21 * e0000000 @runtime 128M PCIe-0 Memory space
22 * e8000000 @runtime 128M PCIe-1 Memory space
23 * f1000000 fde00000 8M on-chip south-bridge registers
24 * f1800000 fe600000 8M on-chip north-bridge registers
25 * f2000000 fee00000 1M PCIe-0 I/O space
26 * f2100000 fef00000 1M PCIe-1 I/O space
27 */
28
29#define DOVE_CESA_PHYS_BASE 0xc8000000
30#define DOVE_CESA_VIRT_BASE 0xfdb00000
31#define DOVE_CESA_SIZE SZ_1M
32
33#define DOVE_PCIE0_MEM_PHYS_BASE 0xe0000000
34#define DOVE_PCIE0_MEM_SIZE SZ_128M
35
36#define DOVE_PCIE1_MEM_PHYS_BASE 0xe8000000
37#define DOVE_PCIE1_MEM_SIZE SZ_128M
38
39#define DOVE_BOOTROM_PHYS_BASE 0xf8000000
40#define DOVE_BOOTROM_SIZE SZ_128M
41
42#define DOVE_SCRATCHPAD_PHYS_BASE 0xf0000000
43#define DOVE_SCRATCHPAD_VIRT_BASE 0xfdd00000
44#define DOVE_SCRATCHPAD_SIZE SZ_1M
45
46#define DOVE_SB_REGS_PHYS_BASE 0xf1000000
47#define DOVE_SB_REGS_VIRT_BASE 0xfde00000
48#define DOVE_SB_REGS_SIZE SZ_8M
49
50#define DOVE_NB_REGS_PHYS_BASE 0xf1800000
51#define DOVE_NB_REGS_VIRT_BASE 0xfe600000
52#define DOVE_NB_REGS_SIZE SZ_8M
53
54#define DOVE_PCIE0_IO_PHYS_BASE 0xf2000000
55#define DOVE_PCIE0_IO_VIRT_BASE 0xfee00000
56#define DOVE_PCIE0_IO_BUS_BASE 0x00000000
57#define DOVE_PCIE0_IO_SIZE SZ_1M
58
59#define DOVE_PCIE1_IO_PHYS_BASE 0xf2100000
60#define DOVE_PCIE1_IO_VIRT_BASE 0xfef00000
61#define DOVE_PCIE1_IO_BUS_BASE 0x00100000
62#define DOVE_PCIE1_IO_SIZE SZ_1M
63
64/*
65 * Dove Core Registers Map
66 */
67
68/* SPI, I2C, UART */
69#define DOVE_I2C_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x11000)
70#define DOVE_UART0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x12000)
71#define DOVE_UART0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x12000)
72#define DOVE_UART1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x12100)
73#define DOVE_UART1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x12100)
74#define DOVE_UART2_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x12200)
75#define DOVE_UART2_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x12200)
76#define DOVE_UART3_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x12300)
77#define DOVE_UART3_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x12300)
78#define DOVE_SPI0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x10600)
79#define DOVE_SPI1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x14600)
80
81/* North-South Bridge */
82#define BRIDGE_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x20000)
83
84/* Cryptographic Engine */
85#define DOVE_CRYPT_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x30000)
86
87/* PCIe 0 */
88#define DOVE_PCIE0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x40000)
89
90/* USB */
91#define DOVE_USB0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x50000)
92#define DOVE_USB1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x51000)
93
94/* XOR 0 Engine */
95#define DOVE_XOR0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x60800)
96#define DOVE_XOR0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x60800)
97#define DOVE_XOR0_HIGH_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x60A00)
98#define DOVE_XOR0_HIGH_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x60A00)
99
100/* XOR 1 Engine */
101#define DOVE_XOR1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x60900)
102#define DOVE_XOR1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x60900)
103#define DOVE_XOR1_HIGH_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x60B00)
104#define DOVE_XOR1_HIGH_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x60B00)
105
106/* Gigabit Ethernet */
107#define DOVE_GE00_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x70000)
108
109/* PCIe 1 */
110#define DOVE_PCIE1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x80000)
111
112/* CAFE */
113#define DOVE_SDIO0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x92000)
114#define DOVE_SDIO1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x90000)
115#define DOVE_CAM_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x94000)
116#define DOVE_CAFE_WIN_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x98000)
117
118/* SATA */
119#define DOVE_SATA_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xa0000)
120
121/* I2S/SPDIF */
122#define DOVE_AUD0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xb0000)
123#define DOVE_AUD1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xb4000)
124
125/* NAND Flash Controller */
126#define DOVE_NFC_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xc0000)
127
128/* MPP, GPIO, Reset Sampling */
129#define DOVE_MPP_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0200)
130#define DOVE_PMU_MPP_GENERAL_CTRL (DOVE_MPP_VIRT_BASE + 0x10)
131#define DOVE_RESET_SAMPLE_LO (DOVE_MPP_VIRT_BASE | 0x014)
132#define DOVE_RESET_SAMPLE_HI (DOVE_MPP_VIRT_BASE | 0x018)
133#define DOVE_GPIO_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0400)
134#define DOVE_MPP_GENERAL_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe803c)
135#define DOVE_AU1_SPDIFO_GPIO_EN (1 << 1)
136#define DOVE_NAND_GPIO_EN (1 << 0)
137#define DOVE_MPP_CTRL4_VIRT_BASE (DOVE_GPIO_VIRT_BASE + 0x40)
138
139
140/* Power Management */
141#define DOVE_PMU_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0000)
142
143/* Real Time Clock */
144#define DOVE_RTC_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xd8500)
145
146/* AC97 */
147#define DOVE_AC97_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xe0000)
148#define DOVE_AC97_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe0000)
149
150/* Peripheral DMA */
151#define DOVE_PDMA_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xe4000)
152#define DOVE_PDMA_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe4000)
153
154#define DOVE_GLOBAL_CONFIG_1 (DOVE_SB_REGS_VIRT_BASE | 0xe802C)
155#define DOVE_TWSI_ENABLE_OPTION1 (1 << 7)
156#define DOVE_GLOBAL_CONFIG_2 (DOVE_SB_REGS_VIRT_BASE | 0xe8030)
157#define DOVE_TWSI_ENABLE_OPTION2 (1 << 20)
158#define DOVE_TWSI_ENABLE_OPTION3 (1 << 21)
159#define DOVE_TWSI_OPTION3_GPIO (1 << 22)
160#define DOVE_SSP_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xec000)
161#define DOVE_SSP_CTRL_STATUS_1 (DOVE_SB_REGS_VIRT_BASE | 0xe8034)
162#define DOVE_SSP_ON_AU1 (1 << 0)
163#define DOVE_SSP_CLOCK_ENABLE (1 << 1)
164#define DOVE_SSP_BPB_CLOCK_SRC_SSP (1 << 11)
165/* Memory Controller */
166#define DOVE_MC_VIRT_BASE (DOVE_NB_REGS_VIRT_BASE | 0x00000)
167
168/* LCD Controller */
169#define DOVE_LCD_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x10000)
170#define DOVE_LCD1_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x20000)
171#define DOVE_LCD2_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x10000)
172#define DOVE_LCD_DCON_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x30000)
173
174/* Graphic Engine */
175#define DOVE_GPU_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x40000)
176
177/* Video Engine */
178#define DOVE_VPU_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x400000)
179
180#endif
diff --git a/arch/arm/mach-dove/include/mach/entry-macro.S b/arch/arm/mach-dove/include/mach/entry-macro.S
new file mode 100644
index 000000000000..e84c78c2a8b7
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/entry-macro.S
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-dove/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Marvell Dove 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/bridge-regs.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 @ check low interrupts
25 ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
26 ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
27 mov \irqnr, #31
28 ands \irqstat, \irqstat, \tmp
29
30 @ if no low interrupts set, check high interrupts
31 ldreq \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
32 ldreq \tmp, [\base, #IRQ_MASK_HIGH_OFF]
33 moveq \irqnr, #63
34 andeqs \irqstat, \irqstat, \tmp
35
36 @ find first active interrupt source
37 clzne \irqstat, \irqstat
38 subne \irqnr, \irqnr, \irqstat
39 .endm
diff --git a/arch/arm/mach-dove/include/mach/gpio.h b/arch/arm/mach-dove/include/mach/gpio.h
new file mode 100644
index 000000000000..0ee70ff39e11
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/gpio.h
@@ -0,0 +1,49 @@
1/*
2 * arch/arm/mach-dove/include/mach/gpio.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_GPIO_H
10#define __ASM_ARCH_GPIO_H
11
12#include <asm/errno.h>
13#include <mach/irqs.h>
14#include <plat/gpio.h>
15#include <asm-generic/gpio.h> /* cansleep wrappers */
16
17#define GPIO_MAX 64
18
19#define GPIO_BASE_LO (DOVE_GPIO_VIRT_BASE + 0x00)
20#define GPIO_BASE_HI (DOVE_GPIO_VIRT_BASE + 0x20)
21
22#define GPIO_BASE(pin) ((pin < 32) ? GPIO_BASE_LO : GPIO_BASE_HI)
23
24#define GPIO_OUT(pin) (GPIO_BASE(pin) + 0x00)
25#define GPIO_IO_CONF(pin) (GPIO_BASE(pin) + 0x04)
26#define GPIO_BLINK_EN(pin) (GPIO_BASE(pin) + 0x08)
27#define GPIO_IN_POL(pin) (GPIO_BASE(pin) + 0x0c)
28#define GPIO_DATA_IN(pin) (GPIO_BASE(pin) + 0x10)
29#define GPIO_EDGE_CAUSE(pin) (GPIO_BASE(pin) + 0x14)
30#define GPIO_EDGE_MASK(pin) (GPIO_BASE(pin) + 0x18)
31#define GPIO_LEVEL_MASK(pin) (GPIO_BASE(pin) + 0x1c)
32
33static inline int gpio_to_irq(int pin)
34{
35 if (pin < NR_GPIO_IRQS)
36 return pin + IRQ_DOVE_GPIO_START;
37
38 return -EINVAL;
39}
40
41static inline int irq_to_gpio(int irq)
42{
43 if (IRQ_DOVE_GPIO_START < irq && irq < NR_IRQS)
44 return irq - IRQ_DOVE_GPIO_START;
45
46 return -EINVAL;
47}
48
49#endif
diff --git a/arch/arm/mach-dove/include/mach/hardware.h b/arch/arm/mach-dove/include/mach/hardware.h
new file mode 100644
index 000000000000..32b0826e7873
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/hardware.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-dove/include/mach/hardware.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_HARDWARE_H
10#define __ASM_ARCH_HARDWARE_H
11
12#include "dove.h"
13
14#define pcibios_assign_all_busses() 1
15
16#define PCIBIOS_MIN_IO 0x1000
17#define PCIBIOS_MIN_MEM 0x01000000
18#define PCIMEM_BASE DOVE_PCIE0_MEM_PHYS_BASE
19
20
21/* Macros below are required for compatibility with PXA AC'97 driver. */
22#define __REG(x) (*((volatile u32 *)((x) - DOVE_SB_REGS_PHYS_BASE + \
23 DOVE_SB_REGS_VIRT_BASE)))
24#define __PREG(x) (((u32)&(x)) - DOVE_SB_REGS_VIRT_BASE + \
25 DOVE_SB_REGS_PHYS_BASE)
26#endif
diff --git a/arch/arm/mach-dove/include/mach/io.h b/arch/arm/mach-dove/include/mach/io.h
new file mode 100644
index 000000000000..3b3e4721ce2e
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/io.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-dove/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 "dove.h"
13
14#define IO_SPACE_LIMIT 0xffffffff
15
16#define __io(a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_PHYS_BASE) +\
17 DOVE_PCIE0_IO_VIRT_BASE))
18#define __mem_pci(a) (a)
19
20#endif
diff --git a/arch/arm/mach-dove/include/mach/irqs.h b/arch/arm/mach-dove/include/mach/irqs.h
new file mode 100644
index 000000000000..46681466f92b
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/irqs.h
@@ -0,0 +1,101 @@
1/*
2 * arch/arm/mach-dove/include/mach/irqs.h
3 *
4 * IRQ definitions for Marvell Dove 88AP510 SoC
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/*
15 * Dove Low Interrupt Controller
16 */
17#define IRQ_DOVE_BRIDGE 0
18#define IRQ_DOVE_H2C 1
19#define IRQ_DOVE_C2H 2
20#define IRQ_DOVE_NAND 3
21#define IRQ_DOVE_PDMA 4
22#define IRQ_DOVE_SPI1 5
23#define IRQ_DOVE_SPI0 6
24#define IRQ_DOVE_UART_0 7
25#define IRQ_DOVE_UART_1 8
26#define IRQ_DOVE_UART_2 9
27#define IRQ_DOVE_UART_3 10
28#define IRQ_DOVE_I2C 11
29#define IRQ_DOVE_GPIO_0_7 12
30#define IRQ_DOVE_GPIO_8_15 13
31#define IRQ_DOVE_GPIO_16_23 14
32#define IRQ_DOVE_PCIE0_ERR 15
33#define IRQ_DOVE_PCIE0 16
34#define IRQ_DOVE_PCIE1_ERR 17
35#define IRQ_DOVE_PCIE1 18
36#define IRQ_DOVE_I2S0 19
37#define IRQ_DOVE_I2S0_ERR 20
38#define IRQ_DOVE_I2S1 21
39#define IRQ_DOVE_I2S1_ERR 22
40#define IRQ_DOVE_USB_ERR 23
41#define IRQ_DOVE_USB0 24
42#define IRQ_DOVE_USB1 25
43#define IRQ_DOVE_GE00_RX 26
44#define IRQ_DOVE_GE00_TX 27
45#define IRQ_DOVE_GE00_MISC 28
46#define IRQ_DOVE_GE00_SUM 29
47#define IRQ_DOVE_GE00_ERR 30
48#define IRQ_DOVE_CRYPTO 31
49
50/*
51 * Dove High Interrupt Controller
52 */
53#define IRQ_DOVE_AC97 32
54#define IRQ_DOVE_PMU 33
55#define IRQ_DOVE_CAM 34
56#define IRQ_DOVE_SDIO0 35
57#define IRQ_DOVE_SDIO1 36
58#define IRQ_DOVE_SDIO0_WAKEUP 37
59#define IRQ_DOVE_SDIO1_WAKEUP 38
60#define IRQ_DOVE_XOR_00 39
61#define IRQ_DOVE_XOR_01 40
62#define IRQ_DOVE_XOR0_ERR 41
63#define IRQ_DOVE_XOR_10 42
64#define IRQ_DOVE_XOR_11 43
65#define IRQ_DOVE_XOR1_ERR 44
66#define IRQ_DOVE_LCD_DCON 45
67#define IRQ_DOVE_LCD1 46
68#define IRQ_DOVE_LCD0 47
69#define IRQ_DOVE_GPU 48
70#define IRQ_DOVE_PERFORM_MNTR 49
71#define IRQ_DOVE_VPRO_DMA1 51
72#define IRQ_DOVE_SSP_TIMER 54
73#define IRQ_DOVE_SSP 55
74#define IRQ_DOVE_MC_L2_ERR 56
75#define IRQ_DOVE_CRYPTO_ERR 59
76#define IRQ_DOVE_GPIO_24_31 60
77#define IRQ_DOVE_HIGH_GPIO 61
78#define IRQ_DOVE_SATA 62
79
80/*
81 * DOVE General Purpose Pins
82 */
83#define IRQ_DOVE_GPIO_START 64
84#define NR_GPIO_IRQS 64
85
86/*
87 * PMU interrupts
88 */
89#define IRQ_DOVE_PMU_START (IRQ_DOVE_GPIO_START + NR_GPIO_IRQS)
90#define NR_PMU_IRQS 7
91#define IRQ_DOVE_RTC (IRQ_DOVE_PMU_START + 5)
92
93#define NR_IRQS (IRQ_DOVE_PMU_START + NR_PMU_IRQS)
94
95/* Required for compatability with PXA AC97 driver. */
96#define IRQ_AC97 IRQ_DOVE_AC97
97/* Required for compatability with PXA DMA driver. */
98#define IRQ_DMA IRQ_DOVE_PDMA
99/* Required for compatability with PXA NAND driver */
100#define IRQ_NAND IRQ_DOVE_NAND
101#endif
diff --git a/arch/arm/mach-dove/include/mach/memory.h b/arch/arm/mach-dove/include/mach/memory.h
new file mode 100644
index 000000000000..d66872074946
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/memory.h
@@ -0,0 +1,10 @@
1/*
2 * arch/arm/mach-dove/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#endif
diff --git a/arch/arm/mach-dove/include/mach/pm.h b/arch/arm/mach-dove/include/mach/pm.h
new file mode 100644
index 000000000000..3ad9f946a9e8
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/pm.h
@@ -0,0 +1,54 @@
1/*
2 * arch/arm/mach-dove/include/mach/pm.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_PM_H
10#define __ASM_ARCH_PM_H
11
12#include <asm/errno.h>
13#include <mach/irqs.h>
14
15#define CLOCK_GATING_CONTROL (DOVE_PMU_VIRT_BASE + 0x38)
16#define CLOCK_GATING_USB0_MASK (1 << 0)
17#define CLOCK_GATING_USB1_MASK (1 << 1)
18#define CLOCK_GATING_GBE_MASK (1 << 2)
19#define CLOCK_GATING_SATA_MASK (1 << 3)
20#define CLOCK_GATING_PCIE0_MASK (1 << 4)
21#define CLOCK_GATING_PCIE1_MASK (1 << 5)
22#define CLOCK_GATING_SDIO0_MASK (1 << 8)
23#define CLOCK_GATING_SDIO1_MASK (1 << 9)
24#define CLOCK_GATING_NAND_MASK (1 << 10)
25#define CLOCK_GATING_CAMERA_MASK (1 << 11)
26#define CLOCK_GATING_I2S0_MASK (1 << 12)
27#define CLOCK_GATING_I2S1_MASK (1 << 13)
28#define CLOCK_GATING_CRYPTO_MASK (1 << 15)
29#define CLOCK_GATING_AC97_MASK (1 << 21)
30#define CLOCK_GATING_PDMA_MASK (1 << 22)
31#define CLOCK_GATING_XOR0_MASK (1 << 23)
32#define CLOCK_GATING_XOR1_MASK (1 << 24)
33#define CLOCK_GATING_GIGA_PHY_MASK (1 << 30)
34
35#define PMU_INTERRUPT_CAUSE (DOVE_PMU_VIRT_BASE + 0x50)
36#define PMU_INTERRUPT_MASK (DOVE_PMU_VIRT_BASE + 0x54)
37
38static inline int pmu_to_irq(int pin)
39{
40 if (pin < NR_PMU_IRQS)
41 return pin + IRQ_DOVE_PMU_START;
42
43 return -EINVAL;
44}
45
46static inline int irq_to_pmu(int irq)
47{
48 if (IRQ_DOVE_PMU_START < irq && irq < NR_IRQS)
49 return irq - IRQ_DOVE_PMU_START;
50
51 return -EINVAL;
52}
53
54#endif
diff --git a/arch/arm/mach-dove/include/mach/system.h b/arch/arm/mach-dove/include/mach/system.h
new file mode 100644
index 000000000000..356afda56853
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/system.h
@@ -0,0 +1,36 @@
1/*
2 * arch/arm/mach-dove/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/bridge-regs.h>
13
14static inline void arch_idle(void)
15{
16 cpu_do_idle();
17}
18
19static inline void arch_reset(char mode, const char *cmd)
20{
21 /*
22 * Enable soft reset to assert RSTOUTn.
23 */
24 writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
25
26 /*
27 * Assert soft reset.
28 */
29 writel(SOFT_RESET, SYSTEM_SOFT_RESET);
30
31 while (1)
32 ;
33}
34
35
36#endif
diff --git a/arch/arm/mach-dove/include/mach/timex.h b/arch/arm/mach-dove/include/mach/timex.h
new file mode 100644
index 000000000000..251d538541db
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/timex.h
@@ -0,0 +1,9 @@
1/*
2 * arch/arm/mach-dove/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)
diff --git a/arch/arm/mach-dove/include/mach/uncompress.h b/arch/arm/mach-dove/include/mach/uncompress.h
new file mode 100644
index 000000000000..2c5cdd7a3eed
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/uncompress.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-dove/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 <mach/dove.h>
10
11#define UART_THR ((volatile unsigned char *)(DOVE_UART0_PHYS_BASE + 0x0))
12#define UART_LSR ((volatile unsigned char *)(DOVE_UART0_PHYS_BASE + 0x14))
13
14#define LSR_THRE 0x20
15
16static void putc(const char c)
17{
18 int i;
19
20 for (i = 0; i < 0x1000; i++) {
21 /* Transmit fifo not full? */
22 if (*UART_LSR & LSR_THRE)
23 break;
24 }
25
26 *UART_THR = c;
27}
28
29static void flush(void)
30{
31}
32
33/*
34 * nothing to do
35 */
36#define arch_decomp_setup()
37#define arch_decomp_wdog()
diff --git a/arch/arm/mach-dove/include/mach/vmalloc.h b/arch/arm/mach-dove/include/mach/vmalloc.h
new file mode 100644
index 000000000000..8b2c974755c6
--- /dev/null
+++ b/arch/arm/mach-dove/include/mach/vmalloc.h
@@ -0,0 +1,5 @@
1/*
2 * arch/arm/mach-dove/include/mach/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfd800000