qcacld-3.0: Fix compilation errors for msmcobalt (2/2)
Fix compilation errors when building for msmcobalt. Change-Id: I2e1d968e967f493fb927440777d1d01f7e3f66b0 CRs-Fixed: 1006068
Dieser Commit ist enthalten in:

committet von
Gerrit - the friendly Code Review server

Ursprung
fa345994b5
Commit
52ec669089
@@ -37,6 +37,12 @@
|
||||
/* Enable BMI_TEST COMMANDs; The Value 0x09 is randomly choosen */
|
||||
#define BMI_TEST_ENABLE (0x09)
|
||||
|
||||
#ifndef CONFIG_CNSS
|
||||
#define SHOULD_RUN_BMI_TEST_COMMANDS false
|
||||
#else
|
||||
#define SHOULD_RUN_BMI_TEST_COMMANDS (BMI_TEST_ENABLE == cnss_get_bmi_setup())
|
||||
#endif
|
||||
|
||||
static QDF_STATUS
|
||||
bmi_command_test(uint32_t command, uint32_t address, uint8_t *data,
|
||||
uint32_t length, struct ol_context *ol_ctx)
|
||||
@@ -220,11 +226,33 @@ static inline uint32_t bmi_get_test_addr(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS bmi_download_firmware(struct ol_context *ol_ctx)
|
||||
/**
|
||||
* run_bmi_test() - run some bmi tests
|
||||
* @ol_ctx: bmi context
|
||||
*
|
||||
*/
|
||||
static void run_bmi_test(struct ol_context *ol_ctx)
|
||||
{
|
||||
uint8_t data[10], out[10];
|
||||
uint32_t address;
|
||||
int32_t ret;
|
||||
|
||||
ret = snprintf(data, 10, "ABCDEFGHI");
|
||||
BMI_DBG("ret:%d writing data:%s\n", ret, data);
|
||||
address = bmi_get_test_addr();
|
||||
|
||||
if (bmi_init(ol_ctx) != QDF_STATUS_SUCCESS) {
|
||||
BMI_WARN("BMI_INIT Failed; No Memory!");
|
||||
return;
|
||||
}
|
||||
bmi_command_test(BMI_NO_COMMAND, address, data, 9, ol_ctx);
|
||||
bmi_command_test(BMI_WRITE_MEMORY, address, data, 9, ol_ctx);
|
||||
bmi_command_test(BMI_READ_MEMORY, address, out, 9, ol_ctx);
|
||||
BMI_DBG("Output:%s", out);
|
||||
}
|
||||
|
||||
QDF_STATUS bmi_download_firmware(struct ol_context *ol_ctx)
|
||||
{
|
||||
struct hif_opaque_softc *scn = ol_ctx->scn;
|
||||
|
||||
if (NO_BMI || !hif_needs_bmi(scn))
|
||||
@@ -235,23 +263,9 @@ QDF_STATUS bmi_download_firmware(struct ol_context *ol_ctx)
|
||||
bmi_assert(0);
|
||||
return QDF_STATUS_NOT_INITIALIZED;
|
||||
}
|
||||
#ifdef CONFIG_CNSS
|
||||
if (BMI_TEST_ENABLE == cnss_get_bmi_setup()) {
|
||||
ret = snprintf(data, 10, "ABCDEFGHI");
|
||||
BMI_DBG("ret:%d writing data:%s\n", ret, data);
|
||||
address = bmi_get_test_addr();
|
||||
|
||||
if (bmi_init(ol_ctx) != QDF_STATUS_SUCCESS) {
|
||||
BMI_WARN("BMI_INIT Failed; No Memory!");
|
||||
goto end;
|
||||
}
|
||||
bmi_command_test(BMI_NO_COMMAND, address, data, 9, ol_ctx);
|
||||
bmi_command_test(BMI_WRITE_MEMORY, address, data, 9, ol_ctx);
|
||||
bmi_command_test(BMI_READ_MEMORY, address, out, 9, ol_ctx);
|
||||
BMI_DBG("Output:%s", out);
|
||||
}
|
||||
#endif
|
||||
end:
|
||||
if (SHOULD_RUN_BMI_TEST_COMMANDS)
|
||||
run_bmi_test(ol_ctx);
|
||||
return bmi_firmware_download(ol_ctx);
|
||||
}
|
||||
|
||||
|
@@ -59,8 +59,11 @@ static uint32_t refclk_speed_to_hz[] = {
|
||||
52000000, /* SOC_REFCLK_52_MHZ */
|
||||
};
|
||||
|
||||
#if defined(CONFIG_CNSS)
|
||||
static int ol_target_coredump(void *inst, void *memory_block,
|
||||
uint32_t block_len);
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_SECURE_FIRMWARE
|
||||
static int ol_check_fw_hash(const u8 *data, u32 fw_size, ATH_BIN_FILE file)
|
||||
{
|
||||
@@ -150,7 +153,9 @@ __ol_transfer_bin_file(struct ol_context *ol_ctx, ATH_BIN_FILE file,
|
||||
#endif
|
||||
struct hif_target_info *tgt_info = hif_get_target_info_handle(scn);
|
||||
uint32_t target_type = tgt_info->target_type;
|
||||
#if defined(CONFIG_CNSS)
|
||||
struct bmi_info *bmi_ctx = GET_BMI_CONTEXT(ol_ctx);
|
||||
#endif
|
||||
qdf_device_t qdf_dev = ol_ctx->qdf_dev;
|
||||
|
||||
switch (file) {
|
||||
@@ -612,8 +617,10 @@ void ol_target_failure(void *instance, QDF_STATUS status)
|
||||
struct ol_context *ol_ctx = instance;
|
||||
struct hif_opaque_softc *scn = ol_ctx->scn;
|
||||
tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
#ifdef CONFIG_CNSS
|
||||
struct ol_config_info *ini_cfg = ol_get_ini_handle(ol_ctx);
|
||||
int ret;
|
||||
#endif
|
||||
ol_target_status target_status =
|
||||
hif_get_target_status(scn);
|
||||
|
||||
@@ -1218,9 +1225,9 @@ QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
|
||||
struct ol_config_info *ini_cfg = ol_get_ini_handle(ol_ctx);
|
||||
uint32_t target_type = tgt_info->target_type;
|
||||
uint32_t target_version = tgt_info->target_version;
|
||||
#ifdef CONFIG_CNSS
|
||||
struct bmi_info *bmi_ctx = GET_BMI_CONTEXT(ol_ctx);
|
||||
|
||||
#ifdef CONFIG_CNSS
|
||||
if (0 != cnss_get_fw_files_for_target(&bmi_ctx->fw_files,
|
||||
target_type,
|
||||
target_version)) {
|
||||
@@ -1328,7 +1335,7 @@ QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
|
||||
if (ini_cfg->enable_uart_print ||
|
||||
(WLAN_IS_EPPING_ENABLED(cds_get_conparam()) &&
|
||||
WLAN_IS_EPPING_FW_UART(cds_get_conparam()))) {
|
||||
switch (tgt_info->target_version) {
|
||||
switch (target_version) {
|
||||
case AR6004_VERSION_REV1_3:
|
||||
param = 11;
|
||||
break;
|
||||
@@ -1427,6 +1434,7 @@ int ol_diag_read(struct hif_opaque_softc *scn, uint8_t *buffer,
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CNSS)
|
||||
static int ol_ath_get_reg_table(uint32_t target_version,
|
||||
tgt_reg_table *reg_table)
|
||||
{
|
||||
@@ -1461,7 +1469,10 @@ static int ol_ath_get_reg_table(uint32_t target_version,
|
||||
|
||||
return section_len;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_CNSS)
|
||||
static int ol_diag_read_reg_loc(struct hif_opaque_softc *scn, uint8_t *buffer,
|
||||
uint32_t buffer_len)
|
||||
{
|
||||
@@ -1527,6 +1538,7 @@ static int ol_diag_read_reg_loc(struct hif_opaque_softc *scn, uint8_t *buffer,
|
||||
out:
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ol_dump_target_memory(struct hif_opaque_softc *scn, void *memory_block)
|
||||
{
|
||||
@@ -1552,6 +1564,8 @@ void ol_dump_target_memory(struct hif_opaque_softc *scn, void *memory_block)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if defined(CONFIG_CNSS)
|
||||
/**
|
||||
* ol_target_coredump() - API to collect target ramdump
|
||||
* @inst - private context
|
||||
@@ -1638,6 +1652,7 @@ static int ol_target_coredump(void *inst, void *memory_block,
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ol_get_ini_handle() - API to get Ol INI configuration
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren