[U-Boot] [PATCH v3 025/108] x86: tpl: Add a fake PCI bus

Bin Meng bmeng.cn at gmail.com
Mon Oct 28 07:12:51 UTC 2019


On Mon, Oct 21, 2019 at 11:40 AM Simon Glass <sjg at chromium.org> wrote:
>
> In TPL we try to minimise code size so do not include the PCI subsystem.
> We can use fixed BARs and drivers can directly program the devices that
> they need.
>
> However we do need to bind the devices on the PCI bus and without PCI this
> does not ordinarily happen. As a work-around, define a fake PCI bus which
> does this binding, but no other PCI operations. This is a convenient way
> to ensure that we can use the same device tree for TPL, SPL and U-Boot
> proper:
>
>    TPL    - CONFIG_TPL_PCI is not set (no auto-config, fake PCI bus)
>    SPL    - CONFIG_SPL_PCI is set (no auto-config but with real PCI bus)
>    U-Boot - CONFIG_PCI is set (full auto-config after relocation)
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v3:
> - Fix 'autoallocation' typo
> - Improve wording in commit message
>
> Changes in v2: None
>
>  arch/x86/lib/tpl.c | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list