X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=drivers%2Fwatchdog%2Fsbsa_gwdt.c;h=b7cb199c9238444fa82889bf8ce00694751a21f9;hb=720620e6916ba40b9a173bb07706d2c73f3c23e7;hp=2eae431ba6c13c872e9c7744cfe7203dfd47309a;hpb=f27d73e941525cab15682f2aea1673f5f943a128;p=platform%2Fkernel%2Fu-boot.git diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c index 2eae431..b7cb199 100644 --- a/drivers/watchdog/sbsa_gwdt.c +++ b/drivers/watchdog/sbsa_gwdt.c @@ -61,7 +61,7 @@ static int sbsa_gwdt_start(struct udevice *dev, u64 timeout, ulong flags) * to half value of timeout. */ clk = get_tbclk(); - writel(clk / 2 * timeout, + writel(clk / (2 * 1000) * timeout, priv->reg_control + SBSA_GWDT_WOR); /* writing WCS will cause an explicit watchdog refresh */ @@ -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, };