diff options
Diffstat (limited to 'arch/blackfin/mach-bf561/boards/ezkit.c')
-rw-r--r-- | arch/blackfin/mach-bf561/boards/ezkit.c | 89 |
1 files changed, 47 insertions, 42 deletions
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 50b4cdceccfe..0e2178a1aec5 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -43,53 +43,42 @@ | |||
43 | /* | 43 | /* |
44 | * Name the Board for the /proc/cpuinfo | 44 | * Name the Board for the /proc/cpuinfo |
45 | */ | 45 | */ |
46 | const char bfin_board_name[] = "ADDS-BF561-EZKIT"; | 46 | const char bfin_board_name[] = "ADI BF561-EZKIT"; |
47 | |||
48 | #define ISP1761_BASE 0x2C0F0000 | ||
49 | #define ISP1761_IRQ IRQ_PF10 | ||
50 | 47 | ||
51 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | 48 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) |
52 | static struct resource bfin_isp1761_resources[] = { | 49 | #include <linux/usb/isp1760.h> |
53 | { | 50 | static struct resource bfin_isp1760_resources[] = { |
54 | .name = "isp1761-regs", | 51 | [0] = { |
55 | .start = ISP1761_BASE + 0x00000000, | 52 | .start = 0x2C0F0000, |
56 | .end = ISP1761_BASE + 0x000fffff, | 53 | .end = 0x203C0000 + 0xfffff, |
57 | .flags = IORESOURCE_MEM, | 54 | .flags = IORESOURCE_MEM, |
58 | }, | 55 | }, |
59 | { | 56 | [1] = { |
60 | .start = ISP1761_IRQ, | 57 | .start = IRQ_PF10, |
61 | .end = ISP1761_IRQ, | 58 | .end = IRQ_PF10, |
62 | .flags = IORESOURCE_IRQ, | 59 | .flags = IORESOURCE_IRQ, |
63 | }, | 60 | }, |
64 | }; | 61 | }; |
65 | 62 | ||
66 | static struct platform_device bfin_isp1761_device = { | 63 | static struct isp1760_platform_data isp1760_priv = { |
67 | .name = "isp1761", | 64 | .is_isp1761 = 0, |
68 | .id = 0, | 65 | .port1_disable = 0, |
69 | .num_resources = ARRAY_SIZE(bfin_isp1761_resources), | 66 | .bus_width_16 = 1, |
70 | .resource = bfin_isp1761_resources, | 67 | .port1_otg = 0, |
68 | .analog_oc = 0, | ||
69 | .dack_polarity_high = 0, | ||
70 | .dreq_polarity_high = 0, | ||
71 | }; | 71 | }; |
72 | 72 | ||
73 | static struct platform_device *bfin_isp1761_devices[] = { | 73 | static struct platform_device bfin_isp1760_device = { |
74 | &bfin_isp1761_device, | 74 | .name = "isp1760-hcd", |
75 | .id = 0, | ||
76 | .dev = { | ||
77 | .platform_data = &isp1760_priv, | ||
78 | }, | ||
79 | .num_resources = ARRAY_SIZE(bfin_isp1760_resources), | ||
80 | .resource = bfin_isp1760_resources, | ||
75 | }; | 81 | }; |
76 | |||
77 | int __init bfin_isp1761_init(void) | ||
78 | { | ||
79 | unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices); | ||
80 | |||
81 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | ||
82 | set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); | ||
83 | |||
84 | return platform_add_devices(bfin_isp1761_devices, num_devices); | ||
85 | } | ||
86 | |||
87 | void __exit bfin_isp1761_exit(void) | ||
88 | { | ||
89 | platform_device_unregister(&bfin_isp1761_device); | ||
90 | } | ||
91 | |||
92 | arch_initcall(bfin_isp1761_init); | ||
93 | #endif | 82 | #endif |
94 | 83 | ||
95 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 84 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
@@ -221,23 +210,33 @@ static struct platform_device bfin_uart_device = { | |||
221 | #endif | 210 | #endif |
222 | 211 | ||
223 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 212 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
224 | static struct resource bfin_sir_resources[] = { | ||
225 | #ifdef CONFIG_BFIN_SIR0 | 213 | #ifdef CONFIG_BFIN_SIR0 |
214 | static struct resource bfin_sir0_resources[] = { | ||
226 | { | 215 | { |
227 | .start = 0xFFC00400, | 216 | .start = 0xFFC00400, |
228 | .end = 0xFFC004FF, | 217 | .end = 0xFFC004FF, |
229 | .flags = IORESOURCE_MEM, | 218 | .flags = IORESOURCE_MEM, |
230 | }, | 219 | }, |
231 | #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 | }, | ||
232 | }; | 230 | }; |
233 | 231 | ||
234 | static struct platform_device bfin_sir_device = { | 232 | static struct platform_device bfin_sir0_device = { |
235 | .name = "bfin_sir", | 233 | .name = "bfin_sir", |
236 | .id = 0, | 234 | .id = 0, |
237 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | 235 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), |
238 | .resource = bfin_sir_resources, | 236 | .resource = bfin_sir0_resources, |
239 | }; | 237 | }; |
240 | #endif | 238 | #endif |
239 | #endif | ||
241 | 240 | ||
242 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 241 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
243 | static struct mtd_partition ezkit_partitions[] = { | 242 | static struct mtd_partition ezkit_partitions[] = { |
@@ -449,6 +448,10 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
449 | &net2272_bfin_device, | 448 | &net2272_bfin_device, |
450 | #endif | 449 | #endif |
451 | 450 | ||
451 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | ||
452 | &bfin_isp1760_device, | ||
453 | #endif | ||
454 | |||
452 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 455 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
453 | &bfin_spi0_device, | 456 | &bfin_spi0_device, |
454 | #endif | 457 | #endif |
@@ -458,7 +461,9 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
458 | #endif | 461 | #endif |
459 | 462 | ||
460 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 463 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
461 | &bfin_sir_device, | 464 | #ifdef CONFIG_BFIN_SIR0 |
465 | &bfin_sir0_device, | ||
466 | #endif | ||
462 | #endif | 467 | #endif |
463 | 468 | ||
464 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 469 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |