[SRU][J:linux-bluefield][PATCH 0/1] UBUNTU: SAUCE: mlxbf-bootctl supports RTC battery status read and clear
Ron Li
xiangrongl at nvidia.com
Thu Sep 5 23:30:01 UTC 2024
BugLink: https://bugs.launchpad.net/bugs/2078881
SRU Justification:
[Impact]
The RTC battery status is not directly accessible from the kernel user space. The recent Nvidia UEFI added SMC to report the RTC battery status and clear the status bit if needed.
[Fix]
* Added an rtc_battery entry in the bootctl driver.
* Read the rtc_battery entry will trigger an SMC call to read the RTC battery status.
[Test Case]
* Check if the bootctl driver is loaded.
* Check the rtc_battery entry:
cat /sys/bus/platform/drivers/mlxbf-bootctl/rtc_battery
A value of 0x0 means RTC battery voltage is good.
A value of 0x80 means RTC battery voltage is low. The status bit is also cleared after the read.
An error code will be return if this feature is missing from UEFI.
[Other]
* This code is likely to change depending on feedback we received from maintainers.
Ron Li (1):
UBUNTU: SAUCE: mlxbf-bootctl supports RTC battery status read and
clear
drivers/platform/mellanox/mlxbf-bootctl.c | 20 ++++++++++++++++++++
drivers/platform/mellanox/mlxbf-bootctl.h | 5 +++++
2 files changed, 25 insertions(+)
--
2.30.1
More information about the kernel-team
mailing list