Re: [PATCH 3/6] watchdog: tegra_wdt: Support Tegra20

From: Krzysztof Kozlowski

Date: Tue Nov 10 2026 - 13:27:31 EST


On 10/11/2026 13:39, Artur Kowalski wrote:
> +static int tegra20_wdt_init(struct platform_device *pdev, struct tegra_wdt *wdt,
> + void __iomem *regs)
> +{
> + struct device *dev = &pdev->dev;
> + struct device_node *np;
> + struct resource res;
> + int ret;
> +
> + /*
> + * RST_SOURCE belongs to the clock and reset controller, whose driver
> + * doesn't use it. Map only this register, without requesting it, as
> + * the region belongs to the clock and reset controller.
> + */
> + np = of_find_compatible_node(NULL, NULL, "nvidia,tegra20-car");
> + if (!np)
> + return dev_err_probe(dev, -ENODEV,
> + "clock and reset controller not found\n");
> +
> + ret = of_address_to_resource(np, 0, &res);
> + of_node_put(np);
> + if (ret)

Looks like doing syscon here. This in general is more fragile.

...

> +/*
> + * Tegra30 and later list "nvidia,tegra20-timer" as well, but match their more
> + * specific compatible string.
> + */
> static const struct of_device_id tegra_wdt_of_match[] = {
> { .compatible = "nvidia,tegra30-timer", .data = &tegra30_wdt_soc },
> + { .compatible = "nvidia,tegra20-timer", .data = &tegra20_wdt_soc },

Why in reversed order?

> { },
> };
> MODULE_DEVICE_TABLE(of, tegra_wdt_of_match);
>


Best regards,
Krzysztof