src/ec/intel: Create common code for board_id implementation

This patch creates initial common code structure for board_id
implementation for intel rvp platforms. Board_id helps in
identifying the platform with respect to CHROME_EC and INTEL_EC
(Windows_EC). Changes include
1. Create initial board_id.c and board_id.h
2. Modify the Makefile to include src/ec/intel directory

BUG=b:260654043
TEST=Able to build with the patch and boot the mtlrvp platform with the
subsequent patches in the train

Signed-off-by: Harsha B R <harsha.b.r@intel.com>
Change-Id: If133f6a72b8c3e1d8811a11f91e4556beb8c16e0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70227
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Usha P <usha.p@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
This commit is contained in:
Harsha B R 2022-12-01 21:23:53 +05:30 committed by Eric Lai
parent a6f6e6a592
commit a5e04af484
4 changed files with 27 additions and 0 deletions

View File

@ -80,6 +80,7 @@ PHONY+= clean-abuild coreboot check-style build_complete
####################################################################### #######################################################################
# root source directories of coreboot # root source directories of coreboot
subdirs-y := src/lib src/commonlib/ src/console src/device src/acpi src/superio/common subdirs-y := src/lib src/commonlib/ src/console src/device src/acpi src/superio/common
subdirs-$(CONFIG_EC_ACPI) += src/ec/intel
subdirs-y += src/ec/acpi $(wildcard src/ec/*/*) $(wildcard src/southbridge/*/*) subdirs-y += src/ec/acpi $(wildcard src/ec/*/*) $(wildcard src/southbridge/*/*)
subdirs-y += $(wildcard src/soc/*) $(wildcard src/soc/*/common) $(filter-out $(wildcard src/soc/*/common),$(wildcard src/soc/*/*)) subdirs-y += $(wildcard src/soc/*) $(wildcard src/soc/*/common) $(filter-out $(wildcard src/soc/*/common),$(wildcard src/soc/*/*))
subdirs-y += $(wildcard src/northbridge/*/*) subdirs-y += $(wildcard src/northbridge/*/*)

View File

@ -0,0 +1,7 @@
## SPDX-License-Identifier: GPL-2.0-or-later
bootblock-y += board_id.c
romstage-y += board_id.c
ramstage-y += board_id.c
CPPFLAGS_common += -I$(src)/ec/intel

10
src/ec/intel/board_id.c Normal file
View File

@ -0,0 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <boardid.h>
#include "board_id.h"
/* Get RVP Board ID */
int get_rvp_board_id(void)
{
return BOARD_ID_INIT;
}

9
src/ec/intel/board_id.h Normal file
View File

@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _MAINBOARD_COMMON_BOARD_ID_H_
#define _MAINBOARD_COMMON_BOARD_ID_H_
/* Returns RVP board_id */
int get_rvp_board_id(void);
#endif /* _MAINBOARD_COMMON_BOARD_ID_H_ */