diff options
author | Sean Rhodes <sean@starlabs.systems> | 2022-03-09 08:07:30 +0000 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-03-30 13:49:22 +0000 |
commit | 6082ee5281bdf0c3f3d6981873efcd93a94b9330 (patch) | |
tree | 18c23f417cce7c809f808c2d96ee0fc9518ce19f /src/ec/starlabs | |
parent | 36e2b4b2b40c935a5cf8662014d1ad44c3587ace (diff) |
ec/starlabs/merlin: Make EC function names generic
Rather than using `ite_`, use `ec_` so the same functions
can be called for different ECs.
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ie61af233f731eb47772af1c82c6abdc515bc89cc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62700
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/ec/starlabs')
-rw-r--r-- | src/ec/starlabs/merlin/ec.h | 2 | ||||
-rw-r--r-- | src/ec/starlabs/merlin/ite.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ec/starlabs/merlin/ec.h b/src/ec/starlabs/merlin/ec.h index 8f8bb99368..1e7607d8fc 100644 --- a/src/ec/starlabs/merlin/ec.h +++ b/src/ec/starlabs/merlin/ec.h @@ -81,6 +81,6 @@ #define KBL_DISABLED 0x00 #define KBL_ENABLED 0xdd -uint16_t it_get_version(void); +uint16_t ec_get_version(void); #endif diff --git a/src/ec/starlabs/merlin/ite.c b/src/ec/starlabs/merlin/ite.c index e8eaa229d7..357c67cda5 100644 --- a/src/ec/starlabs/merlin/ite.c +++ b/src/ec/starlabs/merlin/ite.c @@ -10,7 +10,7 @@ #include "ec.h" #include "ecdefs.h" -uint16_t it_get_version(void) +uint16_t ec_get_version(void) { return (ec_read(ECRAM_MAJOR_VERSION) << 8) | ec_read(ECRAM_MINOR_VERSION); } @@ -26,7 +26,7 @@ static uint8_t get_ec_value_from_option(const char *name, return lut[index]; } -static uint16_t ite_get_chip_id(unsigned int port) +static uint16_t ec_get_chip_id(unsigned int port) { return (pnp_read_index(port, ITE_CHIPID1) << 8) | pnp_read_index(port, ITE_CHIPID2); @@ -49,7 +49,7 @@ static void merlin_init(struct device *dev) return; } - const uint16_t chip_id = ite_get_chip_id(dev->path.pnp.port); + const uint16_t chip_id = ec_get_chip_id(dev->path.pnp.port); if (chip_id != ITE_CHIPID_VAL) { printk(BIOS_ERR, "ITE: Expected chip ID 0x%04x, but got 0x%04x instead.\n", |