Lines Matching refs:corepll_res
406 u64 (*calculate_freq)(struct mlxbf_i2c_resource *corepll_res);
1347 struct mlxbf_i2c_resource *corepll_res; in mlxbf_i2c_get_corepll() local
1352 corepll_res = mlxbf_i2c_get_shared_resource(priv, in mlxbf_i2c_get_corepll()
1354 if (!corepll_res) in mlxbf_i2c_get_corepll()
1362 lockdep_assert_held(corepll_res->lock); in mlxbf_i2c_get_corepll()
1365 if (corepll_res->io) in mlxbf_i2c_get_corepll()
1368 params = corepll_res->params; in mlxbf_i2c_get_corepll()
1374 corepll_res->io = devm_ioremap(dev, params->start, size); in mlxbf_i2c_get_corepll()
1375 if (!corepll_res->io) { in mlxbf_i2c_get_corepll()
1386 struct mlxbf_i2c_resource *corepll_res; in mlxbf_i2c_release_corepll() local
1390 corepll_res = mlxbf_i2c_get_shared_resource(priv, in mlxbf_i2c_release_corepll()
1393 mutex_lock(corepll_res->lock); in mlxbf_i2c_release_corepll()
1395 if (corepll_res->io) { in mlxbf_i2c_release_corepll()
1397 params = corepll_res->params; in mlxbf_i2c_release_corepll()
1398 devm_iounmap(dev, corepll_res->io); in mlxbf_i2c_release_corepll()
1403 mutex_unlock(corepll_res->lock); in mlxbf_i2c_release_corepll()
1465 static u64 mlxbf_i2c_calculate_freq_from_tyu(struct mlxbf_i2c_resource *corepll_res) in mlxbf_i2c_calculate_freq_from_tyu() argument
1472 corepll_val = readl(corepll_res->io + MLXBF_I2C_CORE_PLL_REG1); in mlxbf_i2c_calculate_freq_from_tyu()
1495 static u64 mlxbf_i2c_calculate_freq_from_yu(struct mlxbf_i2c_resource *corepll_res) in mlxbf_i2c_calculate_freq_from_yu() argument
1502 corepll_reg1_val = readl(corepll_res->io + MLXBF_I2C_CORE_PLL_REG1); in mlxbf_i2c_calculate_freq_from_yu()
1503 corepll_reg2_val = readl(corepll_res->io + MLXBF_I2C_CORE_PLL_REG2); in mlxbf_i2c_calculate_freq_from_yu()
1530 struct mlxbf_i2c_resource *corepll_res; in mlxbf_i2c_calculate_corepll_freq() local
1535 corepll_res = mlxbf_i2c_get_shared_resource(priv, in mlxbf_i2c_calculate_corepll_freq()
1537 if (!corepll_res) in mlxbf_i2c_calculate_corepll_freq()
1548 mutex_lock(corepll_res->lock); in mlxbf_i2c_calculate_corepll_freq()
1551 mutex_unlock(corepll_res->lock); in mlxbf_i2c_calculate_corepll_freq()
1558 mutex_unlock(corepll_res->lock); in mlxbf_i2c_calculate_corepll_freq()
1562 mlxbf_i2c_corepll_frequency = chip->calculate_freq(corepll_res); in mlxbf_i2c_calculate_corepll_freq()
1564 mutex_unlock(corepll_res->lock); in mlxbf_i2c_calculate_corepll_freq()