Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
@@ -205,8 +205,6 @@ static int fsl_pq_mdio_find_free(struct mii_bus *new_bus)
|
||||
static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs, struct device_node *np)
|
||||
{
|
||||
struct gfar __iomem *enet_regs;
|
||||
u32 __iomem *ioremap_tbipa;
|
||||
u64 addr, size;
|
||||
|
||||
/*
|
||||
* This is mildly evil, but so is our hardware for doing this.
|
||||
@@ -220,9 +218,7 @@ static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs, struct devi
|
||||
return &enet_regs->tbipa;
|
||||
} else if (of_device_is_compatible(np, "fsl,etsec2-mdio") ||
|
||||
of_device_is_compatible(np, "fsl,etsec2-tbi")) {
|
||||
addr = of_translate_address(np, of_get_address(np, 1, &size, NULL));
|
||||
ioremap_tbipa = ioremap(addr, size);
|
||||
return ioremap_tbipa;
|
||||
return of_iomap(np, 1);
|
||||
} else
|
||||
return NULL;
|
||||
}
|
||||
@@ -279,16 +275,19 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
|
||||
u32 __iomem *tbipa;
|
||||
struct mii_bus *new_bus;
|
||||
int tbiaddr = -1;
|
||||
const u32 *addrp;
|
||||
u64 addr = 0, size = 0;
|
||||
int err = 0;
|
||||
int err;
|
||||
|
||||
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
|
||||
new_bus = mdiobus_alloc();
|
||||
if (NULL == new_bus)
|
||||
if (!new_bus) {
|
||||
err = -ENOMEM;
|
||||
goto err_free_priv;
|
||||
}
|
||||
|
||||
new_bus->name = "Freescale PowerQUICC MII Bus",
|
||||
new_bus->read = &fsl_pq_mdio_read,
|
||||
@@ -297,8 +296,19 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
|
||||
new_bus->priv = priv;
|
||||
fsl_pq_mdio_bus_name(new_bus->id, np);
|
||||
|
||||
addrp = of_get_address(np, 0, &size, NULL);
|
||||
if (!addrp) {
|
||||
err = -EINVAL;
|
||||
goto err_free_bus;
|
||||
}
|
||||
|
||||
/* Set the PHY base address */
|
||||
addr = of_translate_address(np, of_get_address(np, 0, &size, NULL));
|
||||
addr = of_translate_address(np, addrp);
|
||||
if (addr == OF_BAD_ADDR) {
|
||||
err = -EINVAL;
|
||||
goto err_free_bus;
|
||||
}
|
||||
|
||||
map = ioremap(addr, size);
|
||||
if (!map) {
|
||||
err = -ENOMEM;
|
||||
|
Reference in New Issue
Block a user