2017-12-21 16:05:34

by Rakesh Pillai

[permalink] [raw]
Subject: [PATCH v2 0/3] Core changes for wcn3990

This patchset includes the core changes for wcn3990 to
- Add SNOC bus type used for wcn3990 target
- Add the debug mask for SNOC bus type
- Adding fw feature flag for non-bmi firmware load, since wcn3990
firmware is not loaded by bmi

Changes since v1:
- Rebase the patchset on the latest ath.git

Govind Singh (2):
ath10k: Add SNOC bus type for WCN3990 target
ath10k: Add debug mask for SNOC bus type

Rakesh Pillai (1):
ath10k: Add fw feature flag for non-bmi firmware load

drivers/net/wireless/ath/ath10k/core.c | 181 +++++++++++++++++++-------------
drivers/net/wireless/ath/ath10k/core.h | 6 ++
drivers/net/wireless/ath/ath10k/debug.h | 1 +
3 files changed, 113 insertions(+), 75 deletions(-)

--
2.11.0


2017-12-27 10:10:02

by Kalle Valo

[permalink] [raw]
Subject: Re: [v2,1/3] ath10k: Add SNOC bus type for WCN3990 target

Rakesh Pillai <[email protected]> wrote:

> WCN3990 is integrated chipset which uses system NOC.
> Add SNOC bus type and related definitions.
>
> Signed-off-by: Govind Singh <[email protected]>
> Signed-off-by: Rakesh Pillai <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

3 patches applied to ath-next branch of ath.git, thanks.

63855e3d6e7a ath10k: Add SNOC bus type for WCN3990 target
b796240409b3 ath10k: Add debug mask for SNOC bus type
71e9c29fbd28 ath10k: Add fw feature flag for non-bmi firmware load

--
https://patchwork.kernel.org/patch/10127929/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2017-12-21 16:05:32

by Rakesh Pillai

[permalink] [raw]
Subject: [PATCH v2 1/3] ath10k: Add SNOC bus type for WCN3990 target

From: Govind Singh <[email protected]>

WCN3990 is integrated chipset which uses system NOC.
Add SNOC bus type and related definitions.

Signed-off-by: Govind Singh <[email protected]>
Signed-off-by: Rakesh Pillai <[email protected]>
---
drivers/net/wireless/ath/ath10k/core.c | 1 +
drivers/net/wireless/ath/ath10k/core.h | 3 +++
2 files changed, 4 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 042175a5653f..b6d5bad6f5ec 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1551,6 +1551,7 @@ static void ath10k_core_get_fw_name(struct ath10k *ar, char *fw_name,
break;
case ATH10K_BUS_PCI:
case ATH10K_BUS_AHB:
+ case ATH10K_BUS_SNOC:
scnprintf(fw_name, fw_name_len, "%s-%d.bin",
ATH10K_FW_FILE_BASE, fw_api);
break;
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 398cd3c57139..81285ab30a7d 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -92,6 +92,7 @@ enum ath10k_bus {
ATH10K_BUS_AHB,
ATH10K_BUS_SDIO,
ATH10K_BUS_USB,
+ ATH10K_BUS_SNOC,
};

static inline const char *ath10k_bus_str(enum ath10k_bus bus)
@@ -105,6 +106,8 @@ static inline const char *ath10k_bus_str(enum ath10k_bus bus)
return "sdio";
case ATH10K_BUS_USB:
return "usb";
+ case ATH10K_BUS_SNOC:
+ return "snoc";
}

return "unknown";
--
2.11.0

2017-12-21 16:05:42

by Rakesh Pillai

[permalink] [raw]
Subject: [PATCH v2 3/3] ath10k: Add fw feature flag for non-bmi firmware load

From: Rakesh Pillai <[email protected]>

HL1.0 firmware is not loaded via bmi. The bmi specific
code should not be executed for HL1.0

Add fw feature flag for non bmi targets and skip the bmi
specific code for non bmi targets.

Signed-off-by: Rakesh Pillai <[email protected]>
---
drivers/net/wireless/ath/ath10k/core.c | 180 +++++++++++++++++++--------------
drivers/net/wireless/ath/ath10k/core.h | 3 +
2 files changed, 108 insertions(+), 75 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index b6d5bad6f5ec..188efa8dcfc0 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -445,6 +445,7 @@ static const char *const ath10k_core_fw_feature_str[] = {
[ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST] = "allows-mesh-bcast",
[ATH10K_FW_FEATURE_NO_PS] = "no-ps",
[ATH10K_FW_FEATURE_MGMT_TX_BY_REF] = "mgmt-tx-by-reference",
+ [ATH10K_FW_FEATURE_NON_BMI] = "non-bmi",
};

static unsigned int ath10k_core_get_fw_feature_str(char *buf,
@@ -1524,8 +1525,8 @@ int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name,
data += ie_len;
}

- if (!fw_file->firmware_data ||
- !fw_file->firmware_len) {
+ if (!test_bit(ATH10K_FW_FEATURE_NON_BMI, fw_file->fw_features) &&
+ (!fw_file->firmware_data || !fw_file->firmware_len)) {
ath10k_warn(ar, "No ATH10K_FW_IE_FW_IMAGE found from '%s/%s', skipping\n",
ar->hw_params.fw.dir, name);
ret = -ENOMEDIUM;
@@ -2079,43 +2080,47 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,

ar->running_fw = fw;

- ath10k_bmi_start(ar);
+ if (!test_bit(ATH10K_FW_FEATURE_NON_BMI,
+ ar->running_fw->fw_file.fw_features)) {
+ ath10k_bmi_start(ar);

- if (ath10k_init_configure_target(ar)) {
- status = -EINVAL;
- goto err;
- }
-
- status = ath10k_download_cal_data(ar);
- if (status)
- goto err;
+ if (ath10k_init_configure_target(ar)) {
+ status = -EINVAL;
+ goto err;
+ }

- /* Some of of qca988x solutions are having global reset issue
- * during target initialization. Bypassing PLL setting before
- * downloading firmware and letting the SoC run on REF_CLK is
- * fixing the problem. Corresponding firmware change is also needed
- * to set the clock source once the target is initialized.
- */
- if (test_bit(ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT,
- ar->running_fw->fw_file.fw_features)) {
- status = ath10k_bmi_write32(ar, hi_skip_clock_init, 1);
- if (status) {
- ath10k_err(ar, "could not write to skip_clock_init: %d\n",
- status);
+ status = ath10k_download_cal_data(ar);
+ if (status)
goto err;
+
+ /* Some of of qca988x solutions are having global reset issue
+ * during target initialization. Bypassing PLL setting before
+ * downloading firmware and letting the SoC run on REF_CLK is
+ * fixing the problem. Corresponding firmware change is also
+ * needed to set the clock source once the target is
+ * initialized.
+ */
+ if (test_bit(ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT,
+ ar->running_fw->fw_file.fw_features)) {
+ status = ath10k_bmi_write32(ar, hi_skip_clock_init, 1);
+ if (status) {
+ ath10k_err(ar, "could not write to skip_clock_init: %d\n",
+ status);
+ goto err;
+ }
}
- }

- status = ath10k_download_fw(ar);
- if (status)
- goto err;
+ status = ath10k_download_fw(ar);
+ if (status)
+ goto err;

- status = ath10k_init_uart(ar);
- if (status)
- goto err;
+ status = ath10k_init_uart(ar);
+ if (status)
+ goto err;

- if (ar->hif.bus == ATH10K_BUS_SDIO)
- ath10k_init_sdio(ar);
+ if (ar->hif.bus == ATH10K_BUS_SDIO)
+ ath10k_init_sdio(ar);
+ }

ar->htc.htc_ops.target_send_suspend_complete =
ath10k_send_suspend_complete;
@@ -2126,9 +2131,12 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
goto err;
}

- status = ath10k_bmi_done(ar);
- if (status)
- goto err;
+ if (!test_bit(ATH10K_FW_FEATURE_NON_BMI,
+ ar->running_fw->fw_file.fw_features)) {
+ status = ath10k_bmi_done(ar);
+ if (status)
+ goto err;
+ }

status = ath10k_wmi_attach(ar);
if (status) {
@@ -2371,19 +2379,34 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
return ret;
}

- memset(&target_info, 0, sizeof(target_info));
- if (ar->hif.bus == ATH10K_BUS_SDIO)
+ switch (ar->hif.bus) {
+ case ATH10K_BUS_SDIO:
+ memset(&target_info, 0, sizeof(target_info));
ret = ath10k_bmi_get_target_info_sdio(ar, &target_info);
- else
+ if (ret) {
+ ath10k_err(ar, "could not get target info (%d)\n", ret);
+ goto err_power_down;
+ }
+ ar->target_version = target_info.version;
+ ar->hw->wiphy->hw_version = target_info.version;
+ break;
+ case ATH10K_BUS_PCI:
+ case ATH10K_BUS_AHB:
+ memset(&target_info, 0, sizeof(target_info));
ret = ath10k_bmi_get_target_info(ar, &target_info);
- if (ret) {
- ath10k_err(ar, "could not get target info (%d)\n", ret);
- goto err_power_down;
+ if (ret) {
+ ath10k_err(ar, "could not get target info (%d)\n", ret);
+ goto err_power_down;
+ }
+ ar->target_version = target_info.version;
+ ar->hw->wiphy->hw_version = target_info.version;
+ break;
+ case ATH10K_BUS_SNOC:
+ break;
+ default:
+ ath10k_err(ar, "incorrect hif bus type: %d\n", ar->hif.bus);
}

- ar->target_version = target_info.version;
- ar->hw->wiphy->hw_version = target_info.version;
-
ret = ath10k_init_hw_params(ar);
if (ret) {
ath10k_err(ar, "could not get hw params (%d)\n", ret);
@@ -2403,37 +2426,40 @@ static int ath10k_core_probe_fw(struct ath10k *ar)

ath10k_debug_print_hwfw_info(ar);

- ret = ath10k_core_pre_cal_download(ar);
- if (ret) {
- /* pre calibration data download is not necessary
- * for all the chipsets. Ignore failures and continue.
- */
- ath10k_dbg(ar, ATH10K_DBG_BOOT,
- "could not load pre cal data: %d\n", ret);
- }
+ if (!test_bit(ATH10K_FW_FEATURE_NON_BMI,
+ ar->normal_mode_fw.fw_file.fw_features)) {
+ ret = ath10k_core_pre_cal_download(ar);
+ if (ret) {
+ /* pre calibration data download is not necessary
+ * for all the chipsets. Ignore failures and continue.
+ */
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
+ "could not load pre cal data: %d\n", ret);
+ }

- ret = ath10k_core_get_board_id_from_otp(ar);
- if (ret && ret != -EOPNOTSUPP) {
- ath10k_err(ar, "failed to get board id from otp: %d\n",
- ret);
- goto err_free_firmware_files;
- }
+ ret = ath10k_core_get_board_id_from_otp(ar);
+ if (ret && ret != -EOPNOTSUPP) {
+ ath10k_err(ar, "failed to get board id from otp: %d\n",
+ ret);
+ goto err_free_firmware_files;
+ }

- ret = ath10k_core_check_smbios(ar);
- if (ret)
- ath10k_dbg(ar, ATH10K_DBG_BOOT, "SMBIOS bdf variant name not set.\n");
+ ret = ath10k_core_check_smbios(ar);
+ if (ret)
+ ath10k_dbg(ar, ATH10K_DBG_BOOT, "SMBIOS bdf variant name not set.\n");

- ret = ath10k_core_check_dt(ar);
- if (ret)
- ath10k_dbg(ar, ATH10K_DBG_BOOT, "DT bdf variant name not set.\n");
+ ret = ath10k_core_check_dt(ar);
+ if (ret)
+ ath10k_dbg(ar, ATH10K_DBG_BOOT, "DT bdf variant name not set.\n");

- ret = ath10k_core_fetch_board_file(ar);
- if (ret) {
- ath10k_err(ar, "failed to fetch board file: %d\n", ret);
- goto err_free_firmware_files;
- }
+ ret = ath10k_core_fetch_board_file(ar);
+ if (ret) {
+ ath10k_err(ar, "failed to fetch board file: %d\n", ret);
+ goto err_free_firmware_files;
+ }

- ath10k_debug_print_board_info(ar);
+ ath10k_debug_print_board_info(ar);
+ }

ret = ath10k_core_init_firmware_features(ar);
if (ret) {
@@ -2442,11 +2468,15 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
goto err_free_firmware_files;
}

- ret = ath10k_swap_code_seg_init(ar, &ar->normal_mode_fw.fw_file);
- if (ret) {
- ath10k_err(ar, "failed to initialize code swap segment: %d\n",
- ret);
- goto err_free_firmware_files;
+ if (!test_bit(ATH10K_FW_FEATURE_NON_BMI,
+ ar->normal_mode_fw.fw_file.fw_features)) {
+ ret = ath10k_swap_code_seg_init(ar,
+ &ar->normal_mode_fw.fw_file);
+ if (ret) {
+ ath10k_err(ar, "failed to initialize code swap segment: %d\n",
+ ret);
+ goto err_free_firmware_files;
+ }
}

mutex_lock(&ar->conf_mutex);
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 81285ab30a7d..b747ef52c186 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -618,6 +618,9 @@ enum ath10k_fw_features {
/* Firmware allows management tx by reference instead of by value. */
ATH10K_FW_FEATURE_MGMT_TX_BY_REF = 18,

+ /* Firmware load is done externally, not by bmi */
+ ATH10K_FW_FEATURE_NON_BMI = 19,
+
/* keep last */
ATH10K_FW_FEATURE_COUNT,
};
--
2.11.0

2017-12-21 16:19:05

by Rakesh Pillai

[permalink] [raw]
Subject: RE: [PATCH v2 3/3] ath10k: Add fw feature flag for non-bmi firmware load

Hi Kalle,

I have sent a v3 for this patch with the corrected ownership.


Thanks,
Rakesh Pillai

> -----Original Message-----
> From: Rakesh Pillai [mailto:[email protected]]
> Sent: Thursday, December 21, 2017 9:35 PM
> To: [email protected]
> Cc: [email protected]; Rakesh Pillai <[email protected]=
>;
> Rakesh Pillai <[email protected]>
> Subject: [PATCH v2 3/3] ath10k: Add fw feature flag for non-bmi firmware =
load
>=20
> From: Rakesh Pillai <[email protected]>
>=20
> HL1.0 firmware is not loaded via bmi. The bmi specific
> code should not be executed for HL1.0
>=20
> Add fw feature flag for non bmi targets and skip the bmi
> specific code for non bmi targets.
>=20
> Signed-off-by: Rakesh Pillai <[email protected]>
> ---
> drivers/net/wireless/ath/ath10k/core.c | 180 +++++++++++++++++++--------=
-----
> -
> drivers/net/wireless/ath/ath10k/core.h | 3 +
> 2 files changed, 108 insertions(+), 75 deletions(-)
>=20
> diff --git a/drivers/net/wireless/ath/ath10k/core.c
> b/drivers/net/wireless/ath/ath10k/core.c
> index b6d5bad6f5ec..188efa8dcfc0 100644
> --- a/drivers/net/wireless/ath/ath10k/core.c
> +++ b/drivers/net/wireless/ath/ath10k/core.c
> @@ -445,6 +445,7 @@ static const char *const ath10k_core_fw_feature_str[]
> =3D {
> [ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST] =3D "allows-mesh-
> bcast",
> [ATH10K_FW_FEATURE_NO_PS] =3D "no-ps",
> [ATH10K_FW_FEATURE_MGMT_TX_BY_REF] =3D "mgmt-tx-by-reference",
> + [ATH10K_FW_FEATURE_NON_BMI] =3D "non-bmi",
> };
>=20
> static unsigned int ath10k_core_get_fw_feature_str(char *buf,
> @@ -1524,8 +1525,8 @@ int ath10k_core_fetch_firmware_api_n(struct ath10k
> *ar, const char *name,
> data +=3D ie_len;
> }
>=20
> - if (!fw_file->firmware_data ||
> - !fw_file->firmware_len) {
> + if (!test_bit(ATH10K_FW_FEATURE_NON_BMI, fw_file->fw_features)
> &&
> + (!fw_file->firmware_data || !fw_file->firmware_len)) {
> ath10k_warn(ar, "No ATH10K_FW_IE_FW_IMAGE found from
> '%s/%s', skipping\n",
> ar->hw_params.fw.dir, name);
> ret =3D -ENOMEDIUM;
> @@ -2079,43 +2080,47 @@ int ath10k_core_start(struct ath10k *ar, enum
> ath10k_firmware_mode mode,
>=20
> ar->running_fw =3D fw;
>=20
> - ath10k_bmi_start(ar);
> + if (!test_bit(ATH10K_FW_FEATURE_NON_BMI,
> + ar->running_fw->fw_file.fw_features)) {
> + ath10k_bmi_start(ar);
>=20
> - if (ath10k_init_configure_target(ar)) {
> - status =3D -EINVAL;
> - goto err;
> - }
> -
> - status =3D ath10k_download_cal_data(ar);
> - if (status)
> - goto err;
> + if (ath10k_init_configure_target(ar)) {
> + status =3D -EINVAL;
> + goto err;
> + }
>=20
> - /* Some of of qca988x solutions are having global reset issue
> - * during target initialization. Bypassing PLL setting before
> - * downloading firmware and letting the SoC run on REF_CLK is
> - * fixing the problem. Corresponding firmware change is also needed
> - * to set the clock source once the target is initialized.
> - */
> - if (test_bit(ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT,
> - ar->running_fw->fw_file.fw_features)) {
> - status =3D ath10k_bmi_write32(ar, hi_skip_clock_init, 1);
> - if (status) {
> - ath10k_err(ar, "could not write to skip_clock_init:
> %d\n",
> - status);
> + status =3D ath10k_download_cal_data(ar);
> + if (status)
> goto err;
> +
> + /* Some of of qca988x solutions are having global reset issue
> + * during target initialization. Bypassing PLL setting before
> + * downloading firmware and letting the SoC run on REF_CLK is
> + * fixing the problem. Corresponding firmware change is also
> + * needed to set the clock source once the target is
> + * initialized.
> + */
> + if
> (test_bit(ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT,
> + ar->running_fw->fw_file.fw_features)) {
> + status =3D ath10k_bmi_write32(ar, hi_skip_clock_init, 1);
> + if (status) {
> + ath10k_err(ar, "could not write to
> skip_clock_init: %d\n",
> + status);
> + goto err;
> + }
> }
> - }
>=20
> - status =3D ath10k_download_fw(ar);
> - if (status)
> - goto err;
> + status =3D ath10k_download_fw(ar);
> + if (status)
> + goto err;
>=20
> - status =3D ath10k_init_uart(ar);
> - if (status)
> - goto err;
> + status =3D ath10k_init_uart(ar);
> + if (status)
> + goto err;
>=20
> - if (ar->hif.bus =3D=3D ATH10K_BUS_SDIO)
> - ath10k_init_sdio(ar);
> + if (ar->hif.bus =3D=3D ATH10K_BUS_SDIO)
> + ath10k_init_sdio(ar);
> + }
>=20
> ar->htc.htc_ops.target_send_suspend_complete =3D
> ath10k_send_suspend_complete;
> @@ -2126,9 +2131,12 @@ int ath10k_core_start(struct ath10k *ar, enum
> ath10k_firmware_mode mode,
> goto err;
> }
>=20
> - status =3D ath10k_bmi_done(ar);
> - if (status)
> - goto err;
> + if (!test_bit(ATH10K_FW_FEATURE_NON_BMI,
> + ar->running_fw->fw_file.fw_features)) {
> + status =3D ath10k_bmi_done(ar);
> + if (status)
> + goto err;
> + }
>=20
> status =3D ath10k_wmi_attach(ar);
> if (status) {
> @@ -2371,19 +2379,34 @@ static int ath10k_core_probe_fw(struct ath10k *ar=
)
> return ret;
> }
>=20
> - memset(&target_info, 0, sizeof(target_info));
> - if (ar->hif.bus =3D=3D ATH10K_BUS_SDIO)
> + switch (ar->hif.bus) {
> + case ATH10K_BUS_SDIO:
> + memset(&target_info, 0, sizeof(target_info));
> ret =3D ath10k_bmi_get_target_info_sdio(ar, &target_info);
> - else
> + if (ret) {
> + ath10k_err(ar, "could not get target info (%d)\n", ret);
> + goto err_power_down;
> + }
> + ar->target_version =3D target_info.version;
> + ar->hw->wiphy->hw_version =3D target_info.version;
> + break;
> + case ATH10K_BUS_PCI:
> + case ATH10K_BUS_AHB:
> + memset(&target_info, 0, sizeof(target_info));
> ret =3D ath10k_bmi_get_target_info(ar, &target_info);
> - if (ret) {
> - ath10k_err(ar, "could not get target info (%d)\n", ret);
> - goto err_power_down;
> + if (ret) {
> + ath10k_err(ar, "could not get target info (%d)\n", ret);
> + goto err_power_down;
> + }
> + ar->target_version =3D target_info.version;
> + ar->hw->wiphy->hw_version =3D target_info.version;
> + break;
> + case ATH10K_BUS_SNOC:
> + break;
> + default:
> + ath10k_err(ar, "incorrect hif bus type: %d\n", ar->hif.bus);
> }
>=20
> - ar->target_version =3D target_info.version;
> - ar->hw->wiphy->hw_version =3D target_info.version;
> -
> ret =3D ath10k_init_hw_params(ar);
> if (ret) {
> ath10k_err(ar, "could not get hw params (%d)\n", ret);
> @@ -2403,37 +2426,40 @@ static int ath10k_core_probe_fw(struct ath10k *ar=
)
>=20
> ath10k_debug_print_hwfw_info(ar);
>=20
> - ret =3D ath10k_core_pre_cal_download(ar);
> - if (ret) {
> - /* pre calibration data download is not necessary
> - * for all the chipsets. Ignore failures and continue.
> - */
> - ath10k_dbg(ar, ATH10K_DBG_BOOT,
> - "could not load pre cal data: %d\n", ret);
> - }
> + if (!test_bit(ATH10K_FW_FEATURE_NON_BMI,
> + ar->normal_mode_fw.fw_file.fw_features)) {
> + ret =3D ath10k_core_pre_cal_download(ar);
> + if (ret) {
> + /* pre calibration data download is not necessary
> + * for all the chipsets. Ignore failures and continue.
> + */
> + ath10k_dbg(ar, ATH10K_DBG_BOOT,
> + "could not load pre cal data: %d\n", ret);
> + }
>=20
> - ret =3D ath10k_core_get_board_id_from_otp(ar);
> - if (ret && ret !=3D -EOPNOTSUPP) {
> - ath10k_err(ar, "failed to get board id from otp: %d\n",
> - ret);
> - goto err_free_firmware_files;
> - }
> + ret =3D ath10k_core_get_board_id_from_otp(ar);
> + if (ret && ret !=3D -EOPNOTSUPP) {
> + ath10k_err(ar, "failed to get board id from otp: %d\n",
> + ret);
> + goto err_free_firmware_files;
> + }
>=20
> - ret =3D ath10k_core_check_smbios(ar);
> - if (ret)
> - ath10k_dbg(ar, ATH10K_DBG_BOOT, "SMBIOS bdf variant name
> not set.\n");
> + ret =3D ath10k_core_check_smbios(ar);
> + if (ret)
> + ath10k_dbg(ar, ATH10K_DBG_BOOT, "SMBIOS bdf
> variant name not set.\n");
>=20
> - ret =3D ath10k_core_check_dt(ar);
> - if (ret)
> - ath10k_dbg(ar, ATH10K_DBG_BOOT, "DT bdf variant name not
> set.\n");
> + ret =3D ath10k_core_check_dt(ar);
> + if (ret)
> + ath10k_dbg(ar, ATH10K_DBG_BOOT, "DT bdf variant
> name not set.\n");
>=20
> - ret =3D ath10k_core_fetch_board_file(ar);
> - if (ret) {
> - ath10k_err(ar, "failed to fetch board file: %d\n", ret);
> - goto err_free_firmware_files;
> - }
> + ret =3D ath10k_core_fetch_board_file(ar);
> + if (ret) {
> + ath10k_err(ar, "failed to fetch board file: %d\n", ret);
> + goto err_free_firmware_files;
> + }
>=20
> - ath10k_debug_print_board_info(ar);
> + ath10k_debug_print_board_info(ar);
> + }
>=20
> ret =3D ath10k_core_init_firmware_features(ar);
> if (ret) {
> @@ -2442,11 +2468,15 @@ static int ath10k_core_probe_fw(struct ath10k *ar=
)
> goto err_free_firmware_files;
> }
>=20
> - ret =3D ath10k_swap_code_seg_init(ar, &ar->normal_mode_fw.fw_file);
> - if (ret) {
> - ath10k_err(ar, "failed to initialize code swap segment: %d\n",
> - ret);
> - goto err_free_firmware_files;
> + if (!test_bit(ATH10K_FW_FEATURE_NON_BMI,
> + ar->normal_mode_fw.fw_file.fw_features)) {
> + ret =3D ath10k_swap_code_seg_init(ar,
> + &ar-
> >normal_mode_fw.fw_file);
> + if (ret) {
> + ath10k_err(ar, "failed to initialize code swap segment:
> %d\n",
> + ret);
> + goto err_free_firmware_files;
> + }
> }
>=20
> mutex_lock(&ar->conf_mutex);
> diff --git a/drivers/net/wireless/ath/ath10k/core.h
> b/drivers/net/wireless/ath/ath10k/core.h
> index 81285ab30a7d..b747ef52c186 100644
> --- a/drivers/net/wireless/ath/ath10k/core.h
> +++ b/drivers/net/wireless/ath/ath10k/core.h
> @@ -618,6 +618,9 @@ enum ath10k_fw_features {
> /* Firmware allows management tx by reference instead of by value. */
> ATH10K_FW_FEATURE_MGMT_TX_BY_REF =3D 18,
>=20
> + /* Firmware load is done externally, not by bmi */
> + ATH10K_FW_FEATURE_NON_BMI =3D 19,
> +
> /* keep last */
> ATH10K_FW_FEATURE_COUNT,
> };
> --
> 2.11.0

2017-12-21 16:05:42

by Rakesh Pillai

[permalink] [raw]
Subject: [PATCH v2 2/3] ath10k: Add debug mask for SNOC bus type

From: Govind Singh <[email protected]>

WCN3990 target uses SNOC bus.
Add debug mask for SNOC bus type.

Signed-off-by: Govind Singh <[email protected]>
Signed-off-by: Rakesh Pillai <[email protected]>
---
drivers/net/wireless/ath/ath10k/debug.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h
index 5e662994c49a..134fb68ae546 100644
--- a/drivers/net/wireless/ath/ath10k/debug.h
+++ b/drivers/net/wireless/ath/ath10k/debug.h
@@ -42,6 +42,7 @@ enum ath10k_debug_mask {
ATH10K_DBG_SDIO_DUMP = 0x00020000,
ATH10K_DBG_USB = 0x00040000,
ATH10K_DBG_USB_BULK = 0x00080000,
+ ATH10K_DBG_SNOC = 0x00100000,
ATH10K_DBG_ANY = 0xffffffff,
};

--
2.11.0

2017-12-22 10:06:44

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] ath10k: Add fw feature flag for non-bmi firmware load

Rakesh Pillai <[email protected]> writes:

> I have sent a v3 for this patch with the corrected ownership.

Please always resend the whole patch series[1], not just the individual
patch. It's just too much work for me try to fish the correct versions
from different places in patchwork.

But no need to resend this time, I already took the v3 version in
pending branch. But in the future keep this in mind.

[1] https://wireless.wiki.kernel.org/en/developers/documentation/submitting=
patches#resubmit_the_whole_patchset

--=20
Kalle Valo=