OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Only display areas with differencesIgnore whitespace
Rev 2 Rev 3
1 --- a/arch/mips/bcm63xx/Makefile 1 --- a/arch/mips/bcm63xx/Makefile
2 +++ b/arch/mips/bcm63xx/Makefile 2 +++ b/arch/mips/bcm63xx/Makefile
3 @@ -1,6 +1,6 @@ 3 @@ -1,6 +1,6 @@
4 obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \ 4 obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
5 setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ 5 setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
6 - dev-rng.o dev-uart.o dev-wdt.o \ 6 - dev-pcmcia.o dev-rng.o dev-uart.o \
7 + dev-rng.o dev-wdt.o \ 7 + dev-pcmcia.o dev-rng.o \
8 dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o \ 8 dev-wdt.o dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o \
9 sprom.o 9 usb-common.o sprom.o
10 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 10 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
11 --- a/arch/mips/bcm63xx/dev-uart.c 11 --- a/arch/mips/bcm63xx/dev-uart.c
12 +++ /dev/null 12 +++ /dev/null
13 @@ -1,76 +0,0 @@ 13 @@ -1,76 +0,0 @@
14 -/* 14 -/*
15 - * This file is subject to the terms and conditions of the GNU General Public 15 - * This file is subject to the terms and conditions of the GNU General Public
16 - * License. See the file "COPYING" in the main directory of this archive 16 - * License. See the file "COPYING" in the main directory of this archive
17 - * for more details. 17 - * for more details.
18 - * 18 - *
19 - * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr> 19 - * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
20 - */ 20 - */
21 - 21 -
22 -#include <linux/init.h> 22 -#include <linux/init.h>
23 -#include <linux/kernel.h> 23 -#include <linux/kernel.h>
24 -#include <linux/platform_device.h> 24 -#include <linux/platform_device.h>
25 -#include <bcm63xx_cpu.h> 25 -#include <bcm63xx_cpu.h>
26 - 26 -
27 -static struct resource uart0_resources[] = { 27 -static struct resource uart0_resources[] = {
28 - { 28 - {
29 - /* start & end filled at runtime */ 29 - /* start & end filled at runtime */
30 - .flags = IORESOURCE_MEM, 30 - .flags = IORESOURCE_MEM,
31 - }, 31 - },
32 - { 32 - {
33 - /* start filled at runtime */ 33 - /* start filled at runtime */
34 - .flags = IORESOURCE_IRQ, 34 - .flags = IORESOURCE_IRQ,
35 - }, 35 - },
36 -}; 36 -};
37 - 37 -
38 -static struct resource uart1_resources[] = { 38 -static struct resource uart1_resources[] = {
39 - { 39 - {
40 - /* start & end filled at runtime */ 40 - /* start & end filled at runtime */
41 - .flags = IORESOURCE_MEM, 41 - .flags = IORESOURCE_MEM,
42 - }, 42 - },
43 - { 43 - {
44 - /* start filled at runtime */ 44 - /* start filled at runtime */
45 - .flags = IORESOURCE_IRQ, 45 - .flags = IORESOURCE_IRQ,
46 - }, 46 - },
47 -}; 47 -};
48 - 48 -
49 -static struct platform_device bcm63xx_uart_devices[] = { 49 -static struct platform_device bcm63xx_uart_devices[] = {
50 - { 50 - {
51 - .name = "bcm63xx_uart", 51 - .name = "bcm63xx_uart",
52 - .id = 0, 52 - .id = 0,
53 - .num_resources = ARRAY_SIZE(uart0_resources), 53 - .num_resources = ARRAY_SIZE(uart0_resources),
54 - .resource = uart0_resources, 54 - .resource = uart0_resources,
55 - }, 55 - },
56 - 56 -
57 - { 57 - {
58 - .name = "bcm63xx_uart", 58 - .name = "bcm63xx_uart",
59 - .id = 1, 59 - .id = 1,
60 - .num_resources = ARRAY_SIZE(uart1_resources), 60 - .num_resources = ARRAY_SIZE(uart1_resources),
61 - .resource = uart1_resources, 61 - .resource = uart1_resources,
62 - } 62 - }
63 -}; 63 -};
64 - 64 -
65 -int __init bcm63xx_uart_register(unsigned int id) 65 -int __init bcm63xx_uart_register(unsigned int id)
66 -{ 66 -{
67 - if (id >= ARRAY_SIZE(bcm63xx_uart_devices)) 67 - if (id >= ARRAY_SIZE(bcm63xx_uart_devices))
68 - return -ENODEV; 68 - return -ENODEV;
69 - 69 -
70 - if (id == 1 && (!BCMCPU_IS_3368() && !BCMCPU_IS_6358() && 70 - if (id == 1 && (!BCMCPU_IS_3368() && !BCMCPU_IS_6358() &&
71 - !BCMCPU_IS_6368())) 71 - !BCMCPU_IS_6368()))
72 - return -ENODEV; 72 - return -ENODEV;
73 - 73 -
74 - if (id == 0) { 74 - if (id == 0) {
75 - uart0_resources[0].start = bcm63xx_regset_address(RSET_UART0); 75 - uart0_resources[0].start = bcm63xx_regset_address(RSET_UART0);
76 - uart0_resources[0].end = uart0_resources[0].start + 76 - uart0_resources[0].end = uart0_resources[0].start +
77 - RSET_UART_SIZE - 1; 77 - RSET_UART_SIZE - 1;
78 - uart0_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0); 78 - uart0_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0);
79 - } 79 - }
80 - 80 -
81 - if (id == 1) { 81 - if (id == 1) {
82 - uart1_resources[0].start = bcm63xx_regset_address(RSET_UART1); 82 - uart1_resources[0].start = bcm63xx_regset_address(RSET_UART1);
83 - uart1_resources[0].end = uart1_resources[0].start + 83 - uart1_resources[0].end = uart1_resources[0].start +
84 - RSET_UART_SIZE - 1; 84 - RSET_UART_SIZE - 1;
85 - uart1_resources[1].start = bcm63xx_get_irq_number(IRQ_UART1); 85 - uart1_resources[1].start = bcm63xx_get_irq_number(IRQ_UART1);
86 - } 86 - }
87 - 87 -
88 - return platform_device_register(&bcm63xx_uart_devices[id]); 88 - return platform_device_register(&bcm63xx_uart_devices[id]);
89 -} 89 -}
90 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h 90 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h
91 +++ /dev/null 91 +++ /dev/null
92 @@ -1,6 +0,0 @@ 92 @@ -1,6 +0,0 @@
93 -#ifndef BCM63XX_DEV_UART_H_ 93 -#ifndef BCM63XX_DEV_UART_H_
94 -#define BCM63XX_DEV_UART_H_ 94 -#define BCM63XX_DEV_UART_H_
95 - 95 -
96 -int bcm63xx_uart_register(unsigned int id); 96 -int bcm63xx_uart_register(unsigned int id);
97 - 97 -
98 -#endif /* BCM63XX_DEV_UART_H_ */ 98 -#endif /* BCM63XX_DEV_UART_H_ */
99 --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h 99 --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
100 +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h 100 +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
101 @@ -31,8 +31,6 @@ struct board_info { 101 @@ -33,8 +33,6 @@ struct board_info {
102 unsigned int has_ohci0:1; -  
103 unsigned int has_ehci0:1; 102 unsigned int has_ehci0:1;
104 unsigned int has_usbd:1; 103 unsigned int has_usbd:1;
-   104 unsigned int has_dsp:1;
105 - unsigned int has_uart0:1; 105 - unsigned int has_uart0:1;
106 - unsigned int has_uart1:1; 106 - unsigned int has_uart1:1;
107 unsigned int use_fallback_sprom:1; 107 unsigned int use_fallback_sprom:1;
108 108
109 /* ethernet config */ 109 /* ethernet config */
110 --- a/arch/mips/bcm63xx/boards/board_common.c 110 --- a/arch/mips/bcm63xx/boards/board_common.c
111 +++ b/arch/mips/bcm63xx/boards/board_common.c 111 +++ b/arch/mips/bcm63xx/boards/board_common.c
112 @@ -20,7 +20,6 @@ 112 @@ -20,7 +20,6 @@
113 #include <asm/prom.h> 113 #include <asm/prom.h>
114 #include <bcm63xx_board.h> 114 #include <bcm63xx_board.h>
115 #include <bcm63xx_cpu.h> 115 #include <bcm63xx_cpu.h>
116 -#include <bcm63xx_dev_uart.h> 116 -#include <bcm63xx_dev_uart.h>
117 #include <bcm63xx_regs.h> 117 #include <bcm63xx_regs.h>
118 #include <bcm63xx_io.h> 118 #include <bcm63xx_io.h>
119 #include <bcm63xx_gpio.h> 119 #include <bcm63xx_gpio.h>
120 @@ -188,12 +187,6 @@ int __init board_register_devices(void) 120 @@ -189,12 +188,6 @@ int __init board_register_devices(void)
121 121
122 bcm63xx_gpio_init(); 122 bcm63xx_gpio_init();
123 123
124 - if (board.has_uart0) 124 - if (board.has_uart0)
125 - bcm63xx_uart_register(0); 125 - bcm63xx_uart_register(0);
126 - 126 -
127 - if (board.has_uart1) 127 - if (board.has_uart1)
128 - bcm63xx_uart_register(1); 128 - bcm63xx_uart_register(1);
129 - 129 -
130 if (board.has_pccard) 130 if (board.has_pccard)
131 bcm63xx_pcmcia_register(); 131 bcm63xx_pcmcia_register();
132 132
133 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 133 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
134 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 134 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
135 @@ -35,9 +35,6 @@ static struct board_info __initdata boar 135 @@ -35,9 +35,6 @@ static struct board_info __initdata boar
136 .name = "CVG834G_E15R3921", 136 .name = "CVG834G_E15R3921",
137 .expected_cpu_id = 0x3368, 137 .expected_cpu_id = 0x3368,
138 138
139 - .has_uart0 = 1, 139 - .has_uart0 = 1,
140 - .has_uart1 = 1, 140 - .has_uart1 = 1,
141 - 141 -
142 .has_enet0 = 1, 142 .has_enet0 = 1,
143 .has_pci = 1, 143 .has_pci = 1,
144 144
145 @@ -67,7 +64,6 @@ static struct board_info __initdata boar 145 @@ -67,7 +64,6 @@ static struct board_info __initdata boar
146 .name = "96328avng", 146 .name = "96328avng",
147 .expected_cpu_id = 0x6328, 147 .expected_cpu_id = 0x6328,
148 148
149 - .has_uart0 = 1, 149 - .has_uart0 = 1,
150 .has_pci = 1, 150 .has_pci = 1,
151 .has_usbd = 0, 151 .has_usbd = 0,
152 .use_fallback_sprom = 1, 152 .use_fallback_sprom = 1,
153 @@ -116,7 +112,6 @@ static struct board_info __initdata boar 153 @@ -116,7 +112,6 @@ static struct board_info __initdata boar
154 .name = "96338GW", 154 .name = "96338GW",
155 .expected_cpu_id = 0x6338, 155 .expected_cpu_id = 0x6338,
156 156
157 - .has_uart0 = 1, 157 - .has_uart0 = 1,
158 .has_enet0 = 1, 158 .has_enet0 = 1,
159 .enet0 = { 159 .enet0 = {
160 .force_speed_100 = 1, 160 .force_speed_100 = 1,
161 @@ -159,7 +154,6 @@ static struct board_info __initdata boar 161 @@ -159,7 +154,6 @@ static struct board_info __initdata boar
162 .name = "96338W", 162 .name = "96338W",
163 .expected_cpu_id = 0x6338, 163 .expected_cpu_id = 0x6338,
164 164
165 - .has_uart0 = 1, 165 - .has_uart0 = 1,
166 .has_enet0 = 1, 166 .has_enet0 = 1,
167 .enet0 = { 167 .enet0 = {
168 .force_speed_100 = 1, 168 .force_speed_100 = 1,
169 @@ -204,8 +198,6 @@ static struct board_info __initdata boar 169 @@ -204,8 +198,6 @@ static struct board_info __initdata boar
170 static struct board_info __initdata board_96345gw2 = { 170 static struct board_info __initdata board_96345gw2 = {
171 .name = "96345GW2", 171 .name = "96345GW2",
172 .expected_cpu_id = 0x6345, 172 .expected_cpu_id = 0x6345,
173 - 173 -
174 - .has_uart0 = 1, 174 - .has_uart0 = 1,
175 }; 175 };
176 #endif 176 #endif
177 177
178 @@ -217,7 +209,6 @@ static struct board_info __initdata boar 178 @@ -217,7 +209,6 @@ static struct board_info __initdata boar
179 .name = "96348R", 179 .name = "96348R",
180 .expected_cpu_id = 0x6348, 180 .expected_cpu_id = 0x6348,
181 181
182 - .has_uart0 = 1, 182 - .has_uart0 = 1,
183 .has_enet0 = 1, 183 .has_enet0 = 1,
184 .has_pci = 1, 184 .has_pci = 1,
185 .use_fallback_sprom = 1, 185 .use_fallback_sprom = 1,
186 @@ -262,7 +253,6 @@ static struct board_info __initdata boar 186 @@ -262,7 +253,6 @@ static struct board_info __initdata boar
187 .name = "96348GW-10", 187 .name = "96348GW-10",
188 .expected_cpu_id = 0x6348, 188 .expected_cpu_id = 0x6348,
189 189
190 - .has_uart0 = 1, 190 - .has_uart0 = 1,
191 .has_enet0 = 1, 191 .has_enet0 = 1,
192 .has_enet1 = 1, 192 .has_enet1 = 1,
193 .has_pci = 1, 193 .has_pci = 1,
194 @@ -315,7 +305,6 @@ static struct board_info __initdata boar 194 @@ -323,7 +313,6 @@ static struct board_info __initdata boar
195 .name = "96348GW-11", 195 .name = "96348GW-11",
196 .expected_cpu_id = 0x6348, 196 .expected_cpu_id = 0x6348,
197 197
198 - .has_uart0 = 1, 198 - .has_uart0 = 1,
199 .has_enet0 = 1, 199 .has_enet0 = 1,
200 .has_enet1 = 1, 200 .has_enet1 = 1,
201 .has_pci = 1, 201 .has_pci = 1,
202 @@ -370,7 +359,6 @@ static struct board_info __initdata boar 202 @@ -378,7 +367,6 @@ static struct board_info __initdata boar
203 .name = "96348GW", 203 .name = "96348GW",
204 .expected_cpu_id = 0x6348, 204 .expected_cpu_id = 0x6348,
205 205
206 - .has_uart0 = 1, 206 - .has_uart0 = 1,
207 .has_enet0 = 1, 207 .has_enet0 = 1,
208 .has_enet1 = 1, 208 .has_enet1 = 1,
209 .has_pci = 1, 209 .has_pci = 1,
210 @@ -421,7 +409,6 @@ static struct board_info __initdata boar 210 @@ -437,7 +425,6 @@ static struct board_info __initdata boar
211 .name = "F@ST2404", 211 .name = "F@ST2404",
212 .expected_cpu_id = 0x6348, 212 .expected_cpu_id = 0x6348,
213 213
214 - .has_uart0 = 1, 214 - .has_uart0 = 1,
215 .has_enet0 = 1, 215 .has_enet0 = 1,
216 .has_enet1 = 1, 216 .has_enet1 = 1,
217 .has_pci = 1, 217 .has_pci = 1,
218 @@ -466,7 +453,6 @@ static struct board_info __initdata boar 218 @@ -482,7 +469,6 @@ static struct board_info __initdata boar
219 .name = "DV201AMR", 219 .name = "DV201AMR",
220 .expected_cpu_id = 0x6348, 220 .expected_cpu_id = 0x6348,
221 221
222 - .has_uart0 = 1, 222 - .has_uart0 = 1,
223 .has_pci = 1, 223 .has_pci = 1,
224 .use_fallback_sprom = 1, 224 .use_fallback_sprom = 1,
225 .has_ohci0 = 1, 225 .has_ohci0 = 1,
226 @@ -487,7 +473,6 @@ static struct board_info __initdata boar 226 @@ -503,7 +489,6 @@ static struct board_info __initdata boar
227 .name = "96348GW-A", 227 .name = "96348GW-A",
228 .expected_cpu_id = 0x6348, 228 .expected_cpu_id = 0x6348,
229 229
230 - .has_uart0 = 1, 230 - .has_uart0 = 1,
231 .has_enet0 = 1, 231 .has_enet0 = 1,
232 .has_enet1 = 1, 232 .has_enet1 = 1,
233 .has_pci = 1, 233 .has_pci = 1,
234 @@ -514,7 +499,6 @@ static struct board_info __initdata boar 234 @@ -530,7 +515,6 @@ static struct board_info __initdata boar
235 .name = "96358VW", 235 .name = "96358VW",
236 .expected_cpu_id = 0x6358, 236 .expected_cpu_id = 0x6358,
237 237
238 - .has_uart0 = 1, 238 - .has_uart0 = 1,
239 .has_enet0 = 1, 239 .has_enet0 = 1,
240 .has_enet1 = 1, 240 .has_enet1 = 1,
241 .has_pci = 1, 241 .has_pci = 1,
242 @@ -567,7 +551,6 @@ static struct board_info __initdata boar 242 @@ -583,7 +567,6 @@ static struct board_info __initdata boar
243 .name = "96358VW2", 243 .name = "96358VW2",
244 .expected_cpu_id = 0x6358, 244 .expected_cpu_id = 0x6358,
245 245
246 - .has_uart0 = 1, 246 - .has_uart0 = 1,
247 .has_enet0 = 1, 247 .has_enet0 = 1,
248 .has_enet1 = 1, 248 .has_enet1 = 1,
249 .has_pci = 1, 249 .has_pci = 1,
250 @@ -617,7 +600,6 @@ static struct board_info __initdata boar 250 @@ -633,7 +616,6 @@ static struct board_info __initdata boar
251 .name = "AGPF-S0", 251 .name = "AGPF-S0",
252 .expected_cpu_id = 0x6358, 252 .expected_cpu_id = 0x6358,
253 253
254 - .has_uart0 = 1, 254 - .has_uart0 = 1,
255 .has_enet0 = 1, 255 .has_enet0 = 1,
256 .has_enet1 = 1, 256 .has_enet1 = 1,
257 .has_pci = 1, 257 .has_pci = 1,
258   258