diff options
Diffstat (limited to 'arch/blackfin/mach-bf537/boards')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/cm_bf537.c | 63 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/generic_board.c | 109 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/minotaur.c | 48 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/pnav10.c | 50 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 280 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/tcm_bf537.c | 63 |
6 files changed, 478 insertions, 135 deletions
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c index dde14720b0ea..6ac8e4d5bd38 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c | |||
@@ -308,6 +308,19 @@ static struct platform_device net2272_bfin_device = { | |||
308 | }; | 308 | }; |
309 | #endif | 309 | #endif |
310 | 310 | ||
311 | static struct resource bfin_gpios_resources = { | ||
312 | .start = 0, | ||
313 | .end = MAX_BLACKFIN_GPIOS - 1, | ||
314 | .flags = IORESOURCE_IRQ, | ||
315 | }; | ||
316 | |||
317 | static struct platform_device bfin_gpios_device = { | ||
318 | .name = "simple-gpio", | ||
319 | .id = -1, | ||
320 | .num_resources = 1, | ||
321 | .resource = &bfin_gpios_resources, | ||
322 | }; | ||
323 | |||
311 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) | 324 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) |
312 | static struct mtd_partition cm_partitions[] = { | 325 | static struct mtd_partition cm_partitions[] = { |
313 | { | 326 | { |
@@ -379,30 +392,57 @@ static struct platform_device bfin_uart_device = { | |||
379 | #endif | 392 | #endif |
380 | 393 | ||
381 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 394 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
382 | static struct resource bfin_sir_resources[] = { | ||
383 | #ifdef CONFIG_BFIN_SIR0 | 395 | #ifdef CONFIG_BFIN_SIR0 |
396 | static struct resource bfin_sir0_resources[] = { | ||
384 | { | 397 | { |
385 | .start = 0xFFC00400, | 398 | .start = 0xFFC00400, |
386 | .end = 0xFFC004FF, | 399 | .end = 0xFFC004FF, |
387 | .flags = IORESOURCE_MEM, | 400 | .flags = IORESOURCE_MEM, |
388 | }, | 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 | static 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 | }; | ||
389 | #endif | 419 | #endif |
390 | #ifdef CONFIG_BFIN_SIR1 | 420 | #ifdef CONFIG_BFIN_SIR1 |
421 | static struct resource bfin_sir1_resources[] = { | ||
391 | { | 422 | { |
392 | .start = 0xFFC02000, | 423 | .start = 0xFFC02000, |
393 | .end = 0xFFC020FF, | 424 | .end = 0xFFC020FF, |
394 | .flags = IORESOURCE_MEM, | 425 | .flags = IORESOURCE_MEM, |
395 | }, | 426 | }, |
396 | #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 | }, | ||
397 | }; | 437 | }; |
398 | 438 | static struct platform_device bfin_sir1_device = { | |
399 | static struct platform_device bfin_sir_device = { | ||
400 | .name = "bfin_sir", | 439 | .name = "bfin_sir", |
401 | .id = 0, | 440 | .id = 1, |
402 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | 441 | .num_resources = ARRAY_SIZE(bfin_sir1_resources), |
403 | .resource = bfin_sir_resources, | 442 | .resource = bfin_sir1_resources, |
404 | }; | 443 | }; |
405 | #endif | 444 | #endif |
445 | #endif | ||
406 | 446 | ||
407 | #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) |
408 | static struct resource bfin_twi0_resource[] = { | 448 | static struct resource bfin_twi0_resource[] = { |
@@ -525,7 +565,12 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
525 | #endif | 565 | #endif |
526 | 566 | ||
527 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 567 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
528 | &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 | ||
529 | #endif | 574 | #endif |
530 | 575 | ||
531 | #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) |
@@ -564,6 +609,8 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
564 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) | 609 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) |
565 | &cm_flash_device, | 610 | &cm_flash_device, |
566 | #endif | 611 | #endif |
612 | |||
613 | &bfin_gpios_device, | ||
567 | }; | 614 | }; |
568 | 615 | ||
569 | static int __init cm_bf537_init(void) | 616 | static int __init cm_bf537_init(void) |
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c index 78a13d5bfd55..dd6e6bfb98ea 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 | */ |
53 | const char bfin_board_name[] = "GENERIC Board"; | 53 | const 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) |
63 | static struct resource bfin_isp1761_resources[] = { | 60 | #include <linux/usb/isp1760.h> |
61 | static 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 | ||
77 | static struct platform_device bfin_isp1761_device = { | 74 | static 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 | ||
84 | static struct platform_device *bfin_isp1761_devices[] = { | 84 | static 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 | |||
88 | int __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 | |||
98 | void __exit bfin_isp1761_exit(void) | ||
99 | { | ||
100 | platform_device_unregister(&bfin_isp1761_device); | ||
101 | } | ||
102 | |||
103 | arch_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) |
562 | static struct resource bfin_sir_resources[] = { | ||
563 | #ifdef CONFIG_BFIN_SIR0 | 551 | #ifdef CONFIG_BFIN_SIR0 |
552 | static 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 | |||
570 | static 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 |
578 | static 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 | ||
579 | static struct platform_device bfin_sir_device = { | 596 | static 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) |
588 | static struct resource bfin_twi0_resource[] = { | 606 | static 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) |
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) |
229 | static struct resource bfin_sir_resources[] = { | ||
230 | #ifdef CONFIG_BFIN_SIR0 | 229 | #ifdef CONFIG_BFIN_SIR0 |
230 | static 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 | |||
248 | static 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 |
256 | static 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 | ||
246 | static struct platform_device bfin_sir_device = { | 274 | static 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) |
255 | static struct resource bfin_twi0_resource[] = { | 284 | static 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 f9174c11cbd4..89de94f4545d 100644 --- a/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/arch/blackfin/mach-bf537/boards/pnav10.c | |||
@@ -49,7 +49,7 @@ | |||
49 | /* | 49 | /* |
50 | * Name the Board for the /proc/cpuinfo | 50 | * Name the Board for the /proc/cpuinfo |
51 | */ | 51 | */ |
52 | const char bfin_board_name[] = "PNAV-1.0"; | 52 | const char bfin_board_name[] = "ADI PNAV-1.0"; |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * Driver needs to know address, irq and flag pin. | 55 | * Driver needs to know address, irq and flag pin. |
@@ -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) |
456 | static struct resource bfin_sir_resources[] = { | ||
457 | #ifdef CONFIG_BFIN_SIR0 | 456 | #ifdef CONFIG_BFIN_SIR0 |
457 | static 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 | |||
475 | static 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 |
483 | static 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 | ||
473 | static struct platform_device bfin_sir_device = { | 501 | static 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 | ||
481 | static struct platform_device *stamp_devices[] __initdata = { | 510 | static 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 8d394393201f..d812e2514a2f 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/interrupt.h> | 46 | #include <linux/interrupt.h> |
47 | #include <linux/i2c.h> | 47 | #include <linux/i2c.h> |
48 | #include <linux/usb/sl811.h> | 48 | #include <linux/usb/sl811.h> |
49 | #include <linux/spi/mmc_spi.h> | ||
49 | #include <asm/dma.h> | 50 | #include <asm/dma.h> |
50 | #include <asm/bfin5xx_spi.h> | 51 | #include <asm/bfin5xx_spi.h> |
51 | #include <asm/reboot.h> | 52 | #include <asm/reboot.h> |
@@ -55,57 +56,46 @@ | |||
55 | /* | 56 | /* |
56 | * Name the Board for the /proc/cpuinfo | 57 | * Name the Board for the /proc/cpuinfo |
57 | */ | 58 | */ |
58 | const char bfin_board_name[] = "ADDS-BF537-STAMP"; | 59 | const char bfin_board_name[] = "ADI BF537-STAMP"; |
59 | 60 | ||
60 | /* | 61 | /* |
61 | * Driver needs to know address, irq and flag pin. | 62 | * Driver needs to know address, irq and flag pin. |
62 | */ | 63 | */ |
63 | 64 | ||
64 | #define ISP1761_BASE 0x203C0000 | ||
65 | #define ISP1761_IRQ IRQ_PF7 | ||
66 | |||
67 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | 65 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) |
68 | static struct resource bfin_isp1761_resources[] = { | 66 | #include <linux/usb/isp1760.h> |
67 | static struct resource bfin_isp1760_resources[] = { | ||
69 | [0] = { | 68 | [0] = { |
70 | .name = "isp1761-regs", | 69 | .start = 0x203C0000, |
71 | .start = ISP1761_BASE + 0x00000000, | 70 | .end = 0x203C0000 + 0x000fffff, |
72 | .end = ISP1761_BASE + 0x000fffff, | ||
73 | .flags = IORESOURCE_MEM, | 71 | .flags = IORESOURCE_MEM, |
74 | }, | 72 | }, |
75 | [1] = { | 73 | [1] = { |
76 | .start = ISP1761_IRQ, | 74 | .start = IRQ_PF7, |
77 | .end = ISP1761_IRQ, | 75 | .end = IRQ_PF7, |
78 | .flags = IORESOURCE_IRQ, | 76 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
79 | }, | 77 | }, |
80 | }; | 78 | }; |
81 | 79 | ||
82 | static struct platform_device bfin_isp1761_device = { | 80 | static struct isp1760_platform_data isp1760_priv = { |
83 | .name = "isp1761", | 81 | .is_isp1761 = 0, |
84 | .id = 0, | 82 | .port1_disable = 0, |
85 | .num_resources = ARRAY_SIZE(bfin_isp1761_resources), | 83 | .bus_width_16 = 1, |
86 | .resource = bfin_isp1761_resources, | 84 | .port1_otg = 0, |
85 | .analog_oc = 0, | ||
86 | .dack_polarity_high = 0, | ||
87 | .dreq_polarity_high = 0, | ||
87 | }; | 88 | }; |
88 | 89 | ||
89 | static struct platform_device *bfin_isp1761_devices[] = { | 90 | static struct platform_device bfin_isp1760_device = { |
90 | &bfin_isp1761_device, | 91 | .name = "isp1760-hcd", |
92 | .id = 0, | ||
93 | .dev = { | ||
94 | .platform_data = &isp1760_priv, | ||
95 | }, | ||
96 | .num_resources = ARRAY_SIZE(bfin_isp1760_resources), | ||
97 | .resource = bfin_isp1760_resources, | ||
91 | }; | 98 | }; |
92 | |||
93 | int __init bfin_isp1761_init(void) | ||
94 | { | ||
95 | unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices); | ||
96 | |||
97 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | ||
98 | set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); | ||
99 | |||
100 | return platform_add_devices(bfin_isp1761_devices, num_devices); | ||
101 | } | ||
102 | |||
103 | void __exit bfin_isp1761_exit(void) | ||
104 | { | ||
105 | platform_device_unregister(&bfin_isp1761_device); | ||
106 | } | ||
107 | |||
108 | arch_initcall(bfin_isp1761_init); | ||
109 | #endif | 99 | #endif |
110 | 100 | ||
111 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 101 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
@@ -443,11 +433,11 @@ static struct mtd_partition stamp_partitions[] = { | |||
443 | .offset = 0, | 433 | .offset = 0, |
444 | }, { | 434 | }, { |
445 | .name = "linux kernel(nor)", | 435 | .name = "linux kernel(nor)", |
446 | .size = 0xE0000, | 436 | .size = 0x180000, |
447 | .offset = MTDPART_OFS_APPEND, | 437 | .offset = MTDPART_OFS_APPEND, |
448 | }, { | 438 | }, { |
449 | .name = "file system(nor)", | 439 | .name = "file system(nor)", |
450 | .size = 0x400000 - 0x40000 - 0xE0000 - 0x10000, | 440 | .size = 0x400000 - 0x40000 - 0x180000 - 0x10000, |
451 | .offset = MTDPART_OFS_APPEND, | 441 | .offset = MTDPART_OFS_APPEND, |
452 | }, { | 442 | }, { |
453 | .name = "MAC Address(nor)", | 443 | .name = "MAC Address(nor)", |
@@ -490,7 +480,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { | |||
490 | .mask_flags = MTD_CAP_ROM | 480 | .mask_flags = MTD_CAP_ROM |
491 | }, { | 481 | }, { |
492 | .name = "linux kernel(spi)", | 482 | .name = "linux kernel(spi)", |
493 | .size = 0xe0000, | 483 | .size = 0x180000, |
494 | .offset = MTDPART_OFS_APPEND, | 484 | .offset = MTDPART_OFS_APPEND, |
495 | }, { | 485 | }, { |
496 | .name = "file system(spi)", | 486 | .name = "file system(spi)", |
@@ -503,7 +493,7 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
503 | .name = "m25p80", | 493 | .name = "m25p80", |
504 | .parts = bfin_spi_flash_partitions, | 494 | .parts = bfin_spi_flash_partitions, |
505 | .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions), | 495 | .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions), |
506 | .type = "m25p64", | 496 | /* .type = "m25p64", */ |
507 | }; | 497 | }; |
508 | 498 | ||
509 | /* SPI flash chip (m25p64) */ | 499 | /* SPI flash chip (m25p64) */ |
@@ -537,9 +527,29 @@ static struct bfin5xx_spi_chip ad9960_spi_chip_info = { | |||
537 | }; | 527 | }; |
538 | #endif | 528 | #endif |
539 | 529 | ||
540 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | 530 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
541 | static struct bfin5xx_spi_chip spi_mmc_chip_info = { | 531 | #define MMC_SPI_CARD_DETECT_INT IRQ_PF5 |
542 | .enable_dma = 1, | 532 | |
533 | static int bfin_mmc_spi_init(struct device *dev, | ||
534 | irqreturn_t (*detect_int)(int, void *), void *data) | ||
535 | { | ||
536 | return request_irq(MMC_SPI_CARD_DETECT_INT, detect_int, | ||
537 | IRQF_TRIGGER_FALLING, "mmc-spi-detect", data); | ||
538 | } | ||
539 | |||
540 | static void bfin_mmc_spi_exit(struct device *dev, void *data) | ||
541 | { | ||
542 | free_irq(MMC_SPI_CARD_DETECT_INT, data); | ||
543 | } | ||
544 | |||
545 | static struct mmc_spi_platform_data bfin_mmc_spi_pdata = { | ||
546 | .init = bfin_mmc_spi_init, | ||
547 | .exit = bfin_mmc_spi_exit, | ||
548 | .detect_delay = 100, /* msecs */ | ||
549 | }; | ||
550 | |||
551 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | ||
552 | .enable_dma = 0, | ||
543 | .bits_per_word = 8, | 553 | .bits_per_word = 8, |
544 | }; | 554 | }; |
545 | #endif | 555 | #endif |
@@ -613,6 +623,14 @@ static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { | |||
613 | }; | 623 | }; |
614 | #endif | 624 | #endif |
615 | 625 | ||
626 | #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) | ||
627 | static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { | ||
628 | .enable_dma = 1, | ||
629 | .bits_per_word = 8, | ||
630 | .cs_gpio = GPIO_PF10, | ||
631 | }; | ||
632 | #endif | ||
633 | |||
616 | #if defined(CONFIG_MTD_DATAFLASH) \ | 634 | #if defined(CONFIG_MTD_DATAFLASH) \ |
617 | || defined(CONFIG_MTD_DATAFLASH_MODULE) | 635 | || defined(CONFIG_MTD_DATAFLASH_MODULE) |
618 | 636 | ||
@@ -624,7 +642,7 @@ static struct mtd_partition bfin_spi_dataflash_partitions[] = { | |||
624 | .mask_flags = MTD_CAP_ROM | 642 | .mask_flags = MTD_CAP_ROM |
625 | }, { | 643 | }, { |
626 | .name = "linux kernel(spi)", | 644 | .name = "linux kernel(spi)", |
627 | .size = 0xe0000, | 645 | .size = 0x180000, |
628 | .offset = MTDPART_OFS_APPEND, | 646 | .offset = MTDPART_OFS_APPEND, |
629 | }, { | 647 | }, { |
630 | .name = "file system(spi)", | 648 | .name = "file system(spi)", |
@@ -703,23 +721,14 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
703 | .controller_data = &ad9960_spi_chip_info, | 721 | .controller_data = &ad9960_spi_chip_info, |
704 | }, | 722 | }, |
705 | #endif | 723 | #endif |
706 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | 724 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
707 | { | 725 | { |
708 | .modalias = "spi_mmc_dummy", | 726 | .modalias = "mmc_spi", |
709 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | 727 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
710 | .bus_num = 0, | 728 | .bus_num = 0, |
711 | .chip_select = 0, | 729 | .chip_select = 4, |
712 | .platform_data = NULL, | 730 | .platform_data = &bfin_mmc_spi_pdata, |
713 | .controller_data = &spi_mmc_chip_info, | 731 | .controller_data = &mmc_spi_chip_info, |
714 | .mode = SPI_MODE_3, | ||
715 | }, | ||
716 | { | ||
717 | .modalias = "spi_mmc", | ||
718 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | ||
719 | .bus_num = 0, | ||
720 | .chip_select = CONFIG_SPI_MMC_CS_CHAN, | ||
721 | .platform_data = NULL, | ||
722 | .controller_data = &spi_mmc_chip_info, | ||
723 | .mode = SPI_MODE_3, | 732 | .mode = SPI_MODE_3, |
724 | }, | 733 | }, |
725 | #endif | 734 | #endif |
@@ -783,6 +792,17 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
783 | .mode = SPI_CPHA | SPI_CPOL, | 792 | .mode = SPI_CPHA | SPI_CPOL, |
784 | }, | 793 | }, |
785 | #endif | 794 | #endif |
795 | #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) | ||
796 | { | ||
797 | .modalias = "enc28j60", | ||
798 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | ||
799 | .irq = IRQ_PF6, | ||
800 | .bus_num = 0, | ||
801 | .chip_select = 0, /* GPIO controlled SSEL */ | ||
802 | .controller_data = &enc28j60_spi_chip_info, | ||
803 | .mode = SPI_MODE_0, | ||
804 | }, | ||
805 | #endif | ||
786 | }; | 806 | }; |
787 | 807 | ||
788 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 808 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
@@ -885,30 +905,59 @@ static struct platform_device bfin_uart_device = { | |||
885 | #endif | 905 | #endif |
886 | 906 | ||
887 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 907 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
888 | static struct resource bfin_sir_resources[] = { | ||
889 | #ifdef CONFIG_BFIN_SIR0 | 908 | #ifdef CONFIG_BFIN_SIR0 |
909 | static struct resource bfin_sir0_resources[] = { | ||
890 | { | 910 | { |
891 | .start = 0xFFC00400, | 911 | .start = 0xFFC00400, |
892 | .end = 0xFFC004FF, | 912 | .end = 0xFFC004FF, |
893 | .flags = IORESOURCE_MEM, | 913 | .flags = IORESOURCE_MEM, |
894 | }, | 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 | |||
927 | static 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 | }; | ||
895 | #endif | 933 | #endif |
896 | #ifdef CONFIG_BFIN_SIR1 | 934 | #ifdef CONFIG_BFIN_SIR1 |
935 | static struct resource bfin_sir1_resources[] = { | ||
897 | { | 936 | { |
898 | .start = 0xFFC02000, | 937 | .start = 0xFFC02000, |
899 | .end = 0xFFC020FF, | 938 | .end = 0xFFC020FF, |
900 | .flags = IORESOURCE_MEM, | 939 | .flags = IORESOURCE_MEM, |
901 | }, | 940 | }, |
902 | #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 | }, | ||
903 | }; | 951 | }; |
904 | 952 | ||
905 | static struct platform_device bfin_sir_device = { | 953 | static struct platform_device bfin_sir1_device = { |
906 | .name = "bfin_sir", | 954 | .name = "bfin_sir", |
907 | .id = 0, | 955 | .id = 1, |
908 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | 956 | .num_resources = ARRAY_SIZE(bfin_sir1_resources), |
909 | .resource = bfin_sir_resources, | 957 | .resource = bfin_sir1_resources, |
910 | }; | 958 | }; |
911 | #endif | 959 | #endif |
960 | #endif | ||
912 | 961 | ||
913 | #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) |
914 | static struct resource bfin_twi0_resource[] = { | 963 | static struct resource bfin_twi0_resource[] = { |
@@ -932,6 +981,93 @@ static struct platform_device i2c_bfin_twi_device = { | |||
932 | }; | 981 | }; |
933 | #endif | 982 | #endif |
934 | 983 | ||
984 | #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) | ||
985 | #include <linux/input.h> | ||
986 | #include <linux/i2c/adp5588_keys.h> | ||
987 | static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { | ||
988 | [0] = KEY_GRAVE, | ||
989 | [1] = KEY_1, | ||
990 | [2] = KEY_2, | ||
991 | [3] = KEY_3, | ||
992 | [4] = KEY_4, | ||
993 | [5] = KEY_5, | ||
994 | [6] = KEY_6, | ||
995 | [7] = KEY_7, | ||
996 | [8] = KEY_8, | ||
997 | [9] = KEY_9, | ||
998 | [10] = KEY_0, | ||
999 | [11] = KEY_MINUS, | ||
1000 | [12] = KEY_EQUAL, | ||
1001 | [13] = KEY_BACKSLASH, | ||
1002 | [15] = KEY_KP0, | ||
1003 | [16] = KEY_Q, | ||
1004 | [17] = KEY_W, | ||
1005 | [18] = KEY_E, | ||
1006 | [19] = KEY_R, | ||
1007 | [20] = KEY_T, | ||
1008 | [21] = KEY_Y, | ||
1009 | [22] = KEY_U, | ||
1010 | [23] = KEY_I, | ||
1011 | [24] = KEY_O, | ||
1012 | [25] = KEY_P, | ||
1013 | [26] = KEY_LEFTBRACE, | ||
1014 | [27] = KEY_RIGHTBRACE, | ||
1015 | [29] = KEY_KP1, | ||
1016 | [30] = KEY_KP2, | ||
1017 | [31] = KEY_KP3, | ||
1018 | [32] = KEY_A, | ||
1019 | [33] = KEY_S, | ||
1020 | [34] = KEY_D, | ||
1021 | [35] = KEY_F, | ||
1022 | [36] = KEY_G, | ||
1023 | [37] = KEY_H, | ||
1024 | [38] = KEY_J, | ||
1025 | [39] = KEY_K, | ||
1026 | [40] = KEY_L, | ||
1027 | [41] = KEY_SEMICOLON, | ||
1028 | [42] = KEY_APOSTROPHE, | ||
1029 | [43] = KEY_BACKSLASH, | ||
1030 | [45] = KEY_KP4, | ||
1031 | [46] = KEY_KP5, | ||
1032 | [47] = KEY_KP6, | ||
1033 | [48] = KEY_102ND, | ||
1034 | [49] = KEY_Z, | ||
1035 | [50] = KEY_X, | ||
1036 | [51] = KEY_C, | ||
1037 | [52] = KEY_V, | ||
1038 | [53] = KEY_B, | ||
1039 | [54] = KEY_N, | ||
1040 | [55] = KEY_M, | ||
1041 | [56] = KEY_COMMA, | ||
1042 | [57] = KEY_DOT, | ||
1043 | [58] = KEY_SLASH, | ||
1044 | [60] = KEY_KPDOT, | ||
1045 | [61] = KEY_KP7, | ||
1046 | [62] = KEY_KP8, | ||
1047 | [63] = KEY_KP9, | ||
1048 | [64] = KEY_SPACE, | ||
1049 | [65] = KEY_BACKSPACE, | ||
1050 | [66] = KEY_TAB, | ||
1051 | [67] = KEY_KPENTER, | ||
1052 | [68] = KEY_ENTER, | ||
1053 | [69] = KEY_ESC, | ||
1054 | [70] = KEY_DELETE, | ||
1055 | [74] = KEY_KPMINUS, | ||
1056 | [76] = KEY_UP, | ||
1057 | [77] = KEY_DOWN, | ||
1058 | [78] = KEY_RIGHT, | ||
1059 | [79] = KEY_LEFT, | ||
1060 | }; | ||
1061 | |||
1062 | static struct adp5588_kpad_platform_data adp5588_kpad_data = { | ||
1063 | .rows = 8, | ||
1064 | .cols = 10, | ||
1065 | .keymap = adp5588_keymap, | ||
1066 | .keymapsize = ARRAY_SIZE(adp5588_keymap), | ||
1067 | .repeat = 0, | ||
1068 | }; | ||
1069 | #endif | ||
1070 | |||
935 | #ifdef CONFIG_I2C_BOARDINFO | 1071 | #ifdef CONFIG_I2C_BOARDINFO |
936 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 1072 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
937 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) | 1073 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) |
@@ -958,6 +1094,13 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
958 | .platform_data = (void *)&bfin_ad7879_ts_info, | 1094 | .platform_data = (void *)&bfin_ad7879_ts_info, |
959 | }, | 1095 | }, |
960 | #endif | 1096 | #endif |
1097 | #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) | ||
1098 | { | ||
1099 | I2C_BOARD_INFO("adp5588-keys", 0x34), | ||
1100 | .irq = IRQ_PG0, | ||
1101 | .platform_data = (void *)&adp5588_kpad_data, | ||
1102 | }, | ||
1103 | #endif | ||
961 | }; | 1104 | }; |
962 | #endif | 1105 | #endif |
963 | 1106 | ||
@@ -1057,6 +1200,10 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1057 | &isp1362_hcd_device, | 1200 | &isp1362_hcd_device, |
1058 | #endif | 1201 | #endif |
1059 | 1202 | ||
1203 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | ||
1204 | &bfin_isp1760_device, | ||
1205 | #endif | ||
1206 | |||
1060 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 1207 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
1061 | &smc91x_device, | 1208 | &smc91x_device, |
1062 | #endif | 1209 | #endif |
@@ -1098,7 +1245,12 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1098 | #endif | 1245 | #endif |
1099 | 1246 | ||
1100 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 1247 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
1101 | &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 | ||
1102 | #endif | 1254 | #endif |
1103 | 1255 | ||
1104 | #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 d5ff705a5129..2f4b066153c5 100644 --- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c | |||
@@ -308,6 +308,19 @@ static struct platform_device net2272_bfin_device = { | |||
308 | }; | 308 | }; |
309 | #endif | 309 | #endif |
310 | 310 | ||
311 | static struct resource bfin_gpios_resources = { | ||
312 | .start = 0, | ||
313 | .end = MAX_BLACKFIN_GPIOS - 1, | ||
314 | .flags = IORESOURCE_IRQ, | ||
315 | }; | ||
316 | |||
317 | static struct platform_device bfin_gpios_device = { | ||
318 | .name = "simple-gpio", | ||
319 | .id = -1, | ||
320 | .num_resources = 1, | ||
321 | .resource = &bfin_gpios_resources, | ||
322 | }; | ||
323 | |||
311 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) | 324 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) |
312 | static struct mtd_partition cm_partitions[] = { | 325 | static struct mtd_partition cm_partitions[] = { |
313 | { | 326 | { |
@@ -379,30 +392,59 @@ static struct platform_device bfin_uart_device = { | |||
379 | #endif | 392 | #endif |
380 | 393 | ||
381 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 394 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
382 | static struct resource bfin_sir_resources[] = { | ||
383 | #ifdef CONFIG_BFIN_SIR0 | 395 | #ifdef CONFIG_BFIN_SIR0 |
396 | static struct resource bfin_sir0_resources[] = { | ||
384 | { | 397 | { |
385 | .start = 0xFFC00400, | 398 | .start = 0xFFC00400, |
386 | .end = 0xFFC004FF, | 399 | .end = 0xFFC004FF, |
387 | .flags = IORESOURCE_MEM, | 400 | .flags = IORESOURCE_MEM, |
388 | }, | 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 | |||
414 | static 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 | }; | ||
389 | #endif | 420 | #endif |
390 | #ifdef CONFIG_BFIN_SIR1 | 421 | #ifdef CONFIG_BFIN_SIR1 |
422 | static struct resource bfin_sir1_resources[] = { | ||
391 | { | 423 | { |
392 | .start = 0xFFC02000, | 424 | .start = 0xFFC02000, |
393 | .end = 0xFFC020FF, | 425 | .end = 0xFFC020FF, |
394 | .flags = IORESOURCE_MEM, | 426 | .flags = IORESOURCE_MEM, |
395 | }, | 427 | }, |
396 | #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 | }, | ||
397 | }; | 438 | }; |
398 | 439 | ||
399 | static struct platform_device bfin_sir_device = { | 440 | static struct platform_device bfin_sir1_device = { |
400 | .name = "bfin_sir", | 441 | .name = "bfin_sir", |
401 | .id = 0, | 442 | .id = 1, |
402 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | 443 | .num_resources = ARRAY_SIZE(bfin_sir1_resources), |
403 | .resource = bfin_sir_resources, | 444 | .resource = bfin_sir1_resources, |
404 | }; | 445 | }; |
405 | #endif | 446 | #endif |
447 | #endif | ||
406 | 448 | ||
407 | #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) |
408 | static struct resource bfin_twi0_resource[] = { | 450 | static struct resource bfin_twi0_resource[] = { |
@@ -525,7 +567,12 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
525 | #endif | 567 | #endif |
526 | 568 | ||
527 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 569 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
528 | &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 | ||
529 | #endif | 576 | #endif |
530 | 577 | ||
531 | #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) |
@@ -564,6 +611,8 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
564 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) | 611 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) |
565 | &cm_flash_device, | 612 | &cm_flash_device, |
566 | #endif | 613 | #endif |
614 | |||
615 | &bfin_gpios_device, | ||
567 | }; | 616 | }; |
568 | 617 | ||
569 | static int __init cm_bf537_init(void) | 618 | static int __init cm_bf537_init(void) |