[U-Boot-Users] [PATCH] ppc4xx: Add pci_pre_init() for 405 boards

Matthias Fuchs matthias.fuchs at esd-electronics.com
Thu Jun 21 15:38:26 CEST 2007


ppc4xx: Add pci_pre_init() for 405 boards

This patch adds support for calling a plattform dependant
pci_pre_init() function for 405 boards. This can be used to
move the current pci_405gp_fixup_irq() function into the
board code.

This feature can be enabled by defining CFG_PCI_PRE_INIT.

Signed-off-by: Matthias Fuchs <matthias.fuchs at esd-electronics.com>

---
commit 9941716bc8ed06f12d60fbb4f02e4d07a2792097
tree e5ace7dda41c62e8b266e8a4dc3292a0d87b8b04
parent 3c908811a5e7098d476976eed54a4f8b0e80edc7
author Matthias Fuchs <matthias.fuchs at esd-electronics.com> Thu, 21 Jun 2007 
14:42:46 +0200
committer Matthias Fuchs <matthias.fuchs at esd-electronics.com> Thu, 21 Jun 2007 
14:42:46 +0200

 cpu/ppc4xx/405gp_pci.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/cpu/ppc4xx/405gp_pci.c b/cpu/ppc4xx/405gp_pci.c
index 8bf03e1..b9538fa 100644
--- a/cpu/ppc4xx/405gp_pci.c
+++ b/cpu/ppc4xx/405gp_pci.c
@@ -191,6 +191,15 @@ void pci_405gp_init(struct pci_controlle
 	if (hose->pci_fb)
 		pciauto_region_init(hose->pci_fb);
 
+#if defined(CFG_PCI_PRE_INIT)
+	/* Let board change/modify hose & do initial checks */
+	if (pci_pre_init (hose) == 0) {
+		printf("PCI: Board-specific initialization failed.\n");
+		printf("PCI: Configuration aborted.\n");
+		return;
+	}
+#endif
+
 	pci_register_hose(hose);
 
 	/*--------------------------------------------------------------------------+

-- 
-----------------------------------------------------------------------
Dipl.-Ing. Matthias Fuchs             esd electronic system design gmbh
http://www.esd-electronics.com                    Vahrenwalder Str. 207
phone: +49-511-37298-0, fax: -68                30165 Hannover, Germany
-----------------------------------------------------------------------





More information about the U-Boot mailing list