summaryrefslogtreecommitdiff
path: root/src/ec/starlabs/merlin
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2022-05-06 10:01:33 +0100
committerTim Wawrzynczak <twawrzynczak@chromium.org>2022-05-12 18:33:51 +0000
commit6c921c8f062874a92aa4e99104a52b509fa882d2 (patch)
tree4b690ba368ebacdc1b97d08281b8ed3df562071b /src/ec/starlabs/merlin
parent1ffec679fe16af01340f193df45a64d538ba63a8 (diff)
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>
Diffstat (limited to 'src/ec/starlabs/merlin')
-rw-r--r--src/ec/starlabs/merlin/variants/apl/ecdefs.h2
-rw-r--r--src/ec/starlabs/merlin/variants/glk/ecdefs.h2
-rw-r--r--src/ec/starlabs/merlin/variants/kbl/ecdefs.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/ec/starlabs/merlin/variants/apl/ecdefs.h b/src/ec/starlabs/merlin/variants/apl/ecdefs.h
index 1057da83ff..bb791bc9dc 100644
--- a/src/ec/starlabs/merlin/variants/apl/ecdefs.h
+++ b/src/ec/starlabs/merlin/variants/apl/ecdefs.h
@@ -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
diff --git a/src/ec/starlabs/merlin/variants/glk/ecdefs.h b/src/ec/starlabs/merlin/variants/glk/ecdefs.h
index b09ffc76f0..7407267041 100644
--- a/src/ec/starlabs/merlin/variants/glk/ecdefs.h
+++ b/src/ec/starlabs/merlin/variants/glk/ecdefs.h
@@ -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
diff --git a/src/ec/starlabs/merlin/variants/kbl/ecdefs.h b/src/ec/starlabs/merlin/variants/kbl/ecdefs.h
index 36cd0207ab..af771c4613 100644
--- a/src/ec/starlabs/merlin/variants/kbl/ecdefs.h
+++ b/src/ec/starlabs/merlin/variants/kbl/ecdefs.h
@@ -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