Merge common EC directories

Split the EC define into base and variant. Merge the 3 ATmega chips as
atmega, and the 2 ITE chips as ite.

Tested that the generated files are identical.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2022-10-13 17:46:26 -06:00
committed by Tim Crawford
parent 01885609e8
commit 69f97fe149
33 changed files with 68 additions and 57 deletions

View File

@@ -1,12 +1,18 @@
# SPDX-License-Identifier: GPL-3.0-only
ifeq ($(EC_VARIANT), it8587e)
# SRAM is 4096 bytes, but SRAM at address 2048 is used for scratch ROM
SRAM_SIZE=2048
else ifeq ($(EC_VARIANT), it5570e)
# SRAM is 6144 bytes, only 4096 bytes are mapped at address 0. Region at
# 0x0E00-0x1000 is used for AP communication. So this is brought down to 2048,
# which matches it8587e limits
SRAM_SIZE=2048
else
$(error Unsupported EC: $(EC_VARIANT))
endif
ARCH=8051
# 64 KB is the max without banking
CODE_SIZE=65536
# Include ITE common source
EC_ITE_COMMON_DIR=src/ec/ite
SRC+=$(wildcard $(EC_ITE_COMMON_DIR)/*.c)
INCLUDE+=$(wildcard $(EC_ITE_COMMON_DIR)/include/ec/*.h) $(EC_ITE_COMMON_DIR)/ec.mk
CFLAGS+=-I$(EC_ITE_COMMON_DIR)/include