Lines Matching full:tmp
292 uint32_t tmp; in mcp251xfd_set_tdc() local
298 tmp = FIELD_PREP(MCP251XFD_REG_TDC_TDCMOD_MASK, MCP251XFD_REG_TDC_TDCMOD_AUTO); in mcp251xfd_set_tdc()
299 tmp |= FIELD_PREP(MCP251XFD_REG_TDC_TDCO_MASK, dev_data->tdco); in mcp251xfd_set_tdc()
301 tmp = FIELD_PREP(MCP251XFD_REG_TDC_TDCMOD_MASK, MCP251XFD_REG_TDC_TDCMOD_DISABLED); in mcp251xfd_set_tdc()
304 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_set_tdc()
409 uint32_t tmp; in mcp251xfd_set_timing() local
423 tmp = FIELD_PREP(MCP251XFD_REG_NBTCFG_BRP_MASK, timing->prescaler - 1); in mcp251xfd_set_timing()
424 tmp |= FIELD_PREP(MCP251XFD_REG_NBTCFG_TSEG1_MASK, in mcp251xfd_set_timing()
426 tmp |= FIELD_PREP(MCP251XFD_REG_NBTCFG_TSEG2_MASK, timing->phase_seg2 - 1); in mcp251xfd_set_timing()
427 tmp |= FIELD_PREP(MCP251XFD_REG_NBTCFG_SJW_MASK, timing->sjw - 1); in mcp251xfd_set_timing()
428 *reg = tmp; in mcp251xfd_set_timing()
446 uint32_t tmp; in mcp251xfd_set_timing_data() local
461 tmp = FIELD_PREP(MCP251XFD_REG_DBTCFG_BRP_MASK, timing->prescaler - 1); in mcp251xfd_set_timing_data()
462 tmp |= FIELD_PREP(MCP251XFD_REG_DBTCFG_TSEG1_MASK, in mcp251xfd_set_timing_data()
464 tmp |= FIELD_PREP(MCP251XFD_REG_DBTCFG_TSEG2_MASK, timing->phase_seg2 - 1); in mcp251xfd_set_timing_data()
465 tmp |= FIELD_PREP(MCP251XFD_REG_DBTCFG_SJW_MASK, timing->sjw - 1); in mcp251xfd_set_timing_data()
467 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_set_timing_data()
552 uint32_t tmp; in mcp251xfd_add_rx_filter() local
573 tmp = FIELD_PREP(MCP251XFD_REG_FLTOBJ_SID_MASK, filter->id >> 18); in mcp251xfd_add_rx_filter()
574 tmp |= FIELD_PREP(MCP251XFD_REG_FLTOBJ_EID_MASK, filter->id); in mcp251xfd_add_rx_filter()
575 tmp |= MCP251XFD_REG_FLTOBJ_EXIDE; in mcp251xfd_add_rx_filter()
577 tmp = FIELD_PREP(MCP251XFD_REG_FLTOBJ_SID_MASK, filter->id); in mcp251xfd_add_rx_filter()
580 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_add_rx_filter()
589 tmp = FIELD_PREP(MCP251XFD_REG_MASK_MSID_MASK, filter->mask >> 18); in mcp251xfd_add_rx_filter()
590 tmp |= FIELD_PREP(MCP251XFD_REG_MASK_MEID_MASK, filter->mask); in mcp251xfd_add_rx_filter()
592 tmp = FIELD_PREP(MCP251XFD_REG_MASK_MSID_MASK, filter->mask); in mcp251xfd_add_rx_filter()
594 tmp |= MCP251XFD_REG_MASK_MIDE; in mcp251xfd_add_rx_filter()
596 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_add_rx_filter()
676 uint32_t tmp; in mcp251xfd_get_state() local
687 tmp = sys_le32_to_cpu(*reg); in mcp251xfd_get_state()
690 err_cnt->tx_err_cnt = FIELD_GET(MCP251XFD_REG_TREC_TEC_MASK, tmp); in mcp251xfd_get_state()
691 err_cnt->rx_err_cnt = FIELD_GET(MCP251XFD_REG_TREC_REC_MASK, tmp); in mcp251xfd_get_state()
703 if ((tmp & MCP251XFD_REG_TREC_TXBO) != 0) { in mcp251xfd_get_state()
705 } else if ((tmp & MCP251XFD_REG_TREC_TXBP) != 0) { in mcp251xfd_get_state()
707 } else if ((tmp & MCP251XFD_REG_TREC_RXBP) != 0) { in mcp251xfd_get_state()
709 } else if ((tmp & MCP251XFD_REG_TREC_TXWARN) != 0) { in mcp251xfd_get_state()
711 } else if ((tmp & MCP251XFD_REG_TREC_RXWARN) != 0) { in mcp251xfd_get_state()
955 uint32_t tmp; in mcp251xfd_handle_ivmif() local
965 tmp = sys_le32_to_cpu(*reg); in mcp251xfd_handle_ivmif()
967 if ((tmp & MCP251XFD_REG_BDIAG1_TXBOERR) != 0) { in mcp251xfd_handle_ivmif()
981 if ((tmp & MCP251XFD_REG_BDIAG1_NACKERR) != 0) { in mcp251xfd_handle_ivmif()
985 if ((tmp & (MCP251XFD_REG_BDIAG1_NBIT0ERR | MCP251XFD_REG_BDIAG1_DBIT0ERR)) != 0) { in mcp251xfd_handle_ivmif()
989 if ((tmp & (MCP251XFD_REG_BDIAG1_NBIT1ERR | MCP251XFD_REG_BDIAG1_DBIT1ERR)) != 0) { in mcp251xfd_handle_ivmif()
993 if ((tmp & (MCP251XFD_REG_BDIAG1_NCRCERR | MCP251XFD_REG_BDIAG1_DCRCERR)) != 0) { in mcp251xfd_handle_ivmif()
997 if ((tmp & (MCP251XFD_REG_BDIAG1_NFORMERR | MCP251XFD_REG_BDIAG1_DFORMERR)) != 0) { in mcp251xfd_handle_ivmif()
1001 if ((tmp & (MCP251XFD_REG_BDIAG1_NSTUFERR | MCP251XFD_REG_BDIAG1_DSTUFERR)) != 0) { in mcp251xfd_handle_ivmif()
1338 uint32_t tmp; in mcp251xfd_init_con_reg() local
1341 tmp = MCP251XFD_REG_CON_ISOCRCEN | MCP251XFD_REG_CON_WAKFIL | MCP251XFD_REG_CON_TXQEN | in mcp251xfd_init_con_reg()
1343 tmp |= FIELD_PREP(MCP251XFD_REG_CON_WFT_MASK, MCP251XFD_REG_CON_WFT_T11FILTER) | in mcp251xfd_init_con_reg()
1345 *reg = tmp; in mcp251xfd_init_con_reg()
1356 uint32_t tmp; in mcp251xfd_init_osc_reg() local
1358 tmp = FIELD_PREP(MCP251XFD_REG_OSC_CLKODIV_MASK, dev_cfg->clko_div); in mcp251xfd_init_osc_reg()
1360 tmp |= MCP251XFD_REG_OSC_PLLEN; in mcp251xfd_init_osc_reg()
1364 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_init_osc_reg()
1380 uint32_t tmp; in mcp251xfd_init_iocon_reg() local
1390 tmp = MCP251XFD_REG_IOCON_TRIS0 | MCP251XFD_REG_IOCON_TRIS1 | MCP251XFD_REG_IOCON_PM0 | in mcp251xfd_init_iocon_reg()
1394 tmp |= MCP251XFD_REG_IOCON_SOF; in mcp251xfd_init_iocon_reg()
1397 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_init_iocon_reg()
1405 uint32_t tmp; in mcp251xfd_init_int_reg() local
1407 tmp = MCP251XFD_REG_INT_RXIE | MCP251XFD_REG_INT_MODIE | MCP251XFD_REG_INT_TEFIE | in mcp251xfd_init_int_reg()
1410 tmp |= MCP251XFD_REG_INT_RXOVIE; in mcp251xfd_init_int_reg()
1413 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_init_int_reg()
1421 uint32_t tmp; in mcp251xfd_init_tef_fifo() local
1423 tmp = MCP251XFD_REG_TEFCON_TEFNEIE | MCP251XFD_REG_TEFCON_FRESET; in mcp251xfd_init_tef_fifo()
1424 tmp |= FIELD_PREP(MCP251XFD_REG_TEFCON_FSIZE_MASK, MCP251XFD_TX_QUEUE_ITEMS - 1); in mcp251xfd_init_tef_fifo()
1426 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_init_tef_fifo()
1434 uint32_t tmp; in mcp251xfd_init_tx_queue() local
1436 tmp = MCP251XFD_REG_TXQCON_TXEN | MCP251XFD_REG_TXQCON_FRESET; in mcp251xfd_init_tx_queue()
1437 tmp |= FIELD_PREP(MCP251XFD_REG_TXQCON_TXAT_MASK, MCP251XFD_REG_TXQCON_TXAT_UNLIMITED); in mcp251xfd_init_tx_queue()
1438 tmp |= FIELD_PREP(MCP251XFD_REG_TXQCON_FSIZE_MASK, MCP251XFD_TX_QUEUE_ITEMS - 1); in mcp251xfd_init_tx_queue()
1439 tmp |= FIELD_PREP(MCP251XFD_REG_TXQCON_PLSIZE_MASK, in mcp251xfd_init_tx_queue()
1442 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_init_tx_queue()
1450 uint32_t tmp; in mcp251xfd_init_rx_fifo() local
1452 tmp = MCP251XFD_REG_FIFOCON_TFNRFNIE | MCP251XFD_REG_FIFOCON_FRESET; in mcp251xfd_init_rx_fifo()
1454 tmp |= MCP251XFD_REG_FIFOCON_RXOVIE; in mcp251xfd_init_rx_fifo()
1456 tmp |= FIELD_PREP(MCP251XFD_REG_FIFOCON_FSIZE_MASK, MCP251XFD_RX_FIFO_ITEMS - 1); in mcp251xfd_init_rx_fifo()
1457 tmp |= FIELD_PREP(MCP251XFD_REG_FIFOCON_PLSIZE_MASK, in mcp251xfd_init_rx_fifo()
1460 tmp |= MCP251XFD_REG_FIFOCON_RXTSEN; in mcp251xfd_init_rx_fifo()
1463 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_init_rx_fifo()
1474 uint32_t tmp; in mcp251xfd_init_tscon() local
1476 tmp = MCP251XFD_REG_TSCON_TBCEN; in mcp251xfd_init_tscon()
1477 tmp |= FIELD_PREP(MCP251XFD_REG_TSCON_TBCPRE_MASK, in mcp251xfd_init_tscon()
1480 *reg = sys_cpu_to_le32(tmp); in mcp251xfd_init_tscon()