Lines Matching refs:timer_softc

106 static struct mv_timer_softc *timer_softc = NULL;
190 if (timer_softc != NULL)
194 timer_softc = sc;
213 mtx_init(&timer_softc->timer_mtx, "watchdog", NULL, MTX_DEF);
276 irq_cause = read_cpu_ctrl(timer_softc->config->bridge_irq_cause);
277 irq_cause &= timer_softc->config->irq_timer0_clr;
278 write_cpu_ctrl(timer_softc->config->bridge_irq_cause, irq_cause);
317 nticks = ((timer_softc->config->clock_src / 1000000 + 1) * usec);
352 return (bus_space_read_4(timer_softc->timer_bst,
353 timer_softc->timer_bsh, CPU_TIMER_CONTROL));
360 bus_space_write_4(timer_softc->timer_bst,
361 timer_softc->timer_bsh, CPU_TIMER_CONTROL, val);
368 return (bus_space_read_4(timer_softc->timer_bst,
369 timer_softc->timer_bsh, CPU_TIMER0 + timer * 0x8));
376 bus_space_write_4(timer_softc->timer_bst,
377 timer_softc->timer_bsh, CPU_TIMER0 + timer * 0x8, val);
384 bus_space_write_4(timer_softc->timer_bst,
385 timer_softc->timer_bsh, CPU_TIMER0_REL + timer * 0x8, val);
393 irq_cause = read_cpu_ctrl(timer_softc->config->bridge_irq_cause);
394 irq_cause &= timer_softc->config->irq_timer_wd_clr;
395 write_cpu_ctrl(timer_softc->config->bridge_irq_cause, irq_cause);
415 irq_cause = read_cpu_ctrl(timer_softc->config->bridge_irq_cause);
416 irq_cause &= timer_softc->config->irq_timer_wd_clr;
417 write_cpu_ctrl(timer_softc->config->bridge_irq_cause, irq_cause);
449 irq_cause = read_cpu_ctrl(timer_softc->config->bridge_irq_cause);
450 irq_cause &= timer_softc->config->irq_timer_wd_clr;
451 write_cpu_ctrl(timer_softc->config->bridge_irq_cause, irq_cause);
467 irq_cause = read_cpu_ctrl(timer_softc->config->bridge_irq_cause);
468 irq_cause &= timer_softc->config->irq_timer_wd_clr;
469 write_cpu_ctrl(timer_softc->config->bridge_irq_cause, irq_cause);
485 mtx_lock(&timer_softc->timer_mtx);
487 if (timer_softc->config->watchdog_disable != NULL)
488 timer_softc->config->watchdog_disable();
495 ticks = (uint64_t)(ns * timer_softc->config->clock_src) / 1000000000;
497 if (timer_softc->config->watchdog_disable != NULL)
498 timer_softc->config->watchdog_disable();
501 if (timer_softc->config->watchdog_enable != NULL)
502 timer_softc->config->watchdog_enable();
506 mtx_unlock(&timer_softc->timer_mtx);
561 if (timer_softc->config->soc_family == MV_SOC_ARMADA_XP) {