diff options
author | Marc Jones <marcj303@gmail.com> | 2017-11-21 23:29:55 -0700 |
---|---|---|
committer | Marc Jones <marc@marcjonesconsulting.com> | 2017-11-29 22:35:05 +0000 |
commit | 71f7f0a8f82ffb6273f2f6589bee42b9916bcc35 (patch) | |
tree | 216db7f48555772d805c50412989af923acc2c4a /src | |
parent | ab85c453267dd3b5298187b8d8917f07e2d2d34e (diff) |
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 <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/22561
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/kahlee/Kconfig | 1 | ||||
-rw-r--r-- | src/mainboard/google/kahlee/Makefile.inc | 2 | ||||
-rw-r--r-- | src/mainboard/google/kahlee/boardid.c | 32 | ||||
-rw-r--r-- | src/mainboard/google/kahlee/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h | 2 | ||||
-rw-r--r-- | src/mainboard/google/kahlee/variants/baseboard/memory.c | 2 |
6 files changed, 7 insertions, 36 deletions
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 <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 643bda10aa..f75750405e 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 @@ 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 <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, |