Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159314
b: refs/heads/master
c: 1e2c8d8
h: refs/heads/master
v: v3
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Aug 5, 2009
1 parent 0ebd354 commit 460a543
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d76c626b922e279c7764ec46fb1b9bbd41538f35
refs/heads/master: 1e2c8d830a74c24ccb25601bd89dcd0dbcb4e9f5
15 changes: 15 additions & 0 deletions trunk/arch/mips/ar7/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include <linux/leds.h>
#include <linux/string.h>
#include <linux/etherdevice.h>
#include <linux/phy.h>
#include <linux/phy_fixed.h>

#include <asm/addrspace.h>
#include <asm/mach-ar7/ar7.h>
Expand Down Expand Up @@ -209,6 +211,12 @@ static struct physmap_flash_data physmap_flash_data = {
.width = 2,
};

static struct fixed_phy_status fixed_phy_status __initdata = {
.link = 1,
.speed = 100,
.duplex = 1,
};

static struct plat_cpmac_data cpmac_low_data = {
.reset_bit = 17,
.power_bit = 20,
Expand Down Expand Up @@ -530,6 +538,9 @@ static int __init ar7_register_devices(void)
}

if (ar7_has_high_cpmac()) {
res = fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status);
if (res && res != -ENODEV)
return res;
cpmac_get_mac(1, cpmac_high_data.dev_addr);
res = platform_device_register(&cpmac_high);
if (res)
Expand All @@ -538,6 +549,10 @@ static int __init ar7_register_devices(void)
cpmac_low_data.phy_mask = 0xffffffff;
}

res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status);
if (res && res != -ENODEV)
return res;

cpmac_get_mac(0, cpmac_low_data.dev_addr);
res = platform_device_register(&cpmac_low);
if (res)
Expand Down

0 comments on commit 460a543

Please sign in to comment.