summaryrefslogtreecommitdiff
path: root/drivers/sysreset/sysreset_x86.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-06-12 14:55:33 -0400
committerTom Rini <trini@konsulko.com>2023-06-12 14:55:33 -0400
commit260d4962e06c0a7d2713523c131416a3f70d7f2c (patch)
tree14b9d414810e97f1ffdfdaf099db57a5bbf45a79 /drivers/sysreset/sysreset_x86.c
parent5b589e139620214f26eb83c9fb7bbd62b5f8fc1d (diff)
parent19b77d3d23966a0d6dbb3c86187765f11100fb6f (diff)
Merge tag v2023.07-rc4 into next
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/sysreset/sysreset_x86.c')
-rw-r--r--drivers/sysreset/sysreset_x86.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c
index 8042f3994fe..4936fdb76c7 100644
--- a/drivers/sysreset/sysreset_x86.c
+++ b/drivers/sysreset/sysreset_x86.c
@@ -129,8 +129,13 @@ static int x86_sysreset_probe(struct udevice *dev)
{
struct x86_sysreset_plat *plat = dev_get_plat(dev);
- /* Locate the PCH if there is one. It isn't essential */
- uclass_first_device(UCLASS_PCH, &plat->pch);
+ /*
+ * Locate the PCH if there is one. It isn't essential. Avoid this before
+ * relocation as we shouldn't need reset then and it needs a lot of
+ * memory for PCI enumeration.
+ */
+ if (gd->flags & GD_FLG_RELOC)
+ uclass_first_device(UCLASS_PCH, &plat->pch);
return 0;
}