static void omap_wdt_set_timeout(struct omap_wdt_dev *wdev) { u32 pre_margin = GET_WLDR_VAL(timer_margin); u32 delay_period = GET_WLDR_VAL(timer_margin / 2); void __iomem *base = wdev->base; /* just count up at 32 KHz */ while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) cpu_relax(); __raw_writel(pre_margin, base + OMAP_WATCHDOG_LDR); while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) cpu_relax(); /* Set delay interrupt to half the watchdog interval. */ while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 1 << 5) cpu_relax(); __raw_writel(delay_period, base + OMAP_WATCHDOG_WDLY); }
static void omap_wdt_set_timeout(void) { u32 pre_margin = GET_WLDR_VAL(timer_margin); /* just count up at 32 KHz */ while (omap_readl(OMAP_WATCHDOG_WPS) & 0x04) cpu_relax(); omap_writel(pre_margin, OMAP_WATCHDOG_LDR); while (omap_readl(OMAP_WATCHDOG_WPS) & 0x04) cpu_relax(); }
static void omap_wdt_set_timeout(struct omap_wdt_dev *wdev) { u32 pre_margin = GET_WLDR_VAL(timer_margin); void __iomem *base = wdev->base; while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) cpu_relax(); __raw_writel(pre_margin, base + OMAP_WATCHDOG_LDR); while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) cpu_relax(); }
static void omap_wdt_set_timer(struct omap_wdt_dev *wdev, unsigned int timeout) { u32 pre_margin = GET_WLDR_VAL(timeout); void __iomem *base = wdev->base; /* just count up at 32 KHz */ while (readl_relaxed(base + OMAP_WATCHDOG_WPS) & 0x04) cpu_relax(); writel_relaxed(pre_margin, base + OMAP_WATCHDOG_LDR); while (readl_relaxed(base + OMAP_WATCHDOG_WPS) & 0x04) cpu_relax(); }
static void omap_wdt_set_timeout(struct omap_wdt_dev *wdev) { u32 pre_margin = GET_WLDR_VAL(timer_margin); void __iomem *base = wdev->base; pm_runtime_get_sync(wdev->dev); /* just count up at 32 KHz */ while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) cpu_relax(); __raw_writel(pre_margin, base + OMAP_WATCHDOG_LDR); while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) cpu_relax(); pm_runtime_put_sync(wdev->dev); }