Lines Matching refs:periph_id
704 u32 *get_periph_source_reg(enum periph_id periph_id) in get_periph_source_reg() argument
711 if (periph_id == PERIPH_ID_CSI) in get_periph_source_reg()
714 assert(periph_id >= PERIPH_ID_FIRST && periph_id < PERIPH_ID_COUNT); in get_periph_source_reg()
715 internal_id = INTERNAL_ID(periph_id_to_internal_id[periph_id]); in get_periph_source_reg()
739 int get_periph_clock_info(enum periph_id periph_id, int *mux_bits, in get_periph_clock_info() argument
744 if (!clock_periph_id_isvalid(periph_id)) in get_periph_clock_info()
747 internal_id = INTERNAL_ID(periph_id_to_internal_id[periph_id]); in get_periph_clock_info()
765 enum clock_id get_periph_clock_id(enum periph_id periph_id, int source) in get_periph_clock_id() argument
770 if (!clock_periph_id_isvalid(periph_id)) in get_periph_clock_id()
773 internal_id = INTERNAL_ID(periph_id_to_internal_id[periph_id]); in get_periph_clock_id()
796 int get_periph_clock_source(enum periph_id periph_id, in get_periph_clock_source() argument
802 err = get_periph_clock_info(periph_id, mux_bits, divider_bits, &type); in get_periph_clock_source()
810 printf("Caller requested bad clock: periph=%d, parent=%d\n", periph_id, in get_periph_clock_source()
815 void clock_set_enable(enum periph_id periph_id, int enable) in clock_set_enable() argument
823 assert(clock_periph_id_isvalid(periph_id)); in clock_set_enable()
824 if ((int)periph_id < (int)PERIPH_ID_VW_FIRST) in clock_set_enable()
825 clk = &clkrst->crc_clk_out_enb[PERIPH_REG(periph_id)]; in clock_set_enable()
826 else if ((int)periph_id < (int)PERIPH_ID_X_FIRST) in clock_set_enable()
827 clk = &clkrst->crc_clk_out_enb_vw[PERIPH_REG(periph_id)]; in clock_set_enable()
828 else if ((int)periph_id < (int)PERIPH_ID_Y_FIRST) in clock_set_enable()
835 reg |= PERIPH_MASK(periph_id); in clock_set_enable()
837 reg &= ~PERIPH_MASK(periph_id); in clock_set_enable()
841 void reset_set_enable(enum periph_id periph_id, int enable) in reset_set_enable() argument
849 assert(clock_periph_id_isvalid(periph_id)); in reset_set_enable()
850 if (periph_id < PERIPH_ID_VW_FIRST) in reset_set_enable()
851 reset = &clkrst->crc_rst_dev[PERIPH_REG(periph_id)]; in reset_set_enable()
852 else if ((int)periph_id < (int)PERIPH_ID_X_FIRST) in reset_set_enable()
853 reset = &clkrst->crc_rst_dev_vw[PERIPH_REG(periph_id)]; in reset_set_enable()
854 else if ((int)periph_id < (int)PERIPH_ID_Y_FIRST) in reset_set_enable()
861 reg |= PERIPH_MASK(periph_id); in reset_set_enable()
863 reg &= ~PERIPH_MASK(periph_id); in reset_set_enable()
876 enum periph_id clk_id_to_periph_id(int clk_id) in clk_id_to_periph_id()