1、开驱动CONFIG
./arch/arm64/configs/rockchip_defconfig
CONFIG_WATCHDOG=y
CONFIG_DW_WATCHDOG=y
驱动源码:
drivers/watchdog/dw_wdt.c
2、修改dts
arch/arm64/boot/dts/rockchip/rk3399.dtsi
watchdog@ff848000 {
添加
status = "okay";
3、可选步骤:start watchdogd
这一步骤是修改timeout和while循环喂狗,其实在驱动里面已经有配置timeout(0.5s),并且驱动也会在irq响应中喂狗。
device/rockchip/common/init.rockchip.rc
on init
start watchdogd
watchdogd 源码位置:
system/core/init/watchdogd.cpp
原作者:季风
|