drivers: rtc: Add update to use with new battery backup inplementation
Update Renesas RTC driver to use with the new battery backup inplementation Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
This commit is contained in:
committed by
Fabio Baltieri
parent
caf40f2581
commit
ca8e82532a
@@ -13,7 +13,7 @@
|
||||
#include <zephyr/irq.h>
|
||||
#include <zephyr/sys/util.h>
|
||||
#include <zephyr/logging/log.h>
|
||||
#include <cold_start.h>
|
||||
#include <bsp_reset.h>
|
||||
|
||||
#include <r_rtc.h>
|
||||
#include <soc.h>
|
||||
@@ -156,11 +156,11 @@ static int rtc_renesas_ra_init(const struct device *dev)
|
||||
}
|
||||
|
||||
#if defined(CONFIG_RENESAS_RA_BATTERY_BACKUP_MANUAL_CONFIGURE)
|
||||
if (is_backup_domain_reset_happen()) {
|
||||
if (R_BSP_ResetStatusGet() & BSP_RESET_TYPE_VBATPOR) {
|
||||
R_RTC_ClockSourceSet(&data->fsp_ctrl);
|
||||
}
|
||||
#else
|
||||
if (is_power_on_reset_happen()) {
|
||||
if (R_BSP_ResetStatusGet() & BSP_RESET_TYPE_POR) {
|
||||
R_RTC_ClockSourceSet(&data->fsp_ctrl);
|
||||
}
|
||||
#endif /* CONFIG_RENESAS_RA_BATTERY_BACKUP_MANUAL_CONFIGURE */
|
||||
|
||||
Reference in New Issue
Block a user