Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44251
b: refs/heads/master
c: a6f92f3
h: refs/heads/master
i:
  44249: 9943348
  44247: 0367501
v: v3
  • Loading branch information
Haavard Skinnemoen committed Dec 8, 2006
1 parent 43d781b commit 17fe28b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cfcb3a89d04144c064023bdc7d8dc600a88cc5c4
refs/heads/master: a6f92f3dc8e53185bae50d44b5042b9cddf7f475
31 changes: 23 additions & 8 deletions trunk/arch/avr32/boards/atstk1000/atstk1002.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,32 @@
* published by the Free Software Foundation.
*/
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/types.h>

#include <asm/setup.h>
#include <asm/arch/board.h>
#include <asm/arch/init.h>

struct eth_platform_data __initdata eth0_data = {
.valid = 1,
.mii_phy_addr = 0x10,
.is_rmii = 0,
.hw_addr = { 0x6a, 0x87, 0x71, 0x14, 0xcd, 0xcb },
};

static struct eth_platform_data __initdata eth_data[2];
extern struct lcdc_platform_data atstk1000_fb0_data;

static int __init parse_tag_ethernet(struct tag *tag)
{
int i;

i = tag->u.ethernet.mac_index;
if (i < ARRAY_SIZE(eth_data)) {
eth_data[i].mii_phy_addr = tag->u.ethernet.mii_phy_addr;
memcpy(&eth_data[i].hw_addr, tag->u.ethernet.hw_address,
sizeof(eth_data[i].hw_addr));
eth_data[i].valid = 1;
}
return 0;
}
__tagtable(ATAG_ETHERNET, parse_tag_ethernet);

void __init setup_board(void)
{
at32_map_usart(1, 0); /* /dev/ttyS0 */
Expand All @@ -38,7 +51,9 @@ static int __init atstk1002_init(void)
at32_add_device_usart(1);
at32_add_device_usart(2);

at32_add_device_eth(0, &eth0_data);
if (eth_data[0].valid)
at32_add_device_eth(0, &eth_data[0]);

at32_add_device_spi(0);
at32_add_device_lcdc(0, &atstk1000_fb0_data);

Expand Down
24 changes: 0 additions & 24 deletions trunk/arch/avr32/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,30 +229,6 @@ static int __init parse_tag_rsvd_mem(struct tag *tag)
}
__tagtable(ATAG_RSVD_MEM, parse_tag_rsvd_mem);

static int __init parse_tag_ethernet(struct tag *tag)
{
#if 0
const struct platform_device *pdev;

/*
* We really need a bus type that supports "classes"...this
* will do for now (until we must handle other kinds of
* ethernet controllers)
*/
pdev = platform_get_device("macb", tag->u.ethernet.mac_index);
if (pdev && pdev->dev.platform_data) {
struct eth_platform_data *data = pdev->dev.platform_data;

data->valid = 1;
data->mii_phy_addr = tag->u.ethernet.mii_phy_addr;
memcpy(data->hw_addr, tag->u.ethernet.hw_address,
sizeof(data->hw_addr));
}
#endif
return 0;
}
__tagtable(ATAG_ETHERNET, parse_tag_ethernet);

/*
* Scan the tag table for this tag, and call its parse function. The
* tag table is built by the linker from all the __tagtable
Expand Down

0 comments on commit 17fe28b

Please sign in to comment.