aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537/boards/generic_board.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf537/boards/generic_board.c')
-rw-r--r--arch/blackfin/mach-bf537/boards/generic_board.c109
1 files changed, 68 insertions, 41 deletions
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c
index 78a13d5bfd5..dd6e6bfb98e 100644
--- a/arch/blackfin/mach-bf537/boards/generic_board.c
+++ b/arch/blackfin/mach-bf537/boards/generic_board.c
@@ -50,57 +50,46 @@
50/* 50/*
51 * Name the Board for the /proc/cpuinfo 51 * Name the Board for the /proc/cpuinfo
52 */ 52 */
53const char bfin_board_name[] = "GENERIC Board"; 53const char bfin_board_name[] = "UNKNOWN BOARD";
54 54
55/* 55/*
56 * Driver needs to know address, irq and flag pin. 56 * Driver needs to know address, irq and flag pin.
57 */ 57 */
58 58
59#define ISP1761_BASE 0x203C0000
60#define ISP1761_IRQ IRQ_PF7
61
62#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 59#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
63static struct resource bfin_isp1761_resources[] = { 60#include <linux/usb/isp1760.h>
61static struct resource bfin_isp1760_resources[] = {
64 [0] = { 62 [0] = {
65 .name = "isp1761-regs", 63 .start = 0x203C0000,
66 .start = ISP1761_BASE + 0x00000000, 64 .end = 0x203C0000 + 0x000fffff,
67 .end = ISP1761_BASE + 0x000fffff,
68 .flags = IORESOURCE_MEM, 65 .flags = IORESOURCE_MEM,
69 }, 66 },
70 [1] = { 67 [1] = {
71 .start = ISP1761_IRQ, 68 .start = IRQ_PF7,
72 .end = ISP1761_IRQ, 69 .end = IRQ_PF7,
73 .flags = IORESOURCE_IRQ, 70 .flags = IORESOURCE_IRQ,
74 }, 71 },
75}; 72};
76 73
77static struct platform_device bfin_isp1761_device = { 74static struct isp1760_platform_data isp1760_priv = {
78 .name = "isp1761", 75 .is_isp1761 = 0,
79 .id = 0, 76 .port1_disable = 0,
80 .num_resources = ARRAY_SIZE(bfin_isp1761_resources), 77 .bus_width_16 = 1,
81 .resource = bfin_isp1761_resources, 78 .port1_otg = 0,
79 .analog_oc = 0,
80 .dack_polarity_high = 0,
81 .dreq_polarity_high = 0,
82}; 82};
83 83
84static struct platform_device *bfin_isp1761_devices[] = { 84static struct platform_device bfin_isp1760_device = {
85 &bfin_isp1761_device, 85 .name = "isp1760-hcd",
86 .id = 0,
87 .dev = {
88 .platform_data = &isp1760_priv,
89 },
90 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
91 .resource = bfin_isp1760_resources,
86}; 92};
87
88int __init bfin_isp1761_init(void)
89{
90 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
91
92 printk(KERN_INFO "%s(): registering device resources\n", __func__);
93 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
94
95 return platform_add_devices(bfin_isp1761_devices, num_devices);
96}
97
98void __exit bfin_isp1761_exit(void)
99{
100 platform_device_unregister(&bfin_isp1761_device);
101}
102
103arch_initcall(bfin_isp1761_init);
104#endif 93#endif
105 94
106#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 95#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
@@ -559,30 +548,59 @@ static struct platform_device bfin_uart_device = {
559#endif 548#endif
560 549
561#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 550#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
562static struct resource bfin_sir_resources[] = {
563#ifdef CONFIG_BFIN_SIR0 551#ifdef CONFIG_BFIN_SIR0
552static struct resource bfin_sir0_resources[] = {
564 { 553 {
565 .start = 0xFFC00400, 554 .start = 0xFFC00400,
566 .end = 0xFFC004FF, 555 .end = 0xFFC004FF,
567 .flags = IORESOURCE_MEM, 556 .flags = IORESOURCE_MEM,
568 }, 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};
569#endif 576#endif
570#ifdef CONFIG_BFIN_SIR1 577#ifdef CONFIG_BFIN_SIR1
578static struct resource bfin_sir1_resources[] = {
571 { 579 {
572 .start = 0xFFC02000, 580 .start = 0xFFC02000,
573 .end = 0xFFC020FF, 581 .end = 0xFFC020FF,
574 .flags = IORESOURCE_MEM, 582 .flags = IORESOURCE_MEM,
575 }, 583 },
576#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 },
577}; 594};
578 595
579static struct platform_device bfin_sir_device = { 596static struct platform_device bfin_sir1_device = {
580 .name = "bfin_sir", 597 .name = "bfin_sir",
581 .id = 0, 598 .id = 1,
582 .num_resources = ARRAY_SIZE(bfin_sir_resources), 599 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
583 .resource = bfin_sir_resources, 600 .resource = bfin_sir1_resources,
584}; 601};
585#endif 602#endif
603#endif
586 604
587#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)
588static struct resource bfin_twi0_resource[] = { 606static struct resource bfin_twi0_resource[] = {
@@ -651,6 +669,10 @@ static struct platform_device *stamp_devices[] __initdata = {
651 &net2272_bfin_device, 669 &net2272_bfin_device,
652#endif 670#endif
653 671
672#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
673 &bfin_isp1760_device,
674#endif
675
654#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 676#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
655 &bfin_spi0_device, 677 &bfin_spi0_device,
656#endif 678#endif
@@ -668,7 +690,12 @@ static struct platform_device *stamp_devices[] __initdata = {
668#endif 690#endif
669 691
670#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 692#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
671 &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
672#endif 699#endif
673 700
674#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)