]> git.baikalelectronics.ru Git - uboot.git/commit
x86: tpl: Add a fake PCI bus
authorSimon Glass <sjg@chromium.org>
Mon, 21 Oct 2019 03:37:50 +0000 (21:37 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Sat, 2 Nov 2019 23:20:28 +0000 (07:20 +0800)
commitc93d73ac004e4457522a75e0780fc90fd7ed4f60
tree850143902fe64e70d9335b1fe9cfbe2df4ff15bc
parent4ee122ed98f516402eaad859123f7efc8a4acc4d
x86: tpl: Add a fake PCI bus

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@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/tpl.c