diff options
| author | Lukasz Majewski <[email protected]> | 2025-09-18 10:42:06 +0200 |
|---|---|---|
| committer | Svyatoslav Ryhel <[email protected]> | 2025-10-28 11:27:43 +0200 |
| commit | e50f80d137b4b4bf80d3d208b7651579372aa2aa (patch) | |
| tree | 464459dc3c018b52c01cdb159e5f2b732ecb0415 /drivers/timer/tegra-timer.c | |
| parent | 4f7057962dcca798dbc984089a046b0bfee1273d (diff) | |
timer: tegra: Bind watchdog to timer node
Bind watchdog driver to the Tegra timer node since it uses one of the
timers to act as a watchdog and has no dedicated hardware block.
Signed-off-by: Lukasz Majewski <[email protected]>
Reviewed-by: Svyatoslav Ryhel <[email protected]>
Signed-off-by: Svyatoslav Ryhel <[email protected]>
Diffstat (limited to 'drivers/timer/tegra-timer.c')
| -rw-r--r-- | drivers/timer/tegra-timer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/timer/tegra-timer.c b/drivers/timer/tegra-timer.c index 3545424889d..778b65b6062 100644 --- a/drivers/timer/tegra-timer.c +++ b/drivers/timer/tegra-timer.c @@ -4,6 +4,7 @@ */ #include <dm.h> +#include <dm/lists.h> #include <errno.h> #include <timer.h> @@ -106,6 +107,14 @@ static int tegra_timer_probe(struct udevice *dev) return 0; } +static int tegra_timer_bind(struct udevice *dev) +{ + if (CONFIG_IS_ENABLED(WDT_TEGRA)) + return device_bind_driver_to_node(dev, "tegra_wdt", "tegra-wdt", + dev_ofnode(dev), NULL); + return 0; +} + static const struct timer_ops tegra_timer_ops = { .get_count = tegra_timer_get_count, }; @@ -123,6 +132,7 @@ U_BOOT_DRIVER(tegra_timer) = { .name = "tegra_timer", .id = UCLASS_TIMER, .of_match = tegra_timer_ids, + .bind = tegra_timer_bind, .probe = tegra_timer_probe, .ops = &tegra_timer_ops, .flags = DM_FLAG_PRE_RELOC, |
