Lines Matching refs:bits

262 	uint32_t bits;  in can_stm32fd_read_reg()  local
270 err = can_mcan_sys_read_reg(stm32fd_config->base, remap, &bits); in can_stm32fd_read_reg()
283 *val |= ((bits & GENMASK(23, 16)) << 6); in can_stm32fd_read_reg()
286 *val |= ((bits & GENMASK(15, 11)) << 3); in can_stm32fd_read_reg()
289 *val |= ((bits & GENMASK(10, 4)) << 2); in can_stm32fd_read_reg()
292 *val |= ((bits & GENMASK(3, 1)) << 1); in can_stm32fd_read_reg()
295 *val |= ((bits & GENMASK(0, 0)) << 0); in can_stm32fd_read_reg()
299 if ((bits & CAN_STM32FD_ILS_RXFIFO1) != 0U) { in can_stm32fd_read_reg()
303 if ((bits & CAN_STM32FD_ILS_RXFIFO0) != 0U) { in can_stm32fd_read_reg()
309 *val = bits & (CAN_MCAN_GFC_ANFS | CAN_MCAN_GFC_ANFE | in can_stm32fd_read_reg()
314 *val = bits; in can_stm32fd_read_reg()
325 uint32_t bits = 0U; in can_stm32fd_write_reg() local
339 bits |= ((val & GENMASK(29, 22)) >> 6); in can_stm32fd_write_reg()
342 bits |= ((val & GENMASK(18, 14)) >> 3); in can_stm32fd_write_reg()
345 bits |= ((val & GENMASK(12, 6)) >> 2); in can_stm32fd_write_reg()
348 bits |= ((val & GENMASK(4, 2)) >> 1); in can_stm32fd_write_reg()
351 bits |= ((val & GENMASK(0, 0)) >> 0); in can_stm32fd_write_reg()
356 bits |= CAN_STM32FD_ILS_RXFIFO1; in can_stm32fd_write_reg()
360 bits |= CAN_STM32FD_ILS_RXFIFO0; in can_stm32fd_write_reg()
365 bits |= FIELD_PREP(CAN_STM32FD_RXGFC_LSS, CONFIG_CAN_MAX_STD_ID_FILTER) | in can_stm32fd_write_reg()
367 bits |= val & (CAN_MCAN_GFC_ANFS | CAN_MCAN_GFC_ANFE | in can_stm32fd_write_reg()
372 bits = val; in can_stm32fd_write_reg()
376 return can_mcan_sys_write_reg(stm32fd_config->base, remap, bits); in can_stm32fd_write_reg()