summaryrefslogtreecommitdiff
path: root/src/southbridge/nvidia/ck804/nic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/nvidia/ck804/nic.c')
-rw-r--r--src/southbridge/nvidia/ck804/nic.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/southbridge/nvidia/ck804/nic.c b/src/southbridge/nvidia/ck804/nic.c
index e285644bec..974ce0d4de 100644
--- a/src/southbridge/nvidia/ck804/nic.c
+++ b/src/southbridge/nvidia/ck804/nic.c
@@ -33,11 +33,11 @@ static void nic_init(struct device *dev)
int eeprom_valid = 0;
struct southbridge_nvidia_ck804_config *conf;
static u32 nic_index = 0;
- unsigned long base;
+ u8 *base;
struct resource *res;
res = find_resource(dev, 0x10);
- base = (unsigned long)res->base;
+ base = res2mmio(res, 0, 0);
#define NvRegPhyInterface 0xC0
#define PHY_RGMII 0x10000000
@@ -89,10 +89,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; /* See romstrap.inc and romstrap.lds. */
+ u32 *mac_pos;
+ mac_pos = (u32 *)0xffffffd0; /* See romstrap.inc and romstrap.lds. */
mac_l = read32(mac_pos) + nic_index;
- mac_h = read32(mac_pos + 4);
+ mac_h = read32(mac_pos + 1);
}
#if 1
/* Set that into NIC MMIO. */