summaryrefslogtreecommitdiff
path: root/drivers/net/fsl_pq_mdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fsl_pq_mdio.c')
-rw-r--r--drivers/net/fsl_pq_mdio.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c
index 6be36b9bc31b..b3079a5a7f2b 100644
--- a/drivers/net/fsl_pq_mdio.c
+++ b/drivers/net/fsl_pq_mdio.c
@@ -194,11 +194,15 @@ static int *create_irq_map(struct device_node *np)
void fsl_pq_mdio_bus_name(char *name, struct device_node *np)
{
- const u32 *reg;
+ const u32 *addr;
+ u64 taddr = OF_BAD_ADDR;
- reg = of_get_property(np, "reg", NULL);
+ addr = of_get_address(np, 0, NULL, NULL);
+ if (addr)
+ taddr = of_translate_address(np, addr);
- snprintf(name, MII_BUS_ID_SIZE, "%s@%x", np->name, reg ? *reg : 0);
+ snprintf(name, MII_BUS_ID_SIZE, "%s@%llx", np->name,
+ (unsigned long long)taddr);
}
/* Scan the bus in reverse, looking for an empty spot */