Lines Matching refs:periph_id

481 u32 *get_periph_source_reg(enum periph_id periph_id)  in get_periph_source_reg()  argument
488 if (periph_id == PERIPH_ID_CSI) in get_periph_source_reg()
491 assert(periph_id >= PERIPH_ID_FIRST && periph_id < PERIPH_ID_COUNT); in get_periph_source_reg()
492 internal_id = periph_id_to_internal_id[periph_id]; in get_periph_source_reg()
501 int get_periph_clock_info(enum periph_id periph_id, int *mux_bits, in get_periph_clock_info() argument
506 if (!clock_periph_id_isvalid(periph_id)) in get_periph_clock_info()
509 internal_id = periph_id_to_internal_id[periph_id]; in get_periph_clock_info()
527 enum clock_id get_periph_clock_id(enum periph_id periph_id, int source) in get_periph_clock_id() argument
532 if (!clock_periph_id_isvalid(periph_id)) in get_periph_clock_id()
535 internal_id = periph_id_to_internal_id[periph_id]; in get_periph_clock_id()
558 int get_periph_clock_source(enum periph_id periph_id, in get_periph_clock_source() argument
564 err = get_periph_clock_info(periph_id, mux_bits, divider_bits, &type); in get_periph_clock_source()
572 printf("Caller requested bad clock: periph=%d, parent=%d\n", periph_id, in get_periph_clock_source()
577 void clock_set_enable(enum periph_id periph_id, int enable) in clock_set_enable() argument
585 assert(clock_periph_id_isvalid(periph_id)); in clock_set_enable()
586 if ((int)periph_id < (int)PERIPH_ID_VW_FIRST) in clock_set_enable()
587 clk = &clkrst->crc_clk_out_enb[PERIPH_REG(periph_id)]; in clock_set_enable()
589 clk = &clkrst->crc_clk_out_enb_vw[PERIPH_REG(periph_id)]; in clock_set_enable()
592 reg |= PERIPH_MASK(periph_id); in clock_set_enable()
594 reg &= ~PERIPH_MASK(periph_id); in clock_set_enable()
598 void reset_set_enable(enum periph_id periph_id, int enable) in reset_set_enable() argument
606 assert(clock_periph_id_isvalid(periph_id)); in reset_set_enable()
607 if (periph_id < PERIPH_ID_VW_FIRST) in reset_set_enable()
608 reset = &clkrst->crc_rst_dev[PERIPH_REG(periph_id)]; in reset_set_enable()
610 reset = &clkrst->crc_rst_dev_vw[PERIPH_REG(periph_id)]; in reset_set_enable()
613 reg |= PERIPH_MASK(periph_id); in reset_set_enable()
615 reg &= ~PERIPH_MASK(periph_id); in reset_set_enable()
628 enum periph_id clk_id_to_periph_id(int clk_id) in clk_id_to_periph_id()