Lines Matching refs:pcr1

128 	uint32_t pcr1 = 0u, pcr1_new = 0u;  in gpio_xec_configure()  local
145 pcr1 = sys_read32(pcr1_addr); in gpio_xec_configure()
148 if (MCHP_GPIO_CTRL_MUX_GET(pcr1) != MCHP_GPIO_CTRL_MUX_F0) { in gpio_xec_configure()
150 (uint32_t)pcr1_addr, pcr1); in gpio_xec_configure()
154 pcr1 = (pcr1 & ~MCHP_GPIO_CTRL_PWRG_MASK) | MCHP_GPIO_CTRL_PWRG_OFF; in gpio_xec_configure()
155 sys_write32(pcr1, pcr1_addr); in gpio_xec_configure()
163 if (pcr1 & BIT(MCHP_GPIO_CTRL_INPAD_DIS_POS)) { in gpio_xec_configure()
164 pcr1 &= ~BIT(MCHP_GPIO_CTRL_INPAD_DIS_POS); in gpio_xec_configure()
165 sys_write32(pcr1, pcr1_addr); in gpio_xec_configure()
176 if ((pcr1 & MCHP_GPIO_CTRL_PWRG_MASK) == MCHP_GPIO_CTRL_PWRG_OFF) { in gpio_xec_configure()
177 pcr1 &= ~(MCHP_GPIO_CTRL_PWRG_MASK); in gpio_xec_configure()
178 pcr1 |= MCHP_GPIO_CTRL_PWRG_VTR_IO; in gpio_xec_configure()
179 sys_write32(pcr1, pcr1_addr); in gpio_xec_configure()
181 pcr1 = sys_read32(pcr1_addr); in gpio_xec_configure()
182 if (pcr1 & BIT(MCHP_GPIO_CTRL_INPAD_VAL_POS)) { in gpio_xec_configure()
208 pcr1 = (pcr1 & ~msk) | (pcr1_new & msk); in gpio_xec_configure()
209 sys_write32(pcr1, pcr1_addr); /* configuration. may generate a single edge */ in gpio_xec_configure()
211 sys_write32(pcr1 | BIT(MCHP_GPIO_CTRL_AOD_POS), pcr1_addr); in gpio_xec_configure()
268 uint32_t pcr1 = 0u; in gpio_xec_pin_interrupt_configure() local
291 pcr1 = sys_read32(pcr1_addr); in gpio_xec_pin_interrupt_configure()
293 pcr1 &= ~BIT(MCHP_GPIO_CTRL_INPAD_DIS_POS); in gpio_xec_pin_interrupt_configure()
295 if ((pcr1 & MCHP_GPIO_CTRL_IDET_MASK) == pcr1_req) { in gpio_xec_pin_interrupt_configure()
300 pcr1 &= ~MCHP_GPIO_CTRL_IDET_MASK; in gpio_xec_pin_interrupt_configure()
304 pcr1 |= MCHP_GPIO_CTRL_IDET_LVL_HI; in gpio_xec_pin_interrupt_configure()
306 pcr1 |= MCHP_GPIO_CTRL_IDET_LVL_LO; in gpio_xec_pin_interrupt_configure()
310 pcr1 |= MCHP_GPIO_CTRL_IDET_FEDGE; in gpio_xec_pin_interrupt_configure()
312 pcr1 |= MCHP_GPIO_CTRL_IDET_REDGE; in gpio_xec_pin_interrupt_configure()
314 pcr1 |= MCHP_GPIO_CTRL_IDET_BEDGE; in gpio_xec_pin_interrupt_configure()
317 pcr1 |= MCHP_GPIO_CTRL_IDET_DISABLE; in gpio_xec_pin_interrupt_configure()
320 sys_write32(pcr1, pcr1_addr); in gpio_xec_pin_interrupt_configure()
410 uint32_t pcr1 = sys_read32(pcr1_addr); in gpio_xec_get_direction() local
412 if (!((pcr1 & MCHP_GPIO_CTRL_PWRG_MASK) == MCHP_GPIO_CTRL_PWRG_OFF)) { in gpio_xec_get_direction()
413 if (outputs && (pcr1 & BIT(MCHP_GPIO_CTRL_DIR_POS))) { in gpio_xec_get_direction()
415 } else if (inputs && !(pcr1 & BIT(MCHP_GPIO_CTRL_INPAD_DIS_POS))) { in gpio_xec_get_direction()
444 uint32_t pcr1 = sys_read32(pcr1_addr); in gpio_xec_get_config() local
447 if (pcr1 & BIT(MCHP_GPIO_CTRL_DIR_POS)) { in gpio_xec_get_config()
449 if (pcr1 & BIT(MCHP_GPIO_CTRL_OUTVAL_POS)) { in gpio_xec_get_config()
455 if (pcr1 & BIT(MCHP_GPIO_CTRL_BUFT_POS)) { in gpio_xec_get_config()
458 } else if (!(pcr1 & BIT(MCHP_GPIO_CTRL_INPAD_DIS_POS))) { in gpio_xec_get_config()