Lines Matching refs:iobase
100 void mec_hal_espi_oob_ready_set(struct mec_espi_io_regs *iobase) in mec_hal_espi_oob_ready_set() argument
102 iobase->OOBRDY = MEC_BIT(MEC_ESPI_IO_OOBRDY_OOB_READY_Pos); in mec_hal_espi_oob_ready_set()
105 int mec_hal_espi_oob_is_ready(struct mec_espi_io_regs *iobase) in mec_hal_espi_oob_is_ready() argument
107 if (iobase->OOBRDY & MEC_BIT(MEC_ESPI_IO_OOBRDY_OOB_READY_Pos)) { in mec_hal_espi_oob_is_ready()
118 uint32_t mec_hal_espi_oob_en_status(struct mec_espi_io_regs *iobase) in mec_hal_espi_oob_en_status() argument
120 uint32_t txsts = iobase->OOBTXSTS; in mec_hal_espi_oob_en_status()
135 uint32_t mec_hal_espi_oob_max_pkt_size(struct mec_espi_io_regs *iobase) in mec_hal_espi_oob_max_pkt_size() argument
139 sz = (iobase->OOBRXC & MEC_ESPI_IO_OOBRXC_MAX_PLD_SZ_Msk) >> MEC_ESPI_IO_OOBRXC_MAX_PLD_SZ_Pos; in mec_hal_espi_oob_max_pkt_size()
159 int mec_hal_espi_oob_buffer_set(struct mec_espi_io_regs *iobase, uint8_t dir, in mec_hal_espi_oob_buffer_set() argument
164 if (!iobase || !buf) { in mec_hal_espi_oob_buffer_set()
176 maxlen = mec_hal_espi_oob_max_pkt_size(iobase); in mec_hal_espi_oob_buffer_set()
183 iobase->OOBRXA = buf->maddr; in mec_hal_espi_oob_buffer_set()
184 temp = iobase->OOBRXL & (uint32_t)~(MEC_ESPI_IO_OOBRXL_RX_BUF_LEN_Msk); in mec_hal_espi_oob_buffer_set()
186 iobase->OOBRXL = temp; in mec_hal_espi_oob_buffer_set()
188 iobase->OOBTXA = buf->maddr; in mec_hal_espi_oob_buffer_set()
189 temp = iobase->OOBTXL & (uint32_t)~(MEC_ESPI_IO_OOBTXL_TX_MSG_LEN_Msk); in mec_hal_espi_oob_buffer_set()
191 iobase->OOBTXL = temp; in mec_hal_espi_oob_buffer_set()
202 void mec_hal_espi_oob_rx_buffer_avail(struct mec_espi_io_regs *iobase) in mec_hal_espi_oob_rx_buffer_avail() argument
204 iobase->OOBRXC |= MEC_BIT(MEC_ESPI_IO_OOBRXC_RX_AVAIL_Pos); in mec_hal_espi_oob_rx_buffer_avail()
210 void mec_hal_espi_oob_intr_ctrl(struct mec_espi_io_regs *iobase, uint32_t msk, uint8_t en) in mec_hal_espi_oob_intr_ctrl() argument
216 iobase->OOBRXIEN |= MEC_BIT(MEC_ESPI_IO_OOBRXIEN_DONE_Pos); in mec_hal_espi_oob_intr_ctrl()
218 iobase->OOBRXIEN &= (uint32_t)~MEC_BIT(MEC_ESPI_IO_OOBRXIEN_DONE_Pos); in mec_hal_espi_oob_intr_ctrl()
230 iobase->OOBTXIEN |= txien; in mec_hal_espi_oob_intr_ctrl()
232 iobase->OOBTXIEN &= ~txien; in mec_hal_espi_oob_intr_ctrl()
236 void mec_hal_espi_oob_tx_start(struct mec_espi_io_regs *iobase, uint8_t tag, uint8_t start) in mec_hal_espi_oob_tx_start() argument
238 uint32_t txctrl = iobase->OOBTXC & (uint32_t)~(MEC_ESPI_IO_OOBTXC_OOB_TX_TAG_Msk); in mec_hal_espi_oob_tx_start()
242 iobase->OOBTXC = txctrl; in mec_hal_espi_oob_tx_start()
245 iobase->OOBTXC |= MEC_BIT(MEC_ESPI_IO_OOBTXC_START_Pos); in mec_hal_espi_oob_tx_start()
249 int mec_hal_espi_oob_tx_is_busy(struct mec_espi_io_regs *iobase) in mec_hal_espi_oob_tx_is_busy() argument
251 if (iobase->OOBTXSTS & MEC_BIT(MEC_ESPI_IO_OOBTXSTS_BUSY_Pos)) { in mec_hal_espi_oob_tx_is_busy()
258 uint8_t mec_hal_espi_oob_rx_tag(struct mec_espi_io_regs *iobase) in mec_hal_espi_oob_rx_tag() argument
260 uint32_t tag = ((iobase->OOBRXSTS & MEC_ESPI_IO_OOBRXSTS_OOB_RX_TAG_Msk) >> in mec_hal_espi_oob_rx_tag()
266 uint32_t mec_hal_espi_oob_received_len(struct mec_espi_io_regs *iobase) in mec_hal_espi_oob_received_len() argument
270 if (iobase) { in mec_hal_espi_oob_received_len()
271 recvlen = iobase->OOBRXL & MEC_ESPI_IO_OOBRXL_RECV_MSG_LEN_Msk; in mec_hal_espi_oob_received_len()
278 uint32_t mec_hal_espi_oob_status(struct mec_espi_io_regs *iobase, uint8_t dir) in mec_hal_espi_oob_status() argument
281 return iobase->OOBRXSTS; in mec_hal_espi_oob_status()
283 return iobase->OOBTXSTS; in mec_hal_espi_oob_status()
335 void mec_hal_espi_oob_status_clr_done(struct mec_espi_io_regs *iobase, uint8_t dir) in mec_hal_espi_oob_status_clr_done() argument
338 iobase->OOBTXSTS = MEC_BIT(MEC_ESPI_IO_OOBTXSTS_DONE_Pos); in mec_hal_espi_oob_status_clr_done()
340 iobase->OOBRXSTS = MEC_BIT(MEC_ESPI_IO_OOBRXSTS_DONE_Pos); in mec_hal_espi_oob_status_clr_done()
346 void mec_hal_espi_oob_status_clr_err(struct mec_espi_io_regs *iobase, uint8_t dir) in mec_hal_espi_oob_status_clr_err() argument
349 iobase->OOBTXSTS = (MEC_ESPI_IO_OOBTXSTS_EC_BUS_ERR_Msk in mec_hal_espi_oob_status_clr_err()
353 iobase->OOBRXSTS = (MEC_ESPI_IO_OOBRXSTS_EC_BUS_ERR_Msk in mec_hal_espi_oob_status_clr_err()
358 void mec_hal_espi_oob_status_clr_chen_change(struct mec_espi_io_regs *iobase) in mec_hal_espi_oob_status_clr_chen_change() argument
360 iobase->OOBTXSTS = MEC_BIT(MEC_ESPI_IO_OOBTXSTS_CHEN_CHG_Pos); in mec_hal_espi_oob_status_clr_chen_change()
363 void mec_hal_espi_oob_status_clr_all(struct mec_espi_io_regs *iobase, uint8_t dir) in mec_hal_espi_oob_status_clr_all() argument
366 iobase->OOBRXSTS = MEC_ESPI_OOB_RX_STS_RW1C; in mec_hal_espi_oob_status_clr_all()
368 iobase->OOBTXSTS = MEC_ESPI_OOB_TX_STS_RW1C; in mec_hal_espi_oob_status_clr_all()