qcacmn: Unify A_TARGET_ACCESS_LIKELY

Sleep state adjust has been added the the bus_ops table and the
macros using it can be unified.

Change-Id: Ib788800c83457919ae7eee01f6687cbb57c84a4b
CRs-Fixed: 986480
This commit is contained in:
Houston Hoffman
2016-03-14 21:11:57 -07:00
committed by Gerrit - the friendly Code Review server
parent ca581c4ee3
commit 0b48913237
3 changed files with 37 additions and 41 deletions

View File

@@ -41,6 +41,43 @@
#define Q_TARGET_ACCESS_END(scn) \
hif_target_sleep_state_adjust(scn, true, false)
/*
* A_TARGET_ACCESS_LIKELY will not wait for the target to wake up before
* continuing execution. Because A_TARGET_ACCESS_LIKELY does not guarantee
* that the target is awake before continuing, Q_TARGET_ACCESS macros must
* protect the actual target access. Since Q_TARGET_ACCESS protect the actual
* target access, A_TARGET_ACCESS_LIKELY hints are optional.
*
* To ignore "LIKELY" hints, set CONFIG_TARGET_ACCESS_LIKELY to 0
* (slightly worse performance, less power)
*
* To use "LIKELY" hints, set CONFIG_TARGET_ACCESS_LIKELY to 1
* (slightly better performance, more power)
*
* note: if a bus doesn't use hif_target_sleep_state_adjust, this will have
* no impact.
*/
#define CONFIG_TARGET_ACCESS_LIKELY 0
#if CONFIG_TARGET_ACCESS_LIKELY
#define A_TARGET_ACCESS_LIKELY(scn) \
hif_target_sleep_state_adjust(scn, false, false)
#define A_TARGET_ACCESS_UNLIKELY(scn) \
hif_target_sleep_state_adjust(scn, true, false)
#else /* CONFIG_ATH_PCIE_ACCESS_LIKELY */
#define A_TARGET_ACCESS_LIKELY(scn) \
do { \
unsigned long unused = (unsigned long)(scn); \
unused = unused; \
} while (0)
#define A_TARGET_ACCESS_UNLIKELY(scn) \
do { \
unsigned long unused = (unsigned long)(scn); \
unused = unused; \
} while (0)
#endif /* CONFIG_ATH_PCIE_ACCESS_LIKELY */
#ifdef HIF_PCI
#include "hif_io32_pci.h"
#endif