[coreboot-gerrit] New patch to review for coreboot: f808bf9 exynos5250: assign RAM resources in cpu_init()

David Hendricks (dhendrix@chromium.org) gerrit at coreboot.org
Wed Mar 27 00:36:26 CET 2013


David Hendricks (dhendrix at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2923

-gerrit

commit f808bf9fd006d97b13e2604e3becfeedec899404
Author: David Hendricks <dhendrix at chromium.org>
Date:   Tue Mar 26 16:28:21 2013 -0700

    exynos5250: assign RAM resources in cpu_init()
    
    This moves the ram resource allocation into cpu_init() so that we
    no longer rely on declaring a domain in devicetree.cb (which is kind
    of weird for this platform). This does not cause any actual changes
    to the coreboot memory table, and paves the way for further updates
    to Snow's devicetree.
    
    Change-Id: I141277f59b5d48288f409257bf556a1cfa7a8463
    Signed-off-by: David Hendricks <dhendrix at chromium.org>
---
 src/cpu/samsung/exynos5250/cpu.c | 29 ++---------------------------
 1 file changed, 2 insertions(+), 27 deletions(-)

diff --git a/src/cpu/samsung/exynos5250/cpu.c b/src/cpu/samsung/exynos5250/cpu.c
index bcf4d22..b6eae46 100644
--- a/src/cpu/samsung/exynos5250/cpu.c
+++ b/src/cpu/samsung/exynos5250/cpu.c
@@ -4,32 +4,9 @@
 #define RAM_BASE_KB (CONFIG_SYS_SDRAM_BASE >> 10)
 #define RAM_SIZE_KB (CONFIG_DRAM_SIZE_MB << 10UL)
 
-static void domain_read_resources(device_t dev)
-{
-	ram_resource(dev, 0, RAM_BASE_KB, RAM_SIZE_KB);
-}
-
-static void domain_set_resources(device_t dev)
-{
-	assign_resources(dev->link_list);
-}
-
-static unsigned int domain_scan_bus(device_t dev, unsigned int max)
-{
-	return max;
-}
-
-
-static struct device_operations domain_ops = {
-	.read_resources   = domain_read_resources,
-	.set_resources    = domain_set_resources,
-	.enable_resources = NULL,
-	.init             = NULL,
-	.scan_bus         = domain_scan_bus,
-};
-
 static void cpu_init(device_t dev)
 {
+	ram_resource(dev, 0, RAM_BASE_KB, RAM_SIZE_KB);
 }
 
 static void cpu_noop(device_t dev)
@@ -47,9 +24,7 @@ static struct device_operations cpu_ops = {
 static void enable_dev(device_t dev)
 {
 	/* Set the operations if it is a special bus type */
-	if (dev->path.type == DEVICE_PATH_DOMAIN) {
-		dev->ops = &domain_ops;
-	} else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
+	if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
 		dev->ops = &cpu_ops;
 	}
 }



More information about the coreboot-gerrit mailing list