qcacld-3.0: Remove obsolete codeswap feature

Codeswap feature is introduced for a WLAN chipset which is already
cancelled. It is no longer used in host driver. Remove the feature
to avoid any confusion for future development.

Change-Id: I70ae291ded2d2e290408e2f5b177e872f1f3d7e8
CRs-fixed: 1082183
This commit is contained in:
Yue Ma
2016-10-24 18:38:11 -07:00
committed by Prakash Dhavali
parent c4b47a9834
commit e93d52557a
6 changed files with 0 additions and 121 deletions

7
Kbuild
View File

@@ -1454,13 +1454,6 @@ CDEFINES += -DWLAN_FEATURE_RX_FULL_REORDER_OL
endif
endif
#enable Code swap feature
ifeq ($(CONFIG_CNSS), y)
ifeq ($(CONFIG_HIF_PCI), 1)
CDEFINES += -DCONFIG_CODESWAP_FEATURE
endif
endif
#Enable Signed firmware support for split binary format
ifeq ($(CONFIG_QCA_SIGNED_SPLIT_BINARY_SUPPORT), 1)
CDEFINES += -DQCA_SIGNED_SPLIT_BINARY_SUPPORT

View File

@@ -1204,31 +1204,6 @@ end:
return status;
}
/* AXI Start Address */
#define TARGET_ADDR (0xa0000)
static void ol_transfer_codeswap_struct(struct ol_context *ol_ctx)
{
struct pld_codeswap_codeseg_info wlan_codeswap;
QDF_STATUS rv;
qdf_device_t qdf_dev = ol_ctx->qdf_dev;
if (pld_get_codeswap_struct(qdf_dev->dev, &wlan_codeswap)) {
BMI_ERR("%s: failed to get codeswap structure", __func__);
return;
}
rv = bmi_write_memory(TARGET_ADDR,
(uint8_t *) &wlan_codeswap, sizeof(wlan_codeswap),
ol_ctx);
if (rv != QDF_STATUS_SUCCESS) {
BMI_ERR("Failed to Write 0xa0000 to Target");
return;
}
BMI_INFO("codeswap structure is successfully downloaded");
}
QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
{
struct hif_opaque_softc *scn = ol_ctx->scn;
@@ -1304,8 +1279,6 @@ QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
BMI_INFO("%s: Using 0x%x for the remainder of init",
__func__, address);
ol_transfer_codeswap_struct(ol_ctx);
status = ol_transfer_bin_file(ol_ctx, ATH_OTP_FILE,
address, true);
/* Execute the OTP code only if entry found and downloaded */

View File

@@ -96,27 +96,6 @@ struct pld_fw_files {
char setup_file[PLD_MAX_FILE_NAME];
};
#define PLD_CODESWAP_MAX_CODESEGS 16
/**
* struct pld_codeswap_codeseg_info - code swap segment information
* @codeseg_total_bytes: total bytes of segments
* @num_codesegs: number of code segments
* @codeseg_size: code segment size
* @codeseg_size_log2: log2 of code segment size
* @codeseg_busaddr: array of addresses of each code segment
*
* pld_codeswap_codeseg_info is used to store code swap segment
* information.
*/
struct pld_codeswap_codeseg_info {
u32 codeseg_total_bytes;
u32 num_codesegs;
u32 codeseg_size;
u32 codeseg_size_log2;
void *codeseg_busaddr[PLD_CODESWAP_MAX_CODESEGS];
};
/**
* enum pld_platform_cap_flag - platform capability flag
* @PLD_HAS_EXTERNAL_SWREG: has external regulator
@@ -333,8 +312,6 @@ int pld_get_fw_files_for_target(struct device *dev,
u32 target_type, u32 target_version);
void pld_is_pci_link_down(struct device *dev);
int pld_shadow_control(struct device *dev, bool enable);
int pld_get_codeswap_struct(struct device *dev,
struct pld_codeswap_codeseg_info *swap_seg);
int pld_set_wlan_unsafe_channel(struct device *dev, u16 *unsafe_ch_list,
u16 ch_count);
int pld_get_wlan_unsafe_channel(struct device *dev, u16 *unsafe_ch_list,

View File

@@ -538,39 +538,6 @@ int pld_shadow_control(struct device *dev, bool enable)
return ret;
}
/**
* pld_get_codeswap_struct() - Get codeswap structure
* @dev: device
* @swap_seg: buffer to codeswap information
*
* Return codeswap structure information to the buffer.
*
* Return: 0 for success
* Non zero failure code for errors
*/
int pld_get_codeswap_struct(struct device *dev,
struct pld_codeswap_codeseg_info *swap_seg)
{
int ret = 0;
switch (pld_get_bus_type(dev)) {
case PLD_BUS_TYPE_PCIE:
ret = pld_pcie_get_codeswap_struct(swap_seg);
break;
case PLD_BUS_TYPE_SNOC:
break;
case PLD_BUS_TYPE_SDIO:
break;
case PLD_BUS_TYPE_USB:
break;
default:
ret = -EINVAL;
break;
}
return ret;
}
/**
* pld_set_wlan_unsafe_channel() - Set unsafe channel
* @dev: device

View File

@@ -457,31 +457,6 @@ int pld_pcie_get_fw_files_for_target(struct pld_fw_files *pfw_files,
return 0;
}
/**
* pld_pcie_get_codeswap_struct() - Get codeswap structure
* @swap_seg: buffer to codeswap information
*
* Return codeswap structure information to the buffer.
*
* Return: 0 for success
* Non zero failure code for errors
*/
int pld_pcie_get_codeswap_struct(struct pld_codeswap_codeseg_info *swap_seg)
{
int ret = 0;
struct codeswap_codeseg_info cnss_swap_seg;
if (swap_seg == NULL)
return -ENODEV;
ret = cnss_get_codeswap_struct(&cnss_swap_seg);
if (0 != ret)
return ret;
memcpy(swap_seg, &cnss_swap_seg, sizeof(*swap_seg));
return 0;
}
/**
* pld_pcie_get_platform_cap() - Get platform capabilities
* @cap: buffer to the capabilities

View File

@@ -137,11 +137,6 @@ static inline int pld_pcie_shadow_control(bool enable)
return 0;
}
static inline int
pld_pcie_get_codeswap_struct(struct pld_codeswap_codeseg_info *swap_seg)
{
return 0;
}
static inline int
pld_pcie_set_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 ch_count)
{
return 0;
@@ -230,7 +225,6 @@ static inline uint8_t *pld_pcie_get_wlan_mac_address(struct device *dev,
#else
int pld_pcie_get_fw_files_for_target(struct pld_fw_files *pfw_files,
u32 target_type, u32 target_version);
int pld_pcie_get_codeswap_struct(struct pld_codeswap_codeseg_info *swap_seg);
int pld_pcie_get_platform_cap(struct pld_platform_cap *cap);
void pld_pcie_set_driver_status(enum pld_driver_status status);