mb/intel/ehlcrb: Remove board ID detection via EC

Since there is no EC support on EHL CRB, this patch removes board
ID detection via EC (board_id.c & board_id.h) and its related
files. Temporarily removes variant_memcfg_config function in
romstage_fsp_param.c, will be added back when updating memory
configs later.

Signed-off-by: Tan, Lean Sheng <lean.sheng.tan@intel.com>
Change-Id: I40d96285dc05ec5faabc123950b6b3728299e99a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48121
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Tan, Lean Sheng 2020-11-27 03:56:08 -08:00 committed by Werner Zeh
parent d0789cd6f0
commit 170f2edadb
6 changed files with 1 additions and 71 deletions

View File

@ -5,11 +5,8 @@ subdirs-y += spd
bootblock-y += bootblock.c
romstage-y += romstage_fsp_params.c
romstage-y += board_id.c
ramstage-y += mainboard.c
ramstage-y += board_id.c
subdirs-y += variants/baseboard
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include

View File

@ -1,43 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <boardid.h>
#include <ec/acpi/ec.h>
#include <ec/google/chromeec/ec.h>
#include <stdint.h>
#include "board_id.h"
static uint32_t get_board_id_via_ext_ec(void)
{
uint32_t id = BOARD_ID_INIT;
if (google_chromeec_get_board_version(&id))
id = BOARD_ID_UNKNOWN;
return id;
}
/*
* Get Board ID via EC I/O port write/read
* Board id is 5 bit, so mask other bits while returning board id.
*/
int get_board_id(void)
{
MAYBE_STATIC_NONZERO int id = -1;
if (id < 0) {
if (CONFIG(EC_GOOGLE_CHROMEEC)) {
id = get_board_id_via_ext_ec();
} else {
uint8_t buffer[2];
uint8_t index;
if (send_ec_command(EC_FAB_ID_CMD) == 0) {
for (index = 0; index < sizeof(buffer); index++)
buffer[index] = recv_ec_data();
id = (buffer[0] << 8) | buffer[1];
}
}
}
return (id & 0x1f);
}

View File

@ -1,15 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _MAINBOARD_COMMON_BOARD_ID_H_
#define _MAINBOARD_COMMON_BOARD_ID_H_
/* Board/FAB ID Command */
#define EC_FAB_ID_CMD 0x0D
/*
* Returns board information (board id[15:8] and
* Fab info[7:0]) on success and < 0 on error
*/
int get_board_id(void);
#endif /* _MAINBOARD_COMMON_BOARD_ID_H_ */

View File

@ -4,7 +4,6 @@
#include <console/console.h>
#include <soc/meminit.h>
#include <soc/romstage.h>
#include "board_id.h"
void mainboard_memory_init_params(FSPM_UPD *memupd)
{

View File

@ -13,6 +13,6 @@ const struct pad_config *variant_gpio_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num);
/* This function returns SPD related FSP-M mainboard configs */
const struct mb_cfg *variant_memcfg_config(uint8_t board_id);
const struct mb_cfg *variant_memcfg_config(void);
#endif /*__BASEBOARD_VARIANTS_H__ */

View File

@ -1,16 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <baseboard/variants.h>
#include <console/console.h>
#include <gpio.h>
#include <soc/meminit.h>
#include <soc/romstage.h>
/* ToDo : Fill EHL related memory configs */
const struct mb_cfg *variant_memcfg_config(uint8_t board_id)
{
/* ToDo : Fill EHL related memory configs */
die("unsupported board id : 0x%x\n", board_id);
}