[coreboot-gerrit] Change in coreboot[master]: mainboard/google/kahlee: Update memory.c

Martin Roth (Code Review) gerrit at coreboot.org
Fri Nov 17 17:45:36 CET 2017


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/22515


Change subject: mainboard/google/kahlee: Update memory.c
......................................................................

mainboard/google/kahlee: Update memory.c

This fixes some issues with the initial implementation that was copied
from reef.
- The board ID value shouldn't be size_t - it's not a size.
- Kahlee doesn't even need the memory.c file - it uses an SoDIMM.

BUG=b:68293392
TEST=build stoney platforms, boot kahleebo

Change-Id: Ife5660d36912e887edfd0365a9f16c5a172c9c86
Signed-off-by: Martin Roth <martinroth at google.com>
---
M src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h
M src/mainboard/google/kahlee/variants/baseboard/memory.c
M src/mainboard/google/kahlee/variants/kahlee/Makefile.inc
D src/mainboard/google/kahlee/variants/kahlee/memory.c
4 files changed, 3 insertions(+), 34 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/15/22515/1

diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h
index b4e0891..cf995fc 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h
@@ -23,6 +23,6 @@
 
 const GPIO_CONTROL *get_gpio_table(void);
 const struct sci_source *get_gpe_table(size_t *num);
-size_t variant_board_id(void);
+uint8_t variant_board_id(void);
 
 #endif /* __BASEBOARD_VARIANTS_H__ */
diff --git a/src/mainboard/google/kahlee/variants/baseboard/memory.c b/src/mainboard/google/kahlee/variants/baseboard/memory.c
index 511241f..ae8734e 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/memory.c
+++ b/src/mainboard/google/kahlee/variants/baseboard/memory.c
@@ -17,7 +17,7 @@
 #include <baseboard/variants.h>
 #include <variant/gpio.h>
 
-size_t __attribute__((weak)) variant_board_id(void)
+uint8_t __attribute__((weak)) variant_board_id(void)
 {
 	gpio_t pads[] = {
 		[3] = MEM_CONFIG3,
@@ -26,5 +26,5 @@
 		[0] = MEM_CONFIG0,
 	};
 
-	return gpio_pullup_base2_value(pads, ARRAY_SIZE(pads));
+	return gpio_base2_value(pads, ARRAY_SIZE(pads));
 }
diff --git a/src/mainboard/google/kahlee/variants/kahlee/Makefile.inc b/src/mainboard/google/kahlee/variants/kahlee/Makefile.inc
index 94f3889..c5aab8e 100644
--- a/src/mainboard/google/kahlee/variants/kahlee/Makefile.inc
+++ b/src/mainboard/google/kahlee/variants/kahlee/Makefile.inc
@@ -16,7 +16,5 @@
 bootblock-y += gpio.c
 
 romstage-y += gpio.c
-romstage-y += memory.c
 
 ramstage-y += gpio.c
-ramstage-y += memory.c
diff --git a/src/mainboard/google/kahlee/variants/kahlee/memory.c b/src/mainboard/google/kahlee/variants/kahlee/memory.c
deleted file mode 100644
index 4341b82..0000000
--- a/src/mainboard/google/kahlee/variants/kahlee/memory.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2017 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#include <gpio.h> /* src/include/gpio.h */
-#include <baseboard/variants.h>
-#include <baseboard/gpio.h>
-
-size_t variant_board_id(void)
-{
-	gpio_t pads[] = {
-		[2] = MEM_CONFIG2,
-		[1] = MEM_CONFIG1,
-		[0] = MEM_CONFIG0,
-	};
-
-	return gpio_pullup_base2_value(pads, ARRAY_SIZE(pads));
-}

-- 
To view, visit https://review.coreboot.org/22515
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife5660d36912e887edfd0365a9f16c5a172c9c86
Gerrit-Change-Number: 22515
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171117/64fccb6a/attachment-0001.html>


More information about the coreboot-gerrit mailing list