diff options
| -rw-r--r-- | arch/arm/mach-at91/at91sam9261_devices.c | 10 | ||||
| -rw-r--r-- | arch/arm/mach-at91/at91sam9263_devices.c | 124 | ||||
| -rw-r--r-- | include/asm-arm/arch-at91/board.h | 12 |
3 files changed, 140 insertions, 6 deletions
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index e1504766fd64..8e781997716a 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
| @@ -430,9 +430,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
| 430 | * LCD Controller | 430 | * LCD Controller |
| 431 | * -------------------------------------------------------------------- */ | 431 | * -------------------------------------------------------------------- */ |
| 432 | 432 | ||
| 433 | #if defined(CONFIG_FB_AT91) || defined(CONFIG_FB_AT91_MODULE) | 433 | #if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE) |
| 434 | static u64 lcdc_dmamask = 0xffffffffUL; | 434 | static u64 lcdc_dmamask = 0xffffffffUL; |
| 435 | static struct at91fb_info lcdc_data; | 435 | static struct atmel_lcdfb_info lcdc_data; |
| 436 | 436 | ||
| 437 | static struct resource lcdc_resources[] = { | 437 | static struct resource lcdc_resources[] = { |
| 438 | [0] = { | 438 | [0] = { |
| @@ -455,7 +455,7 @@ static struct resource lcdc_resources[] = { | |||
| 455 | }; | 455 | }; |
| 456 | 456 | ||
| 457 | static struct platform_device at91_lcdc_device = { | 457 | static struct platform_device at91_lcdc_device = { |
| 458 | .name = "at91-fb", | 458 | .name = "atmel_lcdfb", |
| 459 | .id = 0, | 459 | .id = 0, |
| 460 | .dev = { | 460 | .dev = { |
| 461 | .dma_mask = &lcdc_dmamask, | 461 | .dma_mask = &lcdc_dmamask, |
| @@ -466,7 +466,7 @@ static struct platform_device at91_lcdc_device = { | |||
| 466 | .num_resources = ARRAY_SIZE(lcdc_resources), | 466 | .num_resources = ARRAY_SIZE(lcdc_resources), |
| 467 | }; | 467 | }; |
| 468 | 468 | ||
| 469 | void __init at91_add_device_lcdc(struct at91fb_info *data) | 469 | void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) |
| 470 | { | 470 | { |
| 471 | if (!data) { | 471 | if (!data) { |
| 472 | return; | 472 | return; |
| @@ -499,7 +499,7 @@ void __init at91_add_device_lcdc(struct at91fb_info *data) | |||
| 499 | platform_device_register(&at91_lcdc_device); | 499 | platform_device_register(&at91_lcdc_device); |
| 500 | } | 500 | } |
| 501 | #else | 501 | #else |
| 502 | void __init at91_add_device_lcdc(struct at91fb_info *data) {} | 502 | void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {} |
| 503 | #endif | 503 | #endif |
| 504 | 504 | ||
| 505 | 505 | ||
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 | ||
diff --git a/include/asm-arm/arch-at91/board.h b/include/asm-arm/arch-at91/board.h index 7b9903c2c447..7a34a5b1fed0 100644 --- a/include/asm-arm/arch-at91/board.h +++ b/include/asm-arm/arch-at91/board.h | |||
| @@ -62,7 +62,7 @@ struct at91_mmc_data { | |||
| 62 | }; | 62 | }; |
| 63 | extern void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data); | 63 | extern void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data); |
| 64 | 64 | ||
| 65 | /* Ethernet */ | 65 | /* Ethernet (EMAC & MACB) */ |
| 66 | struct at91_eth_data { | 66 | struct at91_eth_data { |
| 67 | u8 phy_irq_pin; /* PHY IRQ */ | 67 | u8 phy_irq_pin; /* PHY IRQ */ |
| 68 | u8 is_rmii; /* using RMII interface? */ | 68 | u8 is_rmii; /* using RMII interface? */ |
| @@ -114,6 +114,16 @@ struct atmel_uart_data { | |||
| 114 | }; | 114 | }; |
| 115 | extern void __init at91_add_device_serial(void); | 115 | extern void __init at91_add_device_serial(void); |
| 116 | 116 | ||
| 117 | /* LCD Controller */ | ||
| 118 | struct atmel_lcdfb_info; | ||
| 119 | extern void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data); | ||
| 120 | |||
| 121 | /* AC97 */ | ||
| 122 | struct atmel_ac97_data { | ||
| 123 | u8 reset_pin; /* reset */ | ||
| 124 | } | ||
| 125 | extern void __init at91_add_device_ac97(struct atmel_ac97_data *data); | ||
| 126 | |||
| 117 | /* LEDs */ | 127 | /* LEDs */ |
| 118 | extern u8 at91_leds_cpu; | 128 | extern u8 at91_leds_cpu; |
| 119 | extern u8 at91_leds_timer; | 129 | extern u8 at91_leds_timer; |
