[coreboot-gerrit] Change in coreboot[master]: google/kahlee: Rename board_id to memory_sku

Marc Jones (Code Review) gerrit at coreboot.org
Wed Nov 22 08:43:41 CET 2017


Marc Jones has uploaded this change for review. ( https://review.coreboot.org/22561


Change subject: google/kahlee: Rename board_id to memory_sku
......................................................................

google/kahlee: Rename board_id to memory_sku

Rename the GPIOs that are named as board_id to  memory_skus.
Report the boardid received from the EC.

BUG=b:69649438

Change-Id: I84bacead3daf829c97f595c4c11a243953243c29
Signed-off-by: Marc Jones <marcj303 at gmail.com>
---
M src/mainboard/google/kahlee/Kconfig
M src/mainboard/google/kahlee/Makefile.inc
D src/mainboard/google/kahlee/boardid.c
M src/mainboard/google/kahlee/mainboard.c
M src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h
M src/mainboard/google/kahlee/variants/baseboard/memory.c
6 files changed, 7 insertions(+), 36 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/22561/1

diff --git a/src/mainboard/google/kahlee/Kconfig b/src/mainboard/google/kahlee/Kconfig
index 7173f1d..6cb9e2a 100644
--- a/src/mainboard/google/kahlee/Kconfig
+++ b/src/mainboard/google/kahlee/Kconfig
@@ -19,6 +19,7 @@
 	select BOARD_ROMSIZE_KB_8192
 	select DRIVERS_PS2_KEYBOARD
 	select EC_GOOGLE_CHROMEEC
+	select EC_GOOGLE_CHROMEEC_BOARDID
 	select EC_GOOGLE_CHROMEEC_LPC
 	select HAVE_OPTION_TABLE
 	select HAVE_ACPI_TABLES
diff --git a/src/mainboard/google/kahlee/Makefile.inc b/src/mainboard/google/kahlee/Makefile.inc
index 131eba3..55c80a4 100644
--- a/src/mainboard/google/kahlee/Makefile.inc
+++ b/src/mainboard/google/kahlee/Makefile.inc
@@ -19,12 +19,10 @@
 bootblock-y += ec.c
 
 romstage-y += BiosCallOuts.c
-romstage-y += boardid.c
 romstage-y += chromeos.c
 romstage-y += OemCustomize.c
 
 ramstage-y += BiosCallOuts.c
-ramstage-y += boardid.c
 ramstage-y += chromeos.c
 ramstage-y += ec.c
 ramstage-y += OemCustomize.c
diff --git a/src/mainboard/google/kahlee/boardid.c b/src/mainboard/google/kahlee/boardid.c
deleted file mode 100644
index 5b59f32..0000000
--- a/src/mainboard/google/kahlee/boardid.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2017 Advanced Micro Devices, 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 <boardid.h>
-#include <console/console.h>
-#include <gpio.h>
-#include <variant/gpio.h>
-#include <baseboard/variants.h>
-
-uint8_t board_id(void)
-{
-	MAYBE_STATIC int id = -1;
-
-	if (id < 0) {
-		id = variant_board_id();
-		printk(BIOS_SPEW, "Board ID: %#x.\n", id);
-	}
-
-	return id;
-}
diff --git a/src/mainboard/google/kahlee/mainboard.c b/src/mainboard/google/kahlee/mainboard.c
index 643bda1..f757504 100644
--- a/src/mainboard/google/kahlee/mainboard.c
+++ b/src/mainboard/google/kahlee/mainboard.c
@@ -20,6 +20,7 @@
 #include <amd_pci_util.h>
 #include <cbmem.h>
 #include <baseboard/variants.h>
+#include <boardid.h>
 #include <soc/nvs.h>
 #include <soc/smi.h>
 #include <variant/ec.h>
@@ -86,6 +87,9 @@
 {
 	const struct sci_source *gpes;
 	size_t num;
+	int boardid = board_id();
+
+	printk(BIOS_INFO, "Board ID: %d\n", boardid);
 
 	mainboard_ec_init();
 
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 cf995fc..45d287a 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);
-uint8_t variant_board_id(void);
+uint8_t variant_memory_sku(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 ae8734e..daa5ef9 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>
 
-uint8_t __attribute__((weak)) variant_board_id(void)
+uint8_t __attribute__((weak)) variant_memory_sku(void)
 {
 	gpio_t pads[] = {
 		[3] = MEM_CONFIG3,

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I84bacead3daf829c97f595c4c11a243953243c29
Gerrit-Change-Number: 22561
Gerrit-PatchSet: 1
Gerrit-Owner: Marc Jones <marc at marcjonesconsulting.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171122/5d71b1c6/attachment.html>


More information about the coreboot-gerrit mailing list