soc/amd/stoneyridge: add resources during read_resources()

The chipset code was incorrectly adding memory resources
to the domain device after resource allocation occurred.
It's not possible to get the correct view of the address space,
and it's generally incorrect to not add resources during
read_resources(). This change fixes the order by adding resources
during read_resources().

Signed-off-by: Furquan Shaikh <furquan@google.com>
Change-Id: I532f508936d5ec154cbcb3538949316ae4851105
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41369
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c
index 6c26623..c6fdc60 100644
--- a/src/soc/amd/stoneyridge/northbridge.c
+++ b/src/soc/amd/stoneyridge/northbridge.c
@@ -414,7 +414,7 @@
 		do_agesawrapper(AMD_INIT_MID, "amdinitmid");
 }
 
-void domain_set_resources(struct device *dev)
+void domain_read_resources(struct device *dev)
 {
 	uint64_t uma_base = get_uma_base();
 	uint32_t uma_size = get_uma_size();
@@ -424,6 +424,8 @@
 	uint64_t high_mem_useable;
 	int idx = 0x10;
 
+	pci_domain_read_resources(dev);
+
 	/* 0x0 -> 0x9ffff */
 	ram_resource(dev, idx++, 0, 0xa0000 / KiB);
 
@@ -462,8 +464,6 @@
 						uma_size / KiB);
 		}
 	}
-
-	assign_resources(dev->link_list);
 }
 
 /*********************************************************************