ec/starlabs/merlin: Remove offset for Max Charge when not supported

Set the MAX_CHARGE offset to dead_code_t for boards that don't support
the function. The avoids erroneous values being written to the EC.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I306c8a60818b780ef3bfb842e7fcc4d8500d6b03
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64092
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
This commit is contained in:
Sean Rhodes 2022-05-06 10:01:33 +01:00 committed by Tim Wawrzynczak
parent 1ffec679fe
commit 6c921c8f06
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@
#define ECRAM_KBL_TIMEOUT 0x1a
#define ECRAM_FN_LOCK_STATE 0x2c
#define ECRAM_FN_CTRL_REVERSE 0x2d
#define ECRAM_MAX_CHARGE 0x46
#define ECRAM_MAX_CHARGE dead_code_t(uint8_t)
#define ECRAM_FAN_MODE dead_code_t(uint8_t)
#endif

View File

@ -20,7 +20,7 @@
#define ECRAM_KBL_TIMEOUT 0x1a
#define ECRAM_FN_LOCK_STATE 0x2c
#define ECRAM_FN_CTRL_REVERSE 0x2d
#define ECRAM_MAX_CHARGE 0x46
#define ECRAM_MAX_CHARGE dead_code_t(uint8_t)
#define ECRAM_FAN_MODE dead_code_t(uint8_t)
#endif

View File

@ -18,6 +18,6 @@
#define ECRAM_FN_LOCK_STATE 0x2c
#define ECRAM_FAN_MODE 0x42
#define ECRAM_FN_CTRL_REVERSE 0x43
#define ECRAM_MAX_CHARGE 0xff /* TODO: Add */
#define ECRAM_MAX_CHARGE dead_code_t(uint8_t)
#endif