Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=568091512d464b06f17b88bfd2bdc1ec98a697bd
Commit:     568091512d464b06f17b88bfd2bdc1ec98a697bd
Parent:     c374e00e17f1c10768d5af922a1ff33e43df2eb0
Author:     Scott Wood <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 12:06:21 2007 -0500
Committer:  Kumar Gala <[EMAIL PROTECTED]>
CommitDate: Wed Oct 3 20:35:43 2007 -0500

    [POWERPC] bootwrapper: Support all-in-one PCI nodes in cuboot-pq2.
    
    Consensus was reached to put PCI nodes at the root of the tree (and not
    under /soc), but the phandle to a control node was rejected in favor of
    simply not worrying about /pci/reg overlapping /soc/ranges.
    
    This updates cuboot-82xx to not look for the phandle.
    
    Signed-off-by: Scott Wood <[EMAIL PROTECTED]>
    Acked-by: David Gibson <[EMAIL PROTECTED]>
    Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/cuboot-pq2.c |   25 ++++++++-----------------
 1 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/arch/powerpc/boot/cuboot-pq2.c b/arch/powerpc/boot/cuboot-pq2.c
index b150bd4..d3d3388 100644
--- a/arch/powerpc/boot/cuboot-pq2.c
+++ b/arch/powerpc/boot/cuboot-pq2.c
@@ -139,11 +139,11 @@ static void fixup_pci(void)
        u32 *pci_regs[3];
        u8 *soc_regs;
        int i, len;
-       void *ctrl_node, *bus_node, *parent_node, *soc_node;
-       u32 naddr, nsize, bus_ph, mem_log2;
+       void *node, *parent_node, *soc_node;
+       u32 naddr, nsize, mem_log2;
 
-       ctrl_node = finddevice("/soc/pci");
-       if (!ctrl_node || !dt_is_compatible(ctrl_node, "fsl,pq2-pci"))
+       node = finddevice("/pci");
+       if (!node || !dt_is_compatible(node, "fsl,pq2-pci"))
                return;
 
        soc_node = finddevice("/soc");
@@ -151,27 +151,18 @@ static void fixup_pci(void)
                goto err;
 
        for (i = 0; i < 3; i++)
-               if (!dt_xlate_reg(ctrl_node, i,
+               if (!dt_xlate_reg(node, i,
                                  (unsigned long *)&pci_regs[i], NULL))
                        goto err;
 
        if (!dt_xlate_reg(soc_node, 0, (unsigned long *)&soc_regs, NULL))
                goto err;
 
-       len = getprop(ctrl_node, "fsl,bus", &bus_ph, 4);
-       if (len != 4)
-               goto err;
-
-       bus_node = find_node_by_prop_value(NULL, "linux,phandle",
-                                          (char *)&bus_ph, 4);
-       if (!bus_node)
-               goto err;
-
-       dt_get_reg_format(bus_node, &naddr, &nsize);
+       dt_get_reg_format(node, &naddr, &nsize);
        if (naddr != 3 || nsize != 2)
                goto err;
 
-       parent_node = get_parent(bus_node);
+       parent_node = get_parent(node);
        if (!parent_node)
                goto err;
 
@@ -179,7 +170,7 @@ static void fixup_pci(void)
        if (naddr != 1 || nsize != 1)
                goto err;
 
-       len = getprop(bus_node, "ranges", pci_ranges_buf,
+       len = getprop(node, "ranges", pci_ranges_buf,
                      sizeof(pci_ranges_buf));
 
        for (i = 0; i < len / sizeof(struct pci_range); i++) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to