diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-01-04 15:55:16 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-04-20 06:12:30 +0000 |
commit | f3dbf4ce6b38b9ebc8e0e537b49ccf1aed456435 (patch) | |
tree | 665e77e4bb1e5dd6a76e871a79696d7de066138d /src/drivers/pc80/rtc/post.c | |
parent | 8920ee0dcccea100428495220aa53e248f5a210d (diff) |
drivers/pc80/rtc: Clean up post_log_path()
Change-Id: I605d39d907e083e73af4c72607216384e7ce166a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38190
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/pc80/rtc/post.c')
-rw-r--r-- | src/drivers/pc80/rtc/post.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/drivers/pc80/rtc/post.c b/src/drivers/pc80/rtc/post.c index e14367424e..5bee5be812 100644 --- a/src/drivers/pc80/rtc/post.c +++ b/src/drivers/pc80/rtc/post.c @@ -86,8 +86,11 @@ void cmos_post_code(u8 value) spin_unlock(&cmos_post_lock); } -static void __unused cmos_post_extra(u32 value) +void cmos_post_extra(u32 value) { + if (!CONFIG(CMOS_POST_EXTRA)) + return; + spin_lock(&cmos_post_lock); switch (cmos_read(CMOS_POST_BANK_OFFSET)) { @@ -102,20 +105,11 @@ static void __unused cmos_post_extra(u32 value) spin_unlock(&cmos_post_lock); } -#if CONFIG(CMOS_POST_EXTRA) -void post_log_path(const struct device *dev) -{ - if (dev) { - /* Encode path into lower 3 bytes */ - u32 path = dev_path_encode(dev); - /* Upper byte contains the log type */ - path |= CMOS_POST_EXTRA_DEV_PATH << 24; - cmos_post_extra(path); - } -} - -void post_log_clear(void) +void cmos_post_path(const struct device *dev) { - cmos_post_extra(0); + /* Encode path into lower 3 bytes */ + u32 path = dev_path_encode(dev); + /* Upper byte contains the log type */ + path |= CMOS_POST_EXTRA_DEV_PATH << 24; + cmos_post_extra(path); } -#endif /* CONFIG_CMOS_POST_EXTRA */ |