diff options
author | Graf Yang <graf.yang@analog.com> | 2008-04-24 15:09:15 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-04-24 15:09:15 -0400 |
commit | 5be36d22b28f01e5074f78b29aa6128da0a53641 (patch) | |
tree | 1fda8bcb0680eda6a826fc3753ee8c9f52a2c75b /arch/blackfin/mach-bf537 | |
parent | 37b6972ad8fb08d438fd600888aff212b1b193b0 (diff) |
[Blackfin] arch: add Blackfin on-chip SIR IrDA driver support
- add platform device resources in board files
- add new bfin_sir.h to each machines
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-bf537')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/cm_bf537.c | 30 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/generic_board.c | 30 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/minotaur.c | 30 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/pnav10.c | 29 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 30 |
5 files changed, 149 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c index 199fde69b964..d8a23cd9b9ed 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c | |||
@@ -325,6 +325,32 @@ static struct platform_device bfin_uart_device = { | |||
325 | }; | 325 | }; |
326 | #endif | 326 | #endif |
327 | 327 | ||
328 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
329 | static struct resource bfin_sir_resources[] = { | ||
330 | #ifdef CONFIG_BFIN_SIR0 | ||
331 | { | ||
332 | .start = 0xFFC00400, | ||
333 | .end = 0xFFC004FF, | ||
334 | .flags = IORESOURCE_MEM, | ||
335 | }, | ||
336 | #endif | ||
337 | #ifdef CONFIG_BFIN_SIR1 | ||
338 | { | ||
339 | .start = 0xFFC02000, | ||
340 | .end = 0xFFC020FF, | ||
341 | .flags = IORESOURCE_MEM, | ||
342 | }, | ||
343 | #endif | ||
344 | }; | ||
345 | |||
346 | static struct platform_device bfin_sir_device = { | ||
347 | .name = "bfin_sir", | ||
348 | .id = 0, | ||
349 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | ||
350 | .resource = bfin_sir_resources, | ||
351 | }; | ||
352 | #endif | ||
353 | |||
328 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 354 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
329 | static struct resource bfin_twi0_resource[] = { | 355 | static struct resource bfin_twi0_resource[] = { |
330 | [0] = { | 356 | [0] = { |
@@ -415,6 +441,10 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
415 | &bfin_uart_device, | 441 | &bfin_uart_device, |
416 | #endif | 442 | #endif |
417 | 443 | ||
444 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
445 | &bfin_sir_device, | ||
446 | #endif | ||
447 | |||
418 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 448 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
419 | &i2c_bfin_twi_device, | 449 | &i2c_bfin_twi_device, |
420 | #endif | 450 | #endif |
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c index b3d78ea755ca..7d250828dad8 100644 --- a/arch/blackfin/mach-bf537/boards/generic_board.c +++ b/arch/blackfin/mach-bf537/boards/generic_board.c | |||
@@ -554,6 +554,32 @@ static struct platform_device bfin_uart_device = { | |||
554 | }; | 554 | }; |
555 | #endif | 555 | #endif |
556 | 556 | ||
557 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
558 | static struct resource bfin_sir_resources[] = { | ||
559 | #ifdef CONFIG_BFIN_SIR0 | ||
560 | { | ||
561 | .start = 0xFFC00400, | ||
562 | .end = 0xFFC004FF, | ||
563 | .flags = IORESOURCE_MEM, | ||
564 | }, | ||
565 | #endif | ||
566 | #ifdef CONFIG_BFIN_SIR1 | ||
567 | { | ||
568 | .start = 0xFFC02000, | ||
569 | .end = 0xFFC020FF, | ||
570 | .flags = IORESOURCE_MEM, | ||
571 | }, | ||
572 | #endif | ||
573 | }; | ||
574 | |||
575 | static struct platform_device bfin_sir_device = { | ||
576 | .name = "bfin_sir", | ||
577 | .id = 0, | ||
578 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | ||
579 | .resource = bfin_sir_resources, | ||
580 | }; | ||
581 | #endif | ||
582 | |||
557 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 583 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
558 | static struct resource bfin_twi0_resource[] = { | 584 | static struct resource bfin_twi0_resource[] = { |
559 | [0] = { | 585 | [0] = { |
@@ -674,6 +700,10 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
674 | &bfin_uart_device, | 700 | &bfin_uart_device, |
675 | #endif | 701 | #endif |
676 | 702 | ||
703 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
704 | &bfin_sir_device, | ||
705 | #endif | ||
706 | |||
677 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 707 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
678 | &i2c_bfin_twi_device, | 708 | &i2c_bfin_twi_device, |
679 | #endif | 709 | #endif |
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c index 4ea7173915ef..18ddf7a52005 100644 --- a/arch/blackfin/mach-bf537/boards/minotaur.c +++ b/arch/blackfin/mach-bf537/boards/minotaur.c | |||
@@ -225,6 +225,32 @@ static struct platform_device bfin_uart_device = { | |||
225 | }; | 225 | }; |
226 | #endif | 226 | #endif |
227 | 227 | ||
228 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
229 | static struct resource bfin_sir_resources[] = { | ||
230 | #ifdef CONFIG_BFIN_SIR0 | ||
231 | { | ||
232 | .start = 0xFFC00400, | ||
233 | .end = 0xFFC004FF, | ||
234 | .flags = IORESOURCE_MEM, | ||
235 | }, | ||
236 | #endif | ||
237 | #ifdef CONFIG_BFIN_SIR1 | ||
238 | { | ||
239 | .start = 0xFFC02000, | ||
240 | .end = 0xFFC020FF, | ||
241 | .flags = IORESOURCE_MEM, | ||
242 | }, | ||
243 | #endif | ||
244 | }; | ||
245 | |||
246 | static struct platform_device bfin_sir_device = { | ||
247 | .name = "bfin_sir", | ||
248 | .id = 0, | ||
249 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | ||
250 | .resource = bfin_sir_resources, | ||
251 | }; | ||
252 | #endif | ||
253 | |||
228 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 254 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
229 | static struct resource bfin_twi0_resource[] = { | 255 | static struct resource bfin_twi0_resource[] = { |
230 | [0] = { | 256 | [0] = { |
@@ -284,6 +310,10 @@ static struct platform_device *minotaur_devices[] __initdata = { | |||
284 | &bfin_uart_device, | 310 | &bfin_uart_device, |
285 | #endif | 311 | #endif |
286 | 312 | ||
313 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
314 | &bfin_sir_device, | ||
315 | #endif | ||
316 | |||
287 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 317 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
288 | &i2c_bfin_twi_device, | 318 | &i2c_bfin_twi_device, |
289 | #endif | 319 | #endif |
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c index 0b3e22b1b681..51c3bab14a69 100644 --- a/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/arch/blackfin/mach-bf537/boards/pnav10.c | |||
@@ -452,6 +452,31 @@ static struct platform_device bfin_uart_device = { | |||
452 | }; | 452 | }; |
453 | #endif | 453 | #endif |
454 | 454 | ||
455 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
456 | static struct resource bfin_sir_resources[] = { | ||
457 | #ifdef CONFIG_BFIN_SIR0 | ||
458 | { | ||
459 | .start = 0xFFC00400, | ||
460 | .end = 0xFFC004FF, | ||
461 | .flags = IORESOURCE_MEM, | ||
462 | }, | ||
463 | #endif | ||
464 | #ifdef CONFIG_BFIN_SIR1 | ||
465 | { | ||
466 | .start = 0xFFC02000, | ||
467 | .end = 0xFFC020FF, | ||
468 | .flags = IORESOURCE_MEM, | ||
469 | }, | ||
470 | #endif | ||
471 | }; | ||
472 | |||
473 | static struct platform_device bfin_sir_device = { | ||
474 | .name = "bfin_sir", | ||
475 | .id = 0, | ||
476 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | ||
477 | .resource = bfin_sir_resources, | ||
478 | }; | ||
479 | #endif | ||
455 | 480 | ||
456 | static struct platform_device *stamp_devices[] __initdata = { | 481 | static struct platform_device *stamp_devices[] __initdata = { |
457 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) | 482 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) |
@@ -493,6 +518,10 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
493 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 518 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
494 | &bfin_uart_device, | 519 | &bfin_uart_device, |
495 | #endif | 520 | #endif |
521 | |||
522 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
523 | &bfin_sir_device, | ||
524 | #endif | ||
496 | }; | 525 | }; |
497 | 526 | ||
498 | static int __init stamp_init(void) | 527 | static int __init stamp_init(void) |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index d4cbcb8774e7..0cec14b1ef5c 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -698,6 +698,32 @@ static struct platform_device bfin_uart_device = { | |||
698 | }; | 698 | }; |
699 | #endif | 699 | #endif |
700 | 700 | ||
701 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
702 | static struct resource bfin_sir_resources[] = { | ||
703 | #ifdef CONFIG_BFIN_SIR0 | ||
704 | { | ||
705 | .start = 0xFFC00400, | ||
706 | .end = 0xFFC004FF, | ||
707 | .flags = IORESOURCE_MEM, | ||
708 | }, | ||
709 | #endif | ||
710 | #ifdef CONFIG_BFIN_SIR1 | ||
711 | { | ||
712 | .start = 0xFFC02000, | ||
713 | .end = 0xFFC020FF, | ||
714 | .flags = IORESOURCE_MEM, | ||
715 | }, | ||
716 | #endif | ||
717 | }; | ||
718 | |||
719 | static struct platform_device bfin_sir_device = { | ||
720 | .name = "bfin_sir", | ||
721 | .id = 0, | ||
722 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | ||
723 | .resource = bfin_sir_resources, | ||
724 | }; | ||
725 | #endif | ||
726 | |||
701 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 727 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
702 | static struct resource bfin_twi0_resource[] = { | 728 | static struct resource bfin_twi0_resource[] = { |
703 | [0] = { | 729 | [0] = { |
@@ -847,6 +873,10 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
847 | &bfin_uart_device, | 873 | &bfin_uart_device, |
848 | #endif | 874 | #endif |
849 | 875 | ||
876 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
877 | &bfin_sir_device, | ||
878 | #endif | ||
879 | |||
850 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 880 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
851 | &i2c_bfin_twi_device, | 881 | &i2c_bfin_twi_device, |
852 | #endif | 882 | #endif |