aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/boards
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/boards')
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index cced73c58115..f65865cd9c3b 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -8,19 +8,32 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/kernel.h>
12#include <linux/string.h>
13#include <linux/types.h>
11 14
15#include <asm/setup.h>
12#include <asm/arch/board.h> 16#include <asm/arch/board.h>
13#include <asm/arch/init.h> 17#include <asm/arch/init.h>
14 18
15struct eth_platform_data __initdata eth0_data = { 19static struct eth_platform_data __initdata eth_data[2];
16 .valid = 1,
17 .mii_phy_addr = 0x10,
18 .is_rmii = 0,
19 .hw_addr = { 0x6a, 0x87, 0x71, 0x14, 0xcd, 0xcb },
20};
21
22extern struct lcdc_platform_data atstk1000_fb0_data; 20extern struct lcdc_platform_data atstk1000_fb0_data;
23 21
22static int __init parse_tag_ethernet(struct tag *tag)
23{
24 int i;
25
26 i = tag->u.ethernet.mac_index;
27 if (i < ARRAY_SIZE(eth_data)) {
28 eth_data[i].mii_phy_addr = tag->u.ethernet.mii_phy_addr;
29 memcpy(&eth_data[i].hw_addr, tag->u.ethernet.hw_address,
30 sizeof(eth_data[i].hw_addr));
31 eth_data[i].valid = 1;
32 }
33 return 0;
34}
35__tagtable(ATAG_ETHERNET, parse_tag_ethernet);
36
24void __init setup_board(void) 37void __init setup_board(void)
25{ 38{
26 at32_map_usart(1, 0); /* /dev/ttyS0 */ 39 at32_map_usart(1, 0); /* /dev/ttyS0 */
@@ -38,7 +51,9 @@ static int __init atstk1002_init(void)
38 at32_add_device_usart(1); 51 at32_add_device_usart(1);
39 at32_add_device_usart(2); 52 at32_add_device_usart(2);
40 53
41 at32_add_device_eth(0, &eth0_data); 54 if (eth_data[0].valid)
55 at32_add_device_eth(0, &eth_data[0]);
56
42 at32_add_device_spi(0); 57 at32_add_device_spi(0);
43 at32_add_device_lcdc(0, &atstk1000_fb0_data); 58 at32_add_device_lcdc(0, &atstk1000_fb0_data);
44 59