aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2008-04-09 19:38:13 -0500
committerJeff Garzik <jgarzik@redhat.com>2008-04-16 20:09:35 -0400
commit9d9326d3bc0ea9a8bbe40bf3e5e66c7b9858caa0 (patch)
tree51b2ee6bfa87bbd6faac0bc00a787354e1fb72a0 /arch/powerpc
parentd080cd6301e107e79c6a0fc654319f8979f70549 (diff)
phy: Change mii_bus id field to a string
Having the id field be an int was making more complex bus topologies excessively difficult. For now, just convert it to a string, and change all instances of "bus->id = val" to snprintf(id, MII_BUS_ID_LEN, "%x", val). Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/82xx/ep8248e.c2
-rw-r--r--arch/powerpc/platforms/pasemi/gpio_mdio.c2
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c5
3 files changed, 5 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c
index ba93d8ae9b0..d5770fdf7f0 100644
--- a/arch/powerpc/platforms/82xx/ep8248e.c
+++ b/arch/powerpc/platforms/82xx/ep8248e.c
@@ -138,7 +138,7 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
bus->name = "ep8248e-mdio-bitbang";
bus->dev = &ofdev->dev;
- bus->id = res.start;
+ snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
return mdiobus_register(bus);
}
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c
index b46542990cf..ab6955412ba 100644
--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
+++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
@@ -241,7 +241,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
new_bus->reset = &gpio_mdio_reset;
prop = of_get_property(np, "reg", NULL);
- new_bus->id = *prop;
+ snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", *prop);
new_bus->priv = priv;
new_bus->phy_mask = 0;
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 2c5388ce902..3581416905e 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -341,7 +341,7 @@ static int __init gfar_of_init(void)
goto unreg;
}
- gfar_data.bus_id = 0;
+ snprintf(gfar_data.bus_id, MII_BUS_ID_SIZE, "0");
gfar_data.phy_id = fixed_link[0];
} else {
phy = of_find_node_by_phandle(*ph);
@@ -362,7 +362,8 @@ static int __init gfar_of_init(void)
}
gfar_data.phy_id = *id;
- gfar_data.bus_id = res.start;
+ snprintf(gfar_data.bus_id, MII_BUS_ID_SIZE, "%x",
+ res.start);
of_node_put(phy);
of_node_put(mdio);