summaryrefslogtreecommitdiff
path: root/src/southbridge/nvidia/mcp55/nic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/nvidia/mcp55/nic.c')
-rw-r--r--src/southbridge/nvidia/mcp55/nic.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/southbridge/nvidia/mcp55/nic.c b/src/southbridge/nvidia/mcp55/nic.c
index fd736e6a0c..136d060d0b 100644
--- a/src/southbridge/nvidia/mcp55/nic.c
+++ b/src/southbridge/nvidia/mcp55/nic.c
@@ -31,7 +31,7 @@
#include <delay.h>
#include "mcp55.h"
-static int phy_read(u32 base, unsigned phy_addr, unsigned phy_reg)
+static int phy_read(u8 *base, unsigned phy_addr, unsigned phy_reg)
{
u32 dword;
unsigned loop = 0x100;
@@ -59,7 +59,7 @@ static int phy_read(u32 base, unsigned phy_addr, unsigned phy_reg)
return dword;
}
-static void phy_detect(u32 base)
+static void phy_detect(u8 *base)
{
u32 dword;
int i, val;
@@ -103,7 +103,8 @@ static void phy_detect(u32 base)
static void nic_init(struct device *dev)
{
- u32 mac_h = 0, mac_l = 0, base;
+ u8 *base;
+ u32 mac_h = 0, mac_l = 0;
int eeprom_valid = 0;
struct southbridge_nvidia_mcp55_config *conf;
static u32 nic_index = 0;
@@ -114,7 +115,7 @@ static void nic_init(struct device *dev)
if (!res)
return;
- base = res->base;
+ base = res2mmio(res, 0, 0);
phy_detect(base);
@@ -160,10 +161,10 @@ static void nic_init(struct device *dev)
}
// if that is invalid we will read that from romstrap
if(!eeprom_valid) {
- unsigned long mac_pos;
- mac_pos = 0xffffffd0; // refer to romstrap.inc and romstrap.lds
+ u32 *mac_pos;
+ mac_pos = (u32 *)0xffffffd0; // refer to romstrap.inc and romstrap.lds
mac_l = read32(mac_pos) + nic_index; // overflow?
- mac_h = read32(mac_pos + 4);
+ mac_h = read32(mac_pos + 1);
}
#if 1