Skip to content

Commit 5179463

Browse files
Titan-Realtekkartben
authored andcommitted
drivers: timer : fix rtmr and slow timer.
RTMR use slow timer be the busy_wait timers, only ARCH_HAS_CUSTOM_BUSY_WAIT if slow timer disabled. Signed-off-by: Titan Chen <[email protected]>
1 parent f9168ae commit 5179463

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/timer/realtek_rts5912_rtmr.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1,
2828

2929
#define RTMR_REG ((RTOSTMR_Type *)DT_INST_REG_ADDR(0))
3030

31-
#define SLWTMR_REG \
32-
((RTOSTMR_Type *)(DT_REG_ADDR(DT_COMPAT_GET_ANY_STATUS_OKAY(realtek_rts5912_slwtimer))))
31+
#define SLWTMR_REG ((RTOSTMR_Type *)(DT_REG_ADDR(DT_NODELABEL(slwtmr0))))
3332

3433
#define SSCON_REG ((SYSTEM_Type *)(DT_REG_ADDR(DT_NODELABEL(sccon))))
3534

dts/arm/realtek/ec/rts5912.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
max-value = <0xFFFFFFFF>;
9797
clock-frequency = <1000000>;
9898
prescaler = <0>;
99-
status = "okay";
99+
status = "disabled";
100100
};
101101

102102
rtmr: rtmr@4000c500 {

soc/realtek/ec/rts5912/Kconfig.defconfig.rts5912

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ config SYS_CLOCK_TICKS_PER_SEC
1818

1919
config ARCH_HAS_CUSTOM_BUSY_WAIT
2020
default y
21+
depends on !COUNTER_REALTEK_RTS5912_SLWTMR
2122

2223
endif # REALTEK_RTS5912_RTMR
2324

0 commit comments

Comments
 (0)