mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
soc: rockchip: opp_select: Implement rockchip_opp_is_use_pvtpll
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com> Change-Id: I212c2ea1edba84228010fd2398cadc884bfd7560
This commit is contained in:
@@ -2399,7 +2399,7 @@ int rockchip_opp_config_clks(struct device *dev, struct opp_table *opp_table,
|
||||
unsigned long *target = data;
|
||||
int ret;
|
||||
|
||||
if (info->is_scmi_clk && !info->is_runtime_active)
|
||||
if (rockchip_opp_is_use_pvtpll(info) && !info->is_runtime_active)
|
||||
return 0;
|
||||
|
||||
ret = clk_bulk_prepare_enable(info->nclocks, info->clocks);
|
||||
@@ -2480,7 +2480,7 @@ int rockchip_opp_check_rate_volt(struct device *dev, struct rockchip_opp_info *i
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (info->is_scmi_clk && !info->is_runtime_active)
|
||||
if (rockchip_opp_is_use_pvtpll(info) && !info->is_runtime_active)
|
||||
is_set_clk = false;
|
||||
if (info->data && info->data->set_read_margin && info->is_runtime_active)
|
||||
is_set_rm = true;
|
||||
|
||||
@@ -44,6 +44,7 @@ struct volt_rm_table {
|
||||
struct rockchip_opp_data {
|
||||
config_clks_t config_clks;
|
||||
config_regulators_t config_regulators;
|
||||
bool is_use_pvtpll;
|
||||
|
||||
int (*get_soc_info)(struct device *dev, struct device_node *np,
|
||||
int *bin, int *process);
|
||||
@@ -143,6 +144,11 @@ struct rockchip_opp_info {
|
||||
bool pvtpll_low_temp;
|
||||
};
|
||||
|
||||
static inline bool rockchip_opp_is_use_pvtpll(struct rockchip_opp_info *info)
|
||||
{
|
||||
return (info->is_scmi_clk || (info->data && info->data->is_use_pvtpll));
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_ROCKCHIP_OPP)
|
||||
int rockchip_of_get_leakage(struct device *dev, char *lkg_name, int *leakage);
|
||||
int rockchip_nvmem_cell_read_u8(struct device_node *np, const char *cell_id,
|
||||
|
||||
Reference in New Issue
Block a user