dm: tegra: pwm: Convert to livetree
authorSimon Glass <sjg@chromium.org>
Tue, 25 Jul 2017 14:30:07 +0000 (08:30 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 28 Jul 2017 18:02:47 +0000 (12:02 -0600)
Update the tegra pwm driver to support a live device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1
Tested-by: Stephen Warren <swarren@nvidia.com>
drivers/pwm/tegra_pwm.c

index d93ac28..b8acc15 100644 (file)
@@ -59,7 +59,7 @@ static int tegra_pwm_ofdata_to_platdata(struct udevice *dev)
 {
        struct tegra_pwm_priv *priv = dev_get_priv(dev);
 
-       priv->regs = (struct pwm_ctlr *)devfdt_get_addr(dev);
+       priv->regs = (struct pwm_ctlr *)dev_read_addr(dev);
 
        return 0;
 }