diff options
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap7000.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c index ada7930d5a4d..48f4ef38c70e 100644 --- a/arch/avr32/mach-at32ap/at32ap7000.c +++ b/arch/avr32/mach-at32ap/at32ap7000.c | |||
@@ -646,6 +646,15 @@ DEFINE_DEV_DATA(macb, 0); | |||
646 | DEV_CLK(hclk, macb0, hsb, 8); | 646 | DEV_CLK(hclk, macb0, hsb, 8); |
647 | DEV_CLK(pclk, macb0, pbb, 6); | 647 | DEV_CLK(pclk, macb0, pbb, 6); |
648 | 648 | ||
649 | static struct eth_platform_data macb1_data; | ||
650 | static struct resource macb1_resource[] = { | ||
651 | PBMEM(0xfff01c00), | ||
652 | IRQ(26), | ||
653 | }; | ||
654 | DEFINE_DEV_DATA(macb, 1); | ||
655 | DEV_CLK(hclk, macb1, hsb, 9); | ||
656 | DEV_CLK(pclk, macb1, pbb, 7); | ||
657 | |||
649 | struct platform_device *__init | 658 | struct platform_device *__init |
650 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data) | 659 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data) |
651 | { | 660 | { |
@@ -679,6 +688,33 @@ at32_add_device_eth(unsigned int id, struct eth_platform_data *data) | |||
679 | } | 688 | } |
680 | break; | 689 | break; |
681 | 690 | ||
691 | case 1: | ||
692 | pdev = &macb1_device; | ||
693 | |||
694 | select_peripheral(PD(13), PERIPH_B, 0); /* TXD0 */ | ||
695 | select_peripheral(PD(14), PERIPH_B, 0); /* TXD1 */ | ||
696 | select_peripheral(PD(11), PERIPH_B, 0); /* TXEN */ | ||
697 | select_peripheral(PD(12), PERIPH_B, 0); /* TXCK */ | ||
698 | select_peripheral(PD(10), PERIPH_B, 0); /* RXD0 */ | ||
699 | select_peripheral(PD(6), PERIPH_B, 0); /* RXD1 */ | ||
700 | select_peripheral(PD(5), PERIPH_B, 0); /* RXER */ | ||
701 | select_peripheral(PD(4), PERIPH_B, 0); /* RXDV */ | ||
702 | select_peripheral(PD(3), PERIPH_B, 0); /* MDC */ | ||
703 | select_peripheral(PD(2), PERIPH_B, 0); /* MDIO */ | ||
704 | |||
705 | if (!data->is_rmii) { | ||
706 | select_peripheral(PC(19), PERIPH_B, 0); /* COL */ | ||
707 | select_peripheral(PC(23), PERIPH_B, 0); /* CRS */ | ||
708 | select_peripheral(PC(26), PERIPH_B, 0); /* TXER */ | ||
709 | select_peripheral(PC(27), PERIPH_B, 0); /* TXD2 */ | ||
710 | select_peripheral(PC(28), PERIPH_B, 0); /* TXD3 */ | ||
711 | select_peripheral(PC(29), PERIPH_B, 0); /* RXD2 */ | ||
712 | select_peripheral(PC(30), PERIPH_B, 0); /* RXD3 */ | ||
713 | select_peripheral(PC(24), PERIPH_B, 0); /* RXCK */ | ||
714 | select_peripheral(PD(15), PERIPH_B, 0); /* SPD */ | ||
715 | } | ||
716 | break; | ||
717 | |||
682 | default: | 718 | default: |
683 | return NULL; | 719 | return NULL; |
684 | } | 720 | } |
@@ -830,6 +866,8 @@ struct clk *at32_clock_list[] = { | |||
830 | &atmel_usart3_usart, | 866 | &atmel_usart3_usart, |
831 | &macb0_hclk, | 867 | &macb0_hclk, |
832 | &macb0_pclk, | 868 | &macb0_pclk, |
869 | &macb1_hclk, | ||
870 | &macb1_pclk, | ||
833 | &spi0_mck, | 871 | &spi0_mck, |
834 | &lcdc0_hclk, | 872 | &lcdc0_hclk, |
835 | &lcdc0_pixclk, | 873 | &lcdc0_pixclk, |