Lines Matching defs:sh_clock
81 } sh_clock = {
116 sh_clock.flags = flags;
132 if (sh_clock.flags & SH_CLOCK_NORTC) {
135 sh_clock.tmuclk = sh_clock.pclock / 16;
140 sh_clock.tmuclk = SH_RTC_CLOCK;
153 sh_clock.cpucycle_1us = (sh_clock.tmuclk * 10) / t0;
155 cnt_1s = ((uint64_t)sh_clock.tmuclk * 10000000 * 10 + t0/2) / t0;
157 sh_clock.cpuclock = cnt_1s / 2; /* two-issue */
159 sh_clock.cpuclock = cnt_1s;
164 if (sh_clock.pclock == 0) {
178 sh_clock.pclock
193 return (sh_clock.cpuclock);
200 return (sh_clock.pclock);
223 _cpu_spin(sh_clock.cpucycle_1us * n);
233 if (sh_clock.pclock == 0)
245 if (sh_clock.flags & SH_CLOCK_NORTC) {
253 sh_clock.hz_cnt = sh_clock.tmuclk / hz - 1;
255 _reg_write_4(SH_(TCOR0), sh_clock.hz_cnt);
256 _reg_write_4(SH_(TCNT0), sh_clock.hz_cnt);
281 sh_clock.tc.tc_get_timecount = sh_timecounter_get;
282 sh_clock.tc.tc_frequency = sh_clock.pclock / 4;
283 sh_clock.tc.tc_name = "tmu_pclock_4";
284 sh_clock.tc.tc_quality = 0;
285 sh_clock.tc.tc_counter_mask = 0xffffffff;
286 tc_init(&sh_clock.tc);