soc/nvidia/tegra124: 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 in
read_resources().

Signed-off-by: Furquan Shaikh <furquan@google.com>
Change-Id: I16f0439679471366723a0084918a20cd95834831
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41372
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/nvidia/tegra124/soc.c b/src/soc/nvidia/tegra124/soc.c
index ffc8771..00c7009 100644
--- a/src/soc/nvidia/tegra124/soc.c
+++ b/src/soc/nvidia/tegra124/soc.c
@@ -14,7 +14,7 @@
  * Will break if we get 2. Sigh.
  * We assume it's all multiples of MiB for MMUs sake.
  */
-static void soc_enable(struct device *dev)
+static void soc_read_resources(struct device *dev)
 {
 	u32 lcdbase = fb_base_mb();
 	unsigned long fb_size = FB_SIZE_MB;
@@ -41,9 +41,8 @@
 }
 
 static struct device_operations soc_ops = {
-	.read_resources   = noop_read_resources,
+	.read_resources   = soc_read_resources,
 	.set_resources    = noop_set_resources,
-	.enable_resources = soc_enable,
 	.init             = soc_init,
 };