Lines Matching refs:base
49 int mec_hal_mbox_init(struct mec_mbox_regs *base, uint32_t swi_ien_msk, uint32_t flags) in mec_hal_mbox_init() argument
51 const struct mec_mbox_info *mbi = find_mbox_info((uint32_t)base); in mec_hal_mbox_init()
79 int mec_hal_mbox_girq_ctrl(struct mec_mbox_regs *base, uint8_t enable) in mec_hal_mbox_girq_ctrl() argument
81 const struct mec_mbox_info *mbi = find_mbox_info((uint32_t)base); in mec_hal_mbox_girq_ctrl()
92 int mec_hal_mbox_girq_clr(struct mec_mbox_regs *base) in mec_hal_mbox_girq_clr() argument
94 const struct mec_mbox_info *mbi = find_mbox_info((uint32_t)base); in mec_hal_mbox_girq_clr()
105 uint32_t mec_hal_mbox_girq_result(struct mec_mbox_regs *base) in mec_hal_mbox_girq_result() argument
107 const struct mec_mbox_info *mbi = find_mbox_info((uint32_t)base); in mec_hal_mbox_girq_result()
116 int mec_hal_mbox_sirq_set(struct mec_mbox_regs *base, uint8_t bitmap) in mec_hal_mbox_sirq_set() argument
118 if (!base) { in mec_hal_mbox_sirq_set()
123 base->ECSMIT |= bitmap; in mec_hal_mbox_sirq_set()
129 int mec_hal_mbox_sirq_en_mask(struct mec_mbox_regs *base, uint8_t val, uint8_t mask) in mec_hal_mbox_sirq_en_mask() argument
131 if (!base) { in mec_hal_mbox_sirq_en_mask()
136 base->ECSMIM = (base->ECSMIM & ~mask) | (val & mask); in mec_hal_mbox_sirq_en_mask()
142 int mec_hal_mbox_get_host_to_ec(struct mec_mbox_regs *base, uint8_t *data) in mec_hal_mbox_get_host_to_ec() argument
144 if (!base) { in mec_hal_mbox_get_host_to_ec()
148 uint8_t host_to_ec = base->H2EC; in mec_hal_mbox_get_host_to_ec()
157 int mec_hal_mbox_set_host_to_ec(struct mec_mbox_regs *base, uint8_t data) in mec_hal_mbox_set_host_to_ec() argument
159 if (!base) { in mec_hal_mbox_set_host_to_ec()
163 base->H2EC = data; in mec_hal_mbox_set_host_to_ec()
168 int mec_hal_mbox_get_ec_to_host(struct mec_mbox_regs *base, uint8_t *data) in mec_hal_mbox_get_ec_to_host() argument
170 if (!base) { in mec_hal_mbox_get_ec_to_host()
174 uint8_t ec_to_host = base->EC2H; in mec_hal_mbox_get_ec_to_host()
183 int mec_hal_mbox_set_ec_to_host(struct mec_mbox_regs *base, uint8_t data) in mec_hal_mbox_set_ec_to_host() argument
185 if (!base) { in mec_hal_mbox_set_ec_to_host()
189 base->EC2H = data; in mec_hal_mbox_set_ec_to_host()
194 int mec_hal_mbox_get(struct mec_mbox_regs *base, uint8_t mbox, uint8_t *data) in mec_hal_mbox_get() argument
196 if (!base || (mbox > MEC_MBOX_MAX_INDEX) || !data) { in mec_hal_mbox_get()
200 volatile uint8_t *p = (volatile uint8_t *)&base->MBOXD[0]; in mec_hal_mbox_get()
207 int mec_hal_mbox_put(struct mec_mbox_regs *base, uint8_t mbox, uint8_t data) in mec_hal_mbox_put() argument
209 if (!base || (mbox > MEC_MBOX_MAX_INDEX)) { in mec_hal_mbox_put()
213 volatile uint8_t *p = (volatile uint8_t *)&base->MBOXD[0]; in mec_hal_mbox_put()
221 int mec_hal_mbox32_get(struct mec_mbox_regs *base, uint8_t mbox, uint32_t *data) in mec_hal_mbox32_get() argument
223 if (!base || (mbox > (MEC_MBOX_MAX_INDEX / 4)) || !data) { in mec_hal_mbox32_get()
227 *data = base->MBOXD[mbox]; in mec_hal_mbox32_get()
232 int mec_hal_mbox32_put(struct mec_mbox_regs *base, uint8_t mbox, uint32_t data) in mec_hal_mbox32_put() argument
234 if (!base || (mbox > (MEC_MBOX_MAX_INDEX / 4))) { in mec_hal_mbox32_put()
238 base->MBOXD[mbox] = data; in mec_hal_mbox32_put()