From 71f7f0a8f82ffb6273f2f6589bee42b9916bcc35 Mon Sep 17 00:00:00 2001 From: Marc Jones Date: Tue, 21 Nov 2017 23:29:55 -0700 Subject: google/kahlee: Rename board_id to memory_sku The GPIOs used in board_id are meant to indicate the memory configuration. Rename board_id to memory_skus. Report the board_id received from the EC. BUG=b:69649438 Change-Id: I84bacead3daf829c97f595c4c11a243953243c29 Signed-off-by: Marc Jones Reviewed-on: https://review.coreboot.org/22561 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson --- src/mainboard/google/kahlee/Kconfig | 1 + src/mainboard/google/kahlee/Makefile.inc | 2 -- src/mainboard/google/kahlee/boardid.c | 32 ---------------------- src/mainboard/google/kahlee/mainboard.c | 4 +++ .../baseboard/include/baseboard/variants.h | 2 +- .../google/kahlee/variants/baseboard/memory.c | 2 +- 6 files changed, 7 insertions(+), 36 deletions(-) delete mode 100644 src/mainboard/google/kahlee/boardid.c (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/kahlee/Kconfig b/src/mainboard/google/kahlee/Kconfig index 6c9bfcc5f8..722229d6e9 100644 --- a/src/mainboard/google/kahlee/Kconfig +++ b/src/mainboard/google/kahlee/Kconfig @@ -20,6 +20,7 @@ config BOARD_GOOGLE_BASEBOARD_KAHLEE select BOARD_ROMSIZE_KB_8192 if BOARD_GOOGLE_KAHLEE 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 131eba38c5..55c80a4cb7 100644 --- a/src/mainboard/google/kahlee/Makefile.inc +++ b/src/mainboard/google/kahlee/Makefile.inc @@ -19,12 +19,10 @@ bootblock-y += bootblock/OemCustomize.c 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 5b59f329bd..0000000000 --- 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 -#include -#include -#include -#include - -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 643bda10aa..f75750405e 100644 --- a/src/mainboard/google/kahlee/mainboard.c +++ b/src/mainboard/google/kahlee/mainboard.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -86,6 +87,9 @@ static void mainboard_init(void *chip_info) { 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 cf995fc59c..45d287a11c 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 ae8734e9d9..daa5ef9160 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/memory.c +++ b/src/mainboard/google/kahlee/variants/baseboard/memory.c @@ -17,7 +17,7 @@ #include #include -uint8_t __attribute__((weak)) variant_board_id(void) +uint8_t __attribute__((weak)) variant_memory_sku(void) { gpio_t pads[] = { [3] = MEM_CONFIG3, -- cgit v1.2.3