Lines Matching defs:clock
216 /* Activate the module clock. */
219 device_printf(dev, "cannot get ahb clock\n");
224 device_printf(dev, "cannot get mod clock\n");
229 device_printf(dev, "cannot enable ahb clock\n");
234 device_printf(dev, "cannot enable mod clock\n");
319 aw_spi_clock_test_cdr1(struct aw_spi_softc *sc, uint64_t clock, uint32_t *ccr)
327 if ((clock - cur) < (clock - best)) {
338 aw_spi_clock_test_cdr2(struct aw_spi_softc *sc, uint64_t clock, uint32_t *ccr)
346 if ((clock - cur) < (clock - best)) {
357 aw_spi_setup_clock(struct aw_spi_softc *sc, uint64_t clock)
362 best_ccr1 = aw_spi_clock_test_cdr1(sc, clock, &ccr1);
363 best_ccr2 = aw_spi_clock_test_cdr2(sc, clock, &ccr2);
365 if (best_ccr1 == clock) {
367 } else if (best_ccr2 == clock) {
370 if ((clock - best_ccr1) < (clock - best_ccr2))
529 uint32_t cs, mode, clock, reg;
535 spibus_get_clock(child, &clock);
538 /* The minimum divider is 2 so set the clock at twice the needed speed */
539 clk_set_freq(sc->clk_mod, 2 * clock, CLK_SET_ROUND_DOWN);
553 /* Setup clock, CS and mode */
554 aw_spi_setup_clock(sc, clock);