@@ -12,8 +12,6 @@ Optional properties:
- interrupt-names: Must include the entries for CE interrupt
names ("ce0" to "ce11") and hw srng interrupt
names.
-- qcom,tgt-mem-mode: Target memory mode used to select BDF Address
-- qcom,bdf-addr: List of BDF address used to configure for the device
- qcom,rproc: DT entry of q6v5-wcss
Example:
@@ -125,7 +123,5 @@ wifi0: wifi@c000000 {
"wbm2host-tx-completions-ring2",
"wbm2host-tx-completions-ring1",
"tcl2host-status-ring";
- qcom,tgt-mem-mode = <0>;
- qcom,bdf-addr = <0x4BE00000 0x4BE00000>;
qcom,rproc = <&qcom_q6v5_wcss>;
};
@@ -1676,22 +1676,14 @@ static int ath11k_qmi_respond_fw_mem_request(struct ath11k_base *ab)
static int ath11k_qmi_alloc_target_mem_chunk(struct ath11k_base *ab)
{
- u32 bdf_location[2] = {0, 0};
struct device *dev = ab->dev;
int i, idx, mode = ab->qmi.target_mem_mode;
- if (of_property_read_u32_array(dev->of_node, "qcom,bdf-addr",
- &bdf_location[0],
- ARRAY_SIZE(bdf_location))) {
- ath11k_warn(ab, "qmi no bdf_addr in device_tree\n");
- return -EINVAL;
- }
-
for (i = 0, idx = 0; i < ab->qmi.mem_seg_count; i++) {
switch (ab->qmi.target_mem[i].type) {
case BDF_MEM_REGION_TYPE:
- ab->qmi.target_mem[idx].paddr = bdf_location[mode];
- ab->qmi.target_mem[idx].vaddr = bdf_location[mode];
+ ab->qmi.target_mem[idx].paddr = ATH11K_QMI_BDF_ADDRESS;
+ ab->qmi.target_mem[idx].vaddr = ATH11K_QMI_BDF_ADDRESS;
ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size;
ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type;
idx++;
@@ -1856,7 +1848,6 @@ static int ath11k_qmi_load_bdf(struct ath11k_base *ab)
struct qmi_wlanfw_bdf_download_resp_msg_v01 resp;
struct device *dev = ab->dev;
struct qmi_txn txn = {};
- u32 location[2];
void __iomem *bdf_addr = NULL;
int type, ret;
@@ -1865,15 +1856,7 @@ static int ath11k_qmi_load_bdf(struct ath11k_base *ab)
return -ENOMEM;
memset(&resp, 0, sizeof(resp));
- if (of_property_read_u32_array(dev->of_node, "qcom,bdf-addr", &location[0],
- ARRAY_SIZE(location))) {
- ath11k_err(ab, "qmi bdf_addr is not in device_tree\n");
- ret = -EINVAL;
- goto out;
- }
-
- bdf_addr = ioremap(location[ab->qmi.target_mem_mode],
- ATH11K_QMI_BDF_MAX_SIZE);
+ bdf_addr = ioremap(ATH11K_QMI_BDF_ADDRESS, ATH11K_QMI_BDF_MAX_SIZE);
if (!bdf_addr) {
ath11k_warn(ab, "qmi ioremap error for BDF\n");
ret = -EIO;
@@ -2414,13 +2397,7 @@ int ath11k_qmi_init_service(struct ath11k_base *ab)
memset(&ab->qmi.target_mem, 0, sizeof(struct target_mem_chunk));
ab->qmi.ab = ab;
- if (of_property_read_u32(dev->of_node,
- "qcom,tgt-mem-mode",
- &ab->qmi.target_mem_mode)) {
- ath11k_err(ab, "No ipq8074_tgt_mem_mode entry in dev-tree.\n");
- ab->qmi.target_mem_mode = 0;
- }
-
+ ab->qmi.target_mem_mode = ATH11K_QMI_TARGET_MEM_MODE_DEFAULT;
ret = qmi_handle_init(&ab->qmi.handle, ATH11K_QMI_RESP_LEN_MAX,
&ath11k_qmi_ops, ath11k_qmi_msg_handlers);
if (ret < 0) {
@@ -12,6 +12,7 @@
#define ATH11K_HOST_VERSION_STRING "WIN"
#define ATH11K_QMI_WLANFW_TIMEOUT_MS 5000
#define ATH11K_QMI_MAX_BDF_FILE_NAME_SIZE 64
+#define ATH11K_QMI_BDF_ADDRESS 0x4B0C0000
#define ATH11K_QMI_BDF_MAX_SIZE (256 * 1024)
#define ATH11K_QMI_CALDATA_OFFSET (128 * 1024)
#define ATH11K_QMI_WLANFW_MAX_BUILD_ID_LEN_V01 128
@@ -31,6 +32,7 @@
#define QMI_WLANFW_MAX_DATA_SIZE_V01 6144
#define ATH11K_FIRMWARE_MODE_OFF 4
+#define ATH11K_QMI_TARGET_MEM_MODE_DEFAULT 0
struct ath11k_base;
Remove bdf-addr from DT entry and hard code in driver. Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org> --- drivers/net/wireless/ath/ath11k/qcom,ath11k.txt | 4 ---- drivers/net/wireless/ath/ath11k/qmi.c | 31 ++++--------------------- drivers/net/wireless/ath/ath11k/qmi.h | 2 ++ 3 files changed, 6 insertions(+), 31 deletions(-)