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>
This commit is contained in:
parent
ab85c45326
commit
71f7f0a8f8
|
@ -20,6 +20,7 @@ config BOARD_GOOGLE_BASEBOARD_KAHLEE
|
||||||
select BOARD_ROMSIZE_KB_8192 if BOARD_GOOGLE_KAHLEE
|
select BOARD_ROMSIZE_KB_8192 if BOARD_GOOGLE_KAHLEE
|
||||||
select DRIVERS_PS2_KEYBOARD
|
select DRIVERS_PS2_KEYBOARD
|
||||||
select EC_GOOGLE_CHROMEEC
|
select EC_GOOGLE_CHROMEEC
|
||||||
|
select EC_GOOGLE_CHROMEEC_BOARDID
|
||||||
select EC_GOOGLE_CHROMEEC_LPC
|
select EC_GOOGLE_CHROMEEC_LPC
|
||||||
select HAVE_OPTION_TABLE
|
select HAVE_OPTION_TABLE
|
||||||
select HAVE_ACPI_TABLES
|
select HAVE_ACPI_TABLES
|
||||||
|
|
|
@ -19,12 +19,10 @@ bootblock-y += bootblock/OemCustomize.c
|
||||||
bootblock-y += ec.c
|
bootblock-y += ec.c
|
||||||
|
|
||||||
romstage-y += BiosCallOuts.c
|
romstage-y += BiosCallOuts.c
|
||||||
romstage-y += boardid.c
|
|
||||||
romstage-y += chromeos.c
|
romstage-y += chromeos.c
|
||||||
romstage-y += OemCustomize.c
|
romstage-y += OemCustomize.c
|
||||||
|
|
||||||
ramstage-y += BiosCallOuts.c
|
ramstage-y += BiosCallOuts.c
|
||||||
ramstage-y += boardid.c
|
|
||||||
ramstage-y += chromeos.c
|
ramstage-y += chromeos.c
|
||||||
ramstage-y += ec.c
|
ramstage-y += ec.c
|
||||||
ramstage-y += OemCustomize.c
|
ramstage-y += OemCustomize.c
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <amd_pci_util.h>
|
#include <amd_pci_util.h>
|
||||||
#include <cbmem.h>
|
#include <cbmem.h>
|
||||||
#include <baseboard/variants.h>
|
#include <baseboard/variants.h>
|
||||||
|
#include <boardid.h>
|
||||||
#include <soc/nvs.h>
|
#include <soc/nvs.h>
|
||||||
#include <soc/smi.h>
|
#include <soc/smi.h>
|
||||||
#include <variant/ec.h>
|
#include <variant/ec.h>
|
||||||
|
@ -86,6 +87,9 @@ static void mainboard_init(void *chip_info)
|
||||||
{
|
{
|
||||||
const struct sci_source *gpes;
|
const struct sci_source *gpes;
|
||||||
size_t num;
|
size_t num;
|
||||||
|
int boardid = board_id();
|
||||||
|
|
||||||
|
printk(BIOS_INFO, "Board ID: %d\n", boardid);
|
||||||
|
|
||||||
mainboard_ec_init();
|
mainboard_ec_init();
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,6 @@
|
||||||
|
|
||||||
const GPIO_CONTROL *get_gpio_table(void);
|
const GPIO_CONTROL *get_gpio_table(void);
|
||||||
const struct sci_source *get_gpe_table(size_t *num);
|
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__ */
|
#endif /* __BASEBOARD_VARIANTS_H__ */
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <baseboard/variants.h>
|
#include <baseboard/variants.h>
|
||||||
#include <variant/gpio.h>
|
#include <variant/gpio.h>
|
||||||
|
|
||||||
uint8_t __attribute__((weak)) variant_board_id(void)
|
uint8_t __attribute__((weak)) variant_memory_sku(void)
|
||||||
{
|
{
|
||||||
gpio_t pads[] = {
|
gpio_t pads[] = {
|
||||||
[3] = MEM_CONFIG3,
|
[3] = MEM_CONFIG3,
|
||||||
|
|
Loading…
Reference in New Issue