summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 69a93685ba..382ec2e354 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 90609ff079..0000000000
--- 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 85c7c85f40..0000000000
--- 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 1354edf74e..481ff0939a 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 53bb75ad23..bf057651d3 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 8446e6cb0f..11db7323c4 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);
-}