qcacmn: Manage driver load target sleep state in hif

The target awake durring driver load feature should be isolated
to hif.

Change-Id: I89de39cc3632f9cc54d1fe5544da8b0bf250206d
CRs-Fixed: 986480
This commit is contained in:
Houston Hoffman
2016-03-14 21:11:46 -07:00
committed by Vishwajith Upendra
parent fb7d612980
commit b861cb3837
4 changed files with 7 additions and 30 deletions

View File

@@ -142,22 +142,6 @@ A_target_id_t hif_get_target_id(struct hif_softc *scn)
return scn->mem; return scn->mem;
} }
/**
* hif_set_target_sleep(): hif_set_target_sleep
* @scn: scn
* @sleep_ok: sleep_ok
* @wait_for_it: wait
*
* Return: void
*/
void hif_set_target_sleep(struct hif_opaque_softc *hif_ctx,
bool sleep_ok, bool wait_for_it)
{
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
hif_target_sleep_state_adjust(scn,
sleep_ok, wait_for_it);
}
/** /**
* hif_target_forced_awake(): hif_target_forced_awake * hif_target_forced_awake(): hif_target_forced_awake
* @scn: scn * @scn: scn

View File

@@ -1205,6 +1205,13 @@ void hif_enable_power_management(struct hif_opaque_softc *hif_ctx,
if (!is_packet_log_enabled) if (!is_packet_log_enabled)
hif_enable_power_gating(hif_ctx); hif_enable_power_gating(hif_ctx);
if (!CONFIG_ATH_PCIE_MAX_PERF &&
CONFIG_ATH_PCIE_AWAKE_WHILE_DRIVER_LOAD) {
if (hif_target_sleep_state_adjust(hif_sc, true, false) < 0)
HIF_ERROR("%s, failed to set target to sleep",
__func__);
}
} }
/** /**

View File

@@ -828,19 +828,6 @@ void *htc_get_targetdef(HTC_HANDLE htc_handle)
return hif_get_targetdef(target->hif_dev); return hif_get_targetdef(target->hif_dev);
} }
/**
* htc_set_target_to_sleep() - set target to sleep
* @context: hif_opaque_softc context
*
* Return: none
*/
void htc_set_target_to_sleep(void *context)
{
struct hif_opaque_softc *scn = (struct hif_opaque_softc *)context;
hif_set_target_sleep(scn, true, false);
}
/** /**
* htc_cancel_deferred_target_sleep() - cancel deferred target sleep * htc_cancel_deferred_target_sleep() - cancel deferred target sleep
* @context: hif_opaque_softc context * @context: hif_opaque_softc context

View File

@@ -703,7 +703,6 @@ do { \
void htc_get_control_endpoint_tx_host_credits(HTC_HANDLE HTCHandle, int *credit); void htc_get_control_endpoint_tx_host_credits(HTC_HANDLE HTCHandle, int *credit);
void htc_dump_counter_info(HTC_HANDLE HTCHandle); void htc_dump_counter_info(HTC_HANDLE HTCHandle);
void *htc_get_targetdef(HTC_HANDLE htc_handle); void *htc_get_targetdef(HTC_HANDLE htc_handle);
void htc_set_target_to_sleep(void *context);
void htc_cancel_deferred_target_sleep(void *context); void htc_cancel_deferred_target_sleep(void *context);
int htc_runtime_suspend(void); int htc_runtime_suspend(void);
int htc_runtime_resume(void); int htc_runtime_resume(void);