From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Schwingen Date: Mon, 31 Jan 2011 12:11:15 +0100 Subject: [U-Boot] calling pci_init before relocation? In-Reply-To: <20110131104254.103BCD42A99@gemini.denx.de> References: <4D45DA9F.5000903@discworld.dascon.de> <4D45E10D.4020302@free.fr> <4D45EA43.3070108@discworld.dascon.de> <20110131104254.103BCD42A99@gemini.denx.de> Message-ID: <4D4698D3.8060401@discworld.dascon.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > Dear Michael Schwingen, > > In message <4D45EA43.3070108@discworld.dascon.de> you wrote: > >> The system hangs during early init, and does not get past relocation. >> > > That is to be expected when you use this before relocation. Don't do > that, then. > > >> If I interpret the code correct, the PCI code is called from >> board_init_r on PowerPC platforms. >> > > So what? board_init_r() is (quoting the comment) "the next part if > the initialization sequence: we are now running from RAM and have a > "normal" C environment, i. e. global data can be written, BSS has > been cleared, the stack size in not that critical any more, etc." > > So it's perfectly safe and clean to run pci_init() there. > I know - I only wanted to point at the differences: the problem is that the ARM code does it before relocation currently, and I was trying to understand why. cu Michael