static bool is_hw_busy(struct engine *engine) { uint32_t i2c_sw_status = 0; uint32_t value = dal_read_reg(engine->ctx, mmDC_I2C_SW_STATUS); i2c_sw_status = get_reg_field_value( value, DC_I2C_SW_STATUS, DC_I2C_SW_STATUS); if (i2c_sw_status == DC_I2C_STATUS__DC_I2C_STATUS_IDLE) return false; reset_hw_engine(engine); value = dal_read_reg(engine->ctx, mmDC_I2C_SW_STATUS); i2c_sw_status = get_reg_field_value( value, DC_I2C_SW_STATUS, DC_I2C_SW_STATUS); return i2c_sw_status != DC_I2C_STATUS__DC_I2C_STATUS_IDLE; }
static bool is_hw_busy(struct dce_i2c_hw *dce_i2c_hw) { uint32_t i2c_sw_status = 0; REG_GET(DC_I2C_SW_STATUS, DC_I2C_SW_STATUS, &i2c_sw_status); if (i2c_sw_status == DC_I2C_STATUS__DC_I2C_STATUS_IDLE) return false; reset_hw_engine(dce_i2c_hw); REG_GET(DC_I2C_SW_STATUS, DC_I2C_SW_STATUS, &i2c_sw_status); return i2c_sw_status != DC_I2C_STATUS__DC_I2C_STATUS_IDLE; }
static bool is_hw_busy(struct engine *engine) { struct i2c_hw_engine_dce110 *hw_engine = FROM_ENGINE(engine); uint32_t i2c_sw_status = 0; REG_GET(DC_I2C_SW_STATUS, DC_I2C_SW_STATUS, &i2c_sw_status); if (i2c_sw_status == DC_I2C_STATUS__DC_I2C_STATUS_IDLE) return false; reset_hw_engine(engine); REG_GET(DC_I2C_SW_STATUS, DC_I2C_SW_STATUS, &i2c_sw_status); return i2c_sw_status != DC_I2C_STATUS__DC_I2C_STATUS_IDLE; }