Lines Matching refs:periph_id
406 u32 *get_periph_source_reg(enum periph_id periph_id) in get_periph_source_reg() argument
412 assert(clock_periph_id_isvalid(periph_id)); in get_periph_source_reg()
413 internal_id = periph_id_to_internal_id[periph_id]; in get_periph_source_reg()
418 int get_periph_clock_info(enum periph_id periph_id, int *mux_bits, in get_periph_clock_info() argument
423 if (!clock_periph_id_isvalid(periph_id)) in get_periph_clock_info()
426 internal_id = periph_id_to_internal_id[periph_id]; in get_periph_clock_info()
450 enum clock_id get_periph_clock_id(enum periph_id periph_id, int source) in get_periph_clock_id() argument
455 if (!clock_periph_id_isvalid(periph_id)) in get_periph_clock_id()
458 internal_id = periph_id_to_internal_id[periph_id]; in get_periph_clock_id()
481 int get_periph_clock_source(enum periph_id periph_id, in get_periph_clock_source() argument
487 err = get_periph_clock_info(periph_id, mux_bits, divider_bits, &type); in get_periph_clock_source()
505 printf("Caller requested bad clock: periph=%d, parent=%d\n", periph_id, in get_periph_clock_source()
510 void clock_set_enable(enum periph_id periph_id, int enable) in clock_set_enable() argument
514 u32 *clk = &clkrst->crc_clk_out_enb[PERIPH_REG(periph_id)]; in clock_set_enable()
518 assert(clock_periph_id_isvalid(periph_id)); in clock_set_enable()
521 reg |= PERIPH_MASK(periph_id); in clock_set_enable()
523 reg &= ~PERIPH_MASK(periph_id); in clock_set_enable()
527 void reset_set_enable(enum periph_id periph_id, int enable) in reset_set_enable() argument
531 u32 *reset = &clkrst->crc_rst_dev[PERIPH_REG(periph_id)]; in reset_set_enable()
535 assert(clock_periph_id_isvalid(periph_id)); in reset_set_enable()
538 reg |= PERIPH_MASK(periph_id); in reset_set_enable()
540 reg &= ~PERIPH_MASK(periph_id); in reset_set_enable()
553 enum periph_id clk_id_to_periph_id(int clk_id) in clk_id_to_periph_id()