summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/armada-37xx-wdt.c2
-rw-r--r--drivers/watchdog/ast_wdt.c8
-rw-r--r--drivers/watchdog/at91sam9_wdt.c4
-rw-r--r--drivers/watchdog/bcm6345_wdt.c2
-rw-r--r--drivers/watchdog/cdns_wdt.c8
-rw-r--r--drivers/watchdog/designware_wdt.c2
-rw-r--r--drivers/watchdog/imx_watchdog.c2
-rw-r--r--drivers/watchdog/mt7621_wdt.c2
-rw-r--r--drivers/watchdog/mtk_wdt.c2
-rw-r--r--drivers/watchdog/octeontx_wdt.c2
-rw-r--r--drivers/watchdog/omap_wdt.c4
-rw-r--r--drivers/watchdog/orion_wdt.c8
-rw-r--r--drivers/watchdog/rti_wdt.c2
-rw-r--r--drivers/watchdog/sbsa_gwdt.c8
-rw-r--r--drivers/watchdog/sp805_wdt.c8
-rw-r--r--drivers/watchdog/stm32mp_wdt.c2
-rw-r--r--drivers/watchdog/tangier_wdt.c2
-rw-r--r--drivers/watchdog/xilinx_tb_wdt.c46
-rw-r--r--drivers/watchdog/xilinx_wwdt.c24
19 files changed, 69 insertions, 69 deletions
diff --git a/drivers/watchdog/armada-37xx-wdt.c b/drivers/watchdog/armada-37xx-wdt.c
index 5da8e56505..dd97a17a70 100644
--- a/drivers/watchdog/armada-37xx-wdt.c
+++ b/drivers/watchdog/armada-37xx-wdt.c
@@ -196,6 +196,6 @@ U_BOOT_DRIVER(a37xx_wdt) = {
.id = UCLASS_WDT,
.of_match = a37xx_wdt_ids,
.probe = a37xx_wdt_probe,
- .priv_auto_alloc_size = sizeof(struct a37xx_wdt),
+ .priv_auto = sizeof(struct a37xx_wdt),
.ops = &a37xx_wdt_ops,
};
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
index 9b83d2ad44..f7b5a1adc1 100644
--- a/drivers/watchdog/ast_wdt.c
+++ b/drivers/watchdog/ast_wdt.c
@@ -86,7 +86,7 @@ static int ast_wdt_expire_now(struct udevice *dev, ulong flags)
return ast_wdt_stop(dev);
}
-static int ast_wdt_ofdata_to_platdata(struct udevice *dev)
+static int ast_wdt_of_to_plat(struct udevice *dev)
{
struct ast_wdt_priv *priv = dev_get_priv(dev);
@@ -113,7 +113,7 @@ static const struct udevice_id ast_wdt_ids[] = {
static int ast_wdt_probe(struct udevice *dev)
{
- debug("%s() wdt%u\n", __func__, dev->seq);
+ debug("%s() wdt%u\n", __func__, dev_seq(dev));
ast_wdt_stop(dev);
return 0;
@@ -124,7 +124,7 @@ U_BOOT_DRIVER(ast_wdt) = {
.id = UCLASS_WDT,
.of_match = ast_wdt_ids,
.probe = ast_wdt_probe,
- .priv_auto_alloc_size = sizeof(struct ast_wdt_priv),
- .ofdata_to_platdata = ast_wdt_ofdata_to_platdata,
+ .priv_auto = sizeof(struct ast_wdt_priv),
+ .of_to_plat = ast_wdt_of_to_plat,
.ops = &ast_wdt_ops,
};
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index 33f5c351d5..9e0d89be62 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -108,7 +108,7 @@ static int at91_wdt_probe(struct udevice *dev)
if (!priv->regs)
return -EINVAL;
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
return 0;
}
@@ -117,7 +117,7 @@ U_BOOT_DRIVER(atmel_at91sam9260_wdt) = {
.name = "atmel_at91sam9260_wdt",
.id = UCLASS_WDT,
.of_match = at91_wdt_ids,
- .priv_auto_alloc_size = sizeof(struct at91_wdt_priv),
+ .priv_auto = sizeof(struct at91_wdt_priv),
.ops = &at91_wdt_ops,
.probe = at91_wdt_probe,
};
diff --git a/drivers/watchdog/bcm6345_wdt.c b/drivers/watchdog/bcm6345_wdt.c
index ee77f49a94..677b1347ca 100644
--- a/drivers/watchdog/bcm6345_wdt.c
+++ b/drivers/watchdog/bcm6345_wdt.c
@@ -112,6 +112,6 @@ U_BOOT_DRIVER(wdt_bcm6345) = {
.id = UCLASS_WDT,
.of_match = bcm6345_wdt_ids,
.ops = &bcm6345_wdt_ops,
- .priv_auto_alloc_size = sizeof(struct bcm6345_wdt_priv),
+ .priv_auto = sizeof(struct bcm6345_wdt_priv),
.probe = bcm6345_wdt_probe,
};
diff --git a/drivers/watchdog/cdns_wdt.c b/drivers/watchdog/cdns_wdt.c
index 2abd5524f6..966d010e40 100644
--- a/drivers/watchdog/cdns_wdt.c
+++ b/drivers/watchdog/cdns_wdt.c
@@ -223,12 +223,12 @@ static int cdns_wdt_stop(struct udevice *dev)
*/
static int cdns_wdt_probe(struct udevice *dev)
{
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
return 0;
}
-static int cdns_wdt_ofdata_to_platdata(struct udevice *dev)
+static int cdns_wdt_of_to_plat(struct udevice *dev)
{
struct cdns_wdt_priv *priv = dev_get_priv(dev);
@@ -260,7 +260,7 @@ U_BOOT_DRIVER(cdns_wdt) = {
.id = UCLASS_WDT,
.of_match = cdns_wdt_ids,
.probe = cdns_wdt_probe,
- .priv_auto_alloc_size = sizeof(struct cdns_wdt_priv),
- .ofdata_to_platdata = cdns_wdt_ofdata_to_platdata,
+ .priv_auto = sizeof(struct cdns_wdt_priv),
+ .of_to_plat = cdns_wdt_of_to_plat,
.ops = &cdns_wdt_ops,
};
diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c
index 7caa6c550c..c020324973 100644
--- a/drivers/watchdog/designware_wdt.c
+++ b/drivers/watchdog/designware_wdt.c
@@ -168,7 +168,7 @@ U_BOOT_DRIVER(designware_wdt) = {
.name = "designware_wdt",
.id = UCLASS_WDT,
.of_match = designware_wdt_ids,
- .priv_auto_alloc_size = sizeof(struct designware_wdt_priv),
+ .priv_auto = sizeof(struct designware_wdt_priv),
.probe = designware_wdt_probe,
.ops = &designware_wdt_ops,
.flags = DM_FLAG_PRE_RELOC,
diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c
index b90c2daece..5e0a096ce5 100644
--- a/drivers/watchdog/imx_watchdog.c
+++ b/drivers/watchdog/imx_watchdog.c
@@ -169,7 +169,7 @@ U_BOOT_DRIVER(imx_wdt) = {
.of_match = imx_wdt_ids,
.probe = imx_wdt_probe,
.ops = &imx_wdt_ops,
- .priv_auto_alloc_size = sizeof(struct imx_wdt_priv),
+ .priv_auto = sizeof(struct imx_wdt_priv),
.flags = DM_FLAG_PRE_RELOC,
};
#endif
diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
index 1cd8866ef8..8b5ed28ebd 100644
--- a/drivers/watchdog/mt7621_wdt.c
+++ b/drivers/watchdog/mt7621_wdt.c
@@ -98,6 +98,6 @@ U_BOOT_DRIVER(mt762x_wdt) = {
.id = UCLASS_WDT,
.of_match = mt762x_wdt_ids,
.probe = mt762x_wdt_probe,
- .priv_auto_alloc_size = sizeof(struct mt762x_wdt),
+ .priv_auto = sizeof(struct mt762x_wdt),
.ops = &mt762x_wdt_ops,
};
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index a636cff354..b098b2e3cf 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -152,7 +152,7 @@ U_BOOT_DRIVER(mtk_wdt) = {
.name = "mtk_wdt",
.id = UCLASS_WDT,
.of_match = mtk_wdt_ids,
- .priv_auto_alloc_size = sizeof(struct mtk_wdt_priv),
+ .priv_auto = sizeof(struct mtk_wdt_priv),
.probe = mtk_wdt_probe,
.ops = &mtk_wdt_ops,
.flags = DM_FLAG_PRE_RELOC,
diff --git a/drivers/watchdog/octeontx_wdt.c b/drivers/watchdog/octeontx_wdt.c
index 88708dc5e1..5f586ef683 100644
--- a/drivers/watchdog/octeontx_wdt.c
+++ b/drivers/watchdog/octeontx_wdt.c
@@ -137,7 +137,7 @@ U_BOOT_DRIVER(wdt_octeontx) = {
.id = UCLASS_WDT,
.of_match = octeontx_wdt_ids,
.ops = &octeontx_wdt_ops,
- .priv_auto_alloc_size = sizeof(struct octeontx_wdt),
+ .priv_auto = sizeof(struct octeontx_wdt),
.probe = octeontx_wdt_probe,
.remove = octeontx_wdt_remove,
.flags = DM_FLAG_OS_PREPARE,
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 9059a4c610..ca2bc7cfb5 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -242,7 +242,7 @@ static int omap3_wdt_probe(struct udevice *dev)
return -EINVAL;
priv->wdt_trgr_pattern = 0x1234;
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
return 0;
}
@@ -263,6 +263,6 @@ U_BOOT_DRIVER(omap3_wdt) = {
.of_match = omap3_wdt_ids,
.ops = &omap3_wdt_ops,
.probe = omap3_wdt_probe,
- .priv_auto_alloc_size = sizeof(struct omap3_wdt_priv),
+ .priv_auto = sizeof(struct omap3_wdt_priv),
};
#endif /* !CONFIG_IS_ENABLED(WDT) */
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index d33e2ac3dc..167af904dc 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -133,7 +133,7 @@ static inline bool save_reg_from_ofdata(struct udevice *dev, int index,
return true;
}
-static int orion_wdt_ofdata_to_platdata(struct udevice *dev)
+static int orion_wdt_of_to_plat(struct udevice *dev)
{
struct orion_wdt_priv *priv = dev_get_priv(dev);
@@ -158,7 +158,7 @@ static int orion_wdt_probe(struct udevice *dev)
struct orion_wdt_priv *priv = dev_get_priv(dev);
int ret;
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
orion_wdt_stop(dev);
ret = clk_get_by_name(dev, "fixed", &priv->clk);
@@ -186,7 +186,7 @@ U_BOOT_DRIVER(orion_wdt) = {
.id = UCLASS_WDT,
.of_match = orion_wdt_ids,
.probe = orion_wdt_probe,
- .priv_auto_alloc_size = sizeof(struct orion_wdt_priv),
- .ofdata_to_platdata = orion_wdt_ofdata_to_platdata,
+ .priv_auto = sizeof(struct orion_wdt_priv),
+ .of_to_plat = orion_wdt_of_to_plat,
.ops = &orion_wdt_ops,
};
diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c
index ebe29c7409..f64a39f657 100644
--- a/drivers/watchdog/rti_wdt.c
+++ b/drivers/watchdog/rti_wdt.c
@@ -118,6 +118,6 @@ U_BOOT_DRIVER(rti_wdt) = {
.of_match = rti_wdt_ids,
.ops = &rti_wdt_ops,
.probe = rti_wdt_probe,
- .priv_auto_alloc_size = sizeof(struct rti_wdt_priv),
+ .priv_auto = sizeof(struct rti_wdt_priv),
.flags = DM_FLAG_REMOVE_WITH_PD_ON,
};
diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c
index 96285c1a9b..b7cb199c92 100644
--- a/drivers/watchdog/sbsa_gwdt.c
+++ b/drivers/watchdog/sbsa_gwdt.c
@@ -88,12 +88,12 @@ static int sbsa_gwdt_expire_now(struct udevice *dev, ulong flags)
static int sbsa_gwdt_probe(struct udevice *dev)
{
- debug("%s: Probing wdt%u (sbsa-gwdt)\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u (sbsa-gwdt)\n", __func__, dev_seq(dev));
return 0;
}
-static int sbsa_gwdt_ofdata_to_platdata(struct udevice *dev)
+static int sbsa_gwdt_of_to_plat(struct udevice *dev)
{
struct sbsa_gwdt_priv *priv = dev_get_priv(dev);
@@ -125,7 +125,7 @@ U_BOOT_DRIVER(sbsa_gwdt) = {
.id = UCLASS_WDT,
.of_match = sbsa_gwdt_ids,
.probe = sbsa_gwdt_probe,
- .priv_auto_alloc_size = sizeof(struct sbsa_gwdt_priv),
- .ofdata_to_platdata = sbsa_gwdt_ofdata_to_platdata,
+ .priv_auto = sizeof(struct sbsa_gwdt_priv),
+ .of_to_plat = sbsa_gwdt_of_to_plat,
.ops = &sbsa_gwdt_ops,
};
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 23fef2147f..291aad7570 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -105,12 +105,12 @@ static int sp805_wdt_expire_now(struct udevice *dev, ulong flags)
static int sp805_wdt_probe(struct udevice *dev)
{
- debug("%s: Probing wdt%u (sp805-wdt)\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u (sp805-wdt)\n", __func__, dev_seq(dev));
return 0;
}
-static int sp805_wdt_ofdata_to_platdata(struct udevice *dev)
+static int sp805_wdt_of_to_plat(struct udevice *dev)
{
struct sp805_wdt_priv *priv = dev_get_priv(dev);
struct clk clk;
@@ -142,7 +142,7 @@ U_BOOT_DRIVER(sp805_wdt) = {
.id = UCLASS_WDT,
.of_match = sp805_wdt_ids,
.probe = sp805_wdt_probe,
- .priv_auto_alloc_size = sizeof(struct sp805_wdt_priv),
- .ofdata_to_platdata = sp805_wdt_ofdata_to_platdata,
+ .priv_auto = sizeof(struct sp805_wdt_priv),
+ .of_to_plat = sp805_wdt_of_to_plat,
.ops = &sp805_wdt_ops,
};
diff --git a/drivers/watchdog/stm32mp_wdt.c b/drivers/watchdog/stm32mp_wdt.c
index f673fce327..53586fdbfc 100644
--- a/drivers/watchdog/stm32mp_wdt.c
+++ b/drivers/watchdog/stm32mp_wdt.c
@@ -131,7 +131,7 @@ U_BOOT_DRIVER(stm32mp_wdt) = {
.name = "stm32mp-wdt",
.id = UCLASS_WDT,
.of_match = stm32mp_wdt_match,
- .priv_auto_alloc_size = sizeof(struct stm32mp_wdt_priv),
+ .priv_auto = sizeof(struct stm32mp_wdt_priv),
.probe = stm32mp_wdt_probe,
.ops = &stm32mp_wdt_ops,
};
diff --git a/drivers/watchdog/tangier_wdt.c b/drivers/watchdog/tangier_wdt.c
index 358a9b90fd..bdc65597dc 100644
--- a/drivers/watchdog/tangier_wdt.c
+++ b/drivers/watchdog/tangier_wdt.c
@@ -80,7 +80,7 @@ static const struct udevice_id tangier_wdt_ids[] = {
static int tangier_wdt_probe(struct udevice *dev)
{
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
return 0;
}
diff --git a/drivers/watchdog/xilinx_tb_wdt.c b/drivers/watchdog/xilinx_tb_wdt.c
index ea4311c8ce..1687a4599f 100644
--- a/drivers/watchdog/xilinx_tb_wdt.c
+++ b/drivers/watchdog/xilinx_tb_wdt.c
@@ -26,7 +26,7 @@ struct watchdog_regs {
u32 tbr; /* 0x8 */
};
-struct xlnx_wdt_platdata {
+struct xlnx_wdt_plat {
bool enable_once;
struct watchdog_regs *regs;
};
@@ -34,16 +34,16 @@ struct xlnx_wdt_platdata {
static int xlnx_wdt_reset(struct udevice *dev)
{
u32 reg;
- struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev);
+ struct xlnx_wdt_plat *plat = dev_get_plat(dev);
debug("%s ", __func__);
/* Read the current contents of TCSR0 */
- reg = readl(&platdata->regs->twcsr0);
+ reg = readl(&plat->regs->twcsr0);
/* Clear the watchdog WDS bit */
if (reg & (XWT_CSR0_EWDT1_MASK | XWT_CSRX_EWDT2_MASK))
- writel(reg | XWT_CSR0_WDS_MASK, &platdata->regs->twcsr0);
+ writel(reg | XWT_CSR0_WDS_MASK, &plat->regs->twcsr0);
return 0;
}
@@ -51,18 +51,18 @@ static int xlnx_wdt_reset(struct udevice *dev)
static int xlnx_wdt_stop(struct udevice *dev)
{
u32 reg;
- struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev);
+ struct xlnx_wdt_plat *plat = dev_get_plat(dev);
- if (platdata->enable_once) {
+ if (plat->enable_once) {
debug("Can't stop Xilinx watchdog.\n");
return -EBUSY;
}
/* Read the current contents of TCSR0 */
- reg = readl(&platdata->regs->twcsr0);
+ reg = readl(&plat->regs->twcsr0);
- writel(reg & ~XWT_CSR0_EWDT1_MASK, &platdata->regs->twcsr0);
- writel(~XWT_CSRX_EWDT2_MASK, &platdata->regs->twcsr1);
+ writel(reg & ~XWT_CSR0_EWDT1_MASK, &plat->regs->twcsr0);
+ writel(~XWT_CSRX_EWDT2_MASK, &plat->regs->twcsr1);
debug("Watchdog disabled!\n");
@@ -71,37 +71,37 @@ static int xlnx_wdt_stop(struct udevice *dev)
static int xlnx_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
{
- struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev);
+ struct xlnx_wdt_plat *plat = dev_get_plat(dev);
debug("%s:\n", __func__);
writel((XWT_CSR0_WRS_MASK | XWT_CSR0_WDS_MASK | XWT_CSR0_EWDT1_MASK),
- &platdata->regs->twcsr0);
+ &plat->regs->twcsr0);
- writel(XWT_CSRX_EWDT2_MASK, &platdata->regs->twcsr1);
+ writel(XWT_CSRX_EWDT2_MASK, &plat->regs->twcsr1);
return 0;
}
static int xlnx_wdt_probe(struct udevice *dev)
{
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
return 0;
}
-static int xlnx_wdt_ofdata_to_platdata(struct udevice *dev)
+static int xlnx_wdt_of_to_plat(struct udevice *dev)
{
- struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev);
+ struct xlnx_wdt_plat *plat = dev_get_plat(dev);
- platdata->regs = (struct watchdog_regs *)dev_read_addr(dev);
- if (IS_ERR(platdata->regs))
- return PTR_ERR(platdata->regs);
+ plat->regs = (struct watchdog_regs *)dev_read_addr(dev);
+ if (IS_ERR(plat->regs))
+ return PTR_ERR(plat->regs);
- platdata->enable_once = dev_read_u32_default(dev,
- "xlnx,wdt-enable-once", 0);
+ plat->enable_once = dev_read_u32_default(dev, "xlnx,wdt-enable-once",
+ 0);
- debug("%s: wdt-enable-once %d\n", __func__, platdata->enable_once);
+ debug("%s: wdt-enable-once %d\n", __func__, plat->enable_once);
return 0;
}
@@ -123,7 +123,7 @@ U_BOOT_DRIVER(xlnx_wdt) = {
.id = UCLASS_WDT,
.of_match = xlnx_wdt_ids,
.probe = xlnx_wdt_probe,
- .platdata_auto_alloc_size = sizeof(struct xlnx_wdt_platdata),
- .ofdata_to_platdata = xlnx_wdt_ofdata_to_platdata,
+ .plat_auto = sizeof(struct xlnx_wdt_plat),
+ .of_to_plat = xlnx_wdt_of_to_plat,
.ops = &xlnx_wdt_ops,
};
diff --git a/drivers/watchdog/xilinx_wwdt.c b/drivers/watchdog/xilinx_wwdt.c
index d8a585a483..9137d87697 100644
--- a/drivers/watchdog/xilinx_wwdt.c
+++ b/drivers/watchdog/xilinx_wwdt.c
@@ -36,7 +36,7 @@ struct xlnx_wwdt_priv {
struct clk clk;
};
-struct xlnx_wwdt_platdata {
+struct xlnx_wwdt_plat {
bool enable_once;
};
@@ -125,10 +125,10 @@ static int xlnx_wwdt_start(struct udevice *dev, u64 timeout, ulong flags)
static int xlnx_wwdt_probe(struct udevice *dev)
{
int ret;
- struct xlnx_wwdt_platdata *platdata = dev_get_platdata(dev);
+ struct xlnx_wwdt_plat *plat = dev_get_plat(dev);
struct xlnx_wwdt_priv *wdt = dev_get_priv(dev);
- dev_dbg(dev, "%s: Probing wdt%u\n", __func__, dev->seq);
+ dev_dbg(dev, "%s: Probing wdt%u\n", __func__, dev_seq(dev));
ret = regmap_init_mem(dev_ofnode(dev), &wdt->regs);
if (ret) {
@@ -136,7 +136,7 @@ static int xlnx_wwdt_probe(struct udevice *dev)
return ret;
}
- wdt->enable_once = platdata->enable_once;
+ wdt->enable_once = plat->enable_once;
ret = clk_get_by_index(dev, 0, &wdt->clk);
if (ret < 0)
@@ -145,13 +145,13 @@ static int xlnx_wwdt_probe(struct udevice *dev)
return ret;
}
-static int xlnx_wwdt_ofdata_to_platdata(struct udevice *dev)
+static int xlnx_wwdt_of_to_plat(struct udevice *dev)
{
- struct xlnx_wwdt_platdata *platdata = dev_get_platdata(dev);
+ struct xlnx_wwdt_plat *plat = dev_get_plat(dev);
- platdata->enable_once = dev_read_u32_default(dev,
- "xlnx,wdt-enable-once", 0);
- dev_dbg(dev, "wdt-enable-once %d\n", platdata->enable_once);
+ plat->enable_once = dev_read_u32_default(dev, "xlnx,wdt-enable-once",
+ 0);
+ dev_dbg(dev, "wdt-enable-once %d\n", plat->enable_once);
return 0;
}
@@ -172,8 +172,8 @@ U_BOOT_DRIVER(xlnx_wwdt) = {
.id = UCLASS_WDT,
.of_match = xlnx_wwdt_ids,
.probe = xlnx_wwdt_probe,
- .priv_auto_alloc_size = sizeof(struct xlnx_wwdt_priv),
- .platdata_auto_alloc_size = sizeof(struct xlnx_wwdt_platdata),
- .ofdata_to_platdata = xlnx_wwdt_ofdata_to_platdata,
+ .priv_auto = sizeof(struct xlnx_wwdt_priv),
+ .plat_auto = sizeof(struct xlnx_wwdt_plat),
+ .of_to_plat = xlnx_wwdt_of_to_plat,
.ops = &xlnx_wwdt_ops,
};