u-boot-brain/arch/x86/cpu/intel_common
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
..
car.S x86: Update a stale comment about ifdtool 2019-05-08 13:02:10 +08:00
car2_uninit.S x86: Add support for newer CAR schemes 2019-12-15 11:44:18 +08:00
car2.S x86: Add support for newer CAR schemes 2019-12-15 11:44:18 +08:00
cpu_from_spl.c x86: fsp: Save usable RAM and hob_list in the handoff area 2019-10-08 13:57:36 +08:00
cpu.c x86: Add new common CPU functions for turbo/burst mode 2019-10-08 13:57:47 +08:00
fast_spi.c x86: spi: Add helper functions for Intel Fast SPI 2019-12-15 11:44:08 +08:00
itss.c sandbox conversion to SDL2 2020-02-11 10:58:41 -05:00
lpc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lpss.c x86: Add low-power subsystem (lpss) support 2019-12-15 11:44:25 +08:00
Makefile x86: Move P2SB from Apollo Lake to a more generic location 2020-02-07 22:41:24 +08:00
me_status.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
microcode.c x86: Use microcode update from device tree for all processors 2018-07-02 09:23:28 +08:00
mrc.c common: Move board_get_usable_ram_top() out of common.h 2019-12-02 18:25:04 -05:00
p2sb.c x86: apl: Move p2sb ofdata reading to the correct method 2020-04-16 14:36:28 +08:00
pch.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
report_platform.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00