Lines Matching full:osc

125 mcp251xfd_get_osc_str(const u32 osc, const u32 osc_reference)  in mcp251xfd_get_osc_str()  argument
127 switch (~osc & osc_reference & in mcp251xfd_get_osc_str()
232 u32 con = 0, con_reqop, osc = 0; in __mcp251xfd_chip_set_mode() local
267 regmap_read(priv->map_reg, MCP251XFD_REG_OSC, &osc); in __mcp251xfd_chip_set_mode()
271 "Failed to read CAN Control Register (con=0x%08x, osc=0x%08x).\n", in __mcp251xfd_chip_set_mode()
272 con, osc); in __mcp251xfd_chip_set_mode()
279 …"Controller failed to enter mode %s Mode (%u) and stays in %s Mode (%u) (con=0x%08x, osc=0x%08x).\… in __mcp251xfd_chip_set_mode()
282 con, osc); in __mcp251xfd_chip_set_mode()
305 u32 osc; in mcp251xfd_chip_wait_for_osc_ready() local
308 err = regmap_read_poll_timeout(priv->map_reg, MCP251XFD_REG_OSC, osc, in mcp251xfd_chip_wait_for_osc_ready()
309 !mcp251xfd_reg_invalid(osc) && in mcp251xfd_chip_wait_for_osc_ready()
310 (osc & osc_mask) == osc_reference, in mcp251xfd_chip_wait_for_osc_ready()
316 if (mcp251xfd_reg_invalid(osc)) { in mcp251xfd_chip_wait_for_osc_ready()
318 "Failed to read Oscillator Configuration Register (osc=0x%08x).\n", in mcp251xfd_chip_wait_for_osc_ready()
319 osc); in mcp251xfd_chip_wait_for_osc_ready()
324 "Timeout waiting for %s ready (osc=0x%08x, osc_reference=0x%08x, osc_mask=0x%08x).\n", in mcp251xfd_chip_wait_for_osc_ready()
325 mcp251xfd_get_osc_str(osc, osc_reference), in mcp251xfd_chip_wait_for_osc_ready()
326 osc, osc_reference, osc_mask); in mcp251xfd_chip_wait_for_osc_ready()
333 u32 osc, osc_reference, osc_mask; in mcp251xfd_chip_wake() local
342 osc = FIELD_PREP(MCP251XFD_REG_OSC_CLKODIV_MASK, in mcp251xfd_chip_wake()
356 err = regmap_write(priv->map_reg, MCP251XFD_REG_OSC, osc); in mcp251xfd_chip_wake()
361 * sets the OSC Ready bit, and we get an -ETIMEDOUT. Our in mcp251xfd_chip_wake()
370 u32 osc; in mcp251xfd_chip_sleep() local
374 osc = FIELD_PREP(MCP251XFD_REG_OSC_CLKODIV_MASK, in mcp251xfd_chip_sleep()
376 err = regmap_write(priv->map_reg, MCP251XFD_REG_OSC, osc); in mcp251xfd_chip_sleep()
413 /* Check for reset defaults of OSC reg. in mcp251xfd_chip_softreset_check()
467 u32 osc, osc_reference, osc_mask; in mcp251xfd_chip_clock_init() local
474 osc = MCP251XFD_REG_OSC_LPMEN | in mcp251xfd_chip_clock_init()
481 osc |= MCP251XFD_REG_OSC_PLLEN; in mcp251xfd_chip_clock_init()
485 err = regmap_write(priv->map_reg, MCP251XFD_REG_OSC, osc); in mcp251xfd_chip_clock_init()
1713 u32 osc; in mcp251xfd_register_chip_detect() local
1725 err = regmap_read(priv->map_reg, MCP251XFD_REG_OSC, &osc); in mcp251xfd_register_chip_detect()
1729 if (osc & MCP251XFD_REG_OSC_LPMEN) { in mcp251xfd_register_chip_detect()