Lines Matching +full:timebase +full:- +full:frequency
7 * SPDX-License-Identifier: GPL-2.0+
44 usec = usec - tmp; in __udelay()
46 /* Set up TIMER 3 as timebase clock */ in __udelay()
47 timerp->tmr = DTIM_DTMR_RST_RST; in __udelay()
48 timerp->tcn = 0; in __udelay()
50 timerp->tmr = in __udelay()
54 start = now = timerp->tcn; in __udelay()
56 now = timerp->tcn; in __udelay()
66 timerp->ter = (DTIM_DTER_CAP | DTIM_DTER_REF); in dtimer_interrupt()
84 timerp->tcn = 0; in timer_init()
85 timerp->trr = 0; in timer_init()
88 timerp->tmr = DTIM_DTMR_RST_RST; in timer_init()
93 timerp->tcn = 0; in timer_init()
94 timerp->trr = 1000; /* Interrupt every ms */ in timer_init()
99 timerp->tmr = CONFIG_SYS_TIMER_PRESCALER | DTIM_DTMR_CLK_DIV1 | in timer_init()
107 return (timestamp - base); in get_timer()
129 usec = usec - tmp; in __udelay()
131 /* Set up TIMER 3 as timebase clock */ in __udelay()
132 timerp->pcsr = PIT_PCSR_OVW; in __udelay()
133 timerp->pmr = 0; in __udelay()
135 timerp->pcsr |= PIT_PCSR_PRE(CONFIG_SYS_PIT_PRESCALE) | PIT_PCSR_EN; in __udelay()
137 timerp->pmr = tmp; in __udelay()
138 while (timerp->pcntr > 0) ; in __udelay()
148 timerp->pcsr = PIT_PCSR_OVW; in timer_init()
149 timerp->pmr = lastinc = 0; in timer_init()
150 timerp->pcsr |= PIT_PCSR_PRE(CONFIG_SYS_PIT_PRESCALE) | PIT_PCSR_EN; in timer_init()
160 now = timerp->pcntr; in get_timer()
161 diff = -(now - lastinc); in get_timer()
165 return timestamp - base; in get_timer()
176 * This function is derived from PowerPC code (read timebase as long long).
190 * This function is derived from PowerPC code (timebase clock frequency).