u-boot-brain/arch/x86
Simon Glass 1630853085 x86: apl: Move p2sb ofdata reading to the correct method
With P2SB the initial BAR (base-address register) is set up by TPL and
this is used unchanged right through U-Boot.

At present the reading of this address is split between the ofdata() and
probe() methods. There are a few problems that are unique to the p2sb.
One is that its children need to call pcr_read32(), etc. which needs to
have the p2sb address correct. Also some of its children are pinctrl
devices and pinctrl is used when any device is probed. So p2sb really
needs to get its base address set up in ofdata_to_platdata(), before it is
probed.

Another point is that reading the p2sb BAR will not work if the p2sb is
hidden. The FSP-S seems to hide it, presumably to avoid confusing PCI
enumeration.

Reading ofdata in ofdata_to_platdata() is the correct place anyway, so
this is easy to fix.

Move the code into one place and use the early-regs property in all cases
for simplicity and to avoid needing to probe any PCI devices just to read
the BAR.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Tested-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
2020-04-16 14:36:28 +08:00
..
cpu x86: apl: Move p2sb ofdata reading to the correct method 2020-04-16 14:36:28 +08:00
dts tpm: cr50: Use the correct GPIO binding 2020-04-16 14:36:28 +08:00
include/asm x86: Correct wording of coreboot source code 2020-04-16 14:36:28 +08:00
lib x86: acpi: Let OS know that console already had been initialized 2020-04-16 14:36:28 +08:00
config.mk kconfig / kbuild: Re-sync with Linux 4.19 2020-04-10 11:18:32 -04:00
Kconfig x86: Add support for ACPI general-purpose events 2020-02-07 22:46:35 +08:00
Makefile x86: Allow 16-bit init to be in TPL 2019-05-08 13:02:13 +08:00