Lines Matching refs:periph_id

461 u32 *get_periph_source_reg(enum periph_id periph_id)  in get_periph_source_reg()  argument
468 if (periph_id == PERIPH_ID_CSI) in get_periph_source_reg()
471 assert(periph_id >= PERIPH_ID_FIRST && periph_id < PERIPH_ID_COUNT); in get_periph_source_reg()
472 internal_id = periph_id_to_internal_id[periph_id]; in get_periph_source_reg()
481 int get_periph_clock_info(enum periph_id periph_id, int *mux_bits, in get_periph_clock_info() argument
486 if (!clock_periph_id_isvalid(periph_id)) in get_periph_clock_info()
489 internal_id = periph_id_to_internal_id[periph_id]; in get_periph_clock_info()
507 enum clock_id get_periph_clock_id(enum periph_id periph_id, int source) in get_periph_clock_id() argument
512 if (!clock_periph_id_isvalid(periph_id)) in get_periph_clock_id()
515 internal_id = periph_id_to_internal_id[periph_id]; in get_periph_clock_id()
538 int get_periph_clock_source(enum periph_id periph_id, in get_periph_clock_source() argument
544 err = get_periph_clock_info(periph_id, mux_bits, divider_bits, &type); in get_periph_clock_source()
552 printf("Caller requested bad clock: periph=%d, parent=%d\n", periph_id, in get_periph_clock_source()
557 void clock_set_enable(enum periph_id periph_id, int enable) in clock_set_enable() argument
565 assert(clock_periph_id_isvalid(periph_id)); in clock_set_enable()
566 if ((int)periph_id < (int)PERIPH_ID_VW_FIRST) in clock_set_enable()
567 clk = &clkrst->crc_clk_out_enb[PERIPH_REG(periph_id)]; in clock_set_enable()
569 clk = &clkrst->crc_clk_out_enb_vw[PERIPH_REG(periph_id)]; in clock_set_enable()
572 reg |= PERIPH_MASK(periph_id); in clock_set_enable()
574 reg &= ~PERIPH_MASK(periph_id); in clock_set_enable()
578 void reset_set_enable(enum periph_id periph_id, int enable) in reset_set_enable() argument
586 assert(clock_periph_id_isvalid(periph_id)); in reset_set_enable()
587 if (periph_id < PERIPH_ID_VW_FIRST) in reset_set_enable()
588 reset = &clkrst->crc_rst_dev[PERIPH_REG(periph_id)]; in reset_set_enable()
590 reset = &clkrst->crc_rst_dev_vw[PERIPH_REG(periph_id)]; in reset_set_enable()
593 reg |= PERIPH_MASK(periph_id); in reset_set_enable()
595 reg &= ~PERIPH_MASK(periph_id); in reset_set_enable()
608 enum periph_id clk_id_to_periph_id(int clk_id) in clk_id_to_periph_id()