aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf533
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2009-09-09 06:46:19 -0400
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:45 -0500
commit6bd1fbea2e8bff9346a5afb44ca948b4e4ed74a5 (patch)
tree87019fd6c4fb46bc64d6f0ddaaac32179a6af7e6 /arch/blackfin/mach-bf533
parent57d54889cd00db2752994b389ba714138652e60c (diff)
Blackfin: move on-chip UART resources to boards files
Rather than keeping the pins in the actual driver and worrying about a mess of Kconfig options, declare all the desired pin resources in the boards file. This lets people easily select the specific pins/ports for the normal UART as well as GPIOs for CTS/RTS. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf533')
-rw-r--r--arch/blackfin/mach-bf533/boards/H8606.c47
-rw-r--r--arch/blackfin/mach-bf533/boards/blackstamp.c47
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c47
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c47
-rw-r--r--arch/blackfin/mach-bf533/boards/ip0x.c48
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c47
6 files changed, 235 insertions, 48 deletions
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index 4adceb0bdb6d..cb3b74f32346 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -257,21 +257,50 @@ static struct platform_device bfin_spi0_device = {
257#endif /* spi master and devices */ 257#endif /* spi master and devices */
258 258
259#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 259#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
260static struct resource bfin_uart_resources[] = { 260#ifdef CONFIG_SERIAL_BFIN_UART0
261static struct resource bfin_uart0_resources[] = {
261 { 262 {
262 .start = 0xFFC00400, 263 .start = BFIN_UART_THR,
263 .end = 0xFFC004FF, 264 .end = BFIN_UART_GCTL+2,
264 .flags = IORESOURCE_MEM, 265 .flags = IORESOURCE_MEM,
265 }, 266 },
267 {
268 .start = IRQ_UART0_RX,
269 .end = IRQ_UART0_RX + 1,
270 .flags = IORESOURCE_IRQ,
271 },
272 {
273 .start = IRQ_UART0_ERROR,
274 .end = IRQ_UART0_ERROR,
275 .flags = IORESOURCE_IRQ,
276 },
277 {
278 .start = CH_UART0_TX,
279 .end = CH_UART0_TX,
280 .flags = IORESOURCE_DMA,
281 },
282 {
283 .start = CH_UART0_RX,
284 .end = CH_UART0_RX,
285 .flags = IORESOURCE_DMA,
286 },
287};
288
289unsigned short bfin_uart0_peripherals[] = {
290 P_UART0_TX, P_UART0_RX, 0
266}; 291};
267 292
268static struct platform_device bfin_uart_device = { 293static struct platform_device bfin_uart0_device = {
269 .name = "bfin-uart", 294 .name = "bfin-uart",
270 .id = 1, 295 .id = 0,
271 .num_resources = ARRAY_SIZE(bfin_uart_resources), 296 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
272 .resource = bfin_uart_resources, 297 .resource = bfin_uart0_resources,
298 .dev = {
299 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
300 },
273}; 301};
274#endif 302#endif
303#endif
275 304
276#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 305#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
277#ifdef CONFIG_BFIN_SIR0 306#ifdef CONFIG_BFIN_SIR0
@@ -394,7 +423,9 @@ static struct platform_device *h8606_devices[] __initdata = {
394#endif 423#endif
395 424
396#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 425#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
397 &bfin_uart_device, 426#ifdef CONFIG_SERIAL_BFIN_UART0
427 &bfin_uart0_device,
428#endif
398#endif 429#endif
399 430
400#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) 431#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c
index b580884848d4..50ce3ecfdcb2 100644
--- a/arch/blackfin/mach-bf533/boards/blackstamp.c
+++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
@@ -195,21 +195,50 @@ static struct platform_device bfin_spi0_device = {
195#endif /* spi master and devices */ 195#endif /* spi master and devices */
196 196
197#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 197#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
198static struct resource bfin_uart_resources[] = { 198#ifdef CONFIG_SERIAL_BFIN_UART0
199static struct resource bfin_uart0_resources[] = {
199 { 200 {
200 .start = 0xFFC00400, 201 .start = BFIN_UART_THR,
201 .end = 0xFFC004FF, 202 .end = BFIN_UART_GCTL+2,
202 .flags = IORESOURCE_MEM, 203 .flags = IORESOURCE_MEM,
203 }, 204 },
205 {
206 .start = IRQ_UART0_RX,
207 .end = IRQ_UART0_RX + 1,
208 .flags = IORESOURCE_IRQ,
209 },
210 {
211 .start = IRQ_UART0_ERROR,
212 .end = IRQ_UART0_ERROR,
213 .flags = IORESOURCE_IRQ,
214 },
215 {
216 .start = CH_UART0_TX,
217 .end = CH_UART0_TX,
218 .flags = IORESOURCE_DMA,
219 },
220 {
221 .start = CH_UART0_RX,
222 .end = CH_UART0_RX,
223 .flags = IORESOURCE_DMA,
224 },
225};
226
227unsigned short bfin_uart0_peripherals[] = {
228 P_UART0_TX, P_UART0_RX, 0
204}; 229};
205 230
206static struct platform_device bfin_uart_device = { 231static struct platform_device bfin_uart0_device = {
207 .name = "bfin-uart", 232 .name = "bfin-uart",
208 .id = 1, 233 .id = 0,
209 .num_resources = ARRAY_SIZE(bfin_uart_resources), 234 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
210 .resource = bfin_uart_resources, 235 .resource = bfin_uart0_resources,
236 .dev = {
237 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
238 },
211}; 239};
212#endif 240#endif
241#endif
213 242
214#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 243#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
215#ifdef CONFIG_BFIN_SIR0 244#ifdef CONFIG_BFIN_SIR0
@@ -344,7 +373,9 @@ static struct platform_device *stamp_devices[] __initdata = {
344#endif 373#endif
345 374
346#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 375#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
347 &bfin_uart_device, 376#ifdef CONFIG_SERIAL_BFIN_UART0
377 &bfin_uart0_device,
378#endif
348#endif 379#endif
349 380
350#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 381#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index 7fc3b860d4ae..f707faf8a864 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -242,21 +242,50 @@ static struct platform_device smsc911x_device = {
242#endif 242#endif
243 243
244#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 244#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
245static struct resource bfin_uart_resources[] = { 245#ifdef CONFIG_SERIAL_BFIN_UART0
246static struct resource bfin_uart0_resources[] = {
246 { 247 {
247 .start = 0xFFC00400, 248 .start = BFIN_UART_THR,
248 .end = 0xFFC004FF, 249 .end = BFIN_UART_GCTL+2,
249 .flags = IORESOURCE_MEM, 250 .flags = IORESOURCE_MEM,
250 }, 251 },
252 {
253 .start = IRQ_UART0_RX,
254 .end = IRQ_UART0_RX + 1,
255 .flags = IORESOURCE_IRQ,
256 },
257 {
258 .start = IRQ_UART0_ERROR,
259 .end = IRQ_UART0_ERROR,
260 .flags = IORESOURCE_IRQ,
261 },
262 {
263 .start = CH_UART0_TX,
264 .end = CH_UART0_TX,
265 .flags = IORESOURCE_DMA,
266 },
267 {
268 .start = CH_UART0_RX,
269 .end = CH_UART0_RX,
270 .flags = IORESOURCE_DMA,
271 },
272};
273
274unsigned short bfin_uart0_peripherals[] = {
275 P_UART0_TX, P_UART0_RX, 0
251}; 276};
252 277
253static struct platform_device bfin_uart_device = { 278static struct platform_device bfin_uart0_device = {
254 .name = "bfin-uart", 279 .name = "bfin-uart",
255 .id = 1, 280 .id = 0,
256 .num_resources = ARRAY_SIZE(bfin_uart_resources), 281 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
257 .resource = bfin_uart_resources, 282 .resource = bfin_uart0_resources,
283 .dev = {
284 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
285 },
258}; 286};
259#endif 287#endif
288#endif
260 289
261#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 290#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
262#ifdef CONFIG_BFIN_SIR0 291#ifdef CONFIG_BFIN_SIR0
@@ -432,7 +461,9 @@ static struct platform_device *cm_bf533_devices[] __initdata = {
432 &bfin_dpmc, 461 &bfin_dpmc,
433 462
434#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 463#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
435 &bfin_uart_device, 464#ifdef CONFIG_SERIAL_BFIN_UART0
465 &bfin_uart0_device,
466#endif
436#endif 467#endif
437 468
438#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 469#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index d4689dcc198e..50392476722a 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -320,21 +320,50 @@ static struct platform_device bfin_spi0_device = {
320#endif /* spi master and devices */ 320#endif /* spi master and devices */
321 321
322#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 322#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
323static struct resource bfin_uart_resources[] = { 323#ifdef CONFIG_SERIAL_BFIN_UART0
324static struct resource bfin_uart0_resources[] = {
324 { 325 {
325 .start = 0xFFC00400, 326 .start = BFIN_UART_THR,
326 .end = 0xFFC004FF, 327 .end = BFIN_UART_GCTL+2,
327 .flags = IORESOURCE_MEM, 328 .flags = IORESOURCE_MEM,
328 }, 329 },
330 {
331 .start = IRQ_UART0_RX,
332 .end = IRQ_UART0_RX + 1,
333 .flags = IORESOURCE_IRQ,
334 },
335 {
336 .start = IRQ_UART0_ERROR,
337 .end = IRQ_UART0_ERROR,
338 .flags = IORESOURCE_IRQ,
339 },
340 {
341 .start = CH_UART0_TX,
342 .end = CH_UART0_TX,
343 .flags = IORESOURCE_DMA,
344 },
345 {
346 .start = CH_UART0_RX,
347 .end = CH_UART0_RX,
348 .flags = IORESOURCE_DMA,
349 },
350};
351
352unsigned short bfin_uart0_peripherals[] = {
353 P_UART0_TX, P_UART0_RX, 0
329}; 354};
330 355
331static struct platform_device bfin_uart_device = { 356static struct platform_device bfin_uart0_device = {
332 .name = "bfin-uart", 357 .name = "bfin-uart",
333 .id = 1, 358 .id = 0,
334 .num_resources = ARRAY_SIZE(bfin_uart_resources), 359 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
335 .resource = bfin_uart_resources, 360 .resource = bfin_uart0_resources,
361 .dev = {
362 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
363 },
336}; 364};
337#endif 365#endif
366#endif
338 367
339#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 368#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
340#ifdef CONFIG_BFIN_SIR0 369#ifdef CONFIG_BFIN_SIR0
@@ -471,7 +500,9 @@ static struct platform_device *ezkit_devices[] __initdata = {
471#endif 500#endif
472 501
473#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 502#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
474 &bfin_uart_device, 503#ifdef CONFIG_SERIAL_BFIN_UART0
504 &bfin_uart0_device,
505#endif
475#endif 506#endif
476 507
477#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 508#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
diff --git a/arch/blackfin/mach-bf533/boards/ip0x.c b/arch/blackfin/mach-bf533/boards/ip0x.c
index 8ec42ba35b9e..a60d0369ceb7 100644
--- a/arch/blackfin/mach-bf533/boards/ip0x.c
+++ b/arch/blackfin/mach-bf533/boards/ip0x.c
@@ -19,6 +19,7 @@
19#include <linux/usb/isp1362.h> 19#include <linux/usb/isp1362.h>
20#endif 20#endif
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/dma.h>
22#include <asm/bfin5xx_spi.h> 23#include <asm/bfin5xx_spi.h>
23#include <asm/portmux.h> 24#include <asm/portmux.h>
24 25
@@ -143,21 +144,50 @@ static struct platform_device spi_bfin_master_device = {
143#endif /* spi master and devices */ 144#endif /* spi master and devices */
144 145
145#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 146#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
146static struct resource bfin_uart_resources[] = { 147#ifdef CONFIG_SERIAL_BFIN_UART0
148static struct resource bfin_uart0_resources[] = {
147 { 149 {
148 .start = 0xFFC00400, 150 .start = BFIN_UART_THR,
149 .end = 0xFFC004FF, 151 .end = BFIN_UART_GCTL+2,
150 .flags = IORESOURCE_MEM, 152 .flags = IORESOURCE_MEM,
151 }, 153 },
154 {
155 .start = IRQ_UART0_RX,
156 .end = IRQ_UART0_RX + 1,
157 .flags = IORESOURCE_IRQ,
158 },
159 {
160 .start = IRQ_UART0_ERROR,
161 .end = IRQ_UART0_ERROR,
162 .flags = IORESOURCE_IRQ,
163 },
164 {
165 .start = CH_UART0_TX,
166 .end = CH_UART0_TX,
167 .flags = IORESOURCE_DMA,
168 },
169 {
170 .start = CH_UART0_RX,
171 .end = CH_UART0_RX,
172 .flags = IORESOURCE_DMA,
173 },
174};
175
176unsigned short bfin_uart0_peripherals[] = {
177 P_UART0_TX, P_UART0_RX, 0
152}; 178};
153 179
154static struct platform_device bfin_uart_device = { 180static struct platform_device bfin_uart0_device = {
155 .name = "bfin-uart", 181 .name = "bfin-uart",
156 .id = 1, 182 .id = 0,
157 .num_resources = ARRAY_SIZE(bfin_uart_resources), 183 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
158 .resource = bfin_uart_resources, 184 .resource = bfin_uart0_resources,
185 .dev = {
186 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
187 },
159}; 188};
160#endif 189#endif
190#endif
161 191
162#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 192#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
163#ifdef CONFIG_BFIN_SIR0 193#ifdef CONFIG_BFIN_SIR0
@@ -241,7 +271,9 @@ static struct platform_device *ip0x_devices[] __initdata = {
241#endif 271#endif
242 272
243#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 273#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
244 &bfin_uart_device, 274#ifdef CONFIG_SERIAL_BFIN_UART0
275 &bfin_uart0_device,
276#endif
245#endif 277#endif
246 278
247#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 279#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 6d68dcfa2da2..2683e5f2294f 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -322,21 +322,50 @@ static struct platform_device bfin_spi0_device = {
322#endif /* spi master and devices */ 322#endif /* spi master and devices */
323 323
324#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 324#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
325static struct resource bfin_uart_resources[] = { 325#ifdef CONFIG_SERIAL_BFIN_UART0
326static struct resource bfin_uart0_resources[] = {
326 { 327 {
327 .start = 0xFFC00400, 328 .start = BFIN_UART_THR,
328 .end = 0xFFC004FF, 329 .end = BFIN_UART_GCTL+2,
329 .flags = IORESOURCE_MEM, 330 .flags = IORESOURCE_MEM,
330 }, 331 },
332 {
333 .start = IRQ_UART0_RX,
334 .end = IRQ_UART0_RX + 1,
335 .flags = IORESOURCE_IRQ,
336 },
337 {
338 .start = IRQ_UART0_ERROR,
339 .end = IRQ_UART0_ERROR,
340 .flags = IORESOURCE_IRQ,
341 },
342 {
343 .start = CH_UART0_TX,
344 .end = CH_UART0_TX,
345 .flags = IORESOURCE_DMA,
346 },
347 {
348 .start = CH_UART0_RX,
349 .end = CH_UART0_RX,
350 .flags = IORESOURCE_DMA,
351 },
352};
353
354unsigned short bfin_uart0_peripherals[] = {
355 P_UART0_TX, P_UART0_RX, 0
331}; 356};
332 357
333static struct platform_device bfin_uart_device = { 358static struct platform_device bfin_uart0_device = {
334 .name = "bfin-uart", 359 .name = "bfin-uart",
335 .id = 1, 360 .id = 0,
336 .num_resources = ARRAY_SIZE(bfin_uart_resources), 361 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
337 .resource = bfin_uart_resources, 362 .resource = bfin_uart0_resources,
363 .dev = {
364 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
365 },
338}; 366};
339#endif 367#endif
368#endif
340 369
341#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 370#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
342#ifdef CONFIG_BFIN_SIR0 371#ifdef CONFIG_BFIN_SIR0
@@ -495,7 +524,9 @@ static struct platform_device *stamp_devices[] __initdata = {
495#endif 524#endif
496 525
497#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 526#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
498 &bfin_uart_device, 527#ifdef CONFIG_SERIAL_BFIN_UART0
528 &bfin_uart0_device,
529#endif
499#endif 530#endif
500 531
501#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 532#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)