diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9263_devices.c')
| -rw-r--r-- | arch/arm/mach-at91/at91sam9263_devices.c | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index b77121f27f34..2b2e18a67128 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
| @@ -573,6 +573,130 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
| 573 | 573 | ||
| 574 | 574 | ||
| 575 | /* -------------------------------------------------------------------- | 575 | /* -------------------------------------------------------------------- |
| 576 | * AC97 | ||
| 577 | * -------------------------------------------------------------------- */ | ||
| 578 | |||
| 579 | #if defined(CONFIG_SND_AT91_AC97) || defined(CONFIG_SND_AT91_AC97_MODULE) | ||
| 580 | static u64 ac97_dmamask = 0xffffffffUL; | ||
| 581 | static struct atmel_ac97_data ac97_data; | ||
| 582 | |||
| 583 | static struct resource ac97_resources[] = { | ||
| 584 | [0] = { | ||
| 585 | .start = AT91SAM9263_BASE_AC97C, | ||
| 586 | .end = AT91SAM9263_BASE_AC97C + SZ_16K - 1, | ||
| 587 | .flags = IORESOURCE_MEM, | ||
| 588 | }, | ||
| 589 | [1] = { | ||
| 590 | .start = AT91SAM9263_ID_AC97C, | ||
| 591 | .end = AT91SAM9263_ID_AC97C, | ||
| 592 | .flags = IORESOURCE_IRQ, | ||
| 593 | }, | ||
| 594 | }; | ||
| 595 | |||
| 596 | static struct platform_device at91sam9263_ac97_device = { | ||
| 597 | .name = "ac97c", | ||
| 598 | .id = 1, | ||
| 599 | .dev = { | ||
| 600 | .dma_mask = &ac97_dmamask, | ||
| 601 | .coherent_dma_mask = 0xffffffff, | ||
| 602 | .platform_data = &ac97_data, | ||
| 603 | }, | ||
| 604 | .resource = ac97_resources, | ||
| 605 | .num_resources = ARRAY_SIZE(ac97_resources), | ||
| 606 | }; | ||
| 607 | |||
| 608 | void __init at91_add_device_ac97(struct atmel_ac97_data *data) | ||
| 609 | { | ||
| 610 | if (!data) | ||
| 611 | return; | ||
| 612 | |||
| 613 | at91_set_A_periph(AT91_PIN_PB0, 0); /* AC97FS */ | ||
| 614 | at91_set_A_periph(AT91_PIN_PB1, 0); /* AC97CK */ | ||
| 615 | at91_set_A_periph(AT91_PIN_PB2, 0); /* AC97TX */ | ||
| 616 | at91_set_A_periph(AT91_PIN_PB3, 0); /* AC97RX */ | ||
| 617 | |||
| 618 | /* reset */ | ||
| 619 | if (data->reset_pin) | ||
| 620 | at91_set_gpio_output(data->reset_pin, 0); | ||
| 621 | |||
| 622 | ac97_data = *ek_data; | ||
| 623 | platform_device_register(&at91sam9263_ac97_device); | ||
| 624 | } | ||
| 625 | #else | ||
| 626 | void __init at91_add_device_ac97(struct atmel_ac97_data *data) {} | ||
| 627 | #endif | ||
| 628 | |||
| 629 | |||
| 630 | /* -------------------------------------------------------------------- | ||
| 631 | * LCD Controller | ||
| 632 | * -------------------------------------------------------------------- */ | ||
| 633 | |||
| 634 | #if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE) | ||
| 635 | static u64 lcdc_dmamask = 0xffffffffUL; | ||
| 636 | static struct atmel_lcdfb_info lcdc_data; | ||
| 637 | |||
| 638 | static struct resource lcdc_resources[] = { | ||
| 639 | [0] = { | ||
| 640 | .start = AT91SAM9263_LCDC_BASE, | ||
| 641 | .end = AT91SAM9263_LCDC_BASE + SZ_4K - 1, | ||
| 642 | .flags = IORESOURCE_MEM, | ||
| 643 | }, | ||
| 644 | [1] = { | ||
| 645 | .start = AT91SAM9263_ID_LCDC, | ||
| 646 | .end = AT91SAM9263_ID_LCDC, | ||
| 647 | .flags = IORESOURCE_IRQ, | ||
| 648 | }, | ||
| 649 | }; | ||
| 650 | |||
| 651 | static struct platform_device at91_lcdc_device = { | ||
| 652 | .name = "atmel_lcdfb", | ||
| 653 | .id = 0, | ||
| 654 | .dev = { | ||
| 655 | .dma_mask = &lcdc_dmamask, | ||
| 656 | .coherent_dma_mask = 0xffffffff, | ||
| 657 | .platform_data = &lcdc_data, | ||
| 658 | }, | ||
| 659 | .resource = lcdc_resources, | ||
| 660 | .num_resources = ARRAY_SIZE(lcdc_resources), | ||
| 661 | }; | ||
| 662 | |||
| 663 | void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) | ||
| 664 | { | ||
| 665 | if (!data) | ||
| 666 | return; | ||
| 667 | |||
| 668 | at91_set_A_periph(AT91_PIN_PC1, 0); /* LCDHSYNC */ | ||
| 669 | at91_set_A_periph(AT91_PIN_PC2, 0); /* LCDDOTCK */ | ||
| 670 | at91_set_A_periph(AT91_PIN_PC3, 0); /* LCDDEN */ | ||
| 671 | at91_set_B_periph(AT91_PIN_PB9, 0); /* LCDCC */ | ||
| 672 | at91_set_A_periph(AT91_PIN_PC6, 0); /* LCDD2 */ | ||
| 673 | at91_set_A_periph(AT91_PIN_PC7, 0); /* LCDD3 */ | ||
| 674 | at91_set_A_periph(AT91_PIN_PC8, 0); /* LCDD4 */ | ||
| 675 | at91_set_A_periph(AT91_PIN_PC9, 0); /* LCDD5 */ | ||
| 676 | at91_set_A_periph(AT91_PIN_PC10, 0); /* LCDD6 */ | ||
| 677 | at91_set_A_periph(AT91_PIN_PC11, 0); /* LCDD7 */ | ||
| 678 | at91_set_A_periph(AT91_PIN_PC14, 0); /* LCDD10 */ | ||
| 679 | at91_set_A_periph(AT91_PIN_PC15, 0); /* LCDD11 */ | ||
| 680 | at91_set_A_periph(AT91_PIN_PC16, 0); /* LCDD12 */ | ||
| 681 | at91_set_B_periph(AT91_PIN_PC12, 0); /* LCDD13 */ | ||
| 682 | at91_set_A_periph(AT91_PIN_PC18, 0); /* LCDD14 */ | ||
| 683 | at91_set_A_periph(AT91_PIN_PC19, 0); /* LCDD15 */ | ||
| 684 | at91_set_A_periph(AT91_PIN_PC22, 0); /* LCDD18 */ | ||
| 685 | at91_set_A_periph(AT91_PIN_PC23, 0); /* LCDD19 */ | ||
| 686 | at91_set_A_periph(AT91_PIN_PC24, 0); /* LCDD20 */ | ||
| 687 | at91_set_B_periph(AT91_PIN_PC17, 0); /* LCDD21 */ | ||
| 688 | at91_set_A_periph(AT91_PIN_PC26, 0); /* LCDD22 */ | ||
| 689 | at91_set_A_periph(AT91_PIN_PC27, 0); /* LCDD23 */ | ||
| 690 | |||
| 691 | lcdc_data = *data; | ||
| 692 | platform_device_register(&at91_lcdc_device); | ||
| 693 | } | ||
| 694 | #else | ||
| 695 | void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {} | ||
| 696 | #endif | ||
| 697 | |||
| 698 | |||
| 699 | /* -------------------------------------------------------------------- | ||
| 576 | * LEDs | 700 | * LEDs |
| 577 | * -------------------------------------------------------------------- */ | 701 | * -------------------------------------------------------------------- */ |
| 578 | 702 | ||
