watchdog: Use dev_read only if OF_PLATDATA is not enabled
PATCH 1/1 watchdog: Use dev_read only if OF_PLATDATA is not enabled
Currently watchdog tries to use dev_read_u32_default to get timeout configuration in case OF_CONTROL is enabled. However, if SPL is built with OF_PLATDATA this has no sense as there is no device tree.
This patch fixes this issue by only use dev_read_u32_default if OF_CONTROL is enabled but OF_PLATDATA is not.
--- include/wdt.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
include/wdt.h +1 -2
@@ -130,11 +130,10 @@ static inline int initr_watchdog(void) } } -if (CONFIG_IS_ENABLED (OF_CONTROL )) { +if (CONFIG_IS_ENABLED (OF_CONTROL ) && !CONFIG_IS_ENABLED (OF_PLATDATA )) { timeout =dev_read_u32_default (gd->watchdog_dev,"timeout-sec" ,WATCHDOG_TIMEOUT_SECS ); } -wdt_start (gd->watchdog_dev, timeout *1000 ,0 ); gd->flags |=GD_FLG_WDT_READY ; printf("WDT: Started with%s servicing (%ds timeout)\n",
Signature · 1 line
2.20.1
PATCH 1/1 watchdog: Use dev_read only if OF_PLATDATA is not enabled
Quoted 5 lines · Walter Lozano
Currently watchdog tries to use
dev_read_u32_defaultto get timeout configuration in caseOF_CONTROLis enabled. However, if SPL is built withOF_PLATDATAthis has no sense as there is no device tree.
Quoted 8 lines
This patch fixes this issue by only use
dev_read_u32_defaultifOF_CONTROLis enabled butOF_PLATDATAis not.Signed-off-by Walter Lozano <[email protected]>--- include/wdt.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
PATCH 1/1 watchdog: Use dev_read only if OF_PLATDATA is not enabled
In reply to Walter LozanoQuoted 9 lines · Walter Lozano
Currently watchdog tries to use
dev_read_u32_defaultto get timeout configuration in caseOF_CONTROLis enabled. However, if SPL is built withOF_PLATDATAthis has no sense as there is no device tree.This patch fixes this issue by only use
dev_read_u32_defaultifOF_CONTROLis enabled butOF_PLATDATAis not.Signed-off-by Walter Lozano <[email protected]>---
Applied to u-boot-marvell/master.
Thanks,
Stefan