[U-Boot] [RFC] move nand_init after pci_init in arch/powerpc/lib/board.c ?
Wolfgang Denk
wd at denx.de
Fri Oct 1 14:57:45 CEST 2010
Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
In message <1285937418.2597.24.camel at swa-m460> you wrote:
>
> Actually I'm trying to implement a simple bitbanged Nand-Flash
> device connected to a PCI FPGA.
>
> I'm running latest U-Boot on mvBL-M7 board (MPC8343).
>
> Unfortunately nand_init() gets called before pci_init() within
> arch/powerpc/lib/board.c ?
>
> Is there any possibility to defer nand_init after pci_init ?
>
> To minimize impact we could introduce a second nand_init after pci_init
> depending on e.g. CONFIG_NAND_LATE_INIT ... of course being mutually
> exclusive with the first instance.
Eventuall your board just needs to be added to this #ifdef:
684 #if defined(CONFIG_BAB7xx) || defined(CONFIG_CPC45)
685 /*
686 * Do PCI configuration on BAB7xx and CPC45 _before_ the flash
687 * gets initialised, because we need the ISA resp. PCI_to_LOCAL bus
688 * bridge there.
689 */
690 pci_init ();
691 #endif
If this works for you, then please convert the #ifdef into a feature
#ifdef, say "CONFIF_SYS_EARLY_PCI_INIT".
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Wenn Du ein' weise Antwort verlangst, Mußt Du vernünftig fragen.
-- Goethe, Invektiven
More information about the U-Boot
mailing list