Hi Simon, On Sat, Dec 20, 2014 at 5:53 AM, Simon Glass <s...@chromium.org> wrote: > Hi Bin, > > On 19 December 2014 at 00:19, Bin Meng <bmeng...@gmail.com> wrote: >> This new API pci_early_find_devices() is derived from the generic >> version of pci_find_devices() with modifications required in the >> early phase (like hose, config space access routines). >> >> Signed-off-by: Bin Meng <bmeng...@gmail.com> >> --- >> >> arch/x86/cpu/pci.c | 41 +++++++++++++++++++++++++++++++++++++++++ >> arch/x86/include/asm/pci.h | 2 ++ >> 2 files changed, 43 insertions(+) >> >> diff --git a/arch/x86/cpu/pci.c b/arch/x86/cpu/pci.c >> index 1eee08b..cdfb981 100644 >> --- a/arch/x86/cpu/pci.c >> +++ b/arch/x86/cpu/pci.c >> @@ -111,3 +111,44 @@ void pci_write_config32(pci_dev_t dev, unsigned where, >> unsigned value) >> { >> pci_hose_write_config_dword(get_hose(), dev, where, value); >> } >> + >> +pci_dev_t pci_early_find_devices(struct pci_device_id *ids, int index) > > Can't we just call the normal function? We have an early 'hose'... >
We can, but doing this way requires a large update of the drivers/pci/pci.c file, and requires every architecture to have an early hose in its global data. So that early hose becomes a generic feature for every arch we support, not only x86. Do you want to do this? [snip] Regards, Bin _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot