diff options
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r-- | arch/arm/mach-ep93xx/Kconfig | 82 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/Makefile | 8 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/Makefile.boot | 7 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/clock.c | 58 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/core.c | 27 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/edb9302.c | 68 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/edb9302a.c | 68 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/edb9307.c | 68 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/edb9307a.c | 80 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/edb9312.c | 69 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/edb9315.c | 68 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/edb9315a.c | 68 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/edb93xx.c | 217 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 20 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/memory.h | 6 |
15 files changed, 358 insertions, 556 deletions
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index 56bddcef6905..d7291c682a64 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig | |||
@@ -9,87 +9,135 @@ config CRUNCH | |||
9 | 9 | ||
10 | comment "EP93xx Platforms" | 10 | comment "EP93xx Platforms" |
11 | 11 | ||
12 | choice | ||
13 | prompt "EP93xx first SDRAM bank selection" | ||
14 | default EP93XX_SDCE3_SYNC_PHYS_OFFSET | ||
15 | |||
16 | config EP93XX_SDCE3_SYNC_PHYS_OFFSET | ||
17 | bool "0x00000000 - SDCE3/SyncBoot" | ||
18 | help | ||
19 | Select this option if you want support for EP93xx boards with the | ||
20 | first SDRAM bank at 0x00000000 | ||
21 | |||
22 | config EP93XX_SDCE0_PHYS_OFFSET | ||
23 | bool "0xc0000000 - SDCEO" | ||
24 | help | ||
25 | Select this option if you want support for EP93xx boards with the | ||
26 | first SDRAM bank at 0xc0000000 | ||
27 | |||
28 | endchoice | ||
29 | |||
12 | config MACH_ADSSPHERE | 30 | config MACH_ADSSPHERE |
13 | bool "Support ADS Sphere" | 31 | bool "Support ADS Sphere" |
32 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET | ||
14 | help | 33 | help |
15 | Say 'Y' here if you want your kernel to support the ADS | 34 | Say 'Y' here if you want your kernel to support the ADS |
16 | Sphere board. | 35 | Sphere board. |
17 | 36 | ||
37 | config MACH_EDB93XX | ||
38 | bool | ||
39 | |||
40 | config MACH_EDB9301 | ||
41 | bool "Support Cirrus Logic EDB9301" | ||
42 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET | ||
43 | select MACH_EDB93XX | ||
44 | help | ||
45 | Say 'Y' here if you want your kernel to support the Cirrus | ||
46 | Logic EDB9301 Evaluation Board. | ||
47 | |||
18 | config MACH_EDB9302 | 48 | config MACH_EDB9302 |
19 | bool "Support Cirrus Logic EDB9302" | 49 | bool "Support Cirrus Logic EDB9302" |
50 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET | ||
51 | select MACH_EDB93XX | ||
20 | help | 52 | help |
21 | Say 'Y' here if you want your kernel to support the Cirrus | 53 | Say 'Y' here if you want your kernel to support the Cirrus |
22 | Logic EDB9302 Evaluation Board. | 54 | Logic EDB9302 Evaluation Board. |
23 | 55 | ||
24 | config MACH_EDB9302A | 56 | config MACH_EDB9302A |
25 | bool "Support Cirrus Logic EDB9302A" | 57 | bool "Support Cirrus Logic EDB9302A" |
58 | depends on EP93XX_SDCE0_PHYS_OFFSET | ||
59 | select MACH_EDB93XX | ||
26 | help | 60 | help |
27 | Say 'Y' here if you want your kernel to support the Cirrus | 61 | Say 'Y' here if you want your kernel to support the Cirrus |
28 | Logic EDB9302A Evaluation Board. | 62 | Logic EDB9302A Evaluation Board. |
29 | 63 | ||
30 | config MACH_EDB9307 | 64 | config MACH_EDB9307 |
31 | bool "Support Cirrus Logic EDB9307" | 65 | bool "Support Cirrus Logic EDB9307" |
66 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET | ||
67 | select MACH_EDB93XX | ||
32 | help | 68 | help |
33 | Say 'Y' here if you want your kernel to support the Cirrus | 69 | Say 'Y' here if you want your kernel to support the Cirrus |
34 | Logic EDB9307 Evaluation Board. | 70 | Logic EDB9307 Evaluation Board. |
35 | 71 | ||
36 | config MACH_EDB9307A | 72 | config MACH_EDB9307A |
37 | bool "Support Cirrus Logic EDB9307A" | 73 | bool "Support Cirrus Logic EDB9307A" |
74 | depends on EP93XX_SDCE0_PHYS_OFFSET | ||
75 | select MACH_EDB93XX | ||
38 | help | 76 | help |
39 | Say 'Y' here if you want your kernel to support the Cirrus | 77 | Say 'Y' here if you want your kernel to support the Cirrus |
40 | Logic EDB9307A Evaluation Board. | 78 | Logic EDB9307A Evaluation Board. |
41 | 79 | ||
42 | config MACH_EDB9312 | 80 | config MACH_EDB9312 |
43 | bool "Support Cirrus Logic EDB9312" | 81 | bool "Support Cirrus Logic EDB9312" |
82 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET | ||
83 | select MACH_EDB93XX | ||
44 | help | 84 | help |
45 | Say 'Y' here if you want your kernel to support the Cirrus | 85 | Say 'Y' here if you want your kernel to support the Cirrus |
46 | Logic EDB9312 Evaluation Board. | 86 | Logic EDB9312 Evaluation Board. |
47 | 87 | ||
48 | config MACH_EDB9315 | 88 | config MACH_EDB9315 |
49 | bool "Support Cirrus Logic EDB9315" | 89 | bool "Support Cirrus Logic EDB9315" |
90 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET | ||
91 | select MACH_EDB93XX | ||
50 | help | 92 | help |
51 | Say 'Y' here if you want your kernel to support the Cirrus | 93 | Say 'Y' here if you want your kernel to support the Cirrus |
52 | Logic EDB9315 Evaluation Board. | 94 | Logic EDB9315 Evaluation Board. |
53 | 95 | ||
54 | config MACH_EDB9315A | 96 | config MACH_EDB9315A |
55 | bool "Support Cirrus Logic EDB9315A" | 97 | bool "Support Cirrus Logic EDB9315A" |
98 | depends on EP93XX_SDCE0_PHYS_OFFSET | ||
99 | select MACH_EDB93XX | ||
56 | help | 100 | help |
57 | Say 'Y' here if you want your kernel to support the Cirrus | 101 | Say 'Y' here if you want your kernel to support the Cirrus |
58 | Logic EDB9315A Evaluation Board. | 102 | Logic EDB9315A Evaluation Board. |
59 | 103 | ||
60 | config MACH_GESBC9312 | 104 | config MACH_GESBC9312 |
105 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET | ||
61 | bool "Support Glomation GESBC-9312-sx" | 106 | bool "Support Glomation GESBC-9312-sx" |
62 | help | 107 | help |
63 | Say 'Y' here if you want your kernel to support the Glomation | 108 | Say 'Y' here if you want your kernel to support the Glomation |
64 | GESBC-9312-sx board. | 109 | GESBC-9312-sx board. |
65 | 110 | ||
66 | config MACH_MICRO9 | 111 | config MACH_MICRO9 |
67 | bool | 112 | bool |
68 | default n | ||
69 | 113 | ||
70 | config MACH_MICRO9H | 114 | config MACH_MICRO9H |
71 | bool "Support Contec Hypercontrol Micro9-H" | 115 | bool "Support Contec Hypercontrol Micro9-H" |
72 | select MACH_MICRO9 | 116 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET |
73 | help | 117 | select MACH_MICRO9 |
74 | Say 'Y' here if you want your kernel to support the | 118 | help |
75 | Contec Hypercontrol Micro9-H board. | 119 | Say 'Y' here if you want your kernel to support the |
120 | Contec Hypercontrol Micro9-H board. | ||
76 | 121 | ||
77 | config MACH_MICRO9M | 122 | config MACH_MICRO9M |
78 | bool "Support Contec Hypercontrol Micro9-M" | 123 | bool "Support Contec Hypercontrol Micro9-M" |
79 | select MACH_MICRO9 | 124 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET |
80 | help | 125 | select MACH_MICRO9 |
81 | Say 'Y' here if you want your kernel to support the | 126 | help |
82 | Contec Hypercontrol Micro9-M board. | 127 | Say 'Y' here if you want your kernel to support the |
128 | Contec Hypercontrol Micro9-M board. | ||
83 | 129 | ||
84 | config MACH_MICRO9L | 130 | config MACH_MICRO9L |
85 | bool "Support Contec Hypercontrol Micro9-L" | 131 | bool "Support Contec Hypercontrol Micro9-L" |
86 | select MACH_MICRO9 | 132 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET |
87 | help | 133 | select MACH_MICRO9 |
88 | Say 'Y' here if you want your kernel to support the | 134 | help |
89 | Contec Hypercontrol Micro9-L board. | 135 | Say 'Y' here if you want your kernel to support the |
136 | Contec Hypercontrol Micro9-L board. | ||
90 | 137 | ||
91 | config MACH_TS72XX | 138 | config MACH_TS72XX |
92 | bool "Support Technologic Systems TS-72xx SBC" | 139 | bool "Support Technologic Systems TS-72xx SBC" |
140 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET | ||
93 | help | 141 | help |
94 | Say 'Y' here if you want your kernel to support the | 142 | Say 'Y' here if you want your kernel to support the |
95 | Technologic Systems TS-72xx board. | 143 | Technologic Systems TS-72xx board. |
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index 9522e205b73f..eae6199a9891 100644 --- a/arch/arm/mach-ep93xx/Makefile +++ b/arch/arm/mach-ep93xx/Makefile | |||
@@ -7,13 +7,7 @@ obj-n := | |||
7 | obj- := | 7 | obj- := |
8 | 8 | ||
9 | obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o | 9 | obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o |
10 | obj-$(CONFIG_MACH_EDB9302) += edb9302.o | 10 | obj-$(CONFIG_MACH_EDB93XX) += edb93xx.o |
11 | obj-$(CONFIG_MACH_EDB9302A) += edb9302a.o | ||
12 | obj-$(CONFIG_MACH_EDB9307) += edb9307.o | ||
13 | obj-$(CONFIG_MACH_EDB9307A) += edb9307a.o | ||
14 | obj-$(CONFIG_MACH_EDB9312) += edb9312.o | ||
15 | obj-$(CONFIG_MACH_EDB9315) += edb9315.o | ||
16 | obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o | ||
17 | obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o | 11 | obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o |
18 | obj-$(CONFIG_MACH_MICRO9) += micro9.o | 12 | obj-$(CONFIG_MACH_MICRO9) += micro9.o |
19 | obj-$(CONFIG_MACH_TS72XX) += ts72xx.o | 13 | obj-$(CONFIG_MACH_TS72XX) += ts72xx.o |
diff --git a/arch/arm/mach-ep93xx/Makefile.boot b/arch/arm/mach-ep93xx/Makefile.boot index d5561ad15bad..27a085a8f12a 100644 --- a/arch/arm/mach-ep93xx/Makefile.boot +++ b/arch/arm/mach-ep93xx/Makefile.boot | |||
@@ -1,2 +1,5 @@ | |||
1 | zreladdr-y := 0x00008000 | 1 | zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00000100 |
3 | |||
4 | zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0008000 | ||
5 | params_phys-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0000100 | ||
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index b2eede5531c8..6c4c1633ed12 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c | |||
@@ -72,58 +72,58 @@ static struct clk clk_h; | |||
72 | static struct clk clk_p; | 72 | static struct clk clk_p; |
73 | static struct clk clk_pll2; | 73 | static struct clk clk_pll2; |
74 | static struct clk clk_usb_host = { | 74 | static struct clk clk_usb_host = { |
75 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 75 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
76 | .enable_mask = EP93XX_SYSCON_CLOCK_USH_EN, | 76 | .enable_mask = EP93XX_SYSCON_PWRCNT_USH_EN, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | /* DMA Clocks */ | 79 | /* DMA Clocks */ |
80 | static struct clk clk_m2p0 = { | 80 | static struct clk clk_m2p0 = { |
81 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 81 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
82 | .enable_mask = 0x00020000, | 82 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2P0, |
83 | }; | 83 | }; |
84 | static struct clk clk_m2p1 = { | 84 | static struct clk clk_m2p1 = { |
85 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 85 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
86 | .enable_mask = 0x00010000, | 86 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2P1, |
87 | }; | 87 | }; |
88 | static struct clk clk_m2p2 = { | 88 | static struct clk clk_m2p2 = { |
89 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 89 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
90 | .enable_mask = 0x00080000, | 90 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2P2, |
91 | }; | 91 | }; |
92 | static struct clk clk_m2p3 = { | 92 | static struct clk clk_m2p3 = { |
93 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 93 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
94 | .enable_mask = 0x00040000, | 94 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2P3, |
95 | }; | 95 | }; |
96 | static struct clk clk_m2p4 = { | 96 | static struct clk clk_m2p4 = { |
97 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 97 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
98 | .enable_mask = 0x00200000, | 98 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2P4, |
99 | }; | 99 | }; |
100 | static struct clk clk_m2p5 = { | 100 | static struct clk clk_m2p5 = { |
101 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 101 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
102 | .enable_mask = 0x00100000, | 102 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2P5, |
103 | }; | 103 | }; |
104 | static struct clk clk_m2p6 = { | 104 | static struct clk clk_m2p6 = { |
105 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 105 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
106 | .enable_mask = 0x00800000, | 106 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2P6, |
107 | }; | 107 | }; |
108 | static struct clk clk_m2p7 = { | 108 | static struct clk clk_m2p7 = { |
109 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 109 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
110 | .enable_mask = 0x00400000, | 110 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2P7, |
111 | }; | 111 | }; |
112 | static struct clk clk_m2p8 = { | 112 | static struct clk clk_m2p8 = { |
113 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 113 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
114 | .enable_mask = 0x02000000, | 114 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2P8, |
115 | }; | 115 | }; |
116 | static struct clk clk_m2p9 = { | 116 | static struct clk clk_m2p9 = { |
117 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 117 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
118 | .enable_mask = 0x01000000, | 118 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2P9, |
119 | }; | 119 | }; |
120 | static struct clk clk_m2m0 = { | 120 | static struct clk clk_m2m0 = { |
121 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 121 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
122 | .enable_mask = 0x04000000, | 122 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2M0, |
123 | }; | 123 | }; |
124 | static struct clk clk_m2m1 = { | 124 | static struct clk clk_m2m1 = { |
125 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 125 | .enable_reg = EP93XX_SYSCON_PWRCNT, |
126 | .enable_mask = 0x08000000, | 126 | .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2M1, |
127 | }; | 127 | }; |
128 | 128 | ||
129 | #define INIT_CK(dev,con,ck) \ | 129 | #define INIT_CK(dev,con,ck) \ |
@@ -138,7 +138,7 @@ static struct clk_lookup clocks[] = { | |||
138 | INIT_CK(NULL, "hclk", &clk_h), | 138 | INIT_CK(NULL, "hclk", &clk_h), |
139 | INIT_CK(NULL, "pclk", &clk_p), | 139 | INIT_CK(NULL, "pclk", &clk_p), |
140 | INIT_CK(NULL, "pll2", &clk_pll2), | 140 | INIT_CK(NULL, "pll2", &clk_pll2), |
141 | INIT_CK(NULL, "usb_host", &clk_usb_host), | 141 | INIT_CK("ep93xx-ohci", NULL, &clk_usb_host), |
142 | INIT_CK(NULL, "m2p0", &clk_m2p0), | 142 | INIT_CK(NULL, "m2p0", &clk_m2p0), |
143 | INIT_CK(NULL, "m2p1", &clk_m2p1), | 143 | INIT_CK(NULL, "m2p1", &clk_m2p1), |
144 | INIT_CK(NULL, "m2p2", &clk_m2p2), | 144 | INIT_CK(NULL, "m2p2", &clk_m2p2), |
@@ -186,8 +186,8 @@ static unsigned long get_uart_rate(struct clk *clk) | |||
186 | { | 186 | { |
187 | u32 value; | 187 | u32 value; |
188 | 188 | ||
189 | value = __raw_readl(EP93XX_SYSCON_CLOCK_CONTROL); | 189 | value = __raw_readl(EP93XX_SYSCON_PWRCNT); |
190 | if (value & EP93XX_SYSCON_CLOCK_UARTBAUD) | 190 | if (value & EP93XX_SYSCON_PWRCNT_UARTBAUD) |
191 | return EP93XX_EXT_CLK_RATE; | 191 | return EP93XX_EXT_CLK_RATE; |
192 | else | 192 | else |
193 | return EP93XX_EXT_CLK_RATE / 2; | 193 | return EP93XX_EXT_CLK_RATE / 2; |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index ae24486f858a..204dc5cbd0b8 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -155,7 +155,7 @@ static unsigned char gpio_int_unmasked[3]; | |||
155 | static unsigned char gpio_int_enabled[3]; | 155 | static unsigned char gpio_int_enabled[3]; |
156 | static unsigned char gpio_int_type1[3]; | 156 | static unsigned char gpio_int_type1[3]; |
157 | static unsigned char gpio_int_type2[3]; | 157 | static unsigned char gpio_int_type2[3]; |
158 | static unsigned char gpio_int_debouce[3]; | 158 | static unsigned char gpio_int_debounce[3]; |
159 | 159 | ||
160 | /* Port ordering is: A B F */ | 160 | /* Port ordering is: A B F */ |
161 | static const u8 int_type1_register_offset[3] = { 0x90, 0xac, 0x4c }; | 161 | static const u8 int_type1_register_offset[3] = { 0x90, 0xac, 0x4c }; |
@@ -192,11 +192,11 @@ void ep93xx_gpio_int_debounce(unsigned int irq, int enable) | |||
192 | int port_mask = 1 << (line & 7); | 192 | int port_mask = 1 << (line & 7); |
193 | 193 | ||
194 | if (enable) | 194 | if (enable) |
195 | gpio_int_debouce[port] |= port_mask; | 195 | gpio_int_debounce[port] |= port_mask; |
196 | else | 196 | else |
197 | gpio_int_debouce[port] &= ~port_mask; | 197 | gpio_int_debounce[port] &= ~port_mask; |
198 | 198 | ||
199 | __raw_writeb(gpio_int_debouce[port], | 199 | __raw_writeb(gpio_int_debounce[port], |
200 | EP93XX_GPIO_REG(int_debounce_register_offset[port])); | 200 | EP93XX_GPIO_REG(int_debounce_register_offset[port])); |
201 | } | 201 | } |
202 | EXPORT_SYMBOL(ep93xx_gpio_int_debounce); | 202 | EXPORT_SYMBOL(ep93xx_gpio_int_debounce); |
@@ -362,8 +362,8 @@ void __init ep93xx_init_irq(void) | |||
362 | { | 362 | { |
363 | int gpio_irq; | 363 | int gpio_irq; |
364 | 364 | ||
365 | vic_init((void *)EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK); | 365 | vic_init((void *)EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK, 0); |
366 | vic_init((void *)EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK); | 366 | vic_init((void *)EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK, 0); |
367 | 367 | ||
368 | for (gpio_irq = gpio_to_irq(0); | 368 | for (gpio_irq = gpio_to_irq(0); |
369 | gpio_irq <= gpio_to_irq(EP93XX_GPIO_LINE_MAX_IRQ); ++gpio_irq) { | 369 | gpio_irq <= gpio_to_irq(EP93XX_GPIO_LINE_MAX_IRQ); ++gpio_irq) { |
@@ -450,10 +450,19 @@ static struct amba_device uart3_device = { | |||
450 | }; | 450 | }; |
451 | 451 | ||
452 | 452 | ||
453 | static struct resource ep93xx_rtc_resource[] = { | ||
454 | { | ||
455 | .start = EP93XX_RTC_PHYS_BASE, | ||
456 | .end = EP93XX_RTC_PHYS_BASE + 0x10c - 1, | ||
457 | .flags = IORESOURCE_MEM, | ||
458 | }, | ||
459 | }; | ||
460 | |||
453 | static struct platform_device ep93xx_rtc_device = { | 461 | static struct platform_device ep93xx_rtc_device = { |
454 | .name = "ep93xx-rtc", | 462 | .name = "ep93xx-rtc", |
455 | .id = -1, | 463 | .id = -1, |
456 | .num_resources = 0, | 464 | .num_resources = ARRAY_SIZE(ep93xx_rtc_resource), |
465 | .resource = ep93xx_rtc_resource, | ||
457 | }; | 466 | }; |
458 | 467 | ||
459 | 468 | ||
diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c deleted file mode 100644 index 8bf8d7c78f1a..000000000000 --- a/arch/arm/mach-ep93xx/edb9302.c +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb9302.c | ||
3 | * Cirrus Logic EDB9302 support. | ||
4 | * | ||
5 | * Copyright (C) 2006 George Kashperko <george@chas.com.ua> | ||
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 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/i2c.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | static struct physmap_flash_data edb9302_flash_data = { | ||
28 | .width = 2, | ||
29 | }; | ||
30 | |||
31 | static struct resource edb9302_flash_resource = { | ||
32 | .start = EP93XX_CS6_PHYS_BASE, | ||
33 | .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1, | ||
34 | .flags = IORESOURCE_MEM, | ||
35 | }; | ||
36 | |||
37 | static struct platform_device edb9302_flash = { | ||
38 | .name = "physmap-flash", | ||
39 | .id = 0, | ||
40 | .dev = { | ||
41 | .platform_data = &edb9302_flash_data, | ||
42 | }, | ||
43 | .num_resources = 1, | ||
44 | .resource = &edb9302_flash_resource, | ||
45 | }; | ||
46 | |||
47 | static struct ep93xx_eth_data edb9302_eth_data = { | ||
48 | .phy_id = 1, | ||
49 | }; | ||
50 | |||
51 | static void __init edb9302_init_machine(void) | ||
52 | { | ||
53 | ep93xx_init_devices(); | ||
54 | platform_device_register(&edb9302_flash); | ||
55 | |||
56 | ep93xx_register_eth(&edb9302_eth_data, 1); | ||
57 | } | ||
58 | |||
59 | MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board") | ||
60 | /* Maintainer: George Kashperko <george@chas.com.ua> */ | ||
61 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
63 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | ||
64 | .map_io = ep93xx_map_io, | ||
65 | .init_irq = ep93xx_init_irq, | ||
66 | .timer = &ep93xx_timer, | ||
67 | .init_machine = edb9302_init_machine, | ||
68 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/edb9302a.c b/arch/arm/mach-ep93xx/edb9302a.c deleted file mode 100644 index a352c57c7b46..000000000000 --- a/arch/arm/mach-ep93xx/edb9302a.c +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb9302a.c | ||
3 | * Cirrus Logic EDB9302A support. | ||
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 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/i2c.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | static struct physmap_flash_data edb9302a_flash_data = { | ||
28 | .width = 2, | ||
29 | }; | ||
30 | |||
31 | static struct resource edb9302a_flash_resource = { | ||
32 | .start = EP93XX_CS6_PHYS_BASE, | ||
33 | .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1, | ||
34 | .flags = IORESOURCE_MEM, | ||
35 | }; | ||
36 | |||
37 | static struct platform_device edb9302a_flash = { | ||
38 | .name = "physmap-flash", | ||
39 | .id = 0, | ||
40 | .dev = { | ||
41 | .platform_data = &edb9302a_flash_data, | ||
42 | }, | ||
43 | .num_resources = 1, | ||
44 | .resource = &edb9302a_flash_resource, | ||
45 | }; | ||
46 | |||
47 | static struct ep93xx_eth_data edb9302a_eth_data = { | ||
48 | .phy_id = 1, | ||
49 | }; | ||
50 | |||
51 | static void __init edb9302a_init_machine(void) | ||
52 | { | ||
53 | ep93xx_init_devices(); | ||
54 | platform_device_register(&edb9302a_flash); | ||
55 | |||
56 | ep93xx_register_eth(&edb9302a_eth_data, 1); | ||
57 | } | ||
58 | |||
59 | MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board") | ||
60 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
61 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
63 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, | ||
64 | .map_io = ep93xx_map_io, | ||
65 | .init_irq = ep93xx_init_irq, | ||
66 | .timer = &ep93xx_timer, | ||
67 | .init_machine = edb9302a_init_machine, | ||
68 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/edb9307.c b/arch/arm/mach-ep93xx/edb9307.c deleted file mode 100644 index 5ab22f63a4eb..000000000000 --- a/arch/arm/mach-ep93xx/edb9307.c +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb9307.c | ||
3 | * Cirrus Logic EDB9307 support. | ||
4 | * | ||
5 | * Copyright (C) 2007 Herbert Valerio Riedel <hvr@gnu.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 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/i2c.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | static struct physmap_flash_data edb9307_flash_data = { | ||
28 | .width = 4, | ||
29 | }; | ||
30 | |||
31 | static struct resource edb9307_flash_resource = { | ||
32 | .start = EP93XX_CS6_PHYS_BASE, | ||
33 | .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1, | ||
34 | .flags = IORESOURCE_MEM, | ||
35 | }; | ||
36 | |||
37 | static struct platform_device edb9307_flash = { | ||
38 | .name = "physmap-flash", | ||
39 | .id = 0, | ||
40 | .dev = { | ||
41 | .platform_data = &edb9307_flash_data, | ||
42 | }, | ||
43 | .num_resources = 1, | ||
44 | .resource = &edb9307_flash_resource, | ||
45 | }; | ||
46 | |||
47 | static struct ep93xx_eth_data edb9307_eth_data = { | ||
48 | .phy_id = 1, | ||
49 | }; | ||
50 | |||
51 | static void __init edb9307_init_machine(void) | ||
52 | { | ||
53 | ep93xx_init_devices(); | ||
54 | platform_device_register(&edb9307_flash); | ||
55 | |||
56 | ep93xx_register_eth(&edb9307_eth_data, 1); | ||
57 | } | ||
58 | |||
59 | MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board") | ||
60 | /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */ | ||
61 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
63 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | ||
64 | .map_io = ep93xx_map_io, | ||
65 | .init_irq = ep93xx_init_irq, | ||
66 | .timer = &ep93xx_timer, | ||
67 | .init_machine = edb9307_init_machine, | ||
68 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/edb9307a.c b/arch/arm/mach-ep93xx/edb9307a.c deleted file mode 100644 index 6171167d3315..000000000000 --- a/arch/arm/mach-ep93xx/edb9307a.c +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb9307a.c | ||
3 | * Cirrus Logic EDB9307A support. | ||
4 | * | ||
5 | * Copyright (C) 2008 H Hartley Sweeten <hsweeten@visionengravers.com> | ||
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 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/i2c.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | static struct physmap_flash_data edb9307a_flash_data = { | ||
28 | .width = 2, | ||
29 | }; | ||
30 | |||
31 | static struct resource edb9307a_flash_resource = { | ||
32 | .start = EP93XX_CS6_PHYS_BASE, | ||
33 | .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1, | ||
34 | .flags = IORESOURCE_MEM, | ||
35 | }; | ||
36 | |||
37 | static struct platform_device edb9307a_flash = { | ||
38 | .name = "physmap-flash", | ||
39 | .id = 0, | ||
40 | .dev = { | ||
41 | .platform_data = &edb9307a_flash_data, | ||
42 | }, | ||
43 | .num_resources = 1, | ||
44 | .resource = &edb9307a_flash_resource, | ||
45 | }; | ||
46 | |||
47 | static struct ep93xx_eth_data edb9307a_eth_data = { | ||
48 | .phy_id = 1, | ||
49 | }; | ||
50 | |||
51 | static struct i2c_board_info __initdata edb9307a_i2c_data[] = { | ||
52 | { | ||
53 | /* On-board battery backed RTC */ | ||
54 | I2C_BOARD_INFO("isl1208", 0x6f), | ||
55 | }, | ||
56 | /* | ||
57 | * The I2C signals are also routed to the Expansion Connector (J4) | ||
58 | */ | ||
59 | }; | ||
60 | |||
61 | static void __init edb9307a_init_machine(void) | ||
62 | { | ||
63 | ep93xx_init_devices(); | ||
64 | platform_device_register(&edb9307a_flash); | ||
65 | |||
66 | ep93xx_register_eth(&edb9307a_eth_data, 1); | ||
67 | |||
68 | ep93xx_init_i2c(edb9307a_i2c_data, ARRAY_SIZE(edb9307a_i2c_data)); | ||
69 | } | ||
70 | |||
71 | MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board") | ||
72 | /* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */ | ||
73 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
74 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
75 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, | ||
76 | .map_io = ep93xx_map_io, | ||
77 | .init_irq = ep93xx_init_irq, | ||
78 | .timer = &ep93xx_timer, | ||
79 | .init_machine = edb9307a_init_machine, | ||
80 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/edb9312.c b/arch/arm/mach-ep93xx/edb9312.c deleted file mode 100644 index d7179f66d804..000000000000 --- a/arch/arm/mach-ep93xx/edb9312.c +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb9312.c | ||
3 | * Cirrus Logic EDB9312 support. | ||
4 | * | ||
5 | * Copyright (C) 2006 Infosys Technologies Limited | ||
6 | * Toufeeq Hussain <toufeeq_hussain@infosys.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or (at | ||
11 | * your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/mm.h> | ||
17 | #include <linux/sched.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/mtd/physmap.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/io.h> | ||
23 | #include <linux/i2c.h> | ||
24 | #include <mach/hardware.h> | ||
25 | #include <asm/mach-types.h> | ||
26 | #include <asm/mach/arch.h> | ||
27 | |||
28 | static struct physmap_flash_data edb9312_flash_data = { | ||
29 | .width = 4, | ||
30 | }; | ||
31 | |||
32 | static struct resource edb9312_flash_resource = { | ||
33 | .start = EP93XX_CS6_PHYS_BASE, | ||
34 | .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1, | ||
35 | .flags = IORESOURCE_MEM, | ||
36 | }; | ||
37 | |||
38 | static struct platform_device edb9312_flash = { | ||
39 | .name = "physmap-flash", | ||
40 | .id = 0, | ||
41 | .dev = { | ||
42 | .platform_data = &edb9312_flash_data, | ||
43 | }, | ||
44 | .num_resources = 1, | ||
45 | .resource = &edb9312_flash_resource, | ||
46 | }; | ||
47 | |||
48 | static struct ep93xx_eth_data edb9312_eth_data = { | ||
49 | .phy_id = 1, | ||
50 | }; | ||
51 | |||
52 | static void __init edb9312_init_machine(void) | ||
53 | { | ||
54 | ep93xx_init_devices(); | ||
55 | platform_device_register(&edb9312_flash); | ||
56 | |||
57 | ep93xx_register_eth(&edb9312_eth_data, 1); | ||
58 | } | ||
59 | |||
60 | MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board") | ||
61 | /* Maintainer: Toufeeq Hussain <toufeeq_hussain@infosys.com> */ | ||
62 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
63 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
64 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | ||
65 | .map_io = ep93xx_map_io, | ||
66 | .init_irq = ep93xx_init_irq, | ||
67 | .timer = &ep93xx_timer, | ||
68 | .init_machine = edb9312_init_machine, | ||
69 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/edb9315.c b/arch/arm/mach-ep93xx/edb9315.c deleted file mode 100644 index 025af6eaca10..000000000000 --- a/arch/arm/mach-ep93xx/edb9315.c +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb9315.c | ||
3 | * Cirrus Logic EDB9315 support. | ||
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 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/i2c.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | static struct physmap_flash_data edb9315_flash_data = { | ||
28 | .width = 4, | ||
29 | }; | ||
30 | |||
31 | static struct resource edb9315_flash_resource = { | ||
32 | .start = EP93XX_CS6_PHYS_BASE, | ||
33 | .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1, | ||
34 | .flags = IORESOURCE_MEM, | ||
35 | }; | ||
36 | |||
37 | static struct platform_device edb9315_flash = { | ||
38 | .name = "physmap-flash", | ||
39 | .id = 0, | ||
40 | .dev = { | ||
41 | .platform_data = &edb9315_flash_data, | ||
42 | }, | ||
43 | .num_resources = 1, | ||
44 | .resource = &edb9315_flash_resource, | ||
45 | }; | ||
46 | |||
47 | static struct ep93xx_eth_data edb9315_eth_data = { | ||
48 | .phy_id = 1, | ||
49 | }; | ||
50 | |||
51 | static void __init edb9315_init_machine(void) | ||
52 | { | ||
53 | ep93xx_init_devices(); | ||
54 | platform_device_register(&edb9315_flash); | ||
55 | |||
56 | ep93xx_register_eth(&edb9315_eth_data, 1); | ||
57 | } | ||
58 | |||
59 | MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board") | ||
60 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
61 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
63 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | ||
64 | .map_io = ep93xx_map_io, | ||
65 | .init_irq = ep93xx_init_irq, | ||
66 | .timer = &ep93xx_timer, | ||
67 | .init_machine = edb9315_init_machine, | ||
68 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c deleted file mode 100644 index 4c9cc8a39f5c..000000000000 --- a/arch/arm/mach-ep93xx/edb9315a.c +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb9315a.c | ||
3 | * Cirrus Logic EDB9315A support. | ||
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 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/i2c.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | static struct physmap_flash_data edb9315a_flash_data = { | ||
28 | .width = 2, | ||
29 | }; | ||
30 | |||
31 | static struct resource edb9315a_flash_resource = { | ||
32 | .start = EP93XX_CS6_PHYS_BASE, | ||
33 | .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1, | ||
34 | .flags = IORESOURCE_MEM, | ||
35 | }; | ||
36 | |||
37 | static struct platform_device edb9315a_flash = { | ||
38 | .name = "physmap-flash", | ||
39 | .id = 0, | ||
40 | .dev = { | ||
41 | .platform_data = &edb9315a_flash_data, | ||
42 | }, | ||
43 | .num_resources = 1, | ||
44 | .resource = &edb9315a_flash_resource, | ||
45 | }; | ||
46 | |||
47 | static struct ep93xx_eth_data edb9315a_eth_data = { | ||
48 | .phy_id = 1, | ||
49 | }; | ||
50 | |||
51 | static void __init edb9315a_init_machine(void) | ||
52 | { | ||
53 | ep93xx_init_devices(); | ||
54 | platform_device_register(&edb9315a_flash); | ||
55 | |||
56 | ep93xx_register_eth(&edb9315a_eth_data, 1); | ||
57 | } | ||
58 | |||
59 | MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") | ||
60 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
61 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
63 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, | ||
64 | .map_io = ep93xx_map_io, | ||
65 | .init_irq = ep93xx_init_irq, | ||
66 | .timer = &ep93xx_timer, | ||
67 | .init_machine = edb9315a_init_machine, | ||
68 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c new file mode 100644 index 000000000000..e9e45b92457e --- /dev/null +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -0,0 +1,217 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb93xx.c | ||
3 | * Cirrus Logic EDB93xx Development Board support. | ||
4 | * | ||
5 | * EDB93XX, EDB9301, EDB9307A | ||
6 | * Copyright (C) 2008-2009 H Hartley Sweeten <hsweeten@visionengravers.com> | ||
7 | * | ||
8 | * EDB9302 | ||
9 | * Copyright (C) 2006 George Kashperko <george@chas.com.ua> | ||
10 | * | ||
11 | * EDB9302A, EDB9315, EDB9315A | ||
12 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
13 | * | ||
14 | * EDB9307 | ||
15 | * Copyright (C) 2007 Herbert Valerio Riedel <hvr@gnu.org> | ||
16 | * | ||
17 | * EDB9312 | ||
18 | * Copyright (C) 2006 Infosys Technologies Limited | ||
19 | * Toufeeq Hussain <toufeeq_hussain@infosys.com> | ||
20 | * | ||
21 | * This program is free software; you can redistribute it and/or modify | ||
22 | * it under the terms of the GNU General Public License as published by | ||
23 | * the Free Software Foundation; either version 2 of the License, or (at | ||
24 | * your option) any later version. | ||
25 | */ | ||
26 | |||
27 | #include <linux/kernel.h> | ||
28 | #include <linux/init.h> | ||
29 | #include <linux/mm.h> | ||
30 | #include <linux/sched.h> | ||
31 | #include <linux/interrupt.h> | ||
32 | #include <linux/ioport.h> | ||
33 | #include <linux/mtd/physmap.h> | ||
34 | #include <linux/platform_device.h> | ||
35 | #include <linux/io.h> | ||
36 | #include <linux/i2c.h> | ||
37 | #include <mach/hardware.h> | ||
38 | #include <asm/mach-types.h> | ||
39 | #include <asm/mach/arch.h> | ||
40 | |||
41 | static struct physmap_flash_data edb93xx_flash_data; | ||
42 | |||
43 | static struct resource edb93xx_flash_resource = { | ||
44 | .flags = IORESOURCE_MEM, | ||
45 | }; | ||
46 | |||
47 | static struct platform_device edb93xx_flash = { | ||
48 | .name = "physmap-flash", | ||
49 | .id = 0, | ||
50 | .dev = { | ||
51 | .platform_data = &edb93xx_flash_data, | ||
52 | }, | ||
53 | .num_resources = 1, | ||
54 | .resource = &edb93xx_flash_resource, | ||
55 | }; | ||
56 | |||
57 | static void __init __edb93xx_register_flash(unsigned int width, | ||
58 | resource_size_t start, resource_size_t size) | ||
59 | { | ||
60 | edb93xx_flash_data.width = width; | ||
61 | edb93xx_flash_resource.start = start; | ||
62 | edb93xx_flash_resource.end = start + size - 1; | ||
63 | |||
64 | platform_device_register(&edb93xx_flash); | ||
65 | } | ||
66 | |||
67 | static void __init edb93xx_register_flash(void) | ||
68 | { | ||
69 | if (machine_is_edb9307() || machine_is_edb9312() || | ||
70 | machine_is_edb9315()) { | ||
71 | __edb93xx_register_flash(4, EP93XX_CS6_PHYS_BASE, SZ_32M); | ||
72 | } else { | ||
73 | __edb93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M); | ||
74 | } | ||
75 | } | ||
76 | |||
77 | static struct ep93xx_eth_data edb93xx_eth_data = { | ||
78 | .phy_id = 1, | ||
79 | }; | ||
80 | |||
81 | static struct i2c_board_info __initdata edb93xxa_i2c_data[] = { | ||
82 | { | ||
83 | I2C_BOARD_INFO("isl1208", 0x6f), | ||
84 | }, | ||
85 | }; | ||
86 | |||
87 | static struct i2c_board_info __initdata edb93xx_i2c_data[] = { | ||
88 | { | ||
89 | I2C_BOARD_INFO("ds1337", 0x68), | ||
90 | }, | ||
91 | }; | ||
92 | |||
93 | static void __init edb93xx_register_i2c(void) | ||
94 | { | ||
95 | if (machine_is_edb9302a() || machine_is_edb9307a() || | ||
96 | machine_is_edb9315a()) { | ||
97 | ep93xx_register_i2c(edb93xxa_i2c_data, | ||
98 | ARRAY_SIZE(edb93xxa_i2c_data)); | ||
99 | } else if (machine_is_edb9307() || machine_is_edb9312() || | ||
100 | machine_is_edb9315()) { | ||
101 | ep93xx_register_i2c(edb93xx_i2c_data, | ||
102 | ARRAY_SIZE(edb93xx_i2c_data)); | ||
103 | } | ||
104 | } | ||
105 | |||
106 | static void __init edb93xx_init_machine(void) | ||
107 | { | ||
108 | ep93xx_init_devices(); | ||
109 | edb93xx_register_flash(); | ||
110 | ep93xx_register_eth(&edb93xx_eth_data, 1); | ||
111 | edb93xx_register_i2c(); | ||
112 | } | ||
113 | |||
114 | |||
115 | #ifdef CONFIG_MACH_EDB9301 | ||
116 | MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board") | ||
117 | /* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */ | ||
118 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
119 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
120 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | ||
121 | .map_io = ep93xx_map_io, | ||
122 | .init_irq = ep93xx_init_irq, | ||
123 | .timer = &ep93xx_timer, | ||
124 | .init_machine = edb93xx_init_machine, | ||
125 | MACHINE_END | ||
126 | #endif | ||
127 | |||
128 | #ifdef CONFIG_MACH_EDB9302 | ||
129 | MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board") | ||
130 | /* Maintainer: George Kashperko <george@chas.com.ua> */ | ||
131 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
132 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
133 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | ||
134 | .map_io = ep93xx_map_io, | ||
135 | .init_irq = ep93xx_init_irq, | ||
136 | .timer = &ep93xx_timer, | ||
137 | .init_machine = edb93xx_init_machine, | ||
138 | MACHINE_END | ||
139 | #endif | ||
140 | |||
141 | #ifdef CONFIG_MACH_EDB9302A | ||
142 | MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board") | ||
143 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
144 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
145 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
146 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, | ||
147 | .map_io = ep93xx_map_io, | ||
148 | .init_irq = ep93xx_init_irq, | ||
149 | .timer = &ep93xx_timer, | ||
150 | .init_machine = edb93xx_init_machine, | ||
151 | MACHINE_END | ||
152 | #endif | ||
153 | |||
154 | #ifdef CONFIG_MACH_EDB9307 | ||
155 | MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board") | ||
156 | /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */ | ||
157 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
158 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
159 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | ||
160 | .map_io = ep93xx_map_io, | ||
161 | .init_irq = ep93xx_init_irq, | ||
162 | .timer = &ep93xx_timer, | ||
163 | .init_machine = edb93xx_init_machine, | ||
164 | MACHINE_END | ||
165 | #endif | ||
166 | |||
167 | #ifdef CONFIG_MACH_EDB9307A | ||
168 | MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board") | ||
169 | /* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */ | ||
170 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
171 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
172 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, | ||
173 | .map_io = ep93xx_map_io, | ||
174 | .init_irq = ep93xx_init_irq, | ||
175 | .timer = &ep93xx_timer, | ||
176 | .init_machine = edb93xx_init_machine, | ||
177 | MACHINE_END | ||
178 | #endif | ||
179 | |||
180 | #ifdef CONFIG_MACH_EDB9312 | ||
181 | MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board") | ||
182 | /* Maintainer: Toufeeq Hussain <toufeeq_hussain@infosys.com> */ | ||
183 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
184 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
185 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | ||
186 | .map_io = ep93xx_map_io, | ||
187 | .init_irq = ep93xx_init_irq, | ||
188 | .timer = &ep93xx_timer, | ||
189 | .init_machine = edb93xx_init_machine, | ||
190 | MACHINE_END | ||
191 | #endif | ||
192 | |||
193 | #ifdef CONFIG_MACH_EDB9315 | ||
194 | MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board") | ||
195 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
196 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
197 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
198 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | ||
199 | .map_io = ep93xx_map_io, | ||
200 | .init_irq = ep93xx_init_irq, | ||
201 | .timer = &ep93xx_timer, | ||
202 | .init_machine = edb93xx_init_machine, | ||
203 | MACHINE_END | ||
204 | #endif | ||
205 | |||
206 | #ifdef CONFIG_MACH_EDB9315A | ||
207 | MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") | ||
208 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
209 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
210 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
211 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, | ||
212 | .map_io = ep93xx_map_io, | ||
213 | .init_irq = ep93xx_init_irq, | ||
214 | .timer = &ep93xx_timer, | ||
215 | .init_machine = edb93xx_init_machine, | ||
216 | MACHINE_END | ||
217 | #endif | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h index 1732de7629a5..967c079180db 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | |||
@@ -147,13 +147,27 @@ | |||
147 | #define EP93XX_PWM_BASE (EP93XX_APB_VIRT_BASE + 0x00110000) | 147 | #define EP93XX_PWM_BASE (EP93XX_APB_VIRT_BASE + 0x00110000) |
148 | 148 | ||
149 | #define EP93XX_RTC_BASE (EP93XX_APB_VIRT_BASE + 0x00120000) | 149 | #define EP93XX_RTC_BASE (EP93XX_APB_VIRT_BASE + 0x00120000) |
150 | #define EP93XX_RTC_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00120000) | ||
150 | 151 | ||
151 | #define EP93XX_SYSCON_BASE (EP93XX_APB_VIRT_BASE + 0x00130000) | 152 | #define EP93XX_SYSCON_BASE (EP93XX_APB_VIRT_BASE + 0x00130000) |
152 | #define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x)) | 153 | #define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x)) |
153 | #define EP93XX_SYSCON_POWER_STATE EP93XX_SYSCON_REG(0x00) | 154 | #define EP93XX_SYSCON_POWER_STATE EP93XX_SYSCON_REG(0x00) |
154 | #define EP93XX_SYSCON_CLOCK_CONTROL EP93XX_SYSCON_REG(0x04) | 155 | #define EP93XX_SYSCON_PWRCNT EP93XX_SYSCON_REG(0x04) |
155 | #define EP93XX_SYSCON_CLOCK_UARTBAUD 0x20000000 | 156 | #define EP93XX_SYSCON_PWRCNT_FIR_EN (1<<31) |
156 | #define EP93XX_SYSCON_CLOCK_USH_EN 0x10000000 | 157 | #define EP93XX_SYSCON_PWRCNT_UARTBAUD (1<<29) |
158 | #define EP93XX_SYSCON_PWRCNT_USH_EN (1<<28) | ||
159 | #define EP93XX_SYSCON_PWRCNT_DMA_M2M1 (1<<27) | ||
160 | #define EP93XX_SYSCON_PWRCNT_DMA_M2M0 (1<<26) | ||
161 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P8 (1<<25) | ||
162 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P9 (1<<24) | ||
163 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P6 (1<<23) | ||
164 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P7 (1<<22) | ||
165 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P4 (1<<21) | ||
166 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P5 (1<<20) | ||
167 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P2 (1<<19) | ||
168 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P3 (1<<18) | ||
169 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P0 (1<<17) | ||
170 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P1 (1<<16) | ||
157 | #define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08) | 171 | #define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08) |
158 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) | 172 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) |
159 | #define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20) | 173 | #define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20) |
diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h index 5c80c3c8158d..925b12ea0990 100644 --- a/arch/arm/mach-ep93xx/include/mach/memory.h +++ b/arch/arm/mach-ep93xx/include/mach/memory.h | |||
@@ -5,6 +5,12 @@ | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | 5 | #ifndef __ASM_ARCH_MEMORY_H |
6 | #define __ASM_ARCH_MEMORY_H | 6 | #define __ASM_ARCH_MEMORY_H |
7 | 7 | ||
8 | #if defined(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) | ||
8 | #define PHYS_OFFSET UL(0x00000000) | 9 | #define PHYS_OFFSET UL(0x00000000) |
10 | #elif defined(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) | ||
11 | #define PHYS_OFFSET UL(0xc0000000) | ||
12 | #else | ||
13 | #error "Kconfig bug: No EP93xx PHYS_OFFSET set" | ||
14 | #endif | ||
9 | 15 | ||
10 | #endif | 16 | #endif |