diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-08-05 11:14:15 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-08-07 04:55:48 -0400 |
commit | a09e64fbc0094e3073dbb09c3b4bfe4ab669244b (patch) | |
tree | 69689f467179891b498bd7423fcf61925173db31 /arch/arm/mach-ep93xx | |
parent | a1b81a84fff05dbfef45b7012c26e1fee9973e5d (diff) |
[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
This just leaves include/asm-arm/plat-* to deal with.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ep93xx')
29 files changed, 720 insertions, 14 deletions
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c index 8f87f8a41483..aa1fb352fb8f 100644 --- a/arch/arm/mach-ep93xx/adssphere.c +++ b/arch/arm/mach-ep93xx/adssphere.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/arch/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | 25 | ||
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index 4642c70f21e0..6062e47f2043 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <asm/div64.h> | 18 | #include <asm/div64.h> |
19 | #include <asm/arch/hardware.h> | 19 | #include <mach/hardware.h> |
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | 21 | ||
22 | struct clk { | 22 | struct clk { |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index b49da117af9b..f99f43669392 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <asm/types.h> | 36 | #include <asm/types.h> |
37 | #include <asm/setup.h> | 37 | #include <asm/setup.h> |
38 | #include <asm/memory.h> | 38 | #include <asm/memory.h> |
39 | #include <asm/arch/hardware.h> | 39 | #include <mach/hardware.h> |
40 | #include <asm/irq.h> | 40 | #include <asm/irq.h> |
41 | #include <asm/system.h> | 41 | #include <asm/system.h> |
42 | #include <asm/tlbflush.h> | 42 | #include <asm/tlbflush.h> |
@@ -46,7 +46,7 @@ | |||
46 | #include <asm/mach/map.h> | 46 | #include <asm/mach/map.h> |
47 | #include <asm/mach/time.h> | 47 | #include <asm/mach/time.h> |
48 | #include <asm/mach/irq.h> | 48 | #include <asm/mach/irq.h> |
49 | #include <asm/arch/gpio.h> | 49 | #include <mach/gpio.h> |
50 | 50 | ||
51 | #include <asm/hardware/vic.h> | 51 | #include <asm/hardware/vic.h> |
52 | 52 | ||
diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c index 1650ec724228..97550c0ad7b0 100644 --- a/arch/arm/mach-ep93xx/edb9302.c +++ b/arch/arm/mach-ep93xx/edb9302.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/arch/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | 25 | ||
diff --git a/arch/arm/mach-ep93xx/edb9302a.c b/arch/arm/mach-ep93xx/edb9302a.c index 00208ce6e620..99b01d44bf1c 100644 --- a/arch/arm/mach-ep93xx/edb9302a.c +++ b/arch/arm/mach-ep93xx/edb9302a.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/arch/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | 25 | ||
diff --git a/arch/arm/mach-ep93xx/edb9307.c b/arch/arm/mach-ep93xx/edb9307.c index 78d04aeca463..9fb72d01a36c 100644 --- a/arch/arm/mach-ep93xx/edb9307.c +++ b/arch/arm/mach-ep93xx/edb9307.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/arch/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | 25 | ||
diff --git a/arch/arm/mach-ep93xx/edb9312.c b/arch/arm/mach-ep93xx/edb9312.c index d658fb2f574b..87267a574f5e 100644 --- a/arch/arm/mach-ep93xx/edb9312.c +++ b/arch/arm/mach-ep93xx/edb9312.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/mtd/physmap.h> | 20 | #include <linux/mtd/physmap.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <asm/arch/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
26 | 26 | ||
diff --git a/arch/arm/mach-ep93xx/edb9315.c b/arch/arm/mach-ep93xx/edb9315.c index 4fd1cd671521..7e373950be4d 100644 --- a/arch/arm/mach-ep93xx/edb9315.c +++ b/arch/arm/mach-ep93xx/edb9315.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/arch/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | 25 | ||
diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c index 44dacbac8635..08a7c9bfb689 100644 --- a/arch/arm/mach-ep93xx/edb9315a.c +++ b/arch/arm/mach-ep93xx/edb9315a.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/arch/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | 25 | ||
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c index cc80031b4ef8..9b41ec1f089e 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c +++ b/arch/arm/mach-ep93xx/gesbc9312.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/arch/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | 25 | ||
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c index dc2e4c00d989..0f3fb87ca4be 100644 --- a/arch/arm/mach-ep93xx/gpio.c +++ b/arch/arm/mach-ep93xx/gpio.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/seq_file.h> | 18 | #include <linux/seq_file.h> |
19 | 19 | ||
20 | #include <asm/arch/ep93xx-regs.h> | 20 | #include <mach/ep93xx-regs.h> |
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/gpio.h> | 22 | #include <asm/gpio.h> |
23 | 23 | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/debug-macro.S b/arch/arm/mach-ep93xx/include/mach/debug-macro.S new file mode 100644 index 000000000000..802858bc8095 --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/debug-macro.S | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/debug-macro.S | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | #include <mach/ep93xx-regs.h> | ||
13 | |||
14 | .macro addruart,rx | ||
15 | mrc p15, 0, \rx, c1, c0 | ||
16 | tst \rx, #1 @ MMU enabled? | ||
17 | ldreq \rx, =EP93XX_APB_PHYS_BASE @ Physical base | ||
18 | ldrne \rx, =EP93XX_APB_VIRT_BASE @ virtual base | ||
19 | orr \rx, \rx, #0x000c0000 | ||
20 | .endm | ||
21 | |||
22 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/dma.h b/arch/arm/mach-ep93xx/include/mach/dma.h new file mode 100644 index 000000000000..d0fa9656e92f --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/dma.h | |||
@@ -0,0 +1,3 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/dma.h | ||
3 | */ | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/entry-macro.S b/arch/arm/mach-ep93xx/include/mach/entry-macro.S new file mode 100644 index 000000000000..96b85e2c2c0b --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/entry-macro.S | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/entry-macro.S | ||
3 | * IRQ demultiplexing for EP93xx | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | #include <mach/ep93xx-regs.h> | ||
13 | |||
14 | .macro disable_fiq | ||
15 | .endm | ||
16 | |||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | ||
21 | .endm | ||
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | ldr \base, =(EP93XX_AHB_VIRT_BASE) | ||
25 | orr \base, \base, #0x000b0000 | ||
26 | mov \irqnr, #0 | ||
27 | ldr \irqstat, [\base] @ lower 32 interrupts | ||
28 | cmp \irqstat, #0 | ||
29 | bne 1001f | ||
30 | |||
31 | eor \base, \base, #0x00070000 | ||
32 | ldr \irqstat, [\base] @ upper 32 interrupts | ||
33 | cmp \irqstat, #0 | ||
34 | beq 1002f | ||
35 | mov \irqnr, #0x20 | ||
36 | |||
37 | 1001: | ||
38 | movs \tmp, \irqstat, lsl #16 | ||
39 | movne \irqstat, \tmp | ||
40 | addeq \irqnr, \irqnr, #16 | ||
41 | |||
42 | movs \tmp, \irqstat, lsl #8 | ||
43 | movne \irqstat, \tmp | ||
44 | addeq \irqnr, \irqnr, #8 | ||
45 | |||
46 | movs \tmp, \irqstat, lsl #4 | ||
47 | movne \irqstat, \tmp | ||
48 | addeq \irqnr, \irqnr, #4 | ||
49 | |||
50 | movs \tmp, \irqstat, lsl #2 | ||
51 | movne \irqstat, \tmp | ||
52 | addeq \irqnr, \irqnr, #2 | ||
53 | |||
54 | movs \tmp, \irqstat, lsl #1 | ||
55 | addeq \irqnr, \irqnr, #1 | ||
56 | orrs \base, \base, #1 | ||
57 | |||
58 | 1002: | ||
59 | .endm | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h new file mode 100644 index 000000000000..9f4458c8e070 --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_EP93XX_REGS_H | ||
6 | #define __ASM_ARCH_EP93XX_REGS_H | ||
7 | |||
8 | /* | ||
9 | * EP93xx linux memory map: | ||
10 | * | ||
11 | * virt phys size | ||
12 | * fe800000 5M per-platform mappings | ||
13 | * fed00000 80800000 2M APB | ||
14 | * fef00000 80000000 1M AHB | ||
15 | */ | ||
16 | |||
17 | #define EP93XX_AHB_PHYS_BASE 0x80000000 | ||
18 | #define EP93XX_AHB_VIRT_BASE 0xfef00000 | ||
19 | #define EP93XX_AHB_SIZE 0x00100000 | ||
20 | |||
21 | #define EP93XX_APB_PHYS_BASE 0x80800000 | ||
22 | #define EP93XX_APB_VIRT_BASE 0xfed00000 | ||
23 | #define EP93XX_APB_SIZE 0x00200000 | ||
24 | |||
25 | |||
26 | /* AHB peripherals */ | ||
27 | #define EP93XX_DMA_BASE (EP93XX_AHB_VIRT_BASE + 0x00000000) | ||
28 | |||
29 | #define EP93XX_ETHERNET_BASE (EP93XX_AHB_VIRT_BASE + 0x00010000) | ||
30 | #define EP93XX_ETHERNET_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00010000) | ||
31 | |||
32 | #define EP93XX_USB_BASE (EP93XX_AHB_VIRT_BASE + 0x00020000) | ||
33 | #define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000) | ||
34 | |||
35 | #define EP93XX_RASTER_BASE (EP93XX_AHB_VIRT_BASE + 0x00030000) | ||
36 | |||
37 | #define EP93XX_GRAPHICS_ACCEL_BASE (EP93XX_AHB_VIRT_BASE + 0x00040000) | ||
38 | |||
39 | #define EP93XX_SDRAM_CONTROLLER_BASE (EP93XX_AHB_VIRT_BASE + 0x00060000) | ||
40 | |||
41 | #define EP93XX_PCMCIA_CONTROLLER_BASE (EP93XX_AHB_VIRT_BASE + 0x00080000) | ||
42 | |||
43 | #define EP93XX_BOOT_ROM_BASE (EP93XX_AHB_VIRT_BASE + 0x00090000) | ||
44 | |||
45 | #define EP93XX_IDE_BASE (EP93XX_AHB_VIRT_BASE + 0x000a0000) | ||
46 | |||
47 | #define EP93XX_VIC1_BASE (EP93XX_AHB_VIRT_BASE + 0x000b0000) | ||
48 | |||
49 | #define EP93XX_VIC2_BASE (EP93XX_AHB_VIRT_BASE + 0x000c0000) | ||
50 | |||
51 | |||
52 | /* APB peripherals */ | ||
53 | #define EP93XX_TIMER_BASE (EP93XX_APB_VIRT_BASE + 0x00010000) | ||
54 | #define EP93XX_TIMER_REG(x) (EP93XX_TIMER_BASE + (x)) | ||
55 | #define EP93XX_TIMER1_LOAD EP93XX_TIMER_REG(0x00) | ||
56 | #define EP93XX_TIMER1_VALUE EP93XX_TIMER_REG(0x04) | ||
57 | #define EP93XX_TIMER1_CONTROL EP93XX_TIMER_REG(0x08) | ||
58 | #define EP93XX_TIMER1_CLEAR EP93XX_TIMER_REG(0x0c) | ||
59 | #define EP93XX_TIMER2_LOAD EP93XX_TIMER_REG(0x20) | ||
60 | #define EP93XX_TIMER2_VALUE EP93XX_TIMER_REG(0x24) | ||
61 | #define EP93XX_TIMER2_CONTROL EP93XX_TIMER_REG(0x28) | ||
62 | #define EP93XX_TIMER2_CLEAR EP93XX_TIMER_REG(0x2c) | ||
63 | #define EP93XX_TIMER4_VALUE_LOW EP93XX_TIMER_REG(0x60) | ||
64 | #define EP93XX_TIMER4_VALUE_HIGH EP93XX_TIMER_REG(0x64) | ||
65 | #define EP93XX_TIMER3_LOAD EP93XX_TIMER_REG(0x80) | ||
66 | #define EP93XX_TIMER3_VALUE EP93XX_TIMER_REG(0x84) | ||
67 | #define EP93XX_TIMER3_CONTROL EP93XX_TIMER_REG(0x88) | ||
68 | #define EP93XX_TIMER3_CLEAR EP93XX_TIMER_REG(0x8c) | ||
69 | |||
70 | #define EP93XX_I2S_BASE (EP93XX_APB_VIRT_BASE + 0x00020000) | ||
71 | |||
72 | #define EP93XX_SECURITY_BASE (EP93XX_APB_VIRT_BASE + 0x00030000) | ||
73 | |||
74 | #define EP93XX_GPIO_BASE (EP93XX_APB_VIRT_BASE + 0x00040000) | ||
75 | #define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x)) | ||
76 | #define EP93XX_GPIO_F_INT_TYPE1 EP93XX_GPIO_REG(0x4c) | ||
77 | #define EP93XX_GPIO_F_INT_TYPE2 EP93XX_GPIO_REG(0x50) | ||
78 | #define EP93XX_GPIO_F_INT_ACK EP93XX_GPIO_REG(0x54) | ||
79 | #define EP93XX_GPIO_F_INT_ENABLE EP93XX_GPIO_REG(0x58) | ||
80 | #define EP93XX_GPIO_F_INT_STATUS EP93XX_GPIO_REG(0x5c) | ||
81 | #define EP93XX_GPIO_A_INT_TYPE1 EP93XX_GPIO_REG(0x90) | ||
82 | #define EP93XX_GPIO_A_INT_TYPE2 EP93XX_GPIO_REG(0x94) | ||
83 | #define EP93XX_GPIO_A_INT_ACK EP93XX_GPIO_REG(0x98) | ||
84 | #define EP93XX_GPIO_A_INT_ENABLE EP93XX_GPIO_REG(0x9c) | ||
85 | #define EP93XX_GPIO_A_INT_STATUS EP93XX_GPIO_REG(0xa0) | ||
86 | #define EP93XX_GPIO_B_INT_TYPE1 EP93XX_GPIO_REG(0xac) | ||
87 | #define EP93XX_GPIO_B_INT_TYPE2 EP93XX_GPIO_REG(0xb0) | ||
88 | #define EP93XX_GPIO_B_INT_ACK EP93XX_GPIO_REG(0xb4) | ||
89 | #define EP93XX_GPIO_B_INT_ENABLE EP93XX_GPIO_REG(0xb8) | ||
90 | #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) | ||
91 | |||
92 | #define EP93XX_AAC_BASE (EP93XX_APB_VIRT_BASE + 0x00080000) | ||
93 | |||
94 | #define EP93XX_SPI_BASE (EP93XX_APB_VIRT_BASE + 0x000a0000) | ||
95 | |||
96 | #define EP93XX_IRDA_BASE (EP93XX_APB_VIRT_BASE + 0x000b0000) | ||
97 | |||
98 | #define EP93XX_UART1_BASE (EP93XX_APB_VIRT_BASE + 0x000c0000) | ||
99 | #define EP93XX_UART1_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000c0000) | ||
100 | |||
101 | #define EP93XX_UART2_BASE (EP93XX_APB_VIRT_BASE + 0x000d0000) | ||
102 | #define EP93XX_UART2_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000d0000) | ||
103 | |||
104 | #define EP93XX_UART3_BASE (EP93XX_APB_VIRT_BASE + 0x000e0000) | ||
105 | #define EP93XX_UART3_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000e0000) | ||
106 | |||
107 | #define EP93XX_KEY_MATRIX_BASE (EP93XX_APB_VIRT_BASE + 0x000f0000) | ||
108 | |||
109 | #define EP93XX_ADC_BASE (EP93XX_APB_VIRT_BASE + 0x00100000) | ||
110 | #define EP93XX_TOUCHSCREEN_BASE (EP93XX_APB_VIRT_BASE + 0x00100000) | ||
111 | |||
112 | #define EP93XX_PWM_BASE (EP93XX_APB_VIRT_BASE + 0x00110000) | ||
113 | |||
114 | #define EP93XX_RTC_BASE (EP93XX_APB_VIRT_BASE + 0x00120000) | ||
115 | |||
116 | #define EP93XX_SYSCON_BASE (EP93XX_APB_VIRT_BASE + 0x00130000) | ||
117 | #define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x)) | ||
118 | #define EP93XX_SYSCON_POWER_STATE EP93XX_SYSCON_REG(0x00) | ||
119 | #define EP93XX_SYSCON_CLOCK_CONTROL EP93XX_SYSCON_REG(0x04) | ||
120 | #define EP93XX_SYSCON_CLOCK_UARTBAUD 0x20000000 | ||
121 | #define EP93XX_SYSCON_CLOCK_USH_EN 0x10000000 | ||
122 | #define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08) | ||
123 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) | ||
124 | #define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20) | ||
125 | #define EP93XX_SYSCON_CLOCK_SET2 EP93XX_SYSCON_REG(0x24) | ||
126 | #define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80) | ||
127 | #define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE 0x00800000 | ||
128 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) | ||
129 | |||
130 | #define EP93XX_WATCHDOG_BASE (EP93XX_APB_VIRT_BASE + 0x00140000) | ||
131 | |||
132 | |||
133 | #endif | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/gesbc9312.h b/arch/arm/mach-ep93xx/include/mach/gesbc9312.h new file mode 100644 index 000000000000..21fe2b922aa5 --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/gesbc9312.h | |||
@@ -0,0 +1,3 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/gesbc9312.h | ||
3 | */ | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/gpio.h b/arch/arm/mach-ep93xx/include/mach/gpio.h new file mode 100644 index 000000000000..f7020414c5df --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/gpio.h | |||
@@ -0,0 +1,128 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/gpio.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_GPIO_H | ||
6 | #define __ASM_ARCH_GPIO_H | ||
7 | |||
8 | /* GPIO port A. */ | ||
9 | #define EP93XX_GPIO_LINE_A(x) ((x) + 0) | ||
10 | #define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0) | ||
11 | #define EP93XX_GPIO_LINE_EGPIO1 EP93XX_GPIO_LINE_A(1) | ||
12 | #define EP93XX_GPIO_LINE_EGPIO2 EP93XX_GPIO_LINE_A(2) | ||
13 | #define EP93XX_GPIO_LINE_EGPIO3 EP93XX_GPIO_LINE_A(3) | ||
14 | #define EP93XX_GPIO_LINE_EGPIO4 EP93XX_GPIO_LINE_A(4) | ||
15 | #define EP93XX_GPIO_LINE_EGPIO5 EP93XX_GPIO_LINE_A(5) | ||
16 | #define EP93XX_GPIO_LINE_EGPIO6 EP93XX_GPIO_LINE_A(6) | ||
17 | #define EP93XX_GPIO_LINE_EGPIO7 EP93XX_GPIO_LINE_A(7) | ||
18 | |||
19 | /* GPIO port B. */ | ||
20 | #define EP93XX_GPIO_LINE_B(x) ((x) + 8) | ||
21 | #define EP93XX_GPIO_LINE_EGPIO8 EP93XX_GPIO_LINE_B(0) | ||
22 | #define EP93XX_GPIO_LINE_EGPIO9 EP93XX_GPIO_LINE_B(1) | ||
23 | #define EP93XX_GPIO_LINE_EGPIO10 EP93XX_GPIO_LINE_B(2) | ||
24 | #define EP93XX_GPIO_LINE_EGPIO11 EP93XX_GPIO_LINE_B(3) | ||
25 | #define EP93XX_GPIO_LINE_EGPIO12 EP93XX_GPIO_LINE_B(4) | ||
26 | #define EP93XX_GPIO_LINE_EGPIO13 EP93XX_GPIO_LINE_B(5) | ||
27 | #define EP93XX_GPIO_LINE_EGPIO14 EP93XX_GPIO_LINE_B(6) | ||
28 | #define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7) | ||
29 | |||
30 | /* GPIO port C. */ | ||
31 | #define EP93XX_GPIO_LINE_C(x) ((x) + 40) | ||
32 | #define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0) | ||
33 | #define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1) | ||
34 | #define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2) | ||
35 | #define EP93XX_GPIO_LINE_ROW3 EP93XX_GPIO_LINE_C(3) | ||
36 | #define EP93XX_GPIO_LINE_ROW4 EP93XX_GPIO_LINE_C(4) | ||
37 | #define EP93XX_GPIO_LINE_ROW5 EP93XX_GPIO_LINE_C(5) | ||
38 | #define EP93XX_GPIO_LINE_ROW6 EP93XX_GPIO_LINE_C(6) | ||
39 | #define EP93XX_GPIO_LINE_ROW7 EP93XX_GPIO_LINE_C(7) | ||
40 | |||
41 | /* GPIO port D. */ | ||
42 | #define EP93XX_GPIO_LINE_D(x) ((x) + 24) | ||
43 | #define EP93XX_GPIO_LINE_COL0 EP93XX_GPIO_LINE_D(0) | ||
44 | #define EP93XX_GPIO_LINE_COL1 EP93XX_GPIO_LINE_D(1) | ||
45 | #define EP93XX_GPIO_LINE_COL2 EP93XX_GPIO_LINE_D(2) | ||
46 | #define EP93XX_GPIO_LINE_COL3 EP93XX_GPIO_LINE_D(3) | ||
47 | #define EP93XX_GPIO_LINE_COL4 EP93XX_GPIO_LINE_D(4) | ||
48 | #define EP93XX_GPIO_LINE_COL5 EP93XX_GPIO_LINE_D(5) | ||
49 | #define EP93XX_GPIO_LINE_COL6 EP93XX_GPIO_LINE_D(6) | ||
50 | #define EP93XX_GPIO_LINE_COL7 EP93XX_GPIO_LINE_D(7) | ||
51 | |||
52 | /* GPIO port E. */ | ||
53 | #define EP93XX_GPIO_LINE_E(x) ((x) + 32) | ||
54 | #define EP93XX_GPIO_LINE_GRLED EP93XX_GPIO_LINE_E(0) | ||
55 | #define EP93XX_GPIO_LINE_RDLED EP93XX_GPIO_LINE_E(1) | ||
56 | #define EP93XX_GPIO_LINE_DIORn EP93XX_GPIO_LINE_E(2) | ||
57 | #define EP93XX_GPIO_LINE_IDECS1n EP93XX_GPIO_LINE_E(3) | ||
58 | #define EP93XX_GPIO_LINE_IDECS2n EP93XX_GPIO_LINE_E(4) | ||
59 | #define EP93XX_GPIO_LINE_IDEDA0 EP93XX_GPIO_LINE_E(5) | ||
60 | #define EP93XX_GPIO_LINE_IDEDA1 EP93XX_GPIO_LINE_E(6) | ||
61 | #define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7) | ||
62 | |||
63 | /* GPIO port F. */ | ||
64 | #define EP93XX_GPIO_LINE_F(x) ((x) + 16) | ||
65 | #define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0) | ||
66 | #define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1) | ||
67 | #define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2) | ||
68 | #define EP93XX_GPIO_LINE_MCBVD1 EP93XX_GPIO_LINE_F(3) | ||
69 | #define EP93XX_GPIO_LINE_MCBVD2 EP93XX_GPIO_LINE_F(4) | ||
70 | #define EP93XX_GPIO_LINE_VS1 EP93XX_GPIO_LINE_F(5) | ||
71 | #define EP93XX_GPIO_LINE_READY EP93XX_GPIO_LINE_F(6) | ||
72 | #define EP93XX_GPIO_LINE_VS2 EP93XX_GPIO_LINE_F(7) | ||
73 | |||
74 | /* GPIO port G. */ | ||
75 | #define EP93XX_GPIO_LINE_G(x) ((x) + 48) | ||
76 | #define EP93XX_GPIO_LINE_EECLK EP93XX_GPIO_LINE_G(0) | ||
77 | #define EP93XX_GPIO_LINE_EEDAT EP93XX_GPIO_LINE_G(1) | ||
78 | #define EP93XX_GPIO_LINE_SLA0 EP93XX_GPIO_LINE_G(2) | ||
79 | #define EP93XX_GPIO_LINE_SLA1 EP93XX_GPIO_LINE_G(3) | ||
80 | #define EP93XX_GPIO_LINE_DD12 EP93XX_GPIO_LINE_G(4) | ||
81 | #define EP93XX_GPIO_LINE_DD13 EP93XX_GPIO_LINE_G(5) | ||
82 | #define EP93XX_GPIO_LINE_DD14 EP93XX_GPIO_LINE_G(6) | ||
83 | #define EP93XX_GPIO_LINE_DD15 EP93XX_GPIO_LINE_G(7) | ||
84 | |||
85 | /* GPIO port H. */ | ||
86 | #define EP93XX_GPIO_LINE_H(x) ((x) + 56) | ||
87 | #define EP93XX_GPIO_LINE_DD0 EP93XX_GPIO_LINE_H(0) | ||
88 | #define EP93XX_GPIO_LINE_DD1 EP93XX_GPIO_LINE_H(1) | ||
89 | #define EP93XX_GPIO_LINE_DD2 EP93XX_GPIO_LINE_H(2) | ||
90 | #define EP93XX_GPIO_LINE_DD3 EP93XX_GPIO_LINE_H(3) | ||
91 | #define EP93XX_GPIO_LINE_DD4 EP93XX_GPIO_LINE_H(4) | ||
92 | #define EP93XX_GPIO_LINE_DD5 EP93XX_GPIO_LINE_H(5) | ||
93 | #define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6) | ||
94 | #define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7) | ||
95 | |||
96 | /* maximum value for gpio line identifiers */ | ||
97 | #define EP93XX_GPIO_LINE_MAX EP93XX_GPIO_LINE_H(7) | ||
98 | |||
99 | /* maximum value for irq capable line identifiers */ | ||
100 | #define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7) | ||
101 | |||
102 | /* new generic GPIO API - see Documentation/gpio.txt */ | ||
103 | |||
104 | #include <asm-generic/gpio.h> | ||
105 | |||
106 | #define gpio_get_value __gpio_get_value | ||
107 | #define gpio_set_value __gpio_set_value | ||
108 | #define gpio_cansleep __gpio_cansleep | ||
109 | |||
110 | /* | ||
111 | * Map GPIO A0..A7 (0..7) to irq 64..71, | ||
112 | * B0..B7 (7..15) to irq 72..79, and | ||
113 | * F0..F7 (16..24) to irq 80..87. | ||
114 | */ | ||
115 | static inline int gpio_to_irq(unsigned gpio) | ||
116 | { | ||
117 | if (gpio <= EP93XX_GPIO_LINE_MAX_IRQ) | ||
118 | return 64 + gpio; | ||
119 | |||
120 | return -EINVAL; | ||
121 | } | ||
122 | |||
123 | static inline int irq_to_gpio(unsigned irq) | ||
124 | { | ||
125 | return irq - gpio_to_irq(0); | ||
126 | } | ||
127 | |||
128 | #endif | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/hardware.h b/arch/arm/mach-ep93xx/include/mach/hardware.h new file mode 100644 index 000000000000..529807d182bf --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/hardware.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/hardware.h | ||
3 | */ | ||
4 | #ifndef __ASM_ARCH_HARDWARE_H | ||
5 | #define __ASM_ARCH_HARDWARE_H | ||
6 | |||
7 | #include "ep93xx-regs.h" | ||
8 | |||
9 | #define pcibios_assign_all_busses() 0 | ||
10 | |||
11 | #include "platform.h" | ||
12 | |||
13 | #include "gesbc9312.h" | ||
14 | #include "ts72xx.h" | ||
15 | |||
16 | #endif | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/io.h b/arch/arm/mach-ep93xx/include/mach/io.h new file mode 100644 index 000000000000..1ab9a90ad339 --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/io.h | |||
@@ -0,0 +1,8 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/io.h | ||
3 | */ | ||
4 | |||
5 | #define IO_SPACE_LIMIT 0xffffffff | ||
6 | |||
7 | #define __io(p) ((void __iomem *)(p)) | ||
8 | #define __mem_pci(p) (p) | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h b/arch/arm/mach-ep93xx/include/mach/irqs.h new file mode 100644 index 000000000000..ff98390bbf0f --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/irqs.h | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/irqs.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_IRQS_H | ||
6 | #define __ASM_ARCH_IRQS_H | ||
7 | |||
8 | #define IRQ_EP93XX_COMMRX 2 | ||
9 | #define IRQ_EP93XX_COMMTX 3 | ||
10 | #define IRQ_EP93XX_TIMER1 4 | ||
11 | #define IRQ_EP93XX_TIMER2 5 | ||
12 | #define IRQ_EP93XX_AACINTR 6 | ||
13 | #define IRQ_EP93XX_DMAM2P0 7 | ||
14 | #define IRQ_EP93XX_DMAM2P1 8 | ||
15 | #define IRQ_EP93XX_DMAM2P2 9 | ||
16 | #define IRQ_EP93XX_DMAM2P3 10 | ||
17 | #define IRQ_EP93XX_DMAM2P4 11 | ||
18 | #define IRQ_EP93XX_DMAM2P5 12 | ||
19 | #define IRQ_EP93XX_DMAM2P6 13 | ||
20 | #define IRQ_EP93XX_DMAM2P7 14 | ||
21 | #define IRQ_EP93XX_DMAM2P8 15 | ||
22 | #define IRQ_EP93XX_DMAM2P9 16 | ||
23 | #define IRQ_EP93XX_DMAM2M0 17 | ||
24 | #define IRQ_EP93XX_DMAM2M1 18 | ||
25 | #define IRQ_EP93XX_GPIO0MUX 19 | ||
26 | #define IRQ_EP93XX_GPIO1MUX 20 | ||
27 | #define IRQ_EP93XX_GPIO2MUX 21 | ||
28 | #define IRQ_EP93XX_GPIO3MUX 22 | ||
29 | #define IRQ_EP93XX_UART1RX 23 | ||
30 | #define IRQ_EP93XX_UART1TX 24 | ||
31 | #define IRQ_EP93XX_UART2RX 25 | ||
32 | #define IRQ_EP93XX_UART2TX 26 | ||
33 | #define IRQ_EP93XX_UART3RX 27 | ||
34 | #define IRQ_EP93XX_UART3TX 28 | ||
35 | #define IRQ_EP93XX_KEY 29 | ||
36 | #define IRQ_EP93XX_TOUCH 30 | ||
37 | #define EP93XX_VIC1_VALID_IRQ_MASK 0x7ffffffc | ||
38 | |||
39 | #define IRQ_EP93XX_EXT0 32 | ||
40 | #define IRQ_EP93XX_EXT1 33 | ||
41 | #define IRQ_EP93XX_EXT2 34 | ||
42 | #define IRQ_EP93XX_64HZ 35 | ||
43 | #define IRQ_EP93XX_WATCHDOG 36 | ||
44 | #define IRQ_EP93XX_RTC 37 | ||
45 | #define IRQ_EP93XX_IRDA 38 | ||
46 | #define IRQ_EP93XX_ETHERNET 39 | ||
47 | #define IRQ_EP93XX_EXT3 40 | ||
48 | #define IRQ_EP93XX_PROG 41 | ||
49 | #define IRQ_EP93XX_1HZ 42 | ||
50 | #define IRQ_EP93XX_VSYNC 43 | ||
51 | #define IRQ_EP93XX_VIDEO_FIFO 44 | ||
52 | #define IRQ_EP93XX_SSP1RX 45 | ||
53 | #define IRQ_EP93XX_SSP1TX 46 | ||
54 | #define IRQ_EP93XX_GPIO4MUX 47 | ||
55 | #define IRQ_EP93XX_GPIO5MUX 48 | ||
56 | #define IRQ_EP93XX_GPIO6MUX 49 | ||
57 | #define IRQ_EP93XX_GPIO7MUX 50 | ||
58 | #define IRQ_EP93XX_TIMER3 51 | ||
59 | #define IRQ_EP93XX_UART1 52 | ||
60 | #define IRQ_EP93XX_SSP 53 | ||
61 | #define IRQ_EP93XX_UART2 54 | ||
62 | #define IRQ_EP93XX_UART3 55 | ||
63 | #define IRQ_EP93XX_USB 56 | ||
64 | #define IRQ_EP93XX_ETHERNET_PME 57 | ||
65 | #define IRQ_EP93XX_DSP 58 | ||
66 | #define IRQ_EP93XX_GPIO_AB 59 | ||
67 | #define IRQ_EP93XX_SAI 60 | ||
68 | #define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff | ||
69 | |||
70 | #define NR_EP93XX_IRQS (64 + 24) | ||
71 | |||
72 | #define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x)) | ||
73 | #define EP93XX_BOARD_IRQS 32 | ||
74 | |||
75 | #define NR_IRQS (NR_EP93XX_IRQS + EP93XX_BOARD_IRQS) | ||
76 | |||
77 | |||
78 | #endif | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h new file mode 100644 index 000000000000..f1b633590752 --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/memory.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/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 __bus_to_virt(x) __phys_to_virt(x) | ||
11 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
12 | |||
13 | |||
14 | #endif | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h new file mode 100644 index 000000000000..b5c182473f5d --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/platform.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/platform.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASSEMBLY__ | ||
6 | |||
7 | void ep93xx_map_io(void); | ||
8 | void ep93xx_init_irq(void); | ||
9 | void ep93xx_init_time(unsigned long); | ||
10 | void ep93xx_init_devices(void); | ||
11 | extern struct sys_timer ep93xx_timer; | ||
12 | |||
13 | struct ep93xx_eth_data | ||
14 | { | ||
15 | unsigned char dev_addr[6]; | ||
16 | unsigned char phy_id; | ||
17 | }; | ||
18 | |||
19 | |||
20 | #endif | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h new file mode 100644 index 000000000000..67789d0f329e --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/system.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/system.h | ||
3 | */ | ||
4 | |||
5 | #include <mach/hardware.h> | ||
6 | |||
7 | static inline void arch_idle(void) | ||
8 | { | ||
9 | cpu_do_idle(); | ||
10 | } | ||
11 | |||
12 | static inline void arch_reset(char mode) | ||
13 | { | ||
14 | u32 devicecfg; | ||
15 | |||
16 | local_irq_disable(); | ||
17 | |||
18 | devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG); | ||
19 | __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); | ||
20 | __raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG); | ||
21 | __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); | ||
22 | __raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG); | ||
23 | |||
24 | while (1) | ||
25 | ; | ||
26 | } | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/timex.h b/arch/arm/mach-ep93xx/include/mach/timex.h new file mode 100644 index 000000000000..6b3503b01fa6 --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/timex.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/timex.h | ||
3 | */ | ||
4 | |||
5 | #define CLOCK_TICK_RATE 983040 | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/ts72xx.h b/arch/arm/mach-ep93xx/include/mach/ts72xx.h new file mode 100644 index 000000000000..30b318aa1a1f --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/ts72xx.h | |||
@@ -0,0 +1,101 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/ts72xx.h | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * TS72xx memory map: | ||
7 | * | ||
8 | * virt phys size | ||
9 | * febff000 22000000 4K model number register | ||
10 | * febfe000 22400000 4K options register | ||
11 | * febfd000 22800000 4K options register #2 | ||
12 | * febfc000 [67]0000000 4K NAND data register | ||
13 | * febfb000 [67]0400000 4K NAND control register | ||
14 | * febfa000 [67]0800000 4K NAND busy register | ||
15 | * febf9000 10800000 4K TS-5620 RTC index register | ||
16 | * febf8000 11700000 4K TS-5620 RTC data register | ||
17 | */ | ||
18 | |||
19 | #define TS72XX_MODEL_PHYS_BASE 0x22000000 | ||
20 | #define TS72XX_MODEL_VIRT_BASE 0xfebff000 | ||
21 | #define TS72XX_MODEL_SIZE 0x00001000 | ||
22 | |||
23 | #define TS72XX_MODEL_TS7200 0x00 | ||
24 | #define TS72XX_MODEL_TS7250 0x01 | ||
25 | #define TS72XX_MODEL_TS7260 0x02 | ||
26 | |||
27 | |||
28 | #define TS72XX_OPTIONS_PHYS_BASE 0x22400000 | ||
29 | #define TS72XX_OPTIONS_VIRT_BASE 0xfebfe000 | ||
30 | #define TS72XX_OPTIONS_SIZE 0x00001000 | ||
31 | |||
32 | #define TS72XX_OPTIONS_COM2_RS485 0x02 | ||
33 | #define TS72XX_OPTIONS_MAX197 0x01 | ||
34 | |||
35 | |||
36 | #define TS72XX_OPTIONS2_PHYS_BASE 0x22800000 | ||
37 | #define TS72XX_OPTIONS2_VIRT_BASE 0xfebfd000 | ||
38 | #define TS72XX_OPTIONS2_SIZE 0x00001000 | ||
39 | |||
40 | #define TS72XX_OPTIONS2_TS9420 0x04 | ||
41 | #define TS72XX_OPTIONS2_TS9420_BOOT 0x02 | ||
42 | |||
43 | |||
44 | #define TS72XX_NOR_PHYS_BASE 0x60000000 | ||
45 | #define TS72XX_NOR2_PHYS_BASE 0x62000000 | ||
46 | |||
47 | #define TS72XX_NAND1_DATA_PHYS_BASE 0x60000000 | ||
48 | #define TS72XX_NAND2_DATA_PHYS_BASE 0x70000000 | ||
49 | #define TS72XX_NAND_DATA_VIRT_BASE 0xfebfc000 | ||
50 | #define TS72XX_NAND_DATA_SIZE 0x00001000 | ||
51 | |||
52 | #define TS72XX_NAND1_CONTROL_PHYS_BASE 0x60400000 | ||
53 | #define TS72XX_NAND2_CONTROL_PHYS_BASE 0x70400000 | ||
54 | #define TS72XX_NAND_CONTROL_VIRT_BASE 0xfebfb000 | ||
55 | #define TS72XX_NAND_CONTROL_SIZE 0x00001000 | ||
56 | |||
57 | #define TS72XX_NAND1_BUSY_PHYS_BASE 0x60800000 | ||
58 | #define TS72XX_NAND2_BUSY_PHYS_BASE 0x70800000 | ||
59 | #define TS72XX_NAND_BUSY_VIRT_BASE 0xfebfa000 | ||
60 | #define TS72XX_NAND_BUSY_SIZE 0x00001000 | ||
61 | |||
62 | |||
63 | #define TS72XX_RTC_INDEX_VIRT_BASE 0xfebf9000 | ||
64 | #define TS72XX_RTC_INDEX_PHYS_BASE 0x10800000 | ||
65 | #define TS72XX_RTC_INDEX_SIZE 0x00001000 | ||
66 | |||
67 | #define TS72XX_RTC_DATA_VIRT_BASE 0xfebf8000 | ||
68 | #define TS72XX_RTC_DATA_PHYS_BASE 0x11700000 | ||
69 | #define TS72XX_RTC_DATA_SIZE 0x00001000 | ||
70 | |||
71 | |||
72 | #ifndef __ASSEMBLY__ | ||
73 | #include <asm/io.h> | ||
74 | |||
75 | static inline int board_is_ts7200(void) | ||
76 | { | ||
77 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200; | ||
78 | } | ||
79 | |||
80 | static inline int board_is_ts7250(void) | ||
81 | { | ||
82 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250; | ||
83 | } | ||
84 | |||
85 | static inline int board_is_ts7260(void) | ||
86 | { | ||
87 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260; | ||
88 | } | ||
89 | |||
90 | static inline int is_max197_installed(void) | ||
91 | { | ||
92 | return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) & | ||
93 | TS72XX_OPTIONS_MAX197); | ||
94 | } | ||
95 | |||
96 | static inline int is_ts9420_installed(void) | ||
97 | { | ||
98 | return !!(__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) & | ||
99 | TS72XX_OPTIONS2_TS9420); | ||
100 | } | ||
101 | #endif | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h new file mode 100644 index 000000000000..1fd2f17de325 --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
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 (at | ||
9 | * your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <mach/ep93xx-regs.h> | ||
13 | |||
14 | static unsigned char __raw_readb(unsigned int ptr) | ||
15 | { | ||
16 | return *((volatile unsigned char *)ptr); | ||
17 | } | ||
18 | |||
19 | static unsigned int __raw_readl(unsigned int ptr) | ||
20 | { | ||
21 | return *((volatile unsigned int *)ptr); | ||
22 | } | ||
23 | |||
24 | static void __raw_writeb(unsigned char value, unsigned int ptr) | ||
25 | { | ||
26 | *((volatile unsigned char *)ptr) = value; | ||
27 | } | ||
28 | |||
29 | static void __raw_writel(unsigned int value, unsigned int ptr) | ||
30 | { | ||
31 | *((volatile unsigned int *)ptr) = value; | ||
32 | } | ||
33 | |||
34 | |||
35 | #define PHYS_UART1_DATA 0x808c0000 | ||
36 | #define PHYS_UART1_FLAG 0x808c0018 | ||
37 | #define UART1_FLAG_TXFF 0x20 | ||
38 | |||
39 | static inline void putc(int c) | ||
40 | { | ||
41 | int i; | ||
42 | |||
43 | for (i = 0; i < 1000; i++) { | ||
44 | /* Transmit fifo not full? */ | ||
45 | if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF)) | ||
46 | break; | ||
47 | } | ||
48 | |||
49 | __raw_writeb(c, PHYS_UART1_DATA); | ||
50 | } | ||
51 | |||
52 | static inline void flush(void) | ||
53 | { | ||
54 | } | ||
55 | |||
56 | |||
57 | /* | ||
58 | * Some bootloaders don't turn off DMA from the ethernet MAC before | ||
59 | * jumping to linux, which means that we might end up with bits of RX | ||
60 | * status and packet data scribbled over the uncompressed kernel image. | ||
61 | * Work around this by resetting the ethernet MAC before we uncompress. | ||
62 | */ | ||
63 | #define PHYS_ETH_SELF_CTL 0x80010020 | ||
64 | #define ETH_SELF_CTL_RESET 0x00000001 | ||
65 | |||
66 | static void ethernet_reset(void) | ||
67 | { | ||
68 | unsigned int v; | ||
69 | |||
70 | /* Reset the ethernet MAC. */ | ||
71 | v = __raw_readl(PHYS_ETH_SELF_CTL); | ||
72 | __raw_writel(v | ETH_SELF_CTL_RESET, PHYS_ETH_SELF_CTL); | ||
73 | |||
74 | /* Wait for reset to finish. */ | ||
75 | while (__raw_readl(PHYS_ETH_SELF_CTL) & ETH_SELF_CTL_RESET) | ||
76 | ; | ||
77 | } | ||
78 | |||
79 | |||
80 | static void arch_decomp_setup(void) | ||
81 | { | ||
82 | ethernet_reset(); | ||
83 | } | ||
84 | |||
85 | #define arch_decomp_wdog() | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/vmalloc.h b/arch/arm/mach-ep93xx/include/mach/vmalloc.h new file mode 100644 index 000000000000..aed21cd3fe2d --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/vmalloc.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe800000 | ||
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c index 4d831ba799d5..de047a5c8112 100644 --- a/arch/arm/mach-ep93xx/micro9.c +++ b/arch/arm/mach-ep93xx/micro9.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/mtd/physmap.h> | 20 | #include <linux/mtd/physmap.h> |
21 | 21 | ||
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <asm/arch/hardware.h> | 23 | #include <mach/hardware.h> |
24 | 24 | ||
25 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
26 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index c0bc642a5c18..c3cbff126d0c 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/m48t86.h> | 21 | #include <linux/m48t86.h> |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <asm/arch/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |