[U-Boot] [RFC] move nand_init after pci_init in arch/powerpc/lib/board.c ?

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.
Regards, André
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
In message 1285937418.2597.24.camel@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
participants (2)
-
André Schwarz
-
Wolfgang Denk