summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTan, Lean Sheng <lean.sheng.tan@intel.com>2020-11-27 03:56:08 -0800
committerWerner Zeh <werner.zeh@siemens.com>2020-12-10 10:48:11 +0000
commit170f2edadb5688989cbb1a7b899fb0a0615f78bd (patch)
tree7f229a41abc486c5b9b59c71b52d5544952dcf32
parentd0789cd6f031ed911c9216ce576b18e251afb468 (diff)
downloadcoreboot-170f2edadb5688989cbb1a7b899fb0a0615f78bd.tar.gz
coreboot-170f2edadb5688989cbb1a7b899fb0a0615f78bd.tar.bz2
coreboot-170f2edadb5688989cbb1a7b899fb0a0615f78bd.zip
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>
-rw-r--r--src/mainboard/intel/elkhartlake_crb/Makefile.inc3
-rw-r--r--src/mainboard/intel/elkhartlake_crb/board_id.c43
-rw-r--r--src/mainboard/intel/elkhartlake_crb/board_id.h15
-rw-r--r--src/mainboard/intel/elkhartlake_crb/romstage_fsp_params.c1
-rw-r--r--src/mainboard/intel/elkhartlake_crb/variants/baseboard/include/baseboard/variants.h2
-rw-r--r--src/mainboard/intel/elkhartlake_crb/variants/ehlcrb/memory.c8
6 files changed, 1 insertions, 71 deletions
diff --git a/src/mainboard/intel/elkhartlake_crb/Makefile.inc b/src/mainboard/intel/elkhartlake_crb/Makefile.inc
index 69a93685ba68..382ec2e35421 100644
--- a/src/mainboard/intel/elkhartlake_crb/Makefile.inc
+++ b/src/mainboard/intel/elkhartlake_crb/Makefile.inc
@@ -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
diff --git a/src/mainboard/intel/elkhartlake_crb/board_id.c b/src/mainboard/intel/elkhartlake_crb/board_id.c
deleted file mode 100644
index 90609ff079ab..000000000000
--- a/src/mainboard/intel/elkhartlake_crb/board_id.c
+++ /dev/null
@@ -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);
-}
diff --git a/src/mainboard/intel/elkhartlake_crb/board_id.h b/src/mainboard/intel/elkhartlake_crb/board_id.h
deleted file mode 100644
index 85c7c85f400a..000000000000
--- a/src/mainboard/intel/elkhartlake_crb/board_id.h
+++ /dev/null
@@ -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_ */
diff --git a/src/mainboard/intel/elkhartlake_crb/romstage_fsp_params.c b/src/mainboard/intel/elkhartlake_crb/romstage_fsp_params.c
index 1354edf74ebb..481ff0939a56 100644
--- a/src/mainboard/intel/elkhartlake_crb/romstage_fsp_params.c
+++ b/src/mainboard/intel/elkhartlake_crb/romstage_fsp_params.c
@@ -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)
{
diff --git a/src/mainboard/intel/elkhartlake_crb/variants/baseboard/include/baseboard/variants.h b/src/mainboard/intel/elkhartlake_crb/variants/baseboard/include/baseboard/variants.h
index 53bb75ad23a8..bf057651d399 100644
--- a/src/mainboard/intel/elkhartlake_crb/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/intel/elkhartlake_crb/variants/baseboard/include/baseboard/variants.h
@@ -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__ */
diff --git a/src/mainboard/intel/elkhartlake_crb/variants/ehlcrb/memory.c b/src/mainboard/intel/elkhartlake_crb/variants/ehlcrb/memory.c
index 8446e6cb0fcb..11db7323c44a 100644
--- a/src/mainboard/intel/elkhartlake_crb/variants/ehlcrb/memory.c
+++ b/src/mainboard/intel/elkhartlake_crb/variants/ehlcrb/memory.c
@@ -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);
-}