Lines Matching full:tmr
74 struct tegra186_tmr *tmr; member
93 static void tmr_writel(struct tegra186_tmr *tmr, u32 value, unsigned int offset) in tmr_writel() argument
95 writel_relaxed(value, tmr->regs + offset); in tmr_writel()
112 struct tegra186_tmr *tmr; in tegra186_tmr_create() local
114 tmr = devm_kzalloc(tegra->dev, sizeof(*tmr), GFP_KERNEL); in tegra186_tmr_create()
115 if (!tmr) in tegra186_tmr_create()
118 tmr->parent = tegra; in tegra186_tmr_create()
119 tmr->regs = tegra->regs + offset; in tegra186_tmr_create()
120 tmr->index = index; in tegra186_tmr_create()
121 tmr->hwirq = 0; in tegra186_tmr_create()
123 return tmr; in tegra186_tmr_create()
138 tmr_writel(wdt->tmr, 0, TMRCR); in tegra186_wdt_disable()
143 struct tegra186_timer *tegra = wdt->tmr->parent; in tegra186_wdt_enable()
148 writel(value, tegra->regs + TKEIE(wdt->tmr->hwirq)); in tegra186_wdt_enable()
151 tmr_writel(wdt->tmr, TMRSR_INTR_CLR, TMRSR); in tegra186_wdt_enable()
154 tmr_writel(wdt->tmr, TMRCSSR_SRC_USEC, TMRCSSR); in tegra186_wdt_enable()
159 tmr_writel(wdt->tmr, value, TMRCR); in tegra186_wdt_enable()
166 value |= WDTCR_TIMER_SOURCE(wdt->tmr->index); in tegra186_wdt_enable()
270 wdt->tmr = tegra186_tmr_create(tegra, source); in tegra186_wdt_create()
271 if (IS_ERR(wdt->tmr)) in tegra186_wdt_create()
272 return ERR_CAST(wdt->tmr); in tegra186_wdt_create()