From patchwork Wed Aug 7 14:34:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anilkumar Kolli X-Patchwork-Id: 11082293 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB4CB912 for ; Wed, 7 Aug 2019 14:35:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAD1C285B6 for ; Wed, 7 Aug 2019 14:35:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF3C728A7E; Wed, 7 Aug 2019 14:35:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 42CEA285B6 for ; Wed, 7 Aug 2019 14:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=DtEOVEojGfS8aMOdHxxKu77CQH2yPRxgii2UACgm4k4=; b=RZC2K/zG1CSfff Qx3Bu+OIkmqiB1Eg3YUuq9teU9yboD42OsCXx3FguNn9WoAPueB61b02Nt3JCoN3fVaCRNIAHt6Ev Hp+qnoeqhr7xtgjR3xChEKorutZwZpbOe5+aV/bu59a441epDfSrWoWDtWgS59LpLZYIfHE8JnChF wtQlTYoaU3OJBRs8UUla3nl8Jc1/Dis00iqHElLLUY8gFVJbDfcU/yJwmJ1fs2MFjIhtt8+MJahHu 58FkT8m9FWZ389kSg2rhEJM+JCdAknFyJTSpXsEajPBoCm5Q3qKIc4XaqODPvKmLnF7hT4Ngs00xr pZ5pbUQ6aq7PtZA8eATQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvN1r-0006JA-F1; Wed, 07 Aug 2019 14:35:03 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvN1f-0005xL-Va for ath11k@lists.infradead.org; Wed, 07 Aug 2019 14:34:55 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9946860E5A; Wed, 7 Aug 2019 14:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565188490; bh=QCVcaaTjEi6k9f/6v8eEOOnszqXC8hpTXXKSQLwK2Uo=; h=From:To:Cc:Subject:Date:From; b=bEkgy+NyqESaRdXNfz9wdREQFvOOALJXPROAUjPpZxBhDNMHGalVUHza0f22zw/z9 /4ZHS/hmY0oJSeWSUCuv8gPERhKTovn+AfGH12vrSNGc979nZWG/VvfBu2EmJDFbmC TvIaEvlO5yj+KspsnAl/cJWVqEJHOsOvDYWj4dmM= Received: from localhost (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: akolli@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E2D3E60CEC; Wed, 7 Aug 2019 14:34:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565188489; bh=QCVcaaTjEi6k9f/6v8eEOOnszqXC8hpTXXKSQLwK2Uo=; h=From:To:Cc:Subject:Date:From; b=aal2oOmbFDITZPyLgi5WMMuEYgiiqDqqxG96+yhPanLBdbXFHLFb0gQyqDD29j2rk 2EAhRAV8jsUpFzpKppPLkBBfyRjBo4SbgoPE6Jlf+5fPkLAks3u0y2matLZNNRXV0C CX9IIcFEI2zWuZJRm9OBxV65udQtJFDzhtJ3NnAk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E2D3E60CEC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=akolli@codeaurora.org From: Anilkumar Kolli To: ath11k@lists.infradead.org Subject: [PATCH] ath11k: remove bdf-addr from dtsi Date: Wed, 7 Aug 2019 20:04:39 +0530 Message-Id: <1565188479-3027-1-git-send-email-akolli@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190807_073452_108853_BBDB69BE X-CRM114-Status: GOOD ( 10.45 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Remove bdf-addr from DT entry and hard code in driver. Signed-off-by: Anilkumar Kolli --- 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(-) diff --git a/drivers/net/wireless/ath/ath11k/qcom,ath11k.txt b/drivers/net/wireless/ath/ath11k/qcom,ath11k.txt index 3e00f470751b..1824238b4b50 100644 --- a/drivers/net/wireless/ath/ath11k/qcom,ath11k.txt +++ b/drivers/net/wireless/ath/ath11k/qcom,ath11k.txt @@ -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>; }; diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c index dffb8629f14b..b79d7e908967 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -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) { diff --git a/drivers/net/wireless/ath/ath11k/qmi.h b/drivers/net/wireless/ath/ath11k/qmi.h index fab03f5af271..111ae48b9343 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.h +++ b/drivers/net/wireless/ath/ath11k/qmi.h @@ -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;