[U-Boot] [PATCH v2 3/7] pci: Make pci apis usable before relocation
Simon Glass
sjg at chromium.org
Sun Dec 28 02:55:26 CET 2014
On 27 December 2014 at 05:10, Bin Meng <bmeng.cn at gmail.com> wrote:
> Introduce a gd->hose to save the pci hose in the early phase so that
> apis in drivers/pci/pci.c can be used before relocation. Architecture
> codes need assign a valid gd->hose in the early phase.
>
> Some variables are declared as static so change them to be either
> stack variable or global data member so that they can be used before
> relocation, except the 'indent' used by CONFIG_PCI_SCAN_SHOW which
> just affects some print format.
>
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
>
I was actually thinking of making it available only for x86, but in
fact it makes sense so provide this as a global facility. The less
arch-specific stuff we add to global_data the better.
Acked-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v2:
> - New patch to make pci apis usable before relocation
>
> arch/x86/cpu/pci.c | 8 ++++----
> arch/x86/include/asm/global_data.h | 1 -
> arch/x86/include/asm/pci.h | 2 +-
> drivers/pci/pci.c | 25 +++++++++++++++++--------
> include/asm-generic/global_data.h | 6 ++++++
> 5 files changed, 28 insertions(+), 14 deletions(-)
More information about the U-Boot
mailing list