diff options
Diffstat (limited to 'arch/blackfin/mach-bf548/boards/ezkit.c')
-rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 156 |
1 files changed, 119 insertions, 37 deletions
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 5288187a3ace..309c16014cae 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <asm/nand.h> | 45 | #include <asm/nand.h> |
46 | #include <asm/dpmc.h> | 46 | #include <asm/dpmc.h> |
47 | #include <asm/portmux.h> | 47 | #include <asm/portmux.h> |
48 | #include <asm/bfin_sdh.h> | ||
48 | #include <mach/bf54x_keys.h> | 49 | #include <mach/bf54x_keys.h> |
49 | #include <linux/input.h> | 50 | #include <linux/input.h> |
50 | #include <linux/spi/ad7877.h> | 51 | #include <linux/spi/ad7877.h> |
@@ -52,16 +53,16 @@ | |||
52 | /* | 53 | /* |
53 | * Name the Board for the /proc/cpuinfo | 54 | * Name the Board for the /proc/cpuinfo |
54 | */ | 55 | */ |
55 | const char bfin_board_name[] = "ADSP-BF548-EZKIT"; | 56 | const char bfin_board_name[] = "ADI BF548-EZKIT"; |
56 | 57 | ||
57 | /* | 58 | /* |
58 | * Driver needs to know address, irq and flag pin. | 59 | * Driver needs to know address, irq and flag pin. |
59 | */ | 60 | */ |
60 | 61 | ||
61 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | 62 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) |
62 | static struct resource bfin_isp1761_resources[] = { | 63 | #include <linux/usb/isp1760.h> |
64 | static struct resource bfin_isp1760_resources[] = { | ||
63 | [0] = { | 65 | [0] = { |
64 | .name = "isp1761-regs", | ||
65 | .start = 0x2C0C0000, | 66 | .start = 0x2C0C0000, |
66 | .end = 0x2C0C0000 + 0xfffff, | 67 | .end = 0x2C0C0000 + 0xfffff, |
67 | .flags = IORESOURCE_MEM, | 68 | .flags = IORESOURCE_MEM, |
@@ -73,32 +74,25 @@ static struct resource bfin_isp1761_resources[] = { | |||
73 | }, | 74 | }, |
74 | }; | 75 | }; |
75 | 76 | ||
76 | static struct platform_device bfin_isp1761_device = { | 77 | static struct isp1760_platform_data isp1760_priv = { |
77 | .name = "isp1761", | 78 | .is_isp1761 = 0, |
78 | .id = 0, | 79 | .port1_disable = 0, |
79 | .num_resources = ARRAY_SIZE(bfin_isp1761_resources), | 80 | .bus_width_16 = 1, |
80 | .resource = bfin_isp1761_resources, | 81 | .port1_otg = 0, |
82 | .analog_oc = 0, | ||
83 | .dack_polarity_high = 0, | ||
84 | .dreq_polarity_high = 0, | ||
81 | }; | 85 | }; |
82 | 86 | ||
83 | static struct platform_device *bfin_isp1761_devices[] = { | 87 | static struct platform_device bfin_isp1760_device = { |
84 | &bfin_isp1761_device, | 88 | .name = "isp1760-hcd", |
89 | .id = 0, | ||
90 | .dev = { | ||
91 | .platform_data = &isp1760_priv, | ||
92 | }, | ||
93 | .num_resources = ARRAY_SIZE(bfin_isp1760_resources), | ||
94 | .resource = bfin_isp1760_resources, | ||
85 | }; | 95 | }; |
86 | |||
87 | int __init bfin_isp1761_init(void) | ||
88 | { | ||
89 | unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices); | ||
90 | |||
91 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | ||
92 | set_irq_type(bfin_isp1761_resources[1].start, IRQF_TRIGGER_FALLING); | ||
93 | |||
94 | return platform_add_devices(bfin_isp1761_devices, num_devices); | ||
95 | } | ||
96 | |||
97 | void __exit bfin_isp1761_exit(void) | ||
98 | { | ||
99 | platform_device_unregister(&bfin_isp1761_device); | ||
100 | } | ||
101 | arch_initcall(bfin_isp1761_init); | ||
102 | #endif | 96 | #endif |
103 | 97 | ||
104 | #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) | 98 | #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) |
@@ -262,44 +256,107 @@ static struct platform_device bfin_uart_device = { | |||
262 | #endif | 256 | #endif |
263 | 257 | ||
264 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 258 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
265 | static struct resource bfin_sir_resources[] = { | ||
266 | #ifdef CONFIG_BFIN_SIR0 | 259 | #ifdef CONFIG_BFIN_SIR0 |
260 | static struct resource bfin_sir0_resources[] = { | ||
267 | { | 261 | { |
268 | .start = 0xFFC00400, | 262 | .start = 0xFFC00400, |
269 | .end = 0xFFC004FF, | 263 | .end = 0xFFC004FF, |
270 | .flags = IORESOURCE_MEM, | 264 | .flags = IORESOURCE_MEM, |
271 | }, | 265 | }, |
266 | { | ||
267 | .start = IRQ_UART0_RX, | ||
268 | .end = IRQ_UART0_RX+1, | ||
269 | .flags = IORESOURCE_IRQ, | ||
270 | }, | ||
271 | { | ||
272 | .start = CH_UART0_RX, | ||
273 | .end = CH_UART0_RX+1, | ||
274 | .flags = IORESOURCE_DMA, | ||
275 | }, | ||
276 | }; | ||
277 | static struct platform_device bfin_sir0_device = { | ||
278 | .name = "bfin_sir", | ||
279 | .id = 0, | ||
280 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), | ||
281 | .resource = bfin_sir0_resources, | ||
282 | }; | ||
272 | #endif | 283 | #endif |
273 | #ifdef CONFIG_BFIN_SIR1 | 284 | #ifdef CONFIG_BFIN_SIR1 |
285 | static struct resource bfin_sir1_resources[] = { | ||
274 | { | 286 | { |
275 | .start = 0xFFC02000, | 287 | .start = 0xFFC02000, |
276 | .end = 0xFFC020FF, | 288 | .end = 0xFFC020FF, |
277 | .flags = IORESOURCE_MEM, | 289 | .flags = IORESOURCE_MEM, |
278 | }, | 290 | }, |
291 | { | ||
292 | .start = IRQ_UART1_RX, | ||
293 | .end = IRQ_UART1_RX+1, | ||
294 | .flags = IORESOURCE_IRQ, | ||
295 | }, | ||
296 | { | ||
297 | .start = CH_UART1_RX, | ||
298 | .end = CH_UART1_RX+1, | ||
299 | .flags = IORESOURCE_DMA, | ||
300 | }, | ||
301 | }; | ||
302 | static struct platform_device bfin_sir1_device = { | ||
303 | .name = "bfin_sir", | ||
304 | .id = 1, | ||
305 | .num_resources = ARRAY_SIZE(bfin_sir1_resources), | ||
306 | .resource = bfin_sir1_resources, | ||
307 | }; | ||
279 | #endif | 308 | #endif |
280 | #ifdef CONFIG_BFIN_SIR2 | 309 | #ifdef CONFIG_BFIN_SIR2 |
310 | static struct resource bfin_sir2_resources[] = { | ||
281 | { | 311 | { |
282 | .start = 0xFFC02100, | 312 | .start = 0xFFC02100, |
283 | .end = 0xFFC021FF, | 313 | .end = 0xFFC021FF, |
284 | .flags = IORESOURCE_MEM, | 314 | .flags = IORESOURCE_MEM, |
285 | }, | 315 | }, |
316 | { | ||
317 | .start = IRQ_UART2_RX, | ||
318 | .end = IRQ_UART2_RX+1, | ||
319 | .flags = IORESOURCE_IRQ, | ||
320 | }, | ||
321 | { | ||
322 | .start = CH_UART2_RX, | ||
323 | .end = CH_UART2_RX+1, | ||
324 | .flags = IORESOURCE_DMA, | ||
325 | }, | ||
326 | }; | ||
327 | static struct platform_device bfin_sir2_device = { | ||
328 | .name = "bfin_sir", | ||
329 | .id = 2, | ||
330 | .num_resources = ARRAY_SIZE(bfin_sir2_resources), | ||
331 | .resource = bfin_sir2_resources, | ||
332 | }; | ||
286 | #endif | 333 | #endif |
287 | #ifdef CONFIG_BFIN_SIR3 | 334 | #ifdef CONFIG_BFIN_SIR3 |
335 | static struct resource bfin_sir3_resources[] = { | ||
288 | { | 336 | { |
289 | .start = 0xFFC03100, | 337 | .start = 0xFFC03100, |
290 | .end = 0xFFC031FF, | 338 | .end = 0xFFC031FF, |
291 | .flags = IORESOURCE_MEM, | 339 | .flags = IORESOURCE_MEM, |
292 | }, | 340 | }, |
293 | #endif | 341 | { |
342 | .start = IRQ_UART3_RX, | ||
343 | .end = IRQ_UART3_RX+1, | ||
344 | .flags = IORESOURCE_IRQ, | ||
345 | }, | ||
346 | { | ||
347 | .start = CH_UART3_RX, | ||
348 | .end = CH_UART3_RX+1, | ||
349 | .flags = IORESOURCE_DMA, | ||
350 | }, | ||
294 | }; | 351 | }; |
295 | 352 | static struct platform_device bfin_sir3_device = { | |
296 | static struct platform_device bfin_sir_device = { | ||
297 | .name = "bfin_sir", | 353 | .name = "bfin_sir", |
298 | .id = 0, | 354 | .id = 3, |
299 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | 355 | .num_resources = ARRAY_SIZE(bfin_sir3_resources), |
300 | .resource = bfin_sir_resources, | 356 | .resource = bfin_sir3_resources, |
301 | }; | 357 | }; |
302 | #endif | 358 | #endif |
359 | #endif | ||
303 | 360 | ||
304 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) | 361 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) |
305 | static struct resource smsc911x_resources[] = { | 362 | static struct resource smsc911x_resources[] = { |
@@ -347,8 +404,8 @@ static struct musb_hdrc_config musb_config = { | |||
347 | .dyn_fifo = 0, | 404 | .dyn_fifo = 0, |
348 | .soft_con = 1, | 405 | .soft_con = 1, |
349 | .dma = 1, | 406 | .dma = 1, |
350 | .num_eps = 7, | 407 | .num_eps = 8, |
351 | .dma_channels = 7, | 408 | .dma_channels = 8, |
352 | .gpio_vrsel = GPIO_PE7, | 409 | .gpio_vrsel = GPIO_PE7, |
353 | }; | 410 | }; |
354 | 411 | ||
@@ -448,9 +505,19 @@ static struct platform_device bf5xx_nand_device = { | |||
448 | #endif | 505 | #endif |
449 | 506 | ||
450 | #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) | 507 | #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) |
508 | |||
509 | static struct bfin_sd_host bfin_sdh_data = { | ||
510 | .dma_chan = CH_SDH, | ||
511 | .irq_int0 = IRQ_SDH_MASK0, | ||
512 | .pin_req = {P_SD_D0, P_SD_D1, P_SD_D2, P_SD_D3, P_SD_CLK, P_SD_CMD, 0}, | ||
513 | }; | ||
514 | |||
451 | static struct platform_device bf54x_sdh_device = { | 515 | static struct platform_device bf54x_sdh_device = { |
452 | .name = "bfin-sdh", | 516 | .name = "bfin-sdh", |
453 | .id = 0, | 517 | .id = 0, |
518 | .dev = { | ||
519 | .platform_data = &bfin_sdh_data, | ||
520 | }, | ||
454 | }; | 521 | }; |
455 | #endif | 522 | #endif |
456 | 523 | ||
@@ -589,7 +656,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
589 | { | 656 | { |
590 | .modalias = "ad7877", | 657 | .modalias = "ad7877", |
591 | .platform_data = &bfin_ad7877_ts_info, | 658 | .platform_data = &bfin_ad7877_ts_info, |
592 | .irq = IRQ_PJ11, /* newer boards (Rev 1.4+) use IRQ_PB4 */ | 659 | .irq = IRQ_PB4, /* old boards (<=Rev 1.3) use IRQ_PJ11 */ |
593 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 660 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
594 | .bus_num = 0, | 661 | .bus_num = 0, |
595 | .chip_select = 2, | 662 | .chip_select = 2, |
@@ -812,7 +879,18 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
812 | #endif | 879 | #endif |
813 | 880 | ||
814 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 881 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
815 | &bfin_sir_device, | 882 | #ifdef CONFIG_BFIN_SIR0 |
883 | &bfin_sir0_device, | ||
884 | #endif | ||
885 | #ifdef CONFIG_BFIN_SIR1 | ||
886 | &bfin_sir1_device, | ||
887 | #endif | ||
888 | #ifdef CONFIG_BFIN_SIR2 | ||
889 | &bfin_sir2_device, | ||
890 | #endif | ||
891 | #ifdef CONFIG_BFIN_SIR3 | ||
892 | &bfin_sir3_device, | ||
893 | #endif | ||
816 | #endif | 894 | #endif |
817 | 895 | ||
818 | #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) | 896 | #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) |
@@ -827,6 +905,10 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
827 | &musb_device, | 905 | &musb_device, |
828 | #endif | 906 | #endif |
829 | 907 | ||
908 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | ||
909 | &bfin_isp1760_device, | ||
910 | #endif | ||
911 | |||
830 | #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) | 912 | #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) |
831 | &bfin_atapi_device, | 913 | &bfin_atapi_device, |
832 | #endif | 914 | #endif |