aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2009-09-23 01:01:56 -0400
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:45 -0500
commitdf5de261306d9bfc1ed9121595593b10a7626b95 (patch)
tree6bfd86734f017ddcaeb4fc03b0f80819916e64e9 /arch/blackfin/mach-bf537
parent08a54bffaf7d5dc9391518323234ce9f9ea4be8e (diff)
Blackfin: move SPORT 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 emulated 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-bf537')
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537e.c63
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537u.c63
-rw-r--r--arch/blackfin/mach-bf537/boards/minotaur.c63
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c67
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c63
5 files changed, 317 insertions, 2 deletions
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index abb32ddc5122..b4837776b274 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -526,16 +526,75 @@ static struct platform_device i2c_bfin_twi_device = {
526#endif 526#endif
527 527
528#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 528#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
529#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
530static struct resource bfin_sport0_uart_resources[] = {
531 {
532 .start = SPORT0_TCR1,
533 .end = SPORT0_MRCS3+4,
534 .flags = IORESOURCE_MEM,
535 },
536 {
537 .start = IRQ_SPORT0_RX,
538 .end = IRQ_SPORT0_RX+1,
539 .flags = IORESOURCE_IRQ,
540 },
541 {
542 .start = IRQ_SPORT0_ERROR,
543 .end = IRQ_SPORT0_ERROR,
544 .flags = IORESOURCE_IRQ,
545 },
546};
547
548unsigned short bfin_sport0_peripherals[] = {
549 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
550 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
551};
552
529static struct platform_device bfin_sport0_uart_device = { 553static struct platform_device bfin_sport0_uart_device = {
530 .name = "bfin-sport-uart", 554 .name = "bfin-sport-uart",
531 .id = 0, 555 .id = 0,
556 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
557 .resource = bfin_sport0_uart_resources,
558 .dev = {
559 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
560 },
561};
562#endif
563#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
564static struct resource bfin_sport1_uart_resources[] = {
565 {
566 .start = SPORT1_TCR1,
567 .end = SPORT1_MRCS3+4,
568 .flags = IORESOURCE_MEM,
569 },
570 {
571 .start = IRQ_SPORT1_RX,
572 .end = IRQ_SPORT1_RX+1,
573 .flags = IORESOURCE_IRQ,
574 },
575 {
576 .start = IRQ_SPORT1_ERROR,
577 .end = IRQ_SPORT1_ERROR,
578 .flags = IORESOURCE_IRQ,
579 },
580};
581
582unsigned short bfin_sport1_peripherals[] = {
583 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
584 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
532}; 585};
533 586
534static struct platform_device bfin_sport1_uart_device = { 587static struct platform_device bfin_sport1_uart_device = {
535 .name = "bfin-sport-uart", 588 .name = "bfin-sport-uart",
536 .id = 1, 589 .id = 1,
590 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
591 .resource = bfin_sport1_uart_resources,
592 .dev = {
593 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
594 },
537}; 595};
538#endif 596#endif
597#endif
539 598
540#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 599#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
541static struct platform_device bfin_mii_bus = { 600static struct platform_device bfin_mii_bus = {
@@ -647,9 +706,13 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
647#endif 706#endif
648 707
649#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 708#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
709#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
650 &bfin_sport0_uart_device, 710 &bfin_sport0_uart_device,
711#endif
712#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
651 &bfin_sport1_uart_device, 713 &bfin_sport1_uart_device,
652#endif 714#endif
715#endif
653 716
654#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 717#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
655 &isp1362_hcd_device, 718 &isp1362_hcd_device,
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index b3182face957..c6802be65fb1 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -491,16 +491,75 @@ static struct platform_device i2c_bfin_twi_device = {
491#endif 491#endif
492 492
493#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 493#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
494#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
495static struct resource bfin_sport0_uart_resources[] = {
496 {
497 .start = SPORT0_TCR1,
498 .end = SPORT0_MRCS3+4,
499 .flags = IORESOURCE_MEM,
500 },
501 {
502 .start = IRQ_SPORT0_RX,
503 .end = IRQ_SPORT0_RX+1,
504 .flags = IORESOURCE_IRQ,
505 },
506 {
507 .start = IRQ_SPORT0_ERROR,
508 .end = IRQ_SPORT0_ERROR,
509 .flags = IORESOURCE_IRQ,
510 },
511};
512
513unsigned short bfin_sport0_peripherals[] = {
514 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
515 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
516};
517
494static struct platform_device bfin_sport0_uart_device = { 518static struct platform_device bfin_sport0_uart_device = {
495 .name = "bfin-sport-uart", 519 .name = "bfin-sport-uart",
496 .id = 0, 520 .id = 0,
521 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
522 .resource = bfin_sport0_uart_resources,
523 .dev = {
524 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
525 },
526};
527#endif
528#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
529static struct resource bfin_sport1_uart_resources[] = {
530 {
531 .start = SPORT1_TCR1,
532 .end = SPORT1_MRCS3+4,
533 .flags = IORESOURCE_MEM,
534 },
535 {
536 .start = IRQ_SPORT1_RX,
537 .end = IRQ_SPORT1_RX+1,
538 .flags = IORESOURCE_IRQ,
539 },
540 {
541 .start = IRQ_SPORT1_ERROR,
542 .end = IRQ_SPORT1_ERROR,
543 .flags = IORESOURCE_IRQ,
544 },
545};
546
547unsigned short bfin_sport1_peripherals[] = {
548 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
549 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
497}; 550};
498 551
499static struct platform_device bfin_sport1_uart_device = { 552static struct platform_device bfin_sport1_uart_device = {
500 .name = "bfin-sport-uart", 553 .name = "bfin-sport-uart",
501 .id = 1, 554 .id = 1,
555 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
556 .resource = bfin_sport1_uart_resources,
557 .dev = {
558 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
559 },
502}; 560};
503#endif 561#endif
562#endif
504 563
505#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 564#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
506static struct platform_device bfin_mii_bus = { 565static struct platform_device bfin_mii_bus = {
@@ -612,9 +671,13 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
612#endif 671#endif
613 672
614#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 673#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
674#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
615 &bfin_sport0_uart_device, 675 &bfin_sport0_uart_device,
676#endif
677#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
616 &bfin_sport1_uart_device, 678 &bfin_sport1_uart_device,
617#endif 679#endif
680#endif
618 681
619#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 682#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
620 &isp1362_hcd_device, 683 &isp1362_hcd_device,
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c
index 58d6a20e7a0d..6403964490d9 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -377,16 +377,75 @@ static struct platform_device i2c_bfin_twi_device = {
377#endif 377#endif
378 378
379#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 379#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
380#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
381static struct resource bfin_sport0_uart_resources[] = {
382 {
383 .start = SPORT0_TCR1,
384 .end = SPORT0_MRCS3+4,
385 .flags = IORESOURCE_MEM,
386 },
387 {
388 .start = IRQ_SPORT0_RX,
389 .end = IRQ_SPORT0_RX+1,
390 .flags = IORESOURCE_IRQ,
391 },
392 {
393 .start = IRQ_SPORT0_ERROR,
394 .end = IRQ_SPORT0_ERROR,
395 .flags = IORESOURCE_IRQ,
396 },
397};
398
399unsigned short bfin_sport0_peripherals[] = {
400 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
401 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
402};
403
380static struct platform_device bfin_sport0_uart_device = { 404static struct platform_device bfin_sport0_uart_device = {
381 .name = "bfin-sport-uart", 405 .name = "bfin-sport-uart",
382 .id = 0, 406 .id = 0,
407 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
408 .resource = bfin_sport0_uart_resources,
409 .dev = {
410 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
411 },
412};
413#endif
414#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
415static struct resource bfin_sport1_uart_resources[] = {
416 {
417 .start = SPORT1_TCR1,
418 .end = SPORT1_MRCS3+4,
419 .flags = IORESOURCE_MEM,
420 },
421 {
422 .start = IRQ_SPORT1_RX,
423 .end = IRQ_SPORT1_RX+1,
424 .flags = IORESOURCE_IRQ,
425 },
426 {
427 .start = IRQ_SPORT1_ERROR,
428 .end = IRQ_SPORT1_ERROR,
429 .flags = IORESOURCE_IRQ,
430 },
431};
432
433unsigned short bfin_sport1_peripherals[] = {
434 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
435 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
383}; 436};
384 437
385static struct platform_device bfin_sport1_uart_device = { 438static struct platform_device bfin_sport1_uart_device = {
386 .name = "bfin-sport-uart", 439 .name = "bfin-sport-uart",
387 .id = 1, 440 .id = 1,
441 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
442 .resource = bfin_sport1_uart_resources,
443 .dev = {
444 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
445 },
388}; 446};
389#endif 447#endif
448#endif
390 449
391static struct platform_device *minotaur_devices[] __initdata = { 450static struct platform_device *minotaur_devices[] __initdata = {
392#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 451#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
@@ -433,9 +492,13 @@ static struct platform_device *minotaur_devices[] __initdata = {
433#endif 492#endif
434 493
435#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 494#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
495#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
436 &bfin_sport0_uart_device, 496 &bfin_sport0_uart_device,
497#endif
498#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
437 &bfin_sport1_uart_device, 499 &bfin_sport1_uart_device,
438#endif 500#endif
501#endif
439 502
440}; 503};
441 504
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 554f82d6f9da..df4b6b5c08d4 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -1677,16 +1677,75 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1677}; 1677};
1678 1678
1679#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1679#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1680#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1681static struct resource bfin_sport0_uart_resources[] = {
1682 {
1683 .start = SPORT0_TCR1,
1684 .end = SPORT0_MRCS3+4,
1685 .flags = IORESOURCE_MEM,
1686 },
1687 {
1688 .start = IRQ_SPORT0_RX,
1689 .end = IRQ_SPORT0_RX+1,
1690 .flags = IORESOURCE_IRQ,
1691 },
1692 {
1693 .start = IRQ_SPORT0_ERROR,
1694 .end = IRQ_SPORT0_ERROR,
1695 .flags = IORESOURCE_IRQ,
1696 },
1697};
1698
1699unsigned short bfin_sport0_peripherals[] = {
1700 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
1701 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
1702};
1703
1680static struct platform_device bfin_sport0_uart_device = { 1704static struct platform_device bfin_sport0_uart_device = {
1681 .name = "bfin-sport-uart", 1705 .name = "bfin-sport-uart",
1682 .id = 0, 1706 .id = 0,
1707 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
1708 .resource = bfin_sport0_uart_resources,
1709 .dev = {
1710 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
1711 },
1712};
1713#endif
1714#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1715static struct resource bfin_sport1_uart_resources[] = {
1716 {
1717 .start = SPORT1_TCR1,
1718 .end = SPORT1_MRCS3+4,
1719 .flags = IORESOURCE_MEM,
1720 },
1721 {
1722 .start = IRQ_SPORT1_RX,
1723 .end = IRQ_SPORT1_RX+1,
1724 .flags = IORESOURCE_IRQ,
1725 },
1726 {
1727 .start = IRQ_SPORT1_ERROR,
1728 .end = IRQ_SPORT1_ERROR,
1729 .flags = IORESOURCE_IRQ,
1730 },
1731};
1732
1733unsigned short bfin_sport1_peripherals[] = {
1734 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
1735 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
1683}; 1736};
1684 1737
1685static struct platform_device bfin_sport1_uart_device = { 1738static struct platform_device bfin_sport1_uart_device = {
1686 .name = "bfin-sport-uart", 1739 .name = "bfin-sport-uart",
1687 .id = 1, 1740 .id = 1,
1741 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
1742 .resource = bfin_sport1_uart_resources,
1743 .dev = {
1744 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
1745 },
1688}; 1746};
1689#endif 1747#endif
1748#endif
1690 1749
1691#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 1750#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1692#define CF_IDE_NAND_CARD_USE_HDD_INTERFACE 1751#define CF_IDE_NAND_CARD_USE_HDD_INTERFACE
@@ -1867,9 +1926,13 @@ static struct platform_device *stamp_devices[] __initdata = {
1867#endif 1926#endif
1868 1927
1869#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1928#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1929#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1870 &bfin_sport0_uart_device, 1930 &bfin_sport0_uart_device,
1931#endif
1932#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1871 &bfin_sport1_uart_device, 1933 &bfin_sport1_uart_device,
1872#endif 1934#endif
1935#endif
1873 1936
1874#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 1937#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1875 &bfin_pata_device, 1938 &bfin_pata_device,
@@ -1895,10 +1958,10 @@ static struct platform_device *stamp_devices[] __initdata = {
1895static int __init stamp_init(void) 1958static int __init stamp_init(void)
1896{ 1959{
1897 printk(KERN_INFO "%s(): registering device resources\n", __func__); 1960 printk(KERN_INFO "%s(): registering device resources\n", __func__);
1898 i2c_register_board_info(0, bfin_i2c_board_info,
1899 ARRAY_SIZE(bfin_i2c_board_info));
1900 bfin_plat_nand_init(); 1961 bfin_plat_nand_init();
1901 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 1962 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
1963 i2c_register_board_info(0, bfin_i2c_board_info,
1964 ARRAY_SIZE(bfin_i2c_board_info));
1902 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 1965 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
1903 1966
1904 return 0; 1967 return 0;
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index d77ca5b75685..69a2fb804724 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -493,16 +493,75 @@ static struct platform_device i2c_bfin_twi_device = {
493#endif 493#endif
494 494
495#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 495#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
496#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
497static struct resource bfin_sport0_uart_resources[] = {
498 {
499 .start = SPORT0_TCR1,
500 .end = SPORT0_MRCS3+4,
501 .flags = IORESOURCE_MEM,
502 },
503 {
504 .start = IRQ_SPORT0_RX,
505 .end = IRQ_SPORT0_RX+1,
506 .flags = IORESOURCE_IRQ,
507 },
508 {
509 .start = IRQ_SPORT0_ERROR,
510 .end = IRQ_SPORT0_ERROR,
511 .flags = IORESOURCE_IRQ,
512 },
513};
514
515unsigned short bfin_sport0_peripherals[] = {
516 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
517 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
518};
519
496static struct platform_device bfin_sport0_uart_device = { 520static struct platform_device bfin_sport0_uart_device = {
497 .name = "bfin-sport-uart", 521 .name = "bfin-sport-uart",
498 .id = 0, 522 .id = 0,
523 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
524 .resource = bfin_sport0_uart_resources,
525 .dev = {
526 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
527 },
528};
529#endif
530#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
531static struct resource bfin_sport1_uart_resources[] = {
532 {
533 .start = SPORT1_TCR1,
534 .end = SPORT1_MRCS3+4,
535 .flags = IORESOURCE_MEM,
536 },
537 {
538 .start = IRQ_SPORT1_RX,
539 .end = IRQ_SPORT1_RX+1,
540 .flags = IORESOURCE_IRQ,
541 },
542 {
543 .start = IRQ_SPORT1_ERROR,
544 .end = IRQ_SPORT1_ERROR,
545 .flags = IORESOURCE_IRQ,
546 },
547};
548
549unsigned short bfin_sport1_peripherals[] = {
550 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
551 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
499}; 552};
500 553
501static struct platform_device bfin_sport1_uart_device = { 554static struct platform_device bfin_sport1_uart_device = {
502 .name = "bfin-sport-uart", 555 .name = "bfin-sport-uart",
503 .id = 1, 556 .id = 1,
557 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
558 .resource = bfin_sport1_uart_resources,
559 .dev = {
560 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
561 },
504}; 562};
505#endif 563#endif
564#endif
506 565
507#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 566#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
508static struct platform_device bfin_mii_bus = { 567static struct platform_device bfin_mii_bus = {
@@ -614,9 +673,13 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
614#endif 673#endif
615 674
616#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 675#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
676#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
617 &bfin_sport0_uart_device, 677 &bfin_sport0_uart_device,
678#endif
679#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
618 &bfin_sport1_uart_device, 680 &bfin_sport1_uart_device,
619#endif 681#endif
682#endif
620 683
621#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 684#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
622 &isp1362_hcd_device, 685 &isp1362_hcd_device,