Lines Matching refs:regs

41 int mec_hal_bdp_init(struct mec_bdp_regs *regs, uint32_t cfg_flags)  in mec_hal_bdp_init()  argument
45 if (!regs) { in mec_hal_bdp_init()
52 regs->ACTV80 = 0; in mec_hal_bdp_init()
53 regs->ACTV80A = 0; in mec_hal_bdp_init()
56 regs->CONFIG = MEC_BIT(MEC_BDP_CFG_REG_SRESET_POS); in mec_hal_bdp_init()
60 regs->CONFIG = (regs->CONFIG & (uint32_t)~(MEC_BDP_CFG_REG_FIFO_THRH_MSK)) in mec_hal_bdp_init()
65 regs->BL80A = in mec_hal_bdp_init()
71 regs->IEN |= MEC_BIT(MEC_BDP_IEN_REG_THRH_POS); in mec_hal_bdp_init()
77 regs->ACTV80A |= MEC_BIT(MEC_BDP_ACTV_REG_EN_POS); in mec_hal_bdp_init()
82 regs->ACTV80 |= MEC_BIT(MEC_BDP_ACTV_REG_EN_POS); in mec_hal_bdp_init()
88 int mec_hal_bdp_activate(struct mec_bdp_regs *regs, uint8_t enable, uint8_t is_alias) in mec_hal_bdp_activate() argument
90 if (!regs) { in mec_hal_bdp_activate()
96 regs->ACTV80 |= MEC_BIT(MEC_BDP_ACTV_REG_EN_POS); in mec_hal_bdp_activate()
98 regs->ACTV80 &= (uint8_t)~MEC_BIT(MEC_BDP_ACTV_REG_EN_POS); in mec_hal_bdp_activate()
102 regs->ACTV80A |= MEC_BIT(MEC_BDP_ACTV_REG_EN_POS); in mec_hal_bdp_activate()
104 regs->ACTV80A &= (uint8_t)~MEC_BIT(MEC_BDP_ACTV_REG_EN_POS); in mec_hal_bdp_activate()
111 int mec_hal_bdp_girq_ctrl(struct mec_bdp_regs *regs, uint8_t enable) in mec_hal_bdp_girq_ctrl() argument
113 if (!regs) { in mec_hal_bdp_girq_ctrl()
122 int mec_hal_bdp_girq_status_clr(struct mec_bdp_regs *regs) in mec_hal_bdp_girq_status_clr() argument
124 if (!regs) { in mec_hal_bdp_girq_status_clr()
133 int mec_hal_bdp_fifo_thresh_set(struct mec_bdp_regs *regs, uint32_t cfg_thrh) in mec_hal_bdp_fifo_thresh_set() argument
137 if (!regs || (cfg_thrh > MEC5_BDP_CFG_FIFO_THRES_30)) { in mec_hal_bdp_fifo_thresh_set()
142 regs->CONFIG = (regs->CONFIG & (uint32_t)~(MEC_BDP_CFG_REG_FIFO_THRH_MSK)) in mec_hal_bdp_fifo_thresh_set()
152 uint32_t mec_hal_bdp_fifo_thresh_get(struct mec_bdp_regs *regs) in mec_hal_bdp_fifo_thresh_get() argument
154 if (!regs) { in mec_hal_bdp_fifo_thresh_get()
159 (regs->CONFIG & MEC_BDP_CFG_REG_FIFO_THRH_MSK) >> MEC_BDP_CFG_REG_FIFO_THRH_POS; in mec_hal_bdp_fifo_thresh_get()
165 void mec_hal_bdp_intr_en(struct mec_bdp_regs *regs, uint8_t enable) in mec_hal_bdp_intr_en() argument
168 regs->IEN |= MEC_BIT(MEC_BDP_INTR_EN_THRES_POS); in mec_hal_bdp_intr_en()
170 regs->IEN &= (uint8_t)~MEC_BIT(MEC_BDP_INTR_EN_THRES_POS); in mec_hal_bdp_intr_en()
183 uint32_t mec_hal_bdp_status(struct mec_bdp_regs *regs) in mec_hal_bdp_status() argument
185 return regs->STATUS; in mec_hal_bdp_status()
188 uint32_t mec_hal_bdp_snapshot(struct mec_bdp_regs *regs) in mec_hal_bdp_snapshot() argument
190 return regs->SNAP; in mec_hal_bdp_snapshot()
227 int mec_hal_bdp_get_host_io(struct mec_bdp_regs *regs, struct mec_bdp_io *capio) in mec_hal_bdp_get_host_io() argument
233 if (!regs || !capio) { in mec_hal_bdp_get_host_io()
240 da = regs->DATRB; in mec_hal_bdp_get_host_io()
270 da = regs->DATRB; in mec_hal_bdp_get_host_io()