mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
arm: zynq: Try to enable the first watchdog via aliases
The same change as was done for zynqmp with this description:
Add support for enabling the first watchdog pointed via aliases.
DT fragment:
aliases {
...
watchdog0= &watchdog0;
watchdog1 = &watchdog_lpd;
...
};
<zynqmp example removed>
Till this patch the first watchdog found in DT was used and started
which is not enabling all possible configuration based on user request.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
1fbca0db5d
commit
501fc50a29
1 changed files with 9 additions and 5 deletions
|
|
@ -36,12 +36,16 @@ int board_early_init_f(void)
|
|||
int board_init(void)
|
||||
{
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT)
|
||||
if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
|
||||
puts("Watchdog: Not found!\n");
|
||||
} else {
|
||||
wdt_start(watchdog_dev, 0, 0);
|
||||
puts("Watchdog: Started\n");
|
||||
if (uclass_get_device_by_seq(UCLASS_WDT, 0, &watchdog_dev)) {
|
||||
debug("Watchdog: Not found by seq!\n");
|
||||
if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
|
||||
puts("Watchdog: Not found!\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
wdt_start(watchdog_dev, 0, 0);
|
||||
puts("Watchdog: Started\n");
|
||||
# endif
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue