aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2009-01-07 10:14:39 -0500
committerBryan Wu <cooloney@kernel.org>2009-01-07 10:14:39 -0500
commit42bd8bcb2fa1853fda9c51d956f70bbe2329bdfb (patch)
treeda6e1022ee8e19380444d026dc40e6e989489a85 /arch/blackfin
parentc0948d3316eaf3fdacc461c2c9e18441022e9e63 (diff)
Blackfin arch: Modify bfin_sir device configuration to board file
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/mach-bf518/boards/ezbrd.c48
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c48
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c48
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c48
-rw-r--r--arch/blackfin/mach-bf533/boards/H8606.c24
-rw-r--r--arch/blackfin/mach-bf533/boards/blackstamp.c24
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c24
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c28
-rw-r--r--arch/blackfin/mach-bf533/boards/generic_board.c35
-rw-r--r--arch/blackfin/mach-bf533/boards/ip0x.c24
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c24
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537.c48
-rw-r--r--arch/blackfin/mach-bf537/boards/generic_board.c48
-rw-r--r--arch/blackfin/mach-bf537/boards/minotaur.c48
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c48
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c48
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c48
-rw-r--r--arch/blackfin/mach-bf538/boards/ezkit.c69
-rw-r--r--arch/blackfin/mach-bf548/boards/cm_bf548.c90
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c90
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c24
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c24
-rw-r--r--arch/blackfin/mach-bf561/boards/generic_board.c35
-rw-r--r--arch/blackfin/mach-bf561/boards/tepla.c34
24 files changed, 882 insertions, 147 deletions
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c
index 3b0428680e11..b76953b475da 100644
--- a/arch/blackfin/mach-bf518/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
@@ -396,30 +396,59 @@ static struct platform_device bfin_uart_device = {
396#endif 396#endif
397 397
398#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 398#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
399static struct resource bfin_sir_resources[] = {
400#ifdef CONFIG_BFIN_SIR0 399#ifdef CONFIG_BFIN_SIR0
400static struct resource bfin_sir0_resources[] = {
401 { 401 {
402 .start = 0xFFC00400, 402 .start = 0xFFC00400,
403 .end = 0xFFC004FF, 403 .end = 0xFFC004FF,
404 .flags = IORESOURCE_MEM, 404 .flags = IORESOURCE_MEM,
405 }, 405 },
406 {
407 .start = IRQ_UART0_RX,
408 .end = IRQ_UART0_RX+1,
409 .flags = IORESOURCE_IRQ,
410 },
411 {
412 .start = CH_UART0_RX,
413 .end = CH_UART0_RX+1,
414 .flags = IORESOURCE_DMA,
415 },
416};
417
418static struct platform_device bfin_sir0_device = {
419 .name = "bfin_sir",
420 .id = 0,
421 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
422 .resource = bfin_sir0_resources,
423};
406#endif 424#endif
407#ifdef CONFIG_BFIN_SIR1 425#ifdef CONFIG_BFIN_SIR1
426static struct resource bfin_sir1_resources[] = {
408 { 427 {
409 .start = 0xFFC02000, 428 .start = 0xFFC02000,
410 .end = 0xFFC020FF, 429 .end = 0xFFC020FF,
411 .flags = IORESOURCE_MEM, 430 .flags = IORESOURCE_MEM,
412 }, 431 },
413#endif 432 {
433 .start = IRQ_UART1_RX,
434 .end = IRQ_UART1_RX+1,
435 .flags = IORESOURCE_IRQ,
436 },
437 {
438 .start = CH_UART1_RX,
439 .end = CH_UART1_RX+1,
440 .flags = IORESOURCE_DMA,
441 },
414}; 442};
415 443
416static struct platform_device bfin_sir_device = { 444static struct platform_device bfin_sir1_device = {
417 .name = "bfin_sir", 445 .name = "bfin_sir",
418 .id = 0, 446 .id = 1,
419 .num_resources = ARRAY_SIZE(bfin_sir_resources), 447 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
420 .resource = bfin_sir_resources, 448 .resource = bfin_sir1_resources,
421}; 449};
422#endif 450#endif
451#endif
423 452
424#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 453#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
425static struct resource bfin_twi0_resource[] = { 454static struct resource bfin_twi0_resource[] = {
@@ -550,7 +579,12 @@ static struct platform_device *stamp_devices[] __initdata = {
550#endif 579#endif
551 580
552#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 581#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
553 &bfin_sir_device, 582#ifdef CONFIG_BFIN_SIR0
583 &bfin_sir0_device,
584#endif
585#ifdef CONFIG_BFIN_SIR1
586 &bfin_sir1_device,
587#endif
554#endif 588#endif
555 589
556#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 590#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 5797ac40fe2c..c17882b43686 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -717,30 +717,59 @@ static struct platform_device bfin_uart_device = {
717#endif 717#endif
718 718
719#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 719#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
720static struct resource bfin_sir_resources[] = {
721#ifdef CONFIG_BFIN_SIR0 720#ifdef CONFIG_BFIN_SIR0
721static struct resource bfin_sir0_resources[] = {
722 { 722 {
723 .start = 0xFFC00400, 723 .start = 0xFFC00400,
724 .end = 0xFFC004FF, 724 .end = 0xFFC004FF,
725 .flags = IORESOURCE_MEM, 725 .flags = IORESOURCE_MEM,
726 }, 726 },
727 {
728 .start = IRQ_UART0_RX,
729 .end = IRQ_UART0_RX+1,
730 .flags = IORESOURCE_IRQ,
731 },
732 {
733 .start = CH_UART0_RX,
734 .end = CH_UART0_RX+1,
735 .flags = IORESOURCE_DMA,
736 },
737};
738
739static struct platform_device bfin_sir0_device = {
740 .name = "bfin_sir",
741 .id = 0,
742 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
743 .resource = bfin_sir0_resources,
744};
727#endif 745#endif
728#ifdef CONFIG_BFIN_SIR1 746#ifdef CONFIG_BFIN_SIR1
747static struct resource bfin_sir1_resources[] = {
729 { 748 {
730 .start = 0xFFC02000, 749 .start = 0xFFC02000,
731 .end = 0xFFC020FF, 750 .end = 0xFFC020FF,
732 .flags = IORESOURCE_MEM, 751 .flags = IORESOURCE_MEM,
733 }, 752 },
734#endif 753 {
754 .start = IRQ_UART1_RX,
755 .end = IRQ_UART1_RX+1,
756 .flags = IORESOURCE_IRQ,
757 },
758 {
759 .start = CH_UART1_RX,
760 .end = CH_UART1_RX+1,
761 .flags = IORESOURCE_DMA,
762 },
735}; 763};
736 764
737static struct platform_device bfin_sir_device = { 765static struct platform_device bfin_sir1_device = {
738 .name = "bfin_sir", 766 .name = "bfin_sir",
739 .id = 0, 767 .id = 1,
740 .num_resources = ARRAY_SIZE(bfin_sir_resources), 768 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
741 .resource = bfin_sir_resources, 769 .resource = bfin_sir1_resources,
742}; 770};
743#endif 771#endif
772#endif
744 773
745#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 774#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
746static struct resource bfin_twi0_resource[] = { 775static struct resource bfin_twi0_resource[] = {
@@ -911,7 +940,12 @@ static struct platform_device *stamp_devices[] __initdata = {
911#endif 940#endif
912 941
913#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 942#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
914 &bfin_sir_device, 943#ifdef CONFIG_BFIN_SIR0
944 &bfin_sir0_device,
945#endif
946#ifdef CONFIG_BFIN_SIR1
947 &bfin_sir1_device,
948#endif
915#endif 949#endif
916 950
917#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 951#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index dab58a702c8e..4e67f587a141 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -478,30 +478,59 @@ static struct platform_device bfin_uart_device = {
478#endif 478#endif
479 479
480#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 480#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
481static struct resource bfin_sir_resources[] = {
482#ifdef CONFIG_BFIN_SIR0 481#ifdef CONFIG_BFIN_SIR0
482static struct resource bfin_sir0_resources[] = {
483 { 483 {
484 .start = 0xFFC00400, 484 .start = 0xFFC00400,
485 .end = 0xFFC004FF, 485 .end = 0xFFC004FF,
486 .flags = IORESOURCE_MEM, 486 .flags = IORESOURCE_MEM,
487 }, 487 },
488 {
489 .start = IRQ_UART0_RX,
490 .end = IRQ_UART0_RX+1,
491 .flags = IORESOURCE_IRQ,
492 },
493 {
494 .start = CH_UART0_RX,
495 .end = CH_UART0_RX+1,
496 .flags = IORESOURCE_DMA,
497 },
498};
499
500static struct platform_device bfin_sir0_device = {
501 .name = "bfin_sir",
502 .id = 0,
503 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
504 .resource = bfin_sir0_resources,
505};
488#endif 506#endif
489#ifdef CONFIG_BFIN_SIR1 507#ifdef CONFIG_BFIN_SIR1
508static struct resource bfin_sir1_resources[] = {
490 { 509 {
491 .start = 0xFFC02000, 510 .start = 0xFFC02000,
492 .end = 0xFFC020FF, 511 .end = 0xFFC020FF,
493 .flags = IORESOURCE_MEM, 512 .flags = IORESOURCE_MEM,
494 }, 513 },
495#endif 514 {
515 .start = IRQ_UART1_RX,
516 .end = IRQ_UART1_RX+1,
517 .flags = IORESOURCE_IRQ,
518 },
519 {
520 .start = CH_UART1_RX,
521 .end = CH_UART1_RX+1,
522 .flags = IORESOURCE_DMA,
523 },
496}; 524};
497 525
498static struct platform_device bfin_sir_device = { 526static struct platform_device bfin_sir1_device = {
499 .name = "bfin_sir", 527 .name = "bfin_sir",
500 .id = 0, 528 .id = 1,
501 .num_resources = ARRAY_SIZE(bfin_sir_resources), 529 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
502 .resource = bfin_sir_resources, 530 .resource = bfin_sir1_resources,
503}; 531};
504#endif 532#endif
533#endif
505 534
506#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 535#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
507static struct resource bfin_twi0_resource[] = { 536static struct resource bfin_twi0_resource[] = {
@@ -671,7 +700,12 @@ static struct platform_device *stamp_devices[] __initdata = {
671#endif 700#endif
672 701
673#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 702#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
674 &bfin_sir_device, 703#ifdef CONFIG_BFIN_SIR0
704 &bfin_sir0_device,
705#endif
706#ifdef CONFIG_BFIN_SIR1
707 &bfin_sir1_device,
708#endif
675#endif 709#endif
676 710
677#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 711#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index dc0384d2b218..beea15041c2e 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -718,30 +718,59 @@ static struct platform_device bfin_uart_device = {
718#endif 718#endif
719 719
720#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 720#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
721static struct resource bfin_sir_resources[] = {
722#ifdef CONFIG_BFIN_SIR0 721#ifdef CONFIG_BFIN_SIR0
722static struct resource bfin_sir0_resources[] = {
723 { 723 {
724 .start = 0xFFC00400, 724 .start = 0xFFC00400,
725 .end = 0xFFC004FF, 725 .end = 0xFFC004FF,
726 .flags = IORESOURCE_MEM, 726 .flags = IORESOURCE_MEM,
727 }, 727 },
728 {
729 .start = IRQ_UART0_RX,
730 .end = IRQ_UART0_RX+1,
731 .flags = IORESOURCE_IRQ,
732 },
733 {
734 .start = CH_UART0_RX,
735 .end = CH_UART0_RX+1,
736 .flags = IORESOURCE_DMA,
737 },
738};
739
740static struct platform_device bfin_sir0_device = {
741 .name = "bfin_sir",
742 .id = 0,
743 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
744 .resource = bfin_sir0_resources,
745};
728#endif 746#endif
729#ifdef CONFIG_BFIN_SIR1 747#ifdef CONFIG_BFIN_SIR1
748static struct resource bfin_sir1_resources[] = {
730 { 749 {
731 .start = 0xFFC02000, 750 .start = 0xFFC02000,
732 .end = 0xFFC020FF, 751 .end = 0xFFC020FF,
733 .flags = IORESOURCE_MEM, 752 .flags = IORESOURCE_MEM,
734 }, 753 },
735#endif 754 {
755 .start = IRQ_UART1_RX,
756 .end = IRQ_UART1_RX+1,
757 .flags = IORESOURCE_IRQ,
758 },
759 {
760 .start = CH_UART1_RX,
761 .end = CH_UART1_RX+1,
762 .flags = IORESOURCE_DMA,
763 },
736}; 764};
737 765
738static struct platform_device bfin_sir_device = { 766static struct platform_device bfin_sir1_device = {
739 .name = "bfin_sir", 767 .name = "bfin_sir",
740 .id = 0, 768 .id = 1,
741 .num_resources = ARRAY_SIZE(bfin_sir_resources), 769 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
742 .resource = bfin_sir_resources, 770 .resource = bfin_sir1_resources,
743}; 771};
744#endif 772#endif
773#endif
745 774
746#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 775#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
747static struct resource bfin_twi0_resource[] = { 776static struct resource bfin_twi0_resource[] = {
@@ -951,7 +980,12 @@ static struct platform_device *stamp_devices[] __initdata = {
951#endif 980#endif
952 981
953#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 982#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
954 &bfin_sir_device, 983#ifdef CONFIG_BFIN_SIR0
984 &bfin_sir0_device,
985#endif
986#ifdef CONFIG_BFIN_SIR1
987 &bfin_sir1_device,
988#endif
955#endif 989#endif
956 990
957#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 991#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index 72ac3ac8ef76..0c66bf44cfab 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -313,23 +313,33 @@ static struct platform_device bfin_uart_device = {
313#endif 313#endif
314 314
315#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 315#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
316static struct resource bfin_sir_resources[] = {
317#ifdef CONFIG_BFIN_SIR0 316#ifdef CONFIG_BFIN_SIR0
317static struct resource bfin_sir0_resources[] = {
318 { 318 {
319 .start = 0xFFC00400, 319 .start = 0xFFC00400,
320 .end = 0xFFC004FF, 320 .end = 0xFFC004FF,
321 .flags = IORESOURCE_MEM, 321 .flags = IORESOURCE_MEM,
322 }, 322 },
323#endif 323 {
324 .start = IRQ_UART0_RX,
325 .end = IRQ_UART0_RX+1,
326 .flags = IORESOURCE_IRQ,
327 },
328 {
329 .start = CH_UART0_RX,
330 .end = CH_UART0_RX+1,
331 .flags = IORESOURCE_DMA,
332 },
324}; 333};
325 334
326static struct platform_device bfin_sir_device = { 335static struct platform_device bfin_sir0_device = {
327 .name = "bfin_sir", 336 .name = "bfin_sir",
328 .id = 0, 337 .id = 0,
329 .num_resources = ARRAY_SIZE(bfin_sir_resources), 338 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
330 .resource = bfin_sir_resources, 339 .resource = bfin_sir0_resources,
331}; 340};
332#endif 341#endif
342#endif
333 343
334#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) 344#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
335 345
@@ -431,7 +441,9 @@ static struct platform_device *h8606_devices[] __initdata = {
431#endif 441#endif
432 442
433#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 443#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
434 &bfin_sir_device, 444#ifdef CONFIG_BFIN_SIR0
445 &bfin_sir0_device,
446#endif
435#endif 447#endif
436 448
437#if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE) 449#if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE)
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c
index d064ded87719..6ee607c259ac 100644
--- a/arch/blackfin/mach-bf533/boards/blackstamp.c
+++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
@@ -212,23 +212,33 @@ static struct platform_device bfin_uart_device = {
212#endif 212#endif
213 213
214#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 214#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
215static struct resource bfin_sir_resources[] = {
216#ifdef CONFIG_BFIN_SIR0 215#ifdef CONFIG_BFIN_SIR0
216static struct resource bfin_sir0_resources[] = {
217 { 217 {
218 .start = 0xFFC00400, 218 .start = 0xFFC00400,
219 .end = 0xFFC004FF, 219 .end = 0xFFC004FF,
220 .flags = IORESOURCE_MEM, 220 .flags = IORESOURCE_MEM,
221 }, 221 },
222#endif 222 {
223 .start = IRQ_UART0_RX,
224 .end = IRQ_UART0_RX+1,
225 .flags = IORESOURCE_IRQ,
226 },
227 {
228 .start = CH_UART0_RX,
229 .end = CH_UART0_RX+1,
230 .flags = IORESOURCE_DMA,
231 },
223}; 232};
224 233
225static struct platform_device bfin_sir_device = { 234static struct platform_device bfin_sir0_device = {
226 .name = "bfin_sir", 235 .name = "bfin_sir",
227 .id = 0, 236 .id = 0,
228 .num_resources = ARRAY_SIZE(bfin_sir_resources), 237 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
229 .resource = bfin_sir_resources, 238 .resource = bfin_sir0_resources,
230}; 239};
231#endif 240#endif
241#endif
232 242
233#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 243#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
234static struct platform_device bfin_sport0_uart_device = { 244static struct platform_device bfin_sport0_uart_device = {
@@ -353,7 +363,9 @@ static struct platform_device *stamp_devices[] __initdata = {
353#endif 363#endif
354 364
355#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 365#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
356 &bfin_sir_device, 366#ifdef CONFIG_BFIN_SIR0
367 &bfin_sir0_device,
368#endif
357#endif 369#endif
358 370
359#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 371#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index 411d4b84c39d..e7061c7e8c42 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -250,23 +250,33 @@ static struct platform_device bfin_uart_device = {
250#endif 250#endif
251 251
252#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 252#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
253static struct resource bfin_sir_resources[] = {
254#ifdef CONFIG_BFIN_SIR0 253#ifdef CONFIG_BFIN_SIR0
254static struct resource bfin_sir0_resources[] = {
255 { 255 {
256 .start = 0xFFC00400, 256 .start = 0xFFC00400,
257 .end = 0xFFC004FF, 257 .end = 0xFFC004FF,
258 .flags = IORESOURCE_MEM, 258 .flags = IORESOURCE_MEM,
259 }, 259 },
260#endif 260 {
261 .start = IRQ_UART0_RX,
262 .end = IRQ_UART0_RX+1,
263 .flags = IORESOURCE_IRQ,
264 },
265 {
266 .start = CH_UART0_RX,
267 .end = CH_UART0_RX+1,
268 .flags = IORESOURCE_DMA,
269 },
261}; 270};
262 271
263static struct platform_device bfin_sir_device = { 272static struct platform_device bfin_sir0_device = {
264 .name = "bfin_sir", 273 .name = "bfin_sir",
265 .id = 0, 274 .id = 0,
266 .num_resources = ARRAY_SIZE(bfin_sir_resources), 275 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
267 .resource = bfin_sir_resources, 276 .resource = bfin_sir0_resources,
268}; 277};
269#endif 278#endif
279#endif
270 280
271#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 281#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
272static struct platform_device bfin_sport0_uart_device = { 282static struct platform_device bfin_sport0_uart_device = {
@@ -355,7 +365,9 @@ static struct platform_device *cm_bf533_devices[] __initdata = {
355#endif 365#endif
356 366
357#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 367#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
358 &bfin_sir_device, 368#ifdef CONFIG_BFIN_SIR0
369 &bfin_sir0_device,
370#endif
359#endif 371#endif
360 372
361#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 373#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index a59c92d47d17..69abceafb4d0 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -236,23 +236,33 @@ static struct platform_device bfin_uart_device = {
236#endif 236#endif
237 237
238#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 238#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
239static struct resource bfin_sir_resources[] = {
240#ifdef CONFIG_BFIN_SIR0 239#ifdef CONFIG_BFIN_SIR0
240static struct resource bfin_sir0_resources[] = {
241 { 241 {
242 .start = 0xFFC00400, 242 .start = 0xFFC00400,
243 .end = 0xFFC004FF, 243 .end = 0xFFC004FF,
244 .flags = IORESOURCE_MEM, 244 .flags = IORESOURCE_MEM,
245 }, 245 },
246#endif 246 {
247 .start = IRQ_UART0_RX,
248 .end = IRQ_UART0_RX+1,
249 .flags = IORESOURCE_IRQ,
250 },
251 {
252 .start = CH_UART0_RX,
253 .end = CH_UART0_RX+1,
254 .flags = IORESOURCE_DMA,
255 },
247}; 256};
248 257
249static struct platform_device bfin_sir_device = { 258static struct platform_device bfin_sir0_device = {
250 .name = "bfin_sir", 259 .name = "bfin_sir",
251 .id = 0, 260 .id = 0,
252 .num_resources = ARRAY_SIZE(bfin_sir_resources), 261 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
253 .resource = bfin_sir_resources, 262 .resource = bfin_sir0_resources,
254}; 263};
255#endif 264#endif
265#endif
256 266
257#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 267#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
258#include <linux/input.h> 268#include <linux/input.h>
@@ -358,12 +368,10 @@ static struct platform_device *ezkit_devices[] __initdata = {
358 &rtc_device, 368 &rtc_device,
359#endif 369#endif
360 370
361#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
362 &bfin_uart_device,
363#endif
364
365#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 371#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
366 &bfin_sir_device, 372#ifdef CONFIG_BFIN_SIR0
373 &bfin_sir0_device,
374#endif
367#endif 375#endif
368 376
369#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 377#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
diff --git a/arch/blackfin/mach-bf533/boards/generic_board.c b/arch/blackfin/mach-bf533/boards/generic_board.c
index 82b1f6a60e3f..986eeec53b1f 100644
--- a/arch/blackfin/mach-bf533/boards/generic_board.c
+++ b/arch/blackfin/mach-bf533/boards/generic_board.c
@@ -72,6 +72,35 @@ static struct platform_device smc91x_device = {
72}; 72};
73#endif 73#endif
74 74
75#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
76#ifdef CONFIG_BFIN_SIR0
77static struct resource bfin_sir0_resources[] = {
78 {
79 .start = 0xFFC00400,
80 .end = 0xFFC004FF,
81 .flags = IORESOURCE_MEM,
82 },
83 {
84 .start = IRQ_UART0_RX,
85 .end = IRQ_UART0_RX+1,
86 .flags = IORESOURCE_IRQ,
87 },
88 {
89 .start = CH_UART0_RX,
90 .end = CH_UART0_RX+1,
91 .flags = IORESOURCE_DMA,
92 },
93};
94
95static struct platform_device bfin_sir0_device = {
96 .name = "bfin_sir",
97 .id = 0,
98 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
99 .resource = bfin_sir0_resources,
100};
101#endif
102#endif
103
75static struct platform_device *generic_board_devices[] __initdata = { 104static struct platform_device *generic_board_devices[] __initdata = {
76#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 105#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
77 &rtc_device, 106 &rtc_device,
@@ -80,6 +109,12 @@ static struct platform_device *generic_board_devices[] __initdata = {
80#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 109#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
81 &smc91x_device, 110 &smc91x_device,
82#endif 111#endif
112
113#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
114#ifdef CONFIG_BFIN_SIR0
115 &bfin_sir0_device,
116#endif
117#endif
83}; 118};
84 119
85static int __init generic_board_init(void) 120static int __init generic_board_init(void)
diff --git a/arch/blackfin/mach-bf533/boards/ip0x.c b/arch/blackfin/mach-bf533/boards/ip0x.c
index 5864892de314..e30b1b7d1442 100644
--- a/arch/blackfin/mach-bf533/boards/ip0x.c
+++ b/arch/blackfin/mach-bf533/boards/ip0x.c
@@ -197,23 +197,33 @@ static struct platform_device bfin_uart_device = {
197#endif 197#endif
198 198
199#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 199#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
200static struct resource bfin_sir_resources[] = {
201#ifdef CONFIG_BFIN_SIR0 200#ifdef CONFIG_BFIN_SIR0
201static struct resource bfin_sir0_resources[] = {
202 { 202 {
203 .start = 0xFFC00400, 203 .start = 0xFFC00400,
204 .end = 0xFFC004FF, 204 .end = 0xFFC004FF,
205 .flags = IORESOURCE_MEM, 205 .flags = IORESOURCE_MEM,
206 }, 206 },
207#endif 207 {
208 .start = IRQ_UART0_RX,
209 .end = IRQ_UART0_RX+1,
210 .flags = IORESOURCE_IRQ,
211 },
212 {
213 .start = CH_UART0_RX,
214 .end = CH_UART0_RX+1,
215 .flags = IORESOURCE_DMA,
216 },
208}; 217};
209 218
210static struct platform_device bfin_sir_device = { 219static struct platform_device bfin_sir0_device = {
211 .name = "bfin_sir", 220 .name = "bfin_sir",
212 .id = 0, 221 .id = 0,
213 .num_resources = ARRAY_SIZE(bfin_sir_resources), 222 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
214 .resource = bfin_sir_resources, 223 .resource = bfin_sir0_resources,
215}; 224};
216#endif 225#endif
226#endif
217 227
218#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 228#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
219static struct resource isp1362_hcd_resources[] = { 229static struct resource isp1362_hcd_resources[] = {
@@ -272,7 +282,9 @@ static struct platform_device *ip0x_devices[] __initdata = {
272#endif 282#endif
273 283
274#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 284#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
275 &bfin_sir_device, 285#ifdef CONFIG_BFIN_SIR0
286 &bfin_sir0_device,
287#endif
276#endif 288#endif
277 289
278#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 290#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index b0d877626a4d..caa60997fc2c 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -345,23 +345,33 @@ static struct platform_device bfin_uart_device = {
345#endif 345#endif
346 346
347#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 347#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
348static struct resource bfin_sir_resources[] = {
349#ifdef CONFIG_BFIN_SIR0 348#ifdef CONFIG_BFIN_SIR0
349static struct resource bfin_sir0_resources[] = {
350 { 350 {
351 .start = 0xFFC00400, 351 .start = 0xFFC00400,
352 .end = 0xFFC004FF, 352 .end = 0xFFC004FF,
353 .flags = IORESOURCE_MEM, 353 .flags = IORESOURCE_MEM,
354 }, 354 },
355#endif 355 {
356 .start = IRQ_UART0_RX,
357 .end = IRQ_UART0_RX+1,
358 .flags = IORESOURCE_IRQ,
359 },
360 {
361 .start = CH_UART0_RX,
362 .end = CH_UART0_RX+1,
363 .flags = IORESOURCE_DMA,
364 },
356}; 365};
357 366
358static struct platform_device bfin_sir_device = { 367static struct platform_device bfin_sir0_device = {
359 .name = "bfin_sir", 368 .name = "bfin_sir",
360 .id = 0, 369 .id = 0,
361 .num_resources = ARRAY_SIZE(bfin_sir_resources), 370 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
362 .resource = bfin_sir_resources, 371 .resource = bfin_sir0_resources,
363}; 372};
364#endif 373#endif
374#endif
365 375
366#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 376#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
367static struct platform_device bfin_sport0_uart_device = { 377static struct platform_device bfin_sport0_uart_device = {
@@ -509,7 +519,9 @@ static struct platform_device *stamp_devices[] __initdata = {
509#endif 519#endif
510 520
511#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 521#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
512 &bfin_sir_device, 522#ifdef CONFIG_BFIN_SIR0
523 &bfin_sir0_device,
524#endif
513#endif 525#endif
514 526
515#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 527#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c
index f13556b22ff0..6ac8e4d5bd38 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c
@@ -392,30 +392,57 @@ static struct platform_device bfin_uart_device = {
392#endif 392#endif
393 393
394#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 394#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
395static struct resource bfin_sir_resources[] = {
396#ifdef CONFIG_BFIN_SIR0 395#ifdef CONFIG_BFIN_SIR0
396static struct resource bfin_sir0_resources[] = {
397 { 397 {
398 .start = 0xFFC00400, 398 .start = 0xFFC00400,
399 .end = 0xFFC004FF, 399 .end = 0xFFC004FF,
400 .flags = IORESOURCE_MEM, 400 .flags = IORESOURCE_MEM,
401 }, 401 },
402 {
403 .start = IRQ_UART0_RX,
404 .end = IRQ_UART0_RX+1,
405 .flags = IORESOURCE_IRQ,
406 },
407 {
408 .start = CH_UART0_RX,
409 .end = CH_UART0_RX+1,
410 .flags = IORESOURCE_DMA,
411 },
412};
413static struct platform_device bfin_sir0_device = {
414 .name = "bfin_sir",
415 .id = 0,
416 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
417 .resource = bfin_sir0_resources,
418};
402#endif 419#endif
403#ifdef CONFIG_BFIN_SIR1 420#ifdef CONFIG_BFIN_SIR1
421static struct resource bfin_sir1_resources[] = {
404 { 422 {
405 .start = 0xFFC02000, 423 .start = 0xFFC02000,
406 .end = 0xFFC020FF, 424 .end = 0xFFC020FF,
407 .flags = IORESOURCE_MEM, 425 .flags = IORESOURCE_MEM,
408 }, 426 },
409#endif 427 {
428 .start = IRQ_UART1_RX,
429 .end = IRQ_UART1_RX+1,
430 .flags = IORESOURCE_IRQ,
431 },
432 {
433 .start = CH_UART1_RX,
434 .end = CH_UART1_RX+1,
435 .flags = IORESOURCE_DMA,
436 },
410}; 437};
411 438static struct platform_device bfin_sir1_device = {
412static struct platform_device bfin_sir_device = {
413 .name = "bfin_sir", 439 .name = "bfin_sir",
414 .id = 0, 440 .id = 1,
415 .num_resources = ARRAY_SIZE(bfin_sir_resources), 441 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
416 .resource = bfin_sir_resources, 442 .resource = bfin_sir1_resources,
417}; 443};
418#endif 444#endif
445#endif
419 446
420#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 447#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
421static struct resource bfin_twi0_resource[] = { 448static struct resource bfin_twi0_resource[] = {
@@ -538,7 +565,12 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
538#endif 565#endif
539 566
540#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 567#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
541 &bfin_sir_device, 568#ifdef CONFIG_BFIN_SIR0
569 &bfin_sir0_device,
570#endif
571#ifdef CONFIG_BFIN_SIR1
572 &bfin_sir1_device,
573#endif
542#endif 574#endif
543 575
544#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 576#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c
index e9a497114347..dd6e6bfb98ea 100644
--- a/arch/blackfin/mach-bf537/boards/generic_board.c
+++ b/arch/blackfin/mach-bf537/boards/generic_board.c
@@ -548,30 +548,59 @@ static struct platform_device bfin_uart_device = {
548#endif 548#endif
549 549
550#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 550#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
551static struct resource bfin_sir_resources[] = {
552#ifdef CONFIG_BFIN_SIR0 551#ifdef CONFIG_BFIN_SIR0
552static struct resource bfin_sir0_resources[] = {
553 { 553 {
554 .start = 0xFFC00400, 554 .start = 0xFFC00400,
555 .end = 0xFFC004FF, 555 .end = 0xFFC004FF,
556 .flags = IORESOURCE_MEM, 556 .flags = IORESOURCE_MEM,
557 }, 557 },
558 {
559 .start = IRQ_UART0_RX,
560 .end = IRQ_UART0_RX+1,
561 .flags = IORESOURCE_IRQ,
562 },
563 {
564 .start = CH_UART0_RX,
565 .end = CH_UART0_RX+1,
566 .flags = IORESOURCE_DMA,
567 },
568};
569
570static struct platform_device bfin_sir0_device = {
571 .name = "bfin_sir",
572 .id = 0,
573 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
574 .resource = bfin_sir0_resources,
575};
558#endif 576#endif
559#ifdef CONFIG_BFIN_SIR1 577#ifdef CONFIG_BFIN_SIR1
578static struct resource bfin_sir1_resources[] = {
560 { 579 {
561 .start = 0xFFC02000, 580 .start = 0xFFC02000,
562 .end = 0xFFC020FF, 581 .end = 0xFFC020FF,
563 .flags = IORESOURCE_MEM, 582 .flags = IORESOURCE_MEM,
564 }, 583 },
565#endif 584 {
585 .start = IRQ_UART1_RX,
586 .end = IRQ_UART1_RX+1,
587 .flags = IORESOURCE_IRQ,
588 },
589 {
590 .start = CH_UART1_RX,
591 .end = CH_UART1_RX+1,
592 .flags = IORESOURCE_DMA,
593 },
566}; 594};
567 595
568static struct platform_device bfin_sir_device = { 596static struct platform_device bfin_sir1_device = {
569 .name = "bfin_sir", 597 .name = "bfin_sir",
570 .id = 0, 598 .id = 1,
571 .num_resources = ARRAY_SIZE(bfin_sir_resources), 599 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
572 .resource = bfin_sir_resources, 600 .resource = bfin_sir1_resources,
573}; 601};
574#endif 602#endif
603#endif
575 604
576#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 605#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
577static struct resource bfin_twi0_resource[] = { 606static struct resource bfin_twi0_resource[] = {
@@ -661,7 +690,12 @@ static struct platform_device *stamp_devices[] __initdata = {
661#endif 690#endif
662 691
663#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 692#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
664 &bfin_sir_device, 693#ifdef CONFIG_BFIN_SIR0
694 &bfin_sir0_device,
695#endif
696#ifdef CONFIG_BFIN_SIR1
697 &bfin_sir1_device,
698#endif
665#endif 699#endif
666 700
667#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 701#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c
index 48c4cd2d1be6..bb795341cb17 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -226,30 +226,59 @@ static struct platform_device bfin_uart_device = {
226#endif 226#endif
227 227
228#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 228#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
229static struct resource bfin_sir_resources[] = {
230#ifdef CONFIG_BFIN_SIR0 229#ifdef CONFIG_BFIN_SIR0
230static struct resource bfin_sir0_resources[] = {
231 { 231 {
232 .start = 0xFFC00400, 232 .start = 0xFFC00400,
233 .end = 0xFFC004FF, 233 .end = 0xFFC004FF,
234 .flags = IORESOURCE_MEM, 234 .flags = IORESOURCE_MEM,
235 }, 235 },
236 {
237 .start = IRQ_UART0_RX,
238 .end = IRQ_UART0_RX+1,
239 .flags = IORESOURCE_IRQ,
240 },
241 {
242 .start = CH_UART0_RX,
243 .end = CH_UART0_RX+1,
244 .flags = IORESOURCE_DMA,
245 },
246};
247
248static struct platform_device bfin_sir0_device = {
249 .name = "bfin_sir",
250 .id = 0,
251 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
252 .resource = bfin_sir0_resources,
253};
236#endif 254#endif
237#ifdef CONFIG_BFIN_SIR1 255#ifdef CONFIG_BFIN_SIR1
256static struct resource bfin_sir1_resources[] = {
238 { 257 {
239 .start = 0xFFC02000, 258 .start = 0xFFC02000,
240 .end = 0xFFC020FF, 259 .end = 0xFFC020FF,
241 .flags = IORESOURCE_MEM, 260 .flags = IORESOURCE_MEM,
242 }, 261 },
243#endif 262 {
263 .start = IRQ_UART1_RX,
264 .end = IRQ_UART1_RX+1,
265 .flags = IORESOURCE_IRQ,
266 },
267 {
268 .start = CH_UART1_RX,
269 .end = CH_UART1_RX+1,
270 .flags = IORESOURCE_DMA,
271 },
244}; 272};
245 273
246static struct platform_device bfin_sir_device = { 274static struct platform_device bfin_sir1_device = {
247 .name = "bfin_sir", 275 .name = "bfin_sir",
248 .id = 0, 276 .id = 1,
249 .num_resources = ARRAY_SIZE(bfin_sir_resources), 277 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
250 .resource = bfin_sir_resources, 278 .resource = bfin_sir1_resources,
251}; 279};
252#endif 280#endif
281#endif
253 282
254#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 283#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
255static struct resource bfin_twi0_resource[] = { 284static struct resource bfin_twi0_resource[] = {
@@ -311,7 +340,12 @@ static struct platform_device *minotaur_devices[] __initdata = {
311#endif 340#endif
312 341
313#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 342#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
314 &bfin_sir_device, 343#ifdef CONFIG_BFIN_SIR0
344 &bfin_sir0_device,
345#endif
346#ifdef CONFIG_BFIN_SIR1
347 &bfin_sir1_device,
348#endif
315#endif 349#endif
316 350
317#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 351#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index c7da15718e96..89de94f4545d 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -453,30 +453,59 @@ static struct platform_device bfin_uart_device = {
453#endif 453#endif
454 454
455#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 455#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
456static struct resource bfin_sir_resources[] = {
457#ifdef CONFIG_BFIN_SIR0 456#ifdef CONFIG_BFIN_SIR0
457static struct resource bfin_sir0_resources[] = {
458 { 458 {
459 .start = 0xFFC00400, 459 .start = 0xFFC00400,
460 .end = 0xFFC004FF, 460 .end = 0xFFC004FF,
461 .flags = IORESOURCE_MEM, 461 .flags = IORESOURCE_MEM,
462 }, 462 },
463 {
464 .start = IRQ_UART0_RX,
465 .end = IRQ_UART0_RX+1,
466 .flags = IORESOURCE_IRQ,
467 },
468 {
469 .start = CH_UART0_RX,
470 .end = CH_UART0_RX+1,
471 .flags = IORESOURCE_DMA,
472 },
473};
474
475static struct platform_device bfin_sir0_device = {
476 .name = "bfin_sir",
477 .id = 0,
478 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
479 .resource = bfin_sir0_resources,
480};
463#endif 481#endif
464#ifdef CONFIG_BFIN_SIR1 482#ifdef CONFIG_BFIN_SIR1
483static struct resource bfin_sir1_resources[] = {
465 { 484 {
466 .start = 0xFFC02000, 485 .start = 0xFFC02000,
467 .end = 0xFFC020FF, 486 .end = 0xFFC020FF,
468 .flags = IORESOURCE_MEM, 487 .flags = IORESOURCE_MEM,
469 }, 488 },
470#endif 489 {
490 .start = IRQ_UART1_RX,
491 .end = IRQ_UART1_RX+1,
492 .flags = IORESOURCE_IRQ,
493 },
494 {
495 .start = CH_UART1_RX,
496 .end = CH_UART1_RX+1,
497 .flags = IORESOURCE_DMA,
498 },
471}; 499};
472 500
473static struct platform_device bfin_sir_device = { 501static struct platform_device bfin_sir1_device = {
474 .name = "bfin_sir", 502 .name = "bfin_sir",
475 .id = 0, 503 .id = 1,
476 .num_resources = ARRAY_SIZE(bfin_sir_resources), 504 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
477 .resource = bfin_sir_resources, 505 .resource = bfin_sir1_resources,
478}; 506};
479#endif 507#endif
508#endif
480 509
481static struct platform_device *stamp_devices[] __initdata = { 510static struct platform_device *stamp_devices[] __initdata = {
482#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 511#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
@@ -520,7 +549,12 @@ static struct platform_device *stamp_devices[] __initdata = {
520#endif 549#endif
521 550
522#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 551#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
523 &bfin_sir_device, 552#ifdef CONFIG_BFIN_SIR0
553 &bfin_sir0_device,
554#endif
555#ifdef CONFIG_BFIN_SIR1
556 &bfin_sir1_device,
557#endif
524#endif 558#endif
525}; 559};
526 560
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 8facba669553..980121b7e084 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -905,30 +905,59 @@ static struct platform_device bfin_uart_device = {
905#endif 905#endif
906 906
907#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 907#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
908static struct resource bfin_sir_resources[] = {
909#ifdef CONFIG_BFIN_SIR0 908#ifdef CONFIG_BFIN_SIR0
909static struct resource bfin_sir0_resources[] = {
910 { 910 {
911 .start = 0xFFC00400, 911 .start = 0xFFC00400,
912 .end = 0xFFC004FF, 912 .end = 0xFFC004FF,
913 .flags = IORESOURCE_MEM, 913 .flags = IORESOURCE_MEM,
914 }, 914 },
915 {
916 .start = IRQ_UART0_RX,
917 .end = IRQ_UART0_RX+1,
918 .flags = IORESOURCE_IRQ,
919 },
920 {
921 .start = CH_UART0_RX,
922 .end = CH_UART0_RX+1,
923 .flags = IORESOURCE_DMA,
924 },
925};
926
927static struct platform_device bfin_sir0_device = {
928 .name = "bfin_sir",
929 .id = 0,
930 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
931 .resource = bfin_sir0_resources,
932};
915#endif 933#endif
916#ifdef CONFIG_BFIN_SIR1 934#ifdef CONFIG_BFIN_SIR1
935static struct resource bfin_sir1_resources[] = {
917 { 936 {
918 .start = 0xFFC02000, 937 .start = 0xFFC02000,
919 .end = 0xFFC020FF, 938 .end = 0xFFC020FF,
920 .flags = IORESOURCE_MEM, 939 .flags = IORESOURCE_MEM,
921 }, 940 },
922#endif 941 {
942 .start = IRQ_UART1_RX,
943 .end = IRQ_UART1_RX+1,
944 .flags = IORESOURCE_IRQ,
945 },
946 {
947 .start = CH_UART1_RX,
948 .end = CH_UART1_RX+1,
949 .flags = IORESOURCE_DMA,
950 },
923}; 951};
924 952
925static struct platform_device bfin_sir_device = { 953static struct platform_device bfin_sir1_device = {
926 .name = "bfin_sir", 954 .name = "bfin_sir",
927 .id = 0, 955 .id = 1,
928 .num_resources = ARRAY_SIZE(bfin_sir_resources), 956 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
929 .resource = bfin_sir_resources, 957 .resource = bfin_sir1_resources,
930}; 958};
931#endif 959#endif
960#endif
932 961
933#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 962#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
934static struct resource bfin_twi0_resource[] = { 963static struct resource bfin_twi0_resource[] = {
@@ -1216,7 +1245,12 @@ static struct platform_device *stamp_devices[] __initdata = {
1216#endif 1245#endif
1217 1246
1218#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1247#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
1219 &bfin_sir_device, 1248#ifdef CONFIG_BFIN_SIR0
1249 &bfin_sir0_device,
1250#endif
1251#ifdef CONFIG_BFIN_SIR1
1252 &bfin_sir1_device,
1253#endif
1220#endif 1254#endif
1221 1255
1222#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1256#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index f122c3c7158e..2f4b066153c5 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -392,30 +392,59 @@ static struct platform_device bfin_uart_device = {
392#endif 392#endif
393 393
394#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 394#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
395static struct resource bfin_sir_resources[] = {
396#ifdef CONFIG_BFIN_SIR0 395#ifdef CONFIG_BFIN_SIR0
396static struct resource bfin_sir0_resources[] = {
397 { 397 {
398 .start = 0xFFC00400, 398 .start = 0xFFC00400,
399 .end = 0xFFC004FF, 399 .end = 0xFFC004FF,
400 .flags = IORESOURCE_MEM, 400 .flags = IORESOURCE_MEM,
401 }, 401 },
402 {
403 .start = IRQ_UART0_RX,
404 .end = IRQ_UART0_RX+1,
405 .flags = IORESOURCE_IRQ,
406 },
407 {
408 .start = CH_UART0_RX,
409 .end = CH_UART0_RX+1,
410 .flags = IORESOURCE_DMA,
411 },
412};
413
414static struct platform_device bfin_sir0_device = {
415 .name = "bfin_sir",
416 .id = 0,
417 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
418 .resource = bfin_sir0_resources,
419};
402#endif 420#endif
403#ifdef CONFIG_BFIN_SIR1 421#ifdef CONFIG_BFIN_SIR1
422static struct resource bfin_sir1_resources[] = {
404 { 423 {
405 .start = 0xFFC02000, 424 .start = 0xFFC02000,
406 .end = 0xFFC020FF, 425 .end = 0xFFC020FF,
407 .flags = IORESOURCE_MEM, 426 .flags = IORESOURCE_MEM,
408 }, 427 },
409#endif 428 {
429 .start = IRQ_UART1_RX,
430 .end = IRQ_UART1_RX+1,
431 .flags = IORESOURCE_IRQ,
432 },
433 {
434 .start = CH_UART1_RX,
435 .end = CH_UART1_RX+1,
436 .flags = IORESOURCE_DMA,
437 },
410}; 438};
411 439
412static struct platform_device bfin_sir_device = { 440static struct platform_device bfin_sir1_device = {
413 .name = "bfin_sir", 441 .name = "bfin_sir",
414 .id = 0, 442 .id = 1,
415 .num_resources = ARRAY_SIZE(bfin_sir_resources), 443 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
416 .resource = bfin_sir_resources, 444 .resource = bfin_sir1_resources,
417}; 445};
418#endif 446#endif
447#endif
419 448
420#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 449#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
421static struct resource bfin_twi0_resource[] = { 450static struct resource bfin_twi0_resource[] = {
@@ -538,7 +567,12 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
538#endif 567#endif
539 568
540#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 569#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
541 &bfin_sir_device, 570#ifdef CONFIG_BFIN_SIR0
571 &bfin_sir0_device,
572#endif
573#ifdef CONFIG_BFIN_SIR1
574 &bfin_sir1_device,
575#endif
542#endif 576#endif
543 577
544#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 578#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c
index 4b28261c66f5..e37cb9378884 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -95,37 +95,82 @@ static struct platform_device bfin_uart_device = {
95#endif 95#endif
96 96
97#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 97#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
98static struct resource bfin_sir_resources[] = {
99#ifdef CONFIG_BFIN_SIR0 98#ifdef CONFIG_BFIN_SIR0
99static struct resource bfin_sir0_resources[] = {
100 { 100 {
101 .start = 0xFFC00400, 101 .start = 0xFFC00400,
102 .end = 0xFFC004FF, 102 .end = 0xFFC004FF,
103 .flags = IORESOURCE_MEM, 103 .flags = IORESOURCE_MEM,
104 }, 104 },
105 {
106 .start = IRQ_UART0_RX,
107 .end = IRQ_UART0_RX+1,
108 .flags = IORESOURCE_IRQ,
109 },
110 {
111 .start = CH_UART0_RX,
112 .end = CH_UART0_RX+1,
113 .flags = IORESOURCE_DMA,
114 },
115};
116static struct platform_device bfin_sir0_device = {
117 .name = "bfin_sir",
118 .id = 0,
119 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
120 .resource = bfin_sir0_resources,
121};
105#endif 122#endif
106#ifdef CONFIG_BFIN_SIR1 123#ifdef CONFIG_BFIN_SIR1
124static struct resource bfin_sir1_resources[] = {
107 { 125 {
108 .start = 0xFFC02000, 126 .start = 0xFFC02000,
109 .end = 0xFFC020FF, 127 .end = 0xFFC020FF,
110 .flags = IORESOURCE_MEM, 128 .flags = IORESOURCE_MEM,
111 }, 129 },
130 {
131 .start = IRQ_UART1_RX,
132 .end = IRQ_UART1_RX+1,
133 .flags = IORESOURCE_IRQ,
134 },
135 {
136 .start = CH_UART1_RX,
137 .end = CH_UART1_RX+1,
138 .flags = IORESOURCE_DMA,
139 },
140};
141static struct platform_device bfin_sir1_device = {
142 .name = "bfin_sir",
143 .id = 1,
144 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
145 .resource = bfin_sir1_resources,
146};
112#endif 147#endif
113#ifdef CONFIG_BFIN_SIR2 148#ifdef CONFIG_BFIN_SIR2
149static struct resource bfin_sir2_resources[] = {
114 { 150 {
115 .start = 0xFFC02100, 151 .start = 0xFFC02100,
116 .end = 0xFFC021FF, 152 .end = 0xFFC021FF,
117 .flags = IORESOURCE_MEM, 153 .flags = IORESOURCE_MEM,
118 }, 154 },
119#endif 155 {
156 .start = IRQ_UART2_RX,
157 .end = IRQ_UART2_RX+1,
158 .flags = IORESOURCE_IRQ,
159 },
160 {
161 .start = CH_UART2_RX,
162 .end = CH_UART2_RX+1,
163 .flags = IORESOURCE_DMA,
164 },
120}; 165};
121 166static struct platform_device bfin_sir2_device = {
122static struct platform_device bfin_sir_device = {
123 .name = "bfin_sir", 167 .name = "bfin_sir",
124 .id = 0, 168 .id = 2,
125 .num_resources = ARRAY_SIZE(bfin_sir_resources), 169 .num_resources = ARRAY_SIZE(bfin_sir2_resources),
126 .resource = bfin_sir_resources, 170 .resource = bfin_sir2_resources,
127}; 171};
128#endif 172#endif
173#endif
129 174
130/* 175/*
131 * USB-LAN EzExtender board 176 * USB-LAN EzExtender board
@@ -519,7 +564,15 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
519#endif 564#endif
520 565
521#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 566#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
522 &bfin_sir_device, 567#ifdef CONFIG_BFIN_SIR0
568 &bfin_sir0_device,
569#endif
570#ifdef CONFIG_BFIN_SIR1
571 &bfin_sir1_device,
572#endif
573#ifdef CONFIG_BFIN_SIR2
574 &bfin_sir2_device,
575#endif
523#endif 576#endif
524 577
525#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 578#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index d0065c37795e..d063e0f2dbf5 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -187,44 +187,107 @@ static struct platform_device bfin_uart_device = {
187#endif 187#endif
188 188
189#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 189#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
190static struct resource bfin_sir_resources[] = {
191#ifdef CONFIG_BFIN_SIR0 190#ifdef CONFIG_BFIN_SIR0
191static struct resource bfin_sir0_resources[] = {
192 { 192 {
193 .start = 0xFFC00400, 193 .start = 0xFFC00400,
194 .end = 0xFFC004FF, 194 .end = 0xFFC004FF,
195 .flags = IORESOURCE_MEM, 195 .flags = IORESOURCE_MEM,
196 }, 196 },
197 {
198 .start = IRQ_UART0_RX,
199 .end = IRQ_UART0_RX+1,
200 .flags = IORESOURCE_IRQ,
201 },
202 {
203 .start = CH_UART0_RX,
204 .end = CH_UART0_RX+1,
205 .flags = IORESOURCE_DMA,
206 },
207};
208static struct platform_device bfin_sir0_device = {
209 .name = "bfin_sir",
210 .id = 0,
211 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
212 .resource = bfin_sir0_resources,
213};
197#endif 214#endif
198#ifdef CONFIG_BFIN_SIR1 215#ifdef CONFIG_BFIN_SIR1
216static struct resource bfin_sir1_resources[] = {
199 { 217 {
200 .start = 0xFFC02000, 218 .start = 0xFFC02000,
201 .end = 0xFFC020FF, 219 .end = 0xFFC020FF,
202 .flags = IORESOURCE_MEM, 220 .flags = IORESOURCE_MEM,
203 }, 221 },
222 {
223 .start = IRQ_UART1_RX,
224 .end = IRQ_UART1_RX+1,
225 .flags = IORESOURCE_IRQ,
226 },
227 {
228 .start = CH_UART1_RX,
229 .end = CH_UART1_RX+1,
230 .flags = IORESOURCE_DMA,
231 },
232};
233static struct platform_device bfin_sir1_device = {
234 .name = "bfin_sir",
235 .id = 1,
236 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
237 .resource = bfin_sir1_resources,
238};
204#endif 239#endif
205#ifdef CONFIG_BFIN_SIR2 240#ifdef CONFIG_BFIN_SIR2
241static struct resource bfin_sir2_resources[] = {
206 { 242 {
207 .start = 0xFFC02100, 243 .start = 0xFFC02100,
208 .end = 0xFFC021FF, 244 .end = 0xFFC021FF,
209 .flags = IORESOURCE_MEM, 245 .flags = IORESOURCE_MEM,
210 }, 246 },
247 {
248 .start = IRQ_UART2_RX,
249 .end = IRQ_UART2_RX+1,
250 .flags = IORESOURCE_IRQ,
251 },
252 {
253 .start = CH_UART2_RX,
254 .end = CH_UART2_RX+1,
255 .flags = IORESOURCE_DMA,
256 },
257};
258static struct platform_device bfin_sir2_device = {
259 .name = "bfin_sir",
260 .id = 2,
261 .num_resources = ARRAY_SIZE(bfin_sir2_resources),
262 .resource = bfin_sir2_resources,
263};
211#endif 264#endif
212#ifdef CONFIG_BFIN_SIR3 265#ifdef CONFIG_BFIN_SIR3
266static struct resource bfin_sir3_resources[] = {
213 { 267 {
214 .start = 0xFFC03100, 268 .start = 0xFFC03100,
215 .end = 0xFFC031FF, 269 .end = 0xFFC031FF,
216 .flags = IORESOURCE_MEM, 270 .flags = IORESOURCE_MEM,
217 }, 271 },
218#endif 272 {
273 .start = IRQ_UART3_RX,
274 .end = IRQ_UART3_RX+1,
275 .flags = IORESOURCE_IRQ,
276 },
277 {
278 .start = CH_UART3_RX,
279 .end = CH_UART3_RX+1,
280 .flags = IORESOURCE_DMA,
281 },
219}; 282};
220 283static struct platform_device bfin_sir3_device = {
221static struct platform_device bfin_sir_device = {
222 .name = "bfin_sir", 284 .name = "bfin_sir",
223 .id = 0, 285 .id = 3,
224 .num_resources = ARRAY_SIZE(bfin_sir_resources), 286 .num_resources = ARRAY_SIZE(bfin_sir3_resources),
225 .resource = bfin_sir_resources, 287 .resource = bfin_sir3_resources,
226}; 288};
227#endif 289#endif
290#endif
228 291
229#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 292#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
230static struct resource smsc911x_resources[] = { 293static struct resource smsc911x_resources[] = {
@@ -696,7 +759,18 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
696#endif 759#endif
697 760
698#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 761#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
699 &bfin_sir_device, 762#ifdef CONFIG_BFIN_SIR0
763 &bfin_sir0_device,
764#endif
765#ifdef CONFIG_BFIN_SIR1
766 &bfin_sir1_device,
767#endif
768#ifdef CONFIG_BFIN_SIR2
769 &bfin_sir2_device,
770#endif
771#ifdef CONFIG_BFIN_SIR3
772 &bfin_sir3_device,
773#endif
700#endif 774#endif
701 775
702#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 776#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 49fac4c8e610..dae7c1165f16 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -255,44 +255,107 @@ static struct platform_device bfin_uart_device = {
255#endif 255#endif
256 256
257#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 257#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
258static struct resource bfin_sir_resources[] = {
259#ifdef CONFIG_BFIN_SIR0 258#ifdef CONFIG_BFIN_SIR0
259static struct resource bfin_sir0_resources[] = {
260 { 260 {
261 .start = 0xFFC00400, 261 .start = 0xFFC00400,
262 .end = 0xFFC004FF, 262 .end = 0xFFC004FF,
263 .flags = IORESOURCE_MEM, 263 .flags = IORESOURCE_MEM,
264 }, 264 },
265 {
266 .start = IRQ_UART0_RX,
267 .end = IRQ_UART0_RX+1,
268 .flags = IORESOURCE_IRQ,
269 },
270 {
271 .start = CH_UART0_RX,
272 .end = CH_UART0_RX+1,
273 .flags = IORESOURCE_DMA,
274 },
275};
276static struct platform_device bfin_sir0_device = {
277 .name = "bfin_sir",
278 .id = 0,
279 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
280 .resource = bfin_sir0_resources,
281};
265#endif 282#endif
266#ifdef CONFIG_BFIN_SIR1 283#ifdef CONFIG_BFIN_SIR1
284static struct resource bfin_sir1_resources[] = {
267 { 285 {
268 .start = 0xFFC02000, 286 .start = 0xFFC02000,
269 .end = 0xFFC020FF, 287 .end = 0xFFC020FF,
270 .flags = IORESOURCE_MEM, 288 .flags = IORESOURCE_MEM,
271 }, 289 },
290 {
291 .start = IRQ_UART1_RX,
292 .end = IRQ_UART1_RX+1,
293 .flags = IORESOURCE_IRQ,
294 },
295 {
296 .start = CH_UART1_RX,
297 .end = CH_UART1_RX+1,
298 .flags = IORESOURCE_DMA,
299 },
300};
301static struct platform_device bfin_sir1_device = {
302 .name = "bfin_sir",
303 .id = 1,
304 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
305 .resource = bfin_sir1_resources,
306};
272#endif 307#endif
273#ifdef CONFIG_BFIN_SIR2 308#ifdef CONFIG_BFIN_SIR2
309static struct resource bfin_sir2_resources[] = {
274 { 310 {
275 .start = 0xFFC02100, 311 .start = 0xFFC02100,
276 .end = 0xFFC021FF, 312 .end = 0xFFC021FF,
277 .flags = IORESOURCE_MEM, 313 .flags = IORESOURCE_MEM,
278 }, 314 },
315 {
316 .start = IRQ_UART2_RX,
317 .end = IRQ_UART2_RX+1,
318 .flags = IORESOURCE_IRQ,
319 },
320 {
321 .start = CH_UART2_RX,
322 .end = CH_UART2_RX+1,
323 .flags = IORESOURCE_DMA,
324 },
325};
326static struct platform_device bfin_sir2_device = {
327 .name = "bfin_sir",
328 .id = 2,
329 .num_resources = ARRAY_SIZE(bfin_sir2_resources),
330 .resource = bfin_sir2_resources,
331};
279#endif 332#endif
280#ifdef CONFIG_BFIN_SIR3 333#ifdef CONFIG_BFIN_SIR3
334static struct resource bfin_sir3_resources[] = {
281 { 335 {
282 .start = 0xFFC03100, 336 .start = 0xFFC03100,
283 .end = 0xFFC031FF, 337 .end = 0xFFC031FF,
284 .flags = IORESOURCE_MEM, 338 .flags = IORESOURCE_MEM,
285 }, 339 },
286#endif 340 {
341 .start = IRQ_UART3_RX,
342 .end = IRQ_UART3_RX+1,
343 .flags = IORESOURCE_IRQ,
344 },
345 {
346 .start = CH_UART3_RX,
347 .end = CH_UART3_RX+1,
348 .flags = IORESOURCE_DMA,
349 },
287}; 350};
288 351static struct platform_device bfin_sir3_device = {
289static struct platform_device bfin_sir_device = {
290 .name = "bfin_sir", 352 .name = "bfin_sir",
291 .id = 0, 353 .id = 3,
292 .num_resources = ARRAY_SIZE(bfin_sir_resources), 354 .num_resources = ARRAY_SIZE(bfin_sir3_resources),
293 .resource = bfin_sir_resources, 355 .resource = bfin_sir3_resources,
294}; 356};
295#endif 357#endif
358#endif
296 359
297#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 360#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
298static struct resource smsc911x_resources[] = { 361static struct resource smsc911x_resources[] = {
@@ -805,7 +868,18 @@ static struct platform_device *ezkit_devices[] __initdata = {
805#endif 868#endif
806 869
807#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 870#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
808 &bfin_sir_device, 871#ifdef CONFIG_BFIN_SIR0
872 &bfin_sir0_device,
873#endif
874#ifdef CONFIG_BFIN_SIR1
875 &bfin_sir1_device,
876#endif
877#ifdef CONFIG_BFIN_SIR2
878 &bfin_sir2_device,
879#endif
880#ifdef CONFIG_BFIN_SIR3
881 &bfin_sir3_device,
882#endif
809#endif 883#endif
810 884
811#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 885#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 2ba5975790e9..6880d1ebfe60 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -300,23 +300,33 @@ static struct platform_device bfin_uart_device = {
300#endif 300#endif
301 301
302#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 302#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
303static struct resource bfin_sir_resources[] = {
304#ifdef CONFIG_BFIN_SIR0 303#ifdef CONFIG_BFIN_SIR0
304static struct resource bfin_sir0_resources[] = {
305 { 305 {
306 .start = 0xFFC00400, 306 .start = 0xFFC00400,
307 .end = 0xFFC004FF, 307 .end = 0xFFC004FF,
308 .flags = IORESOURCE_MEM, 308 .flags = IORESOURCE_MEM,
309 }, 309 },
310#endif 310 {
311 .start = IRQ_UART0_RX,
312 .end = IRQ_UART0_RX+1,
313 .flags = IORESOURCE_IRQ,
314 },
315 {
316 .start = CH_UART0_RX,
317 .end = CH_UART0_RX+1,
318 .flags = IORESOURCE_DMA,
319 },
311}; 320};
312 321
313static struct platform_device bfin_sir_device = { 322static struct platform_device bfin_sir0_device = {
314 .name = "bfin_sir", 323 .name = "bfin_sir",
315 .id = 0, 324 .id = 0,
316 .num_resources = ARRAY_SIZE(bfin_sir_resources), 325 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
317 .resource = bfin_sir_resources, 326 .resource = bfin_sir0_resources,
318}; 327};
319#endif 328#endif
329#endif
320 330
321#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 331#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
322#define PATA_INT IRQ_PF46 332#define PATA_INT IRQ_PF46
@@ -395,7 +405,9 @@ static struct platform_device *cm_bf561_devices[] __initdata = {
395#endif 405#endif
396 406
397#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 407#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
398 &bfin_sir_device, 408#ifdef CONFIG_BFIN_SIR0
409 &bfin_sir0_device,
410#endif
399#endif 411#endif
400 412
401#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 413#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 1c3ab799b28d..0e2178a1aec5 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -210,23 +210,33 @@ static struct platform_device bfin_uart_device = {
210#endif 210#endif
211 211
212#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 212#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
213static struct resource bfin_sir_resources[] = {
214#ifdef CONFIG_BFIN_SIR0 213#ifdef CONFIG_BFIN_SIR0
214static struct resource bfin_sir0_resources[] = {
215 { 215 {
216 .start = 0xFFC00400, 216 .start = 0xFFC00400,
217 .end = 0xFFC004FF, 217 .end = 0xFFC004FF,
218 .flags = IORESOURCE_MEM, 218 .flags = IORESOURCE_MEM,
219 }, 219 },
220#endif 220 {
221 .start = IRQ_UART0_RX,
222 .end = IRQ_UART0_RX+1,
223 .flags = IORESOURCE_IRQ,
224 },
225 {
226 .start = CH_UART0_RX,
227 .end = CH_UART0_RX+1,
228 .flags = IORESOURCE_DMA,
229 },
221}; 230};
222 231
223static struct platform_device bfin_sir_device = { 232static struct platform_device bfin_sir0_device = {
224 .name = "bfin_sir", 233 .name = "bfin_sir",
225 .id = 0, 234 .id = 0,
226 .num_resources = ARRAY_SIZE(bfin_sir_resources), 235 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
227 .resource = bfin_sir_resources, 236 .resource = bfin_sir0_resources,
228}; 237};
229#endif 238#endif
239#endif
230 240
231#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 241#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
232static struct mtd_partition ezkit_partitions[] = { 242static struct mtd_partition ezkit_partitions[] = {
@@ -451,7 +461,9 @@ static struct platform_device *ezkit_devices[] __initdata = {
451#endif 461#endif
452 462
453#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 463#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
454 &bfin_sir_device, 464#ifdef CONFIG_BFIN_SIR0
465 &bfin_sir0_device,
466#endif
455#endif 467#endif
456 468
457#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 469#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
diff --git a/arch/blackfin/mach-bf561/boards/generic_board.c b/arch/blackfin/mach-bf561/boards/generic_board.c
index 2faa0072d614..0ba366a0e696 100644
--- a/arch/blackfin/mach-bf561/boards/generic_board.c
+++ b/arch/blackfin/mach-bf561/boards/generic_board.c
@@ -62,10 +62,45 @@ static struct platform_device smc91x_device = {
62}; 62};
63#endif 63#endif
64 64
65#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
66#ifdef CONFIG_BFIN_SIR0
67static struct resource bfin_sir0_resources[] = {
68 {
69 .start = 0xFFC00400,
70 .end = 0xFFC004FF,
71 .flags = IORESOURCE_MEM,
72 },
73 {
74 .start = IRQ_UART0_RX,
75 .end = IRQ_UART0_RX+1,
76 .flags = IORESOURCE_IRQ,
77 },
78 {
79 .start = CH_UART0_RX,
80 .end = CH_UART0_RX+1,
81 .flags = IORESOURCE_DMA,
82 },
83};
84
85static struct platform_device bfin_sir0_device = {
86 .name = "bfin_sir",
87 .id = 0,
88 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
89 .resource = bfin_sir0_resources,
90};
91#endif
92#endif
93
65static struct platform_device *generic_board_devices[] __initdata = { 94static struct platform_device *generic_board_devices[] __initdata = {
66#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 95#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
67 &smc91x_device, 96 &smc91x_device,
68#endif 97#endif
98
99#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
100#ifdef CONFIG_BFIN_SIR0
101 &bfin_sir0_device,
102#endif
103#endif
69}; 104};
70 105
71static int __init generic_board_init(void) 106static int __init generic_board_init(void)
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c
index c9174b39f98d..6f77dbe952f5 100644
--- a/arch/blackfin/mach-bf561/boards/tepla.c
+++ b/arch/blackfin/mach-bf561/boards/tepla.c
@@ -44,8 +44,42 @@ static struct platform_device smc91x_device = {
44 .resource = smc91x_resources, 44 .resource = smc91x_resources,
45}; 45};
46 46
47#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
48#ifdef CONFIG_BFIN_SIR0
49static struct resource bfin_sir0_resources[] = {
50 {
51 .start = 0xFFC00400,
52 .end = 0xFFC004FF,
53 .flags = IORESOURCE_MEM,
54 },
55 {
56 .start = IRQ_UART0_RX,
57 .end = IRQ_UART0_RX+1,
58 .flags = IORESOURCE_IRQ,
59 },
60 {
61 .start = CH_UART0_RX,
62 .end = CH_UART0_RX+1,
63 .flags = IORESOURCE_DMA,
64 },
65};
66
67static struct platform_device bfin_sir0_device = {
68 .name = "bfin_sir",
69 .id = 0,
70 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
71 .resource = bfin_sir0_resources,
72};
73#endif
74#endif
75
47static struct platform_device *tepla_devices[] __initdata = { 76static struct platform_device *tepla_devices[] __initdata = {
48 &smc91x_device, 77 &smc91x_device,
78#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
79#ifdef CONFIG_BFIN_SIR0
80 &bfin_sir0_device,
81#endif
82#endif
49}; 83};
50 84
51static int __init tepla_init(void) 85static int __init tepla_init(void)