diff options
Diffstat (limited to 'arch/arm/mach-clps711x/include')
-rw-r--r-- | arch/arm/mach-clps711x/include/mach/autcpu12.h | 23 | ||||
-rw-r--r-- | arch/arm/mach-clps711x/include/mach/clps711x.h | 27 | ||||
-rw-r--r-- | arch/arm/mach-clps711x/include/mach/entry-macro.S | 51 | ||||
-rw-r--r-- | arch/arm/mach-clps711x/include/mach/hardware.h | 67 | ||||
-rw-r--r-- | arch/arm/mach-clps711x/include/mach/irqs.h | 50 | ||||
-rw-r--r-- | arch/arm/mach-clps711x/include/mach/syspld.h | 9 |
6 files changed, 41 insertions, 186 deletions
diff --git a/arch/arm/mach-clps711x/include/mach/autcpu12.h b/arch/arm/mach-clps711x/include/mach/autcpu12.h index 1588a365f610..0452f5f3f034 100644 --- a/arch/arm/mach-clps711x/include/mach/autcpu12.h +++ b/arch/arm/mach-clps711x/include/mach/autcpu12.h | |||
@@ -21,24 +21,15 @@ | |||
21 | #define __ASM_ARCH_AUTCPU12_H | 21 | #define __ASM_ARCH_AUTCPU12_H |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * The CS8900A ethernet chip has its I/O registers wired to chip select 2 | ||
25 | * (nCS2). This is the mapping for it. | ||
26 | */ | ||
27 | #define AUTCPU12_PHYS_CS8900A CS2_PHYS_BASE /* physical */ | ||
28 | #define AUTCPU12_VIRT_CS8900A (0xfe000000) /* virtual */ | ||
29 | |||
30 | /* | ||
31 | * The flash bank is wired to chip select 0 | 24 | * The flash bank is wired to chip select 0 |
32 | */ | 25 | */ |
33 | #define AUTCPU12_PHYS_FLASH CS0_PHYS_BASE /* physical */ | 26 | #define AUTCPU12_PHYS_FLASH CS0_PHYS_BASE /* physical */ |
34 | 27 | ||
35 | /* offset for device specific information structure */ | 28 | /* offset for device specific information structure */ |
36 | #define AUTCPU12_LCDINFO_OFFS (0x00010000) | 29 | #define AUTCPU12_LCDINFO_OFFS (0x00010000) |
37 | /* | 30 | |
38 | * Videomemory is the internal SRAM (CS 6) | 31 | /* Videomemory in the internal SRAM (CS 6) */ |
39 | */ | ||
40 | #define AUTCPU12_PHYS_VIDEO CS6_PHYS_BASE | 32 | #define AUTCPU12_PHYS_VIDEO CS6_PHYS_BASE |
41 | #define AUTCPU12_VIRT_VIDEO (0xfd000000) | ||
42 | 33 | ||
43 | /* | 34 | /* |
44 | * All special IO's are tied to CS1 | 35 | * All special IO's are tied to CS1 |
@@ -49,8 +40,6 @@ | |||
49 | 40 | ||
50 | #define AUTCPU12_PHYS_CSAUX1 CS1_PHYS_BASE +0x04000000 /* physical */ | 41 | #define AUTCPU12_PHYS_CSAUX1 CS1_PHYS_BASE +0x04000000 /* physical */ |
51 | 42 | ||
52 | #define AUTCPU12_PHYS_SMC CS1_PHYS_BASE +0x06000000 /* physical */ | ||
53 | |||
54 | #define AUTCPU12_PHYS_CAN CS1_PHYS_BASE +0x08000000 /* physical */ | 43 | #define AUTCPU12_PHYS_CAN CS1_PHYS_BASE +0x08000000 /* physical */ |
55 | 44 | ||
56 | #define AUTCPU12_PHYS_TOUCH CS1_PHYS_BASE +0x0A000000 /* physical */ | 45 | #define AUTCPU12_PHYS_TOUCH CS1_PHYS_BASE +0x0A000000 /* physical */ |
@@ -59,14 +48,6 @@ | |||
59 | 48 | ||
60 | #define AUTCPU12_PHYS_LPT CS1_PHYS_BASE +0x0E000000 /* physical */ | 49 | #define AUTCPU12_PHYS_LPT CS1_PHYS_BASE +0x0E000000 /* physical */ |
61 | 50 | ||
62 | /* | ||
63 | * defines for smartmedia card access | ||
64 | */ | ||
65 | #define AUTCPU12_SMC_RDY (1<<2) | ||
66 | #define AUTCPU12_SMC_ALE (1<<3) | ||
67 | #define AUTCPU12_SMC_CLE (1<<4) | ||
68 | #define AUTCPU12_SMC_PORT_OFFSET PBDR | ||
69 | #define AUTCPU12_SMC_SELECT_OFFSET 0x10 | ||
70 | /* | 51 | /* |
71 | * defines for lcd contrast | 52 | * defines for lcd contrast |
72 | */ | 53 | */ |
diff --git a/arch/arm/mach-clps711x/include/mach/clps711x.h b/arch/arm/mach-clps711x/include/mach/clps711x.h index c82e21ca49c7..01d1b9559710 100644 --- a/arch/arm/mach-clps711x/include/mach/clps711x.h +++ b/arch/arm/mach-clps711x/include/mach/clps711x.h | |||
@@ -257,6 +257,9 @@ | |||
257 | #define MEMCFG_BUS_WIDTH_16 (0) | 257 | #define MEMCFG_BUS_WIDTH_16 (0) |
258 | #define MEMCFG_BUS_WIDTH_8 (3) | 258 | #define MEMCFG_BUS_WIDTH_8 (3) |
259 | 259 | ||
260 | #define MEMCFG_SQAEN (1 << 6) | ||
261 | #define MEMCFG_CLKENB (1 << 7) | ||
262 | |||
260 | #define MEMCFG_WAITSTATE_8_3 (0 << 2) | 263 | #define MEMCFG_WAITSTATE_8_3 (0 << 2) |
261 | #define MEMCFG_WAITSTATE_7_3 (1 << 2) | 264 | #define MEMCFG_WAITSTATE_7_3 (1 << 2) |
262 | #define MEMCFG_WAITSTATE_6_3 (2 << 2) | 265 | #define MEMCFG_WAITSTATE_6_3 (2 << 2) |
@@ -274,4 +277,28 @@ | |||
274 | #define MEMCFG_WAITSTATE_2_0 (14 << 2) | 277 | #define MEMCFG_WAITSTATE_2_0 (14 << 2) |
275 | #define MEMCFG_WAITSTATE_1_0 (15 << 2) | 278 | #define MEMCFG_WAITSTATE_1_0 (15 << 2) |
276 | 279 | ||
280 | /* INTSR1 Interrupts */ | ||
281 | #define IRQ_CSINT (4) | ||
282 | #define IRQ_EINT1 (5) | ||
283 | #define IRQ_EINT2 (6) | ||
284 | #define IRQ_EINT3 (7) | ||
285 | #define IRQ_TC1OI (8) | ||
286 | #define IRQ_TC2OI (9) | ||
287 | #define IRQ_RTCMI (10) | ||
288 | #define IRQ_TINT (11) | ||
289 | #define IRQ_UTXINT1 (12) | ||
290 | #define IRQ_URXINT1 (13) | ||
291 | #define IRQ_UMSINT (14) | ||
292 | #define IRQ_SSEOTI (15) | ||
293 | |||
294 | /* INTSR2 Interrupts */ | ||
295 | #define IRQ_KBDINT (16 + 0) | ||
296 | #define IRQ_SS2RX (16 + 1) | ||
297 | #define IRQ_SS2TX (16 + 2) | ||
298 | #define IRQ_UTXINT2 (16 + 12) | ||
299 | #define IRQ_URXINT2 (16 + 13) | ||
300 | |||
301 | /* INTSR3 Interrupts */ | ||
302 | #define IRQ_DAIINT (32 + 0) | ||
303 | |||
277 | #endif /* __MACH_CLPS711X_H */ | 304 | #endif /* __MACH_CLPS711X_H */ |
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S deleted file mode 100644 index 56e5c2c23504..000000000000 --- a/arch/arm/mach-clps711x/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps711x/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for CLPS711X-based 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 | #include <mach/hardware.h> | ||
11 | |||
12 | .macro get_irqnr_preamble, base, tmp | ||
13 | .endm | ||
14 | |||
15 | #if (INTSR2 - INTSR1) != (INTMR2 - INTMR1) | ||
16 | #error INTSR stride != INTMR stride | ||
17 | #endif | ||
18 | |||
19 | .macro get_irqnr_and_base, irqnr, stat, base, mask | ||
20 | mov \base, #CLPS711X_VIRT_BASE | ||
21 | ldr \stat, [\base, #INTSR1] | ||
22 | ldr \mask, [\base, #INTMR1] | ||
23 | mov \irqnr, #4 | ||
24 | mov \mask, \mask, lsl #16 | ||
25 | and \stat, \stat, \mask, lsr #16 | ||
26 | movs \stat, \stat, lsr #4 | ||
27 | bne 1001f | ||
28 | |||
29 | add \base, \base, #INTSR2 - INTSR1 | ||
30 | ldr \stat, [\base, #INTSR1] | ||
31 | ldr \mask, [\base, #INTMR1] | ||
32 | mov \irqnr, #16 | ||
33 | mov \mask, \mask, lsl #16 | ||
34 | and \stat, \stat, \mask, lsr #16 | ||
35 | |||
36 | 1001: tst \stat, #255 | ||
37 | addeq \irqnr, \irqnr, #8 | ||
38 | moveq \stat, \stat, lsr #8 | ||
39 | tst \stat, #15 | ||
40 | addeq \irqnr, \irqnr, #4 | ||
41 | moveq \stat, \stat, lsr #4 | ||
42 | tst \stat, #3 | ||
43 | addeq \irqnr, \irqnr, #2 | ||
44 | moveq \stat, \stat, lsr #2 | ||
45 | tst \stat, #1 | ||
46 | addeq \irqnr, \irqnr, #1 | ||
47 | moveq \stat, \stat, lsr #1 | ||
48 | tst \stat, #1 @ bit 0 should be set | ||
49 | .endm | ||
50 | |||
51 | |||
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h index 8497775d6ee5..2f23dd5d73e4 100644 --- a/arch/arm/mach-clps711x/include/mach/hardware.h +++ b/arch/arm/mach-clps711x/include/mach/hardware.h | |||
@@ -24,7 +24,10 @@ | |||
24 | 24 | ||
25 | #include <mach/clps711x.h> | 25 | #include <mach/clps711x.h> |
26 | 26 | ||
27 | #define CLPS711X_VIRT_BASE IOMEM(0xff000000) | 27 | #define IO_ADDRESS(x) (0xdc000000 + (((x) & 0x03ffffff) | \ |
28 | (((x) >> 2) & 0x3c000000))) | ||
29 | |||
30 | #define CLPS711X_VIRT_BASE IOMEM(IO_ADDRESS(CLPS711X_PHYS_BASE)) | ||
28 | 31 | ||
29 | #ifndef __ASSEMBLY__ | 32 | #ifndef __ASSEMBLY__ |
30 | #define clps_readb(off) readb(CLPS711X_VIRT_BASE + (off)) | 33 | #define clps_readb(off) readb(CLPS711X_VIRT_BASE + (off)) |
@@ -61,67 +64,17 @@ | |||
61 | #define CS7_PHYS_BASE (0x00000000) | 64 | #define CS7_PHYS_BASE (0x00000000) |
62 | #endif | 65 | #endif |
63 | 66 | ||
64 | #define SYSPLD_VIRT_BASE 0xfe000000 | 67 | #define CLPS711X_SRAM_BASE CS6_PHYS_BASE |
65 | #define SYSPLD_BASE SYSPLD_VIRT_BASE | 68 | #define CLPS711X_SRAM_SIZE (48 * 1024) |
66 | |||
67 | #if defined (CONFIG_ARCH_CDB89712) | ||
68 | |||
69 | #define ETHER_START 0x20000000 | ||
70 | #define ETHER_SIZE 0x1000 | ||
71 | #define ETHER_BASE 0xfe000000 | ||
72 | |||
73 | #endif | ||
74 | 69 | ||
70 | #define CLPS711X_SDRAM0_BASE (0xc0000000) | ||
71 | #define CLPS711X_SDRAM1_BASE (0xd0000000) | ||
75 | 72 | ||
76 | #if defined (CONFIG_ARCH_EDB7211) | 73 | #if defined (CONFIG_ARCH_EDB7211) |
77 | 74 | ||
78 | /* | 75 | /* The extra 8 lines of the keyboard matrix are wired to chip select 3 */ |
79 | * The extra 8 lines of the keyboard matrix are wired to chip select 3 (nCS3) | 76 | #define EP7211_PHYS_EXTKBD CS3_PHYS_BASE |
80 | * and repeat across it. This is the mapping for it. | ||
81 | * | ||
82 | * In jumpered boot mode, nCS3 is mapped to 0x4000000, not 0x3000000. This | ||
83 | * was cause for much consternation and headscratching. This should probably | ||
84 | * be made a compile/run time kernel option. | ||
85 | */ | ||
86 | #define EP7211_PHYS_EXTKBD CS3_PHYS_BASE /* physical */ | ||
87 | |||
88 | #define EP7211_VIRT_EXTKBD (0xfd000000) /* virtual */ | ||
89 | |||
90 | |||
91 | /* | ||
92 | * The CS8900A ethernet chip has its I/O registers wired to chip select 2 | ||
93 | * (nCS2). This is the mapping for it. | ||
94 | * | ||
95 | * In jumpered boot mode, nCS2 is mapped to 0x5000000, not 0x2000000. This | ||
96 | * was cause for much consternation and headscratching. This should probably | ||
97 | * be made a compile/run time kernel option. | ||
98 | */ | ||
99 | #define EP7211_PHYS_CS8900A CS2_PHYS_BASE /* physical */ | ||
100 | |||
101 | #define EP7211_VIRT_CS8900A (0xfc000000) /* virtual */ | ||
102 | |||
103 | |||
104 | /* | ||
105 | * The two flash banks are wired to chip selects 0 and 1. This is the mapping | ||
106 | * for them. | ||
107 | * | ||
108 | * nCS0 and nCS1 are at 0x70000000 and 0x60000000, respectively, when running | ||
109 | * in jumpered boot mode. | ||
110 | */ | ||
111 | #define EP7211_PHYS_FLASH1 CS0_PHYS_BASE /* physical */ | ||
112 | #define EP7211_PHYS_FLASH2 CS1_PHYS_BASE /* physical */ | ||
113 | |||
114 | #define EP7211_VIRT_FLASH1 (0xfa000000) /* virtual */ | ||
115 | #define EP7211_VIRT_FLASH2 (0xfb000000) /* virtual */ | ||
116 | 77 | ||
117 | #endif /* CONFIG_ARCH_EDB7211 */ | 78 | #endif /* CONFIG_ARCH_EDB7211 */ |
118 | 79 | ||
119 | /* | ||
120 | * Relevant bits in port D, which controls power to the various parts of | ||
121 | * the LCD on the EDB7211. | ||
122 | */ | ||
123 | #define EDB_PD1_LCD_DC_DC_EN (1<<1) | ||
124 | #define EDB_PD2_LCDEN (1<<2) | ||
125 | #define EDB_PD3_LCDBL (1<<3) | ||
126 | |||
127 | #endif | 80 | #endif |
diff --git a/arch/arm/mach-clps711x/include/mach/irqs.h b/arch/arm/mach-clps711x/include/mach/irqs.h deleted file mode 100644 index 14d215f8ca81..000000000000 --- a/arch/arm/mach-clps711x/include/mach/irqs.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps711x/include/mach/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | /* | ||
22 | * Interrupts from INTSR1 | ||
23 | */ | ||
24 | #define IRQ_CSINT 4 | ||
25 | #define IRQ_EINT1 5 | ||
26 | #define IRQ_EINT2 6 | ||
27 | #define IRQ_EINT3 7 | ||
28 | #define IRQ_TC1OI 8 | ||
29 | #define IRQ_TC2OI 9 | ||
30 | #define IRQ_RTCMI 10 | ||
31 | #define IRQ_TINT 11 | ||
32 | #define IRQ_UTXINT1 12 | ||
33 | #define IRQ_URXINT1 13 | ||
34 | #define IRQ_UMSINT 14 | ||
35 | #define IRQ_SSEOTI 15 | ||
36 | |||
37 | #define INT1_IRQS (0x0000fff0) | ||
38 | |||
39 | /* | ||
40 | * Interrupts from INTSR2 | ||
41 | */ | ||
42 | #define IRQ_KBDINT (16+0) /* bit 0 */ | ||
43 | #define IRQ_SS2RX (16+1) /* bit 1 */ | ||
44 | #define IRQ_SS2TX (16+2) /* bit 2 */ | ||
45 | #define IRQ_UTXINT2 (16+12) /* bit 12 */ | ||
46 | #define IRQ_URXINT2 (16+13) /* bit 13 */ | ||
47 | |||
48 | #define INT2_IRQS (0x30070000) | ||
49 | |||
50 | #define NR_IRQS 30 | ||
diff --git a/arch/arm/mach-clps711x/include/mach/syspld.h b/arch/arm/mach-clps711x/include/mach/syspld.h index f7f4c1201898..9a433155bf58 100644 --- a/arch/arm/mach-clps711x/include/mach/syspld.h +++ b/arch/arm/mach-clps711x/include/mach/syspld.h | |||
@@ -23,14 +23,9 @@ | |||
23 | #define __ASM_ARCH_SYSPLD_H | 23 | #define __ASM_ARCH_SYSPLD_H |
24 | 24 | ||
25 | #define SYSPLD_PHYS_BASE (0x10000000) | 25 | #define SYSPLD_PHYS_BASE (0x10000000) |
26 | #define SYSPLD_VIRT_BASE IO_ADDRESS(SYSPLD_PHYS_BASE) | ||
26 | 27 | ||
27 | #ifndef __ASSEMBLY__ | 28 | #define SYSPLD_REG(type, off) (*(volatile type *)(SYSPLD_VIRT_BASE + (off))) |
28 | #include <asm/types.h> | ||
29 | |||
30 | #define SYSPLD_REG(type,off) (*(volatile type *)(SYSPLD_BASE + off)) | ||
31 | #else | ||
32 | #define SYSPLD_REG(type,off) (off) | ||
33 | #endif | ||
34 | 29 | ||
35 | #define PLD_INT SYSPLD_REG(u32, 0x000000) | 30 | #define PLD_INT SYSPLD_REG(u32, 0x000000) |
36 | #define PLD_INT_PENIRQ (1 << 5) | 31 | #define PLD_INT_PENIRQ (1 << 5) |