Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93441
b: refs/heads/master
c: ff114b6
h: refs/heads/master
i:
  93439: 794c84f
v: v3
  • Loading branch information
Remi Machet authored and Paul Mackerras committed Apr 24, 2008
1 parent 81c69d6 commit 20c11db
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21dbfd291fe704986fab63a129f89ed2de471329
refs/heads/master: ff114b669b45480688198f28d6aad1a61223335d
42 changes: 26 additions & 16 deletions trunk/arch/powerpc/sysdev/mv64x60_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,48 +431,58 @@ static int __init mv64x60_device_setup(void)
int err;

id = 0;
for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc")
if ((err = mv64x60_mpsc_device_setup(np, id++)))
goto error;
for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc") {
err = mv64x60_mpsc_device_setup(np, id++);
if (err)
printk(KERN_ERR "Failed to initialize MV64x60 "
"serial device %s: error %d.\n",
np->full_name, err);
}

id = 0;
id2 = 0;
for_each_compatible_node(np, NULL, "marvell,mv64360-eth-group") {
pdev = mv64x60_eth_register_shared_pdev(np, id++);
if (IS_ERR(pdev)) {
err = PTR_ERR(pdev);
goto error;
printk(KERN_ERR "Failed to initialize MV64x60 "
"network block %s: error %d.\n",
np->full_name, err);
continue;
}
for_each_child_of_node(np, np2) {
if (!of_device_is_compatible(np2,
"marvell,mv64360-eth"))
continue;
err = mv64x60_eth_device_setup(np2, id2++, pdev);
if (err) {
of_node_put(np2);
goto error;
}
if (err)
printk(KERN_ERR "Failed to initialize "
"MV64x60 network device %s: "
"error %d.\n",
np2->full_name, err);
}
}

id = 0;
for_each_compatible_node(np, "i2c", "marvell,mv64360-i2c")
if ((err = mv64x60_i2c_device_setup(np, id++)))
goto error;
for_each_compatible_node(np, "i2c", "marvell,mv64360-i2c") {
err = mv64x60_i2c_device_setup(np, id++);
if (err)
printk(KERN_ERR "Failed to initialize MV64x60 I2C "
"bus %s: error %d.\n",
np->full_name, err);
}

/* support up to one watchdog timer */
np = of_find_compatible_node(np, NULL, "marvell,mv64360-wdt");
if (np) {
if ((err = mv64x60_wdt_device_setup(np, id)))
goto error;
printk(KERN_ERR "Failed to initialize MV64x60 "
"Watchdog %s: error %d.\n",
np->full_name, err);
of_node_put(np);
}

return 0;

error:
of_node_put(np);
return err;
}
arch_initcall(mv64x60_device_setup);

Expand Down

0 comments on commit 20c11db

Please sign in to comment.