diff options
author | Pali Rohár <pali@kernel.org> | 2022-02-14 11:34:25 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2022-02-17 14:17:07 +0100 |
commit | 0c4625ac7dab5048b588d55e43ace109246df932 (patch) | |
tree | 6a33541d598dcbbeaaef8c68890d815229e3d44c /drivers/watchdog | |
parent | af6d0938f3033b7a93980427cd324658d64d3eb1 (diff) | |
download | u-boot-0c4625ac7dab5048b588d55e43ace109246df932.tar.gz u-boot-0c4625ac7dab5048b588d55e43ace109246df932.tar.bz2 u-boot-0c4625ac7dab5048b588d55e43ace109246df932.zip |
watchdog: armada_37xx: Convert to official DT bindings
Official DT bindings have only one reg property: watchdog address space.
Convert armada-37xx-wdt.c driver to offical DT bindings and access sel_reg
register via MVEBU_REGISTER() macro, as its value (required by U-Boot
driver) is not in DT yet. In later stage can be driver cleaned to not use
it.
This change would allow U-Boot to use A3720 watchdog DTS structure from
Linux kernel.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/armada-37xx-wdt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/watchdog/armada-37xx-wdt.c b/drivers/watchdog/armada-37xx-wdt.c index 6b5e1ab6fc..2e119b9b5a 100644 --- a/drivers/watchdog/armada-37xx-wdt.c +++ b/drivers/watchdog/armada-37xx-wdt.c @@ -155,12 +155,9 @@ static int a37xx_wdt_probe(struct udevice *dev) struct a37xx_wdt *priv = dev_get_priv(dev); fdt_addr_t addr; - addr = dev_read_addr_index(dev, 0); - if (addr == FDT_ADDR_T_NONE) - goto err; - priv->sel_reg = (void __iomem *)addr; + priv->sel_reg = (void __iomem *)MVEBU_REGISTER(0x0d064); - addr = dev_read_addr_index(dev, 1); + addr = dev_read_addr(dev); if (addr == FDT_ADDR_T_NONE) goto err; priv->reg = (void __iomem *)addr; |