Home
last modified time | relevance | path

Searched refs:msk (Results 1 – 19 of 19) sorted by relevance

/hal_microchip-3.7.0/mec5/drivers/
Dmec_espi_oob.c42 static uint32_t msk_to_girq_bitmap(uint8_t msk) in msk_to_girq_bitmap() argument
46 if (msk & MEC_ESPI_OOB_DIR_UP) { in msk_to_girq_bitmap()
49 if (msk & MEC_ESPI_OOB_DIR_DN) { in msk_to_girq_bitmap()
58 uint32_t msk = 0; in bitmap_to_msk() local
61 msk |= MEC_ESPI_OOB_DIR_UP; in bitmap_to_msk()
64 msk |= MEC_ESPI_OOB_DIR_DN; in bitmap_to_msk()
67 return msk; in bitmap_to_msk()
72 void mec_hal_espi_oob_girq_ctrl(uint8_t enable, uint8_t msk) in mec_hal_espi_oob_girq_ctrl() argument
74 uint32_t bitmap = msk_to_girq_bitmap(msk); in mec_hal_espi_oob_girq_ctrl()
79 void mec_hal_espi_oob_girq_status_clr(uint8_t msk) in mec_hal_espi_oob_girq_status_clr() argument
[all …]
Dmec_ecs.c78 uint32_t msk, temp, val; in mec_hal_ecs_debug_port() local
82 msk = (uint32_t)~MEC_BIT(MEC_ECS_DBG_CTRL_EN_Pos); in mec_hal_ecs_debug_port()
86 msk = MEC_ECS_DBG_CTRL_CFG_Msk; in mec_hal_ecs_debug_port()
90 msk = MEC_ECS_DBG_CTRL_CFG_Msk; in mec_hal_ecs_debug_port()
94 msk = MEC_ECS_DBG_CTRL_CFG_Msk; in mec_hal_ecs_debug_port()
101 temp = MEC_ECS->DBG_CTRL & ~msk; in mec_hal_ecs_debug_port()
114 uint32_t msk = 0, val = 0; in mec_hal_ecs_analog_comparator_config() local
116 msk = MEC_BIT(MEC_ECS_CMPSC_DSLP0_Pos) | MEC_BIT(MEC_ECS_CMPSC_DSLP1_Pos); in mec_hal_ecs_analog_comparator_config()
125 MEC_ECS->CMPSC = (MEC_ECS->CMPSC & (uint32_t)~msk) | val; in mec_hal_ecs_analog_comparator_config()
127 msk = (MEC_BIT(MEC_ECS_CMPC_EN0_Pos) | MEC_BIT(MEC_ECS_CMPC_LKCFG0_Pos) in mec_hal_ecs_analog_comparator_config()
[all …]
Dmec_kbc.c71 uint8_t ctrl = 0u, msk = 0u, val = 0u; in mec_hal_kbc_init() local
127 msk |= MEC_KBC_KESTATUS_UD0_Msk; in mec_hal_kbc_init()
134 msk |= MEC_KBC_KESTATUS_UD1_Msk; in mec_hal_kbc_init()
141 msk |= MEC_KBC_KESTATUS_UD2_Msk; in mec_hal_kbc_init()
150 if (msk) { in mec_hal_kbc_init()
151 base->KESTATUS = (base->KESTATUS & ~msk) | val; in mec_hal_kbc_init()
306 void mec_hal_kbc_status_wr(struct mec_kbc_regs *base, uint8_t val, uint8_t msk) in mec_hal_kbc_status_wr() argument
314 base->KESTATUS = (base->KESTATUS & ~msk) | (val & msk); in mec_hal_kbc_status_wr()
317 void mec_hal_kbc_status_set(struct mec_kbc_regs *base, uint8_t msk) in mec_hal_kbc_status_set() argument
325 base->KESTATUS |= msk; in mec_hal_kbc_status_set()
[all …]
Dmec_espi.c160 uint8_t msk = MEC_ESPI_IO_CAPFC_MAX_PLD_SIZE_Msk; in set_fc_max_pld() local
164 iobase->CAPFC = (iobase->CAPFC & ~msk) | regval; in set_fc_max_pld()
211 uint8_t msk = MEC_ESPI_IO_CAPFC_SHARING_SUPP_Msk; in set_fc_shared_mode() local
214 iobase->CAPFC = (iobase->CAPFC & ~msk) | regval; in set_fc_shared_mode()
228 uint8_t msk = (MEC_ESPI_IO_CAPFC_MAX_PLD_SIZE_Msk | MEC_ESPI_IO_CAPFC_SHARING_SUPP_Msk in set_fc_capabilities() local
244 iobase->CAPFC = (iobase->CAPFC & ~msk) | regval; in set_fc_capabilities()
535 uint32_t msk = (MEC_ESPI_IO_CAP0_PC_SUPP_Msk | MEC_ESPI_IO_CAP0_VW_SUPP_Msk in set_espi_global_cap() local
551 iobase->CAP0 = (iobase->CAP0 & (uint8_t)~msk) | (uint8_t)(cap & msk); in set_espi_global_cap()
561 msk = (MEC_ESPI_IO_CAP1_MAX_FREQ_SUPP_Msk | MEC_ESPI_IO_CAP1_IO_MODE_SUPP_Msk in set_espi_global_cap()
563 iobase->CAP1 = (iobase->CAP1 & (uint8_t)~msk) | (uint8_t)(cap & msk); in set_espi_global_cap()
[all …]
Dmec_tach.c165 uint32_t msk = 0; in mec_hal_tach_intr_enable() local
172 msk |= MEC_BIT(MEC_TACH_CTRL_ENOOL_Pos); in mec_hal_tach_intr_enable()
176 msk |= MEC_BIT(MEC_TACH_CTRL_CNTRDY_IEN_Pos); in mec_hal_tach_intr_enable()
180 msk |= MEC_BIT(MEC_TACH_CTRL_INTOG_IEN_Pos); in mec_hal_tach_intr_enable()
183 if (msk) { in mec_hal_tach_intr_enable()
185 regs->CTRL |= msk; in mec_hal_tach_intr_enable()
187 regs->CTRL &= (uint32_t)~msk; in mec_hal_tach_intr_enable()
Dmec_btimer.c153 uint32_t ctrl = 0, msk = 0; in mec_hal_btimer_reset() local
160 msk |= MEC_BTMR_CTRL_PRESCALE_Msk; in mec_hal_btimer_reset()
164 msk |= MEC_BTMR_CTRL_CNT_DIR_Msk; in mec_hal_btimer_reset()
171 if (msk) { in mec_hal_btimer_reset()
172 regs->CTRL = (regs->CTRL & (uint32_t)~msk) | (ctrl & msk); in mec_hal_btimer_reset()
273 uint32_t msk = (MEC_BIT(MEC_BTMR_CTRL_ENABLE_Pos) | MEC_BIT(MEC_BTMR_CTRL_START_Pos)); in mec_hal_btimer_is_started() local
275 if ((regs->CTRL & msk) == msk) { in mec_hal_btimer_is_started()
Dmec_espi_fc.c114 void mec_hal_espi_fc_intr_ctrl(struct mec_espi_io_regs *iobase, uint32_t msk, uint8_t en) in mec_hal_espi_fc_intr_ctrl() argument
122 if (msk & MEC_BIT(MEC_ESPI_FC_INTR_DONE_POS)) { in mec_hal_espi_fc_intr_ctrl()
125 if (msk & MEC_BIT(MEC_ESPI_FC_INTR_CHEN_CHG_POS)) { in mec_hal_espi_fc_intr_ctrl()
145 void mec_hal_espi_fc_status_clr(struct mec_espi_io_regs *iobase, uint32_t msk) in mec_hal_espi_fc_status_clr() argument
151 iobase->FCSTS = msk; in mec_hal_espi_fc_status_clr()
Dmec_espi_oob.h56 void mec_hal_espi_oob_girq_ctrl(uint8_t enable, uint8_t msk);
57 void mec_hal_espi_oob_girq_status_clr(uint8_t msk);
75 void mec_hal_espi_oob_intr_ctrl(struct mec_espi_io_regs *iobase, uint32_t msk, uint8_t en);
Dmec_espi_vw.c392 uint32_t isel = 0, msk = MEC_ESPI_VW_CTVW_SRC_ISELS_SRC0_IRQ_SEL_Msk; in mec_hal_espi_vw_ct_irq_sel_set() local
401 isel = vw_ct_ien_xlat_tbl[irq_sel] & msk; in mec_hal_espi_vw_ct_irq_sel_set()
403 msk <<= (src_idx * 8u); in mec_hal_espi_vw_ct_irq_sel_set()
405 ctvw->SRC_ISELS = (ctvw->SRC_ISELS & ~msk) | isel; in mec_hal_espi_vw_ct_irq_sel_set()
483 uint32_t msk = 0xfu << i; in mec_hal_espi_vwg_ct_config() local
489 r[1] = ((r[1] & ~msk) | ((uint32_t)vw_ct_ien_xlat_tbl[j] << (i * 8))); in mec_hal_espi_vwg_ct_config()
582 uint32_t msk = MEC_ESPI_VW_CTVW_SRC_ISELS_SRC0_IRQ_SEL_Msk << (src_idx * 8u); in mec_hal_espi_vw_ct_irqsel_set() local
583 uint32_t temp = ctvw->SRC_ISELS & ~msk; in mec_hal_espi_vw_ct_irqsel_set()
585 temp |= ((xlat_isel(irq_sel) << pos) & msk); in mec_hal_espi_vw_ct_irqsel_set()
628 uint32_t msk = MEC_ESPI_VW_CTVW_SRC_ISELS_SRC0_IRQ_SEL_Msk << (src_idx * 8u); in mec_hal_espi_vw_ct_config() local
[all …]
Dmec_kbc_api.h97 void mec_hal_kbc_status_wr(struct mec_kbc_regs *base, uint8_t val, uint8_t msk);
100 void mec_hal_kbc_status_set(struct mec_kbc_regs *base, uint8_t msk);
103 void mec_hal_kbc_status_clear(struct mec_kbc_regs *base, uint8_t msk);
Dmec_espi_fc.h74 void mec_hal_espi_fc_intr_ctrl(struct mec_espi_io_regs *iobase, uint32_t msk, uint8_t en);
76 void mec_hal_espi_fc_status_clr(struct mec_espi_io_regs *iobase, uint32_t msk);
Dmec_qspi.c544 uint32_t val = 0, msk = 0; in mec_hal_qspi_options() local
551 msk |= MEC_BIT(MEC_QSPI_MODE_ACTV_Pos); in mec_hal_qspi_options()
557 msk |= MEC_BIT(MEC_QSPI_MODE_TAFDMA_Pos); in mec_hal_qspi_options()
563 msk |= MEC_BIT(MEC_QSPI_MODE_RX_LDMA_Pos); in mec_hal_qspi_options()
569 msk |= MEC_BIT(MEC_QSPI_MODE_TX_LDMA_Pos); in mec_hal_qspi_options()
575 regs->MODE = (regs->MODE & ~msk) | (val & msk); in mec_hal_qspi_options()
640 int mec_hal_qspi_hw_status_clr(struct mec_qspi_regs *base, uint32_t msk) in mec_hal_qspi_hw_status_clr() argument
646 base->STATUS = msk; in mec_hal_qspi_hw_status_clr()
677 int mec_hal_qspi_intr_ctrl_msk(struct mec_qspi_regs *base, int enable, uint32_t msk) in mec_hal_qspi_intr_ctrl_msk() argument
684 base->INTR_CTRL |= msk; in mec_hal_qspi_intr_ctrl_msk()
[all …]
Dmec_espi_vw.h188 uint8_t val, uint8_t msk);
200 uint8_t val, uint8_t msk, uint32_t flags);
249 uint8_t msk; /* group mask, used with group API's */ member
Dmec_acpi_ec.c304 void mec_hal_acpi_ec_status_mask(struct mec_acpi_ec_regs *regs, uint8_t val, uint8_t msk) in mec_hal_acpi_ec_status_mask() argument
311 regs->AEC_STATUS = (regs->AEC_STATUS & ~msk) | (val & msk); in mec_hal_acpi_ec_status_mask()
Dmec_uart.c505 int mec_hal_uart_intr_mask(struct mec_uart_regs *base, uint8_t msk, uint8_t val) in mec_hal_uart_intr_mask() argument
513 base->IER = (base->IER & ~msk) | val; in mec_hal_uart_intr_mask()
619 uint8_t msk = (MEC_BIT(MEC_UART_LSR_THRE_Pos) | MEC_BIT(MEC_UART_LSR_THSE_Pos)); in mec_hal_uart_is_tx_empty() local
625 if ((base->LSR & msk) == msk) { in mec_hal_uart_is_tx_empty()
Dmec_qspi_api.h211 int mec_hal_qspi_hw_status_clr(struct mec_qspi_regs *base, uint32_t msk);
213 int mec_hal_qspi_intr_ctrl_msk(struct mec_qspi_regs *base, int enable, uint32_t msk);
Dmec_acpi_ec_api.h59 void mec_hal_acpi_ec_status_mask(struct mec_acpi_ec_regs *regs, uint8_t val, uint8_t msk);
Dmec_adc.c112 uint32_t msk = MEC_BIT(MEC_ADC_CTRL_RDONE_Pos) | MEC_BIT(MEC_ADC_CTRL_SDONE_Pos); in mec_hal_adc_activate() local
119 ctrl = regs->CTRL & ~msk; in mec_hal_adc_activate()
Dmec_uart_api.h160 int mec_hal_uart_intr_mask(struct mec_uart_regs *base, uint8_t msk, uint8_t val);