time: Replace hard-coded values with macro

This is more descriptive than the comment and allows for changing
values, such as using a chip with a different clock frequency.

The resulting binary is identical.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2023-10-12 15:33:22 -06:00
committed by Tim Crawford
parent 449bafd130
commit 82b9e19746
2 changed files with 26 additions and 9 deletions

View File

@@ -11,6 +11,9 @@ ec-y += ps2.c
ec-y += signature.c
ec-y += wuc.c
# Chip clock frequency: 9.2 MHz
CFLAGS += -DCONFIG_CLOCK_FREQ_KHZ=9200
ifeq ($(CONFIG_EC_ITE_IT8587E), y)
CFLAGS+=-DCONFIG_EC_ITE_IT8587E=1
# SRAM is 4096 bytes, but SRAM at address 2048 is used for scratch ROM