]> git.baikalelectronics.ru Git - uboot.git/commit
arm64: zynqmp: Try to enable the first watchdog via aliases
authorMichal Simek <michal.simek@xilinx.com>
Wed, 11 Jul 2018 06:30:07 +0000 (08:30 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 19 Jul 2018 08:49:55 +0000 (10:49 +0200)
commit260e72a428a01874af4011f3c3b29a40e168401d
tree24a6681c4125cbfea92e0de95f2dcda9e896f13d
parentc496b45600ec44fe71c079ee626bb2063e175057
arm64: zynqmp: Try to enable the first watchdog via aliases

Add support for enabling the first watchdog pointed via aliases.

DT fragment:
aliases {
...
watchdog0 = &watchdog0;
watchdog1 = &watchdog_lpd;
...
};

dm tree fragment for above configuration with patch applied:
ZynqMP> dm tree
 Class    index  Probed  Driver      Name
-----------------------------------------
...
 watchdog    0  [   ]   cdns_wdt    |   |-- watchdog@ff150000
 watchdog    1  [ + ]   cdns_wdt    |   `-- watchdog@fd4d0000
...

dm uclass fragment:
ZynqMP> dm uclass
...
uclass 75: watchdog
0   watchdog@ff150000 @ 7df02f40, seq -1, (req 1)
1 * watchdog@fd4d0000 @ 7df02ff0, seq 0, (req 0)
...

It is visible that index 1 is IP with seq 0 which means that FPD
watchdog (@fd4d0000) is in DT below LPD watchdog (@ff150000).

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>
board/xilinx/zynqmp/zynqmp.c