aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powermac/setup.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-01-06 19:30:44 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 23:47:16 -0500
commit730745a5c45093982112ddc94cee6a9973455641 (patch)
tree1c36bd96c28d08e2b5d839ba3f4e37588aad2328 /arch/powerpc/platforms/powermac/setup.c
parent002ec58eb57bac2380f0ed5a4e88121b4bdb32ec (diff)
[PATCH] 1/5 powerpc: Rework PowerMac i2c part 1
This is the first part of a rework of the PowerMac i2c code. It completely reworks the "low_i2c" layer. It is now more flexible, supports KeyWest, SMU and PMU i2c busses, and provides functions to match device nodes to i2c busses and adapters. This patch also extends & fix some bugs in the SMU driver related to i2c support and removes the clock spreading hacks from the pmac feature code rather than adapting them to the new API since they'll be replaced by the platform function code completely in patch 3/5 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/powermac/setup.c')
-rw-r--r--arch/powerpc/platforms/powermac/setup.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index e5a5bdbdda7..dc5cdc1484e 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -652,27 +652,22 @@ static int __init pmac_declare_of_platform_devices(void)
652{ 652{
653 struct device_node *np, *npp; 653 struct device_node *np, *npp;
654 654
655 np = find_devices("uni-n"); 655 np = of_find_node_by_name(NULL, "valkyrie");
656 if (np) {
657 for (np = np->child; np != NULL; np = np->sibling)
658 if (strncmp(np->name, "i2c", 3) == 0) {
659 of_platform_device_create(np, "uni-n-i2c",
660 NULL);
661 break;
662 }
663 }
664 np = find_devices("valkyrie");
665 if (np) 656 if (np)
666 of_platform_device_create(np, "valkyrie", NULL); 657 of_platform_device_create(np, "valkyrie", NULL);
667 np = find_devices("platinum"); 658 np = of_find_node_by_name(NULL, "platinum");
668 if (np) 659 if (np)
669 of_platform_device_create(np, "platinum", NULL); 660 of_platform_device_create(np, "platinum", NULL);
670 661 npp = of_find_node_by_name(NULL, "uni-n");
671 npp = of_find_node_by_name(NULL, "u3"); 662 if (npp == NULL)
663 npp = of_find_node_by_name(NULL, "u3");
664 if (npp == NULL)
665 npp = of_find_node_by_name(NULL, "u4");
672 if (npp) { 666 if (npp) {
673 for (np = NULL; (np = of_get_next_child(npp, np)) != NULL;) { 667 for (np = NULL; (np = of_get_next_child(npp, np)) != NULL;) {
674 if (strncmp(np->name, "i2c", 3) == 0) { 668 if (strncmp(np->name, "i2c", 3) == 0) {
675 of_platform_device_create(np, "u3-i2c", NULL); 669 of_platform_device_create(np, "uni-n-i2c",
670 NULL);
676 of_node_put(np); 671 of_node_put(np);
677 break; 672 break;
678 } 673 }