|
|
|
@ -131,6 +131,10 @@ static void ipa_dec_clients_disable_clks_on_wq(struct work_struct *work); |
|
|
|
|
static DECLARE_DELAYED_WORK(ipa_dec_clients_disable_clks_on_wq_work, |
|
|
|
|
ipa_dec_clients_disable_clks_on_wq); |
|
|
|
|
|
|
|
|
|
static void ipa_inc_clients_enable_clks_on_wq(struct work_struct *work); |
|
|
|
|
static DECLARE_WORK(ipa_inc_clients_enable_clks_on_wq_work, |
|
|
|
|
ipa_inc_clients_enable_clks_on_wq); |
|
|
|
|
|
|
|
|
|
static struct ipa3_plat_drv_res ipa3_res = {0, }; |
|
|
|
|
|
|
|
|
|
static struct clk *ipa3_clk; |
|
|
|
@ -4991,6 +4995,12 @@ void ipa3_disable_clks(void) |
|
|
|
|
|
|
|
|
|
IPADBG("disabling IPA clocks and bus voting\n"); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* We see a NoC error on GSI on this flag sequence. |
|
|
|
|
* Need to set this flag first before clock off. |
|
|
|
|
*/ |
|
|
|
|
atomic_set(&ipa3_ctx->ipa_clk_vote, 0); |
|
|
|
|
|
|
|
|
|
ipa3_ctx->ctrl->ipa3_disable_clks(); |
|
|
|
|
|
|
|
|
|
if (ipa3_ctx->use_ipa_pm) |
|
|
|
@ -4998,7 +5008,6 @@ void ipa3_disable_clks(void) |
|
|
|
|
|
|
|
|
|
if (msm_bus_scale_client_update_request(ipa3_ctx->ipa_bus_hdl, 0)) |
|
|
|
|
WARN(1, "bus scaling failed"); |
|
|
|
|
atomic_set(&ipa3_ctx->ipa_clk_vote, 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -5180,6 +5189,12 @@ void ipa3_inc_client_enable_clks(struct ipa_active_client_logging_info *id) |
|
|
|
|
mutex_unlock(&ipa3_ctx->ipa3_active_clients.mutex); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void ipa3_handle_gsi_differ_irq(void) |
|
|
|
|
{ |
|
|
|
|
queue_work(ipa3_ctx->power_mgmt_wq, |
|
|
|
|
&ipa_inc_clients_enable_clks_on_wq_work); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ipa3_active_clks_status() - update the current msm bus clock vote |
|
|
|
|
* status |
|
|
|
@ -5284,6 +5299,13 @@ static void ipa_dec_clients_disable_clks_on_wq(struct work_struct *work) |
|
|
|
|
__ipa3_dec_client_disable_clks(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void ipa_inc_clients_enable_clks_on_wq(struct work_struct *work) |
|
|
|
|
{ |
|
|
|
|
ipa3_enable_clks(); |
|
|
|
|
IPAERR("unexpected clk access, clock on IPA to save reg"); |
|
|
|
|
ipa_assert(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ipa3_dec_client_disable_clks_no_block() - Decrease active clients counter |
|
|
|
|
* if possible without blocking. If this is the last client then the desrease |
|
|
|
@ -6127,6 +6149,7 @@ static int ipa3_post_init(const struct ipa3_plat_drv_res *resource_p, |
|
|
|
|
gsi_props.req_clk_cb = NULL; |
|
|
|
|
gsi_props.rel_clk_cb = NULL; |
|
|
|
|
gsi_props.clk_status_cb = ipa3_active_clks_status; |
|
|
|
|
gsi_props.enable_clk_bug_on = ipa3_handle_gsi_differ_irq; |
|
|
|
|
|
|
|
|
|
if (ipa3_ctx->ipa_config_is_mhi) { |
|
|
|
|
gsi_props.mhi_er_id_limits_valid = true; |
|
|
|
|