diff options
| author | Yingying Tang <yintang@codeaurora.org> | 2017-02-22 20:51:29 +0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-02-28 23:41:08 -0800 |
| commit | 36e63b9ba1842e1874bc0ad45ebcf10cf155d4b7 (patch) | |
| tree | dcc52af894caa033bb53b62f4fdf41a90da01679 | |
| parent | 8ac03a517a1bc1e7b56952a17ec3c77354f97173 (diff) | |
qcacmn: Add "static" to fix compilation error for HL bus
Add "static" before some functions which only be used in 1 file and
remove some unused functions to resolve compilation error.
Change-Id: I5bf80fe2e124bf4258c9bfdc997a5423773ca474
CRs-Fixed: 2010227
| -rw-r--r-- | hif/inc/hif.h | 19 | ||||
| -rw-r--r-- | hif/src/sdio/hif_bmi_reg_access.c | 37 | ||||
| -rw-r--r-- | hif/src/sdio/hif_diag_reg_access.c | 67 | ||||
| -rw-r--r-- | hif/src/sdio/hif_sdio_recv.c | 11 | ||||
| -rw-r--r-- | hif/src/sdio/if_sdio.c | 91 | ||||
| -rw-r--r-- | hif/src/sdio/native_sdio/src/hif.c | 14 |
6 files changed, 33 insertions, 206 deletions
diff --git a/hif/inc/hif.h b/hif/inc/hif.h index 505ac0bcbf4f..1843def5d074 100644 --- a/hif/inc/hif.h +++ b/hif/inc/hif.h @@ -721,6 +721,25 @@ void hif_fake_apps_suspend(struct hif_opaque_softc *hif_ctx, void hif_fake_apps_resume(struct hif_opaque_softc *hif_ctx); #endif +#ifdef HIF_SDIO +/** + * hif_reg_based_get_target_info - to retrieve target info + * @hif_ctx: hif context + * @targ_info: bmi target info + * + * Return: QDF_STATUS_SUCCESS for success. + */ +QDF_STATUS hif_reg_based_get_target_info(struct hif_opaque_softc *hif_ctx, + struct bmi_target_info *targ_info); +#else +static inline QDF_STATUS +hif_reg_based_get_target_info(struct hif_opaque_softc *hif_ctx, + struct bmi_target_info *targ_info) +{ + return QDF_STATUS_SUCCESS; +} +#endif + #ifdef __cplusplus } #endif diff --git a/hif/src/sdio/hif_bmi_reg_access.c b/hif/src/sdio/hif_bmi_reg_access.c index 26f653fdcc4e..5fbdcd9ee620 100644 --- a/hif/src/sdio/hif_bmi_reg_access.c +++ b/hif/src/sdio/hif_bmi_reg_access.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * ***Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -293,8 +293,7 @@ hif_bmi_buffer_receive(struct hif_sdio_dev *device, * Return: QDF_STATUS_SUCCESS for success. */ QDF_STATUS hif_reg_based_get_target_info(struct hif_opaque_softc *hif_ctx, - struct bmi_target_info - *targ_info) { + struct bmi_target_info *targ_info) { QDF_STATUS status; uint32_t cid; struct hif_sdio_softc *scn = HIF_GET_SDIO_SOFTC(hif_ctx); @@ -434,38 +433,6 @@ QDF_STATUS hif_exchange_bmi_msg(struct hif_opaque_softc *hif_ctx, return status; } -/** - * hif_bmi_raw_write - API to handle bmi raw buffer - * @device: hif context - * @buffer: buffer - * @length: length - * - * Return: QDF_STATUS_SUCCESS for success. - */ - -QDF_STATUS -hif_bmi_raw_write(struct hif_sdio_dev *device, char *buffer, - uint32_t length) { - return hif_bmi_buffer_send(device, buffer, length); -} - -/** - * hif_bmi_raw_read - call when bmi buffer is received - * @device: hif context - * @buffer: buffer - * @length: length - * @want_timeout: timeout is needed or not - * - * Return: QDF_STATUS_SUCCESS for success. - */ -QDF_STATUS -hif_bmi_raw_read(struct hif_sdio_dev *device, char *buffer, - uint32_t length, bool want_timeout) -{ - return hif_bmi_buffer_receive(device, buffer, length, - want_timeout); -} - #ifdef BRINGUP_DEBUG #define SDIO_SCRATCH_1_ADDRESS 0x864 /*Functions used for debugging*/ diff --git a/hif/src/sdio/hif_diag_reg_access.c b/hif/src/sdio/hif_diag_reg_access.c index 8d9e65b0c5f6..e3cdf157dc3b 100644 --- a/hif/src/sdio/hif_diag_reg_access.c +++ b/hif/src/sdio/hif_diag_reg_access.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -263,68 +263,3 @@ QDF_STATUS hif_diag_read_mem(struct hif_opaque_softc *scn, return QDF_STATUS_SUCCESS; } - -/** - * hif_ar6k_read_target_register - call to read target register values - * @hif_device: hif context - * @regsel: register selection - * @regval: reg value - * - * Return: QDF_STATUS_SUCCESS for success. - */ -QDF_STATUS hif_ar6k_read_target_register(struct hif_sdio_dev *hif_device, - int regsel, uint32_t *regval) -{ - QDF_STATUS status; - char vals[4]; - char register_selection[4]; - - register_selection[0] = regsel & 0xff; - register_selection[1] = regsel & 0xff; - register_selection[2] = regsel & 0xff; - register_selection[3] = regsel & 0xff; - status = hif_read_write(hif_device, CPU_DBG_SEL_ADDRESS, - register_selection, 4, - HIF_WR_SYNC_BYTE_FIX, NULL); - - if (status != QDF_STATUS_SUCCESS) { - AR_DEBUG_PRINTF(ATH_LOG_ERR, - ("Cannot write CPU_DBG_SEL (%d)\n", regsel)); - return status; - } - - status = hif_read_write(hif_device, - CPU_DBG_ADDRESS, - (char *) vals, - sizeof(vals), HIF_RD_SYNC_BYTE_INC, NULL); - if (status != QDF_STATUS_SUCCESS) { - AR_DEBUG_PRINTF(ATH_LOG_ERR, - ("Cannot read from CPU_DBG_ADDRESS\n")); - return status; - } - - *regval = vals[0] << 0 | vals[1] << 8 | - vals[2] << 16 | vals[3] << 24; - - return status; -} - -/** - * hif_ar6k_fetch_target_regs - call to fetch target reg values - * @hif_device: hif context - * @targregs: target regs - * - * Return: None - */ -void hif_ar6k_fetch_target_regs(struct hif_sdio_dev *hif_device, - uint32_t *targregs) -{ - int i; - uint32_t val; - - for (i = 0; i < AR6003_FETCH_TARG_REGS_COUNT; i++) { - val = 0xffffffff; - hif_ar6k_read_target_register(hif_device, i, &val); - targregs[i] = val; - } -} diff --git a/hif/src/sdio/hif_sdio_recv.c b/hif/src/sdio/hif_sdio_recv.c index 1638c61b4355..cfcb88996f18 100644 --- a/hif/src/sdio/hif_sdio_recv.c +++ b/hif/src/sdio/hif_sdio_recv.c @@ -779,12 +779,13 @@ static QDF_STATUS hif_dev_issue_recv_packet_bundle(struct hif_sdio_device *pdev, return status; } +static QDF_STATUS hif_dev_recv_message_pending_handler(struct hif_sdio_device *pdev, - uint8_t mail_box_index, - uint32_t msg_look_aheads[], - int num_look_aheads, - bool *async_proc, - int *num_pkts_fetched) + uint8_t mail_box_index, + uint32_t msg_look_aheads[], + int num_look_aheads, + bool *async_proc, + int *num_pkts_fetched) { QDF_STATUS status = QDF_STATUS_SUCCESS; HTC_PACKET *packet; diff --git a/hif/src/sdio/if_sdio.c b/hif/src/sdio/if_sdio.c index 289e130e5e12..e0d95f263f01 100644 --- a/hif/src/sdio/if_sdio.c +++ b/hif/src/sdio/if_sdio.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -54,6 +54,7 @@ #include "pktlog_ac.h" #endif #include "epping_main.h" +#include "sdio_api.h" #ifndef ATH_BUS_PM #ifdef CONFIG_PM @@ -198,27 +199,6 @@ err_alloc: } /** - * ol_ath_sdio_configure() - configure sdio device - * @hif_sc: pointer to sdio softc structure - * @dev: pointer to net device - * @hif_handle: pointer to sdio function - * - * Return: 0 for success and non-zero for failure - */ -int -ol_ath_sdio_configure(void *hif_sc, struct net_device *dev, - hif_handle_t *hif_hdl) -{ - struct hif_sdio_softc *sc = (struct hif_sdio_softc *)hif_sc; - int ret = 0; - - sc->aps_osdev.netdev = dev; - *hif_hdl = sc->hif_handle; - - return ret; -} - -/** * hif_sdio_remove() - remove sdio device * @conext: sdio device context * @hif_handle: pointer to sdio function @@ -332,21 +312,6 @@ static int init_ath_hif_sdio(void) } /** - * hif_targ_is_awake(): check if target is awake - * - * This function returns true if the target is awake - * - * @scn: struct hif_softc - * @mem: mapped mem base - * - * Return: bool - */ -bool hif_targ_is_awake(struct hif_softc *scn, void *__iomem *mem) -{ - return true; -} - -/** * hif_sdio_bus_suspend() - suspend the bus * * This function suspends the bus, but sdio doesn't need to suspend. @@ -384,24 +349,6 @@ int hif_sdio_bus_resume(struct hif_softc *hif_ctx) } /** - * hif_enable_power_gating() - enable HW power gating - * - * Return: n/a - */ -void hif_enable_power_gating(void *hif_ctx) -{ -} - -/** - * hif_disable_aspm() - hif_disable_aspm - * - * Return: n/a - */ -void hif_disable_aspm(void) -{ -} - -/** * hif_sdio_close() - hif_bus_close * * Return: None @@ -428,28 +375,6 @@ QDF_STATUS hif_sdio_open(struct hif_softc *hif_sc, return status; } -/** - * hif_get_target_type() - Get the target type - * - * This function is used to query the target type. - * - * @ol_sc: ol_softc struct pointer - * @dev: device pointer - * @bdev: bus dev pointer - * @bid: bus id pointer - * @hif_type: HIF type such as HIF_TYPE_QCA6180 - * @target_type: target type such as TARGET_TYPE_QCA6180 - * - * Return: 0 for success - */ -int hif_get_target_type(struct hif_softc *ol_sc, struct device *dev, - void *bdev, const hif_bus_id *bid, uint32_t *hif_type, - uint32_t *target_type) -{ - - return 0; -} - void hif_get_target_revision(struct hif_softc *ol_sc) { struct hif_softc *ol_sc_local = (struct hif_softc *)ol_sc; @@ -622,15 +547,3 @@ int hif_check_fw_reg(struct hif_opaque_softc *scn) void hif_wlan_disable(struct hif_softc *scn) { } - -/** - * hif_config_target() - configure hif bus - * @hif_hdl: hif handle - * @state: - * - * Return: int - */ -int hif_config_target(void *hif_hdl) -{ - return 0; -} diff --git a/hif/src/sdio/native_sdio/src/hif.c b/hif/src/sdio/native_sdio/src/hif.c index f3a247f33334..d627236383e7 100644 --- a/hif/src/sdio/native_sdio/src/hif.c +++ b/hif/src/sdio/native_sdio/src/hif.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -867,7 +867,7 @@ static inline void sdio_card_state(struct mmc_card *card) * * Return: 0 on success, error number otherwise. */ -QDF_STATUS reinit_sdio(struct hif_sdio_dev *device) +static QDF_STATUS reinit_sdio(struct hif_sdio_dev *device) { int32_t err = 0; struct mmc_host *host; @@ -1042,7 +1042,7 @@ static int sdio_enable4bits(struct hif_sdio_dev *device, int enable) * * Return: 0 on success, error number otherwise. */ -QDF_STATUS +static QDF_STATUS power_state_change_notify(struct hif_sdio_dev *device, HIF_DEVICE_POWER_CHANGE_TYPE config) { @@ -2586,14 +2586,6 @@ static void reset_all_cards(void) { } -void hif_release_device(struct hif_opaque_softc *hif_ctx) -{ - struct hif_sdio_softc *scn = HIF_GET_SDIO_SOFTC(hif_ctx); - struct hif_sdio_dev *hif_device = scn->hif_handle; - - hif_device->claimed_ctx = NULL; -} - QDF_STATUS hif_attach_htc(struct hif_sdio_dev *device, HTC_CALLBACKS *callbacks) { |
