Lean Sheng Tan has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48121 )
Change subject: mb/intel/ehlcrb: Remove board ID detection via EC ......................................................................
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 --- M src/mainboard/intel/elkhartlake_crb/Makefile.inc D src/mainboard/intel/elkhartlake_crb/board_id.c D src/mainboard/intel/elkhartlake_crb/board_id.h M src/mainboard/intel/elkhartlake_crb/romstage_fsp_params.c M src/mainboard/intel/elkhartlake_crb/variants/baseboard/include/baseboard/variants.h M src/mainboard/intel/elkhartlake_crb/variants/ehlcrb/memory.c 6 files changed, 1 insertion(+), 71 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/48121/1
diff --git a/src/mainboard/intel/elkhartlake_crb/Makefile.inc b/src/mainboard/intel/elkhartlake_crb/Makefile.inc index 69a9368..382ec2e 100644 --- a/src/mainboard/intel/elkhartlake_crb/Makefile.inc +++ b/src/mainboard/intel/elkhartlake_crb/Makefile.inc @@ -5,11 +5,8 @@ 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 90609ff..0000000 --- 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 85c7c85..0000000 --- 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 1354edf..481ff09 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 27e91a5..96ee4d5 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_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 8446e6c..11db732 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); -}
Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48121 )
Change subject: mb/intel/ehlcrb: Remove board ID detection via EC ......................................................................
Patch Set 1: Code-Review+2
Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48121 )
Change subject: mb/intel/ehlcrb: Remove board ID detection via EC ......................................................................
Patch Set 2: Code-Review+2
Werner Zeh has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48121 )
Change subject: mb/intel/ehlcrb: Remove board ID detection via EC ......................................................................
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 --- M src/mainboard/intel/elkhartlake_crb/Makefile.inc D src/mainboard/intel/elkhartlake_crb/board_id.c D src/mainboard/intel/elkhartlake_crb/board_id.h M src/mainboard/intel/elkhartlake_crb/romstage_fsp_params.c M src/mainboard/intel/elkhartlake_crb/variants/baseboard/include/baseboard/variants.h M src/mainboard/intel/elkhartlake_crb/variants/ehlcrb/memory.c 6 files changed, 1 insertion(+), 71 deletions(-)
Approvals: build bot (Jenkins): Verified Werner Zeh: Looks good to me, approved Frans Hendriks: Looks good to me, approved
diff --git a/src/mainboard/intel/elkhartlake_crb/Makefile.inc b/src/mainboard/intel/elkhartlake_crb/Makefile.inc index 69a9368..382ec2e 100644 --- a/src/mainboard/intel/elkhartlake_crb/Makefile.inc +++ b/src/mainboard/intel/elkhartlake_crb/Makefile.inc @@ -5,11 +5,8 @@ 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 90609ff..0000000 --- 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 85c7c85..0000000 --- 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 1354edf..481ff09 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 53bb75a..bf05765 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_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 8446e6c..11db732 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); -}