[PATCH 1/3] cleanup PCI Host Bridge setup

John Rose johnrose at austin.ibm.com
Tue Mar 7 12:03:28 EST 2006


Since setup_phb() and pci_process_bridge_OF_ranges() are always called
together, and since the latter falls under the category of "setup", move
the latter into the former.

Thanks-
John

Signed-off-by: John Rose <johnrose at austin.ibm.com>

diff -puN arch/powerpc/kernel/rtas_pci.c~cleanup_phb_setup arch/powerpc/kernel/rtas_pci.c
--- 2_6_p5/arch/powerpc/kernel/rtas_pci.c~cleanup_phb_setup	2006-03-03 15:42:35.000000000 -0600
+++ 2_6_p5-johnrose/arch/powerpc/kernel/rtas_pci.c	2006-03-06 17:23:50.000000000 -0600
@@ -292,6 +292,8 @@ static int __devinit setup_phb(struct de
 	phb->ops = &rtas_pci_ops;
 	phb->buid = get_phb_buid(dev);
 
+	pci_process_bridge_OF_ranges(phb, dev, 0);
+
 	return 0;
 }
 
@@ -323,7 +325,6 @@ unsigned long __init find_and_init_phbs(
 		if (!phb)
 			continue;
 		setup_phb(node, phb);
-		pci_process_bridge_OF_ranges(phb, node, 0);
 		pci_setup_phb_io(phb, index == 0);
 #ifdef CONFIG_PPC_PSERIES
 		/* XXX This code need serious fixing ... --BenH */
@@ -369,7 +370,6 @@ struct pci_controller * __devinit init_p
 	if (!phb)
 		return NULL;
 	setup_phb(dn, phb);
-	pci_process_bridge_OF_ranges(phb, dn, primary);
 
 	pci_setup_phb_io_dynamic(phb, primary);
 

_




More information about the Linuxppc64-dev mailing list