Lines Matching refs:hcnt
522 u8 hcnt, lcnt; in dw_i3c_clk_cfg() local
530 hcnt = DIV_ROUND_UP(I3C_BUS_THIGH_MAX_NS, core_period) - 1; in dw_i3c_clk_cfg()
531 if (hcnt < SCL_I3C_TIMING_CNT_MIN) in dw_i3c_clk_cfg()
532 hcnt = SCL_I3C_TIMING_CNT_MIN; in dw_i3c_clk_cfg()
534 lcnt = DIV_ROUND_UP(core_rate, I3C_BUS_TYP_I3C_SCL_RATE) - hcnt; in dw_i3c_clk_cfg()
538 scl_timing = SCL_I3C_TIMING_HCNT(hcnt) | SCL_I3C_TIMING_LCNT(lcnt); in dw_i3c_clk_cfg()
545 scl_timing = SCL_I3C_TIMING_HCNT(hcnt) | SCL_I3C_TIMING_LCNT(lcnt); in dw_i3c_clk_cfg()
548 lcnt = DIV_ROUND_UP(core_rate, I3C_BUS_SDR1_SCL_RATE) - hcnt; in dw_i3c_clk_cfg()
550 lcnt = DIV_ROUND_UP(core_rate, I3C_BUS_SDR2_SCL_RATE) - hcnt; in dw_i3c_clk_cfg()
552 lcnt = DIV_ROUND_UP(core_rate, I3C_BUS_SDR3_SCL_RATE) - hcnt; in dw_i3c_clk_cfg()
554 lcnt = DIV_ROUND_UP(core_rate, I3C_BUS_SDR4_SCL_RATE) - hcnt; in dw_i3c_clk_cfg()
564 u16 hcnt, lcnt; in dw_i2c_clk_cfg() local
574 hcnt = DIV_ROUND_UP(core_rate, I3C_BUS_I2C_FM_PLUS_SCL_RATE) - lcnt; in dw_i2c_clk_cfg()
575 scl_timing = SCL_I2C_FMP_TIMING_HCNT(hcnt) | in dw_i2c_clk_cfg()
580 hcnt = DIV_ROUND_UP(core_rate, I3C_BUS_I2C_FM_SCL_RATE) - lcnt; in dw_i2c_clk_cfg()
581 scl_timing = SCL_I2C_FM_TIMING_HCNT(hcnt) | in dw_i2c_clk_cfg()