From patchwork Wed Sep 25 04:43:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 11160003 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 10A3617D4 for ; Wed, 25 Sep 2019 04:47:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E234121A4A for ; Wed, 25 Sep 2019 04:47:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LA+XJs1C"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="K3xZDwNN"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="K3xZDwNN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E234121A4A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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=GlvF71m1XTqZNSKNzwo8D2rcNIp9o5jZp3oTLFKa6TU=; b=LA+XJs1CQniVFN m822ikr/b5FoTwTmUQbWmCCUoI1MUYaqLxs3eGbU3Y0nlD4moQgERPG1phkNjLiFLMyowURVR1w/r Bn/NGPbfy0+OGNGgcRPrHWsz1acOOd57ntTvCxeZbFSAZ7ZfTlzWgeqSLYmbQPSur1fSc/SoTmU9q BirGKKcPnBwhstfcdj+sOQWjyB/hunoHEk73dWoiI9nJh+V8o2F/Bfg6LhRFX4KHrewlPJWsfKWIJ 2ky6w6NahVwCluxwbftG5NuXwTc/no6fKrzr928g5pr9WEf8mR3+2AVxw69+DV8TTJIkhldVRLOpR cIrtK5KK0gIbTIlUOdBw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCzD2-0003GY-41; Wed, 25 Sep 2019 04:47:24 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCzCx-0003FC-QD for ath11k@lists.infradead.org; Wed, 25 Sep 2019 04:47:21 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A7F6761156; Wed, 25 Sep 2019 04:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569386838; bh=QafYhI2UhSfAF4Grg9ZswWe88ZulvAGCXUpjODM4s9Y=; h=From:To:Subject:Date:From; b=K3xZDwNNraHQ0nGWEM89DE3jjOv6NLzW6ah2R1KRmemEjzozDsxRe03bjb+q7KpaP E5MfZyJoRU32rB8Ya/LOfQa+1X54EsZvwvDaBqj1iNGumGdUoOa0i0+RNyjTcThEeD zODNjupbTvW6XoJLJ3CwqM52cUeQtKP7ozWKDy18= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from vasanth-lnx.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vthiagar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 819CA602E1 for ; Wed, 25 Sep 2019 04:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569386838; bh=QafYhI2UhSfAF4Grg9ZswWe88ZulvAGCXUpjODM4s9Y=; h=From:To:Subject:Date:From; b=K3xZDwNNraHQ0nGWEM89DE3jjOv6NLzW6ah2R1KRmemEjzozDsxRe03bjb+q7KpaP E5MfZyJoRU32rB8Ya/LOfQa+1X54EsZvwvDaBqj1iNGumGdUoOa0i0+RNyjTcThEeD zODNjupbTvW6XoJLJ3CwqM52cUeQtKP7ozWKDy18= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 819CA602E1 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=vthiagar@codeaurora.org From: Vasanthakumar Thiagarajan To: ath11k@lists.infradead.org Subject: [PATCH bringup 1/5] ath11k: Use C99 structure initialization for target_service_to_ce_map_wlan[] Date: Wed, 25 Sep 2019 10:13:55 +0530 Message-Id: <1569386639-1242-1-git-send-email-vthiagar@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-20190924_214719_895565_F6221C0F X-CRM114-Status: UNSURE ( 9.74 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [198.145.29.96 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 Also cleanup endian conversion for 0 in the last entry of target_service_to_ce_map_wlan[] with a comment saying it is the terminator entry of the map table as suggested during public review. Signed-off-by: Vasanthakumar Thiagarajan --- drivers/net/wireless/ath/ath11k/ahb.c | 132 +++++++++++++++++----------------- 1 file changed, 64 insertions(+), 68 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index e1fee70..db67bab 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -153,118 +153,114 @@ */ static const struct service_to_pipe target_service_to_ce_map_wlan[] = { { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), - __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ - __cpu_to_le32(3), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(3), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), - __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ - __cpu_to_le32(2), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), - __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ - __cpu_to_le32(3), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(3), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), - __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ - __cpu_to_le32(2), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), - __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ - __cpu_to_le32(3), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(3), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), - __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ - __cpu_to_le32(2), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), - __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ - __cpu_to_le32(3), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(3), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), - __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ - __cpu_to_le32(2), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), - __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ - __cpu_to_le32(3), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(3), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), - __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ - __cpu_to_le32(2), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1), - __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ - __cpu_to_le32(7), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(7), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1), - __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ - __cpu_to_le32(2), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC2), - __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ - __cpu_to_le32(9), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC2), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(9), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC2), - __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ - __cpu_to_le32(2), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC2), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), - __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ - __cpu_to_le32(0), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(0), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), - __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ - __cpu_to_le32(1), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(1), }, { /* not used */ - __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), - __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ - __cpu_to_le32(0), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(0), }, { /* not used */ - __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), - __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ - __cpu_to_le32(1), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(1), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), - __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ - __cpu_to_le32(4), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(4), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), - __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ - __cpu_to_le32(1), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(1), }, { - __cpu_to_le32(ATH11K_HTC_SVC_ID_PKT_LOG), - __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ - __cpu_to_le32(5), + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_PKT_LOG), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(5), }, /* (Additions here) */ - { /* must be last */ - __cpu_to_le32(0), - __cpu_to_le32(0), - __cpu_to_le32(0), - }, + { /* terminator entry */ } }; #define ATH11K_IRQ_CE0_OFFSET 4 From patchwork Wed Sep 25 04:43:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 11159997 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4B771747 for ; Wed, 25 Sep 2019 04:47:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 96C4E21A4A for ; Wed, 25 Sep 2019 04:47:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L6pb/Wdq"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="FxS4Lf/R"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="FxS4Lf/R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 96C4E21A4A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References:In-Reply-To: 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: List-Owner; bh=/TNHkaDNuF+LQOuMSSxDcm6KZD+50jwNcidV5c2Tfp8=; b=L6pb/Wdqf2qUbt vRdoQgMKe1c7DudTQhZ6FsvtU141VNqJEz3bJdaTaNbEYOesD8G1akSYC9kUzUK9zL9ivSDg+5G44 KoAD9ywlkKizAIsuqcX0lE7i3XyfRL9g2DkCXOuzQc9FFhjkeFoiY3qOL+wLKsLH8w4Zb7F+gbRWf 0jvdX3i8CDiruNiPCWq5GKli+123HUkfbCkuEam1jcGtVkJ5MqkrfMLlRnRA5pyrfajX601Dekhku ocHRny6JRACPGiBM9F5xKhBg3CZWXryuzmuoK5+Z+2snSq96U/CgoArvlGZcOeWXSIXH8sdVZzkeh wtttaSc/sJBMnCqcDQLA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCzD1-0003GH-3q; Wed, 25 Sep 2019 04:47:23 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCzCy-0003FF-0e for ath11k@lists.infradead.org; Wed, 25 Sep 2019 04:47:21 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B33CF6115A; Wed, 25 Sep 2019 04:47:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569386839; bh=sj3/dzaiVFjE669S9LgFLSDxgEM3j1tFMtqCm6wJ12I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FxS4Lf/RLnq2GN4oBWga4ZXJ0FdlbIuZYD8Jlbk+H8gBd6JNZyCBc2T+sa7c3H/GN PDujliwamOrdnZSOkUGkKW9IhJiQajgEL19/3nJAp+8Bru0keLjKrBgO0n28PxLrz6 9KRuBD3upvUxD2IPoHd/7FRPn3C/UcXSW5DdQ0U8= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.0 Received: from vasanth-lnx.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vthiagar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id B611560A05 for ; Wed, 25 Sep 2019 04:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569386839; bh=sj3/dzaiVFjE669S9LgFLSDxgEM3j1tFMtqCm6wJ12I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FxS4Lf/RLnq2GN4oBWga4ZXJ0FdlbIuZYD8Jlbk+H8gBd6JNZyCBc2T+sa7c3H/GN PDujliwamOrdnZSOkUGkKW9IhJiQajgEL19/3nJAp+8Bru0keLjKrBgO0n28PxLrz6 9KRuBD3upvUxD2IPoHd/7FRPn3C/UcXSW5DdQ0U8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B611560A05 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=vthiagar@codeaurora.org From: Vasanthakumar Thiagarajan To: ath11k@lists.infradead.org Subject: [PATCH bringup 2/5] ath11k: Remove ring mask macros defined for 0 Date: Wed, 25 Sep 2019 10:13:56 +0530 Message-Id: <1569386639-1242-2-git-send-email-vthiagar@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1569386639-1242-1-git-send-email-vthiagar@codeaurora.org> References: <1569386639-1242-1-git-send-email-vthiagar@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190924_214720_101393_87CA3CC4 X-CRM114-Status: UNSURE ( 7.78 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.7 (-) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-1.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [198.145.29.96 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.8 UPPERCASE_50_75 message body is 50-75% uppercase 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 We'll define these macros with non-zero ring mask when required in future. Signed-off-by: Vasanthakumar Thiagarajan --- drivers/net/wireless/ath/ath11k/ahb.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index db67bab..a5e6956 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -323,7 +323,6 @@ #define ATH11K_TX_RING_MASK_0 0x1 #define ATH11K_TX_RING_MASK_1 0x2 #define ATH11K_TX_RING_MASK_2 0x4 -#define ATH11K_TX_RING_MASK_3 0x0 #define ATH11K_RX_RING_MASK_0 0x1 #define ATH11K_RX_RING_MASK_1 0x2 @@ -331,40 +330,27 @@ #define ATH11K_RX_RING_MASK_3 0x8 #define ATH11K_RX_ERR_RING_MASK_0 0x1 -#define ATH11K_RX_ERR_RING_MASK_1 0x0 -#define ATH11K_RX_ERR_RING_MASK_2 0x0 -#define ATH11K_RX_ERR_RING_MASK_3 0x0 #define ATH11K_RX_WBM_REL_RING_MASK_0 0x1 -#define ATH11K_RX_WBM_REL_RING_MASK_1 0x0 -#define ATH11K_RX_WBM_REL_RING_MASK_2 0x0 -#define ATH11K_RX_WBM_REL_RING_MASK_3 0x0 #define ATH11K_REO_STATUS_RING_MASK_0 0x1 -#define ATH11K_REO_STATUS_RING_MASK_1 0x0 -#define ATH11K_REO_STATUS_RING_MASK_2 0x0 -#define ATH11K_REO_STATUS_RING_MASK_3 0x0 #define ATH11K_RXDMA2HOST_RING_MASK_0 0x1 #define ATH11K_RXDMA2HOST_RING_MASK_1 0x2 #define ATH11K_RXDMA2HOST_RING_MASK_2 0x4 -#define ATH11K_RXDMA2HOST_RING_MASK_3 0x0 #define ATH11K_HOST2RXDMA_RING_MASK_0 0x1 #define ATH11K_HOST2RXDMA_RING_MASK_1 0x2 #define ATH11K_HOST2RXDMA_RING_MASK_2 0x4 -#define ATH11K_HOST2RXDMA_RING_MASK_3 0x0 #define ATH11K_RX_MON_STATUS_RING_MASK_0 0x1 #define ATH11K_RX_MON_STATUS_RING_MASK_1 0x2 #define ATH11K_RX_MON_STATUS_RING_MASK_2 0x4 -#define ATH11K_RX_MON_STATUS_RING_MASK_3 0x0 const u8 ath11k_tx_ring_mask[ATH11K_EXT_IRQ_GRP_NUM_MAX] = { ATH11K_TX_RING_MASK_0, ATH11K_TX_RING_MASK_1, ATH11K_TX_RING_MASK_2, - ATH11K_TX_RING_MASK_3, }; const u8 rx_mon_status_ring_mask[ATH11K_EXT_IRQ_GRP_NUM_MAX] = { @@ -384,37 +370,26 @@ const u8 ath11k_rx_err_ring_mask[ATH11K_EXT_IRQ_GRP_NUM_MAX] = { ATH11K_RX_ERR_RING_MASK_0, - ATH11K_RX_ERR_RING_MASK_1, - ATH11K_RX_ERR_RING_MASK_2, - ATH11K_RX_ERR_RING_MASK_3, }; const u8 ath11k_rx_wbm_rel_ring_mask[ATH11K_EXT_IRQ_GRP_NUM_MAX] = { ATH11K_RX_WBM_REL_RING_MASK_0, - ATH11K_RX_WBM_REL_RING_MASK_1, - ATH11K_RX_WBM_REL_RING_MASK_2, - ATH11K_RX_WBM_REL_RING_MASK_3, }; const u8 ath11k_reo_status_ring_mask[ATH11K_EXT_IRQ_GRP_NUM_MAX] = { ATH11K_REO_STATUS_RING_MASK_0, - ATH11K_REO_STATUS_RING_MASK_1, - ATH11K_REO_STATUS_RING_MASK_2, - ATH11K_REO_STATUS_RING_MASK_3, }; const u8 ath11k_rxdma2host_ring_mask[ATH11K_EXT_IRQ_GRP_NUM_MAX] = { ATH11K_RXDMA2HOST_RING_MASK_0, ATH11K_RXDMA2HOST_RING_MASK_1, ATH11K_RXDMA2HOST_RING_MASK_2, - ATH11K_RXDMA2HOST_RING_MASK_3, }; const u8 ath11k_host2rxdma_ring_mask[ATH11K_EXT_IRQ_GRP_NUM_MAX] = { ATH11K_HOST2RXDMA_RING_MASK_0, ATH11K_HOST2RXDMA_RING_MASK_1, ATH11K_HOST2RXDMA_RING_MASK_2, - ATH11K_HOST2RXDMA_RING_MASK_3, }; /* enum ext_irq_num - irq nubers that can be used by external modules From patchwork Wed Sep 25 04:43:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 11159999 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B2DC17D4 for ; Wed, 25 Sep 2019 04:47:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC8DE21A4A for ; Wed, 25 Sep 2019 04:47:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UvA7mmNj"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="E9d+GFlJ"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="kL1sNrj/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC8DE21A4A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References:In-Reply-To: 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: List-Owner; bh=c52U0McjCF7eI9df6mBbS+jAdbXI+KACPDJHKG7V64Y=; b=UvA7mmNjYeeoMQ 2cg+vZIotAxlwt05B9aUb3OR1dkdhiFjbmw+ajzRU4F3CKjAOjjDr/UxgxSxqT0exiD/aOSwCLEap zcNBLx1gLKo5FMD9qp7UR3QxDrI6Ozj4WJprToNoEAQ0Gh8gHiv+0qIDZhrip/q13L1Lf8Ly94NiE ighoOE8uBaJKGEPhxjL6+LWZTw0AZyKmi6vRJ5iQV9rfmmSxQfAIzmksAAReDndBHS3vNUHvJGWx7 VJq8tDp9b4jg03EjOH1bd1powbeGa0+A9cpb3HsfKc7k2MtFWqTm8hLIFp2Vjv0G5cCg4p4DfXKvB yF3/VeVTROf66wC0itHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCzD2-0003H9-G8; Wed, 25 Sep 2019 04:47:24 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCzCz-0003Fa-Dg for ath11k@lists.infradead.org; Wed, 25 Sep 2019 04:47:22 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 208F86115D; Wed, 25 Sep 2019 04:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569386841; bh=4jq8IcOT7BP87srGqrm0Gk6GW5j54iUL4fSNJZk0k1c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E9d+GFlJOOfsxEiyi6BQH9T4D16J6OwtwSeoEpLB/ArYfprUzKDAu6v3kun5faHbU 12hDI3stS/TxPOAgktu3bVEgAYwAIyk0R+6ywKIOAuah11QHGnOvNojp+am0j8V1Wp o6zrVhPQ5uwTubIxG0I5EEEx4vmSToucv5VT+u+E= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from vasanth-lnx.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vthiagar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E997D602E1 for ; Wed, 25 Sep 2019 04:47:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569386840; bh=4jq8IcOT7BP87srGqrm0Gk6GW5j54iUL4fSNJZk0k1c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kL1sNrj/ZA8YnXKTIK74+EcUhWnQ3LL102zQA/0SloEat4GJZcsyOZmObtGC5i+Wc 4Centd2YnMUpZVG12NTxx0sGGjZ9mquBow8ycr+Z6o/J6CwrGbqYHYjDiP5rnjBnrk 6ko3Asw7GY2Vajay2q7cuSF4EXxvYFSI1tjBpDw4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E997D602E1 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=vthiagar@codeaurora.org From: Vasanthakumar Thiagarajan To: ath11k@lists.infradead.org Subject: [PATCH bringup 3/5] ath11k: Move ath11k_ahb_read32() and ath11k_ahb_write32() to ahb.h Date: Wed, 25 Sep 2019 10:13:57 +0530 Message-Id: <1569386639-1242-3-git-send-email-vthiagar@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1569386639-1242-1-git-send-email-vthiagar@codeaurora.org> References: <1569386639-1242-1-git-send-email-vthiagar@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190924_214721_522155_E99F6E1D X-CRM114-Status: UNSURE ( 8.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [198.145.29.96 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 And define them as static inline. Signed-off-by: Vasanthakumar Thiagarajan --- drivers/net/wireless/ath/ath11k/ahb.c | 10 ---------- drivers/net/wireless/ath/ath11k/ahb.h | 12 ++++++++++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index a5e6956..0f26979 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -434,16 +434,6 @@ enum ext_irq_num { tcl2host_status_ring, }; -inline u32 ath11k_ahb_read32(struct ath11k_base *ab, u32 offset) -{ - return ioread32(ab->mem + offset); -} - -inline void ath11k_ahb_write32(struct ath11k_base *ab, u32 offset, u32 value) -{ - iowrite32(value, ab->mem + offset); -} - static void ath11k_ahb_kill_tasklets(struct ath11k_base *ab) { int i; diff --git a/drivers/net/wireless/ath/ath11k/ahb.h b/drivers/net/wireless/ath/ath11k/ahb.h index 8a6b308..4646f1b 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.h +++ b/drivers/net/wireless/ath/ath11k/ahb.h @@ -10,8 +10,16 @@ #define ATH11K_AHB_RECOVERY_TIMEOUT (3 * HZ) struct ath11k_base; -u32 ath11k_ahb_read32(struct ath11k_base *ab, u32 address); -void ath11k_ahb_write32(struct ath11k_base *ab, u32 address, u32 data); +static inline u32 ath11k_ahb_read32(struct ath11k_base *ab, u32 offset) +{ + return ioread32(ab->mem + offset); +} + +static inline void ath11k_ahb_write32(struct ath11k_base *ab, u32 offset, u32 value) +{ + iowrite32(value, ab->mem + offset); +} + void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab); void ath11k_ahb_ext_irq_disable(struct ath11k_base *ab); int ath11k_ahb_start(struct ath11k_base *ab); From patchwork Wed Sep 25 04:43:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 11160001 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96F8B14ED for ; Wed, 25 Sep 2019 04:47:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 74A2A21A4A for ; Wed, 25 Sep 2019 04:47:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dDAprPkF"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="BKJO6Ada"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="BKJO6Ada" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74A2A21A4A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References:In-Reply-To: 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: List-Owner; bh=z8JTOn2TIJ0+MWSIit4iC7+oXRsjBBRgxEj0st4It/A=; b=dDAprPkFVjTRaZ 2Pf8VAjv3YUSl+gYs4xqZ4mOJq/YilisCXl4l8rGBVMugg8SasJ86W7wpbg8JfyilX/OSq8ov1TUa 2nIKkEahfS5QjkUqZ34Ji8nNKrAu+l0T2/fFMwjM5uSjhE1AUzYCB9gwNzAX6UY9ALYUfI8ZepwEM WwL3wYCNHexnLJhqWjNyYq7Mzx7z2yRsUVRmemTy+y6x3ai8WXHVHLxJbtI0UMmVYkehsiH+P3jH0 0jwNPzxYS5mO1jCrP38EoZjUfxHz/XRG0YqxrDhK6hNa4x6QxmkfMJvUZmn3jEkFEm0dq2jnYC6Ww UZNa7oKDrEEuOkOyvJTA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCzD3-0003HT-0H; Wed, 25 Sep 2019 04:47:25 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCzD0-0003Fx-LB for ath11k@lists.infradead.org; Wed, 25 Sep 2019 04:47:24 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5DBB36118E; Wed, 25 Sep 2019 04:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569386842; bh=gxUb/piCyFH0yu2rEekYmDoFsAxzysTpMEb5mxQmQYs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BKJO6AdaHaymvQKXuSxtL4Wwmnge6XI+6ldXDJVWYe7rntNTGzHPfc9RuNZDHqrfK 85YRtZGUtmAcN431RzKs1HB0mOaVcWUhNuPHD314kuxhlXQKg4xxh3rjGsD+k2Qxay qtGUtI+F0CY9QKSEEapiNEwcfept7PCKBBpf3WLw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from vasanth-lnx.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vthiagar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6C28E6016D for ; Wed, 25 Sep 2019 04:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569386842; bh=gxUb/piCyFH0yu2rEekYmDoFsAxzysTpMEb5mxQmQYs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BKJO6AdaHaymvQKXuSxtL4Wwmnge6XI+6ldXDJVWYe7rntNTGzHPfc9RuNZDHqrfK 85YRtZGUtmAcN431RzKs1HB0mOaVcWUhNuPHD314kuxhlXQKg4xxh3rjGsD+k2Qxay qtGUtI+F0CY9QKSEEapiNEwcfept7PCKBBpf3WLw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6C28E6016D 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=vthiagar@codeaurora.org From: Vasanthakumar Thiagarajan To: ath11k@lists.infradead.org Subject: [PATCH bringup 4/5] ath11k: Avoid code duplication in set/clear of a register bit values Date: Wed, 25 Sep 2019 10:13:58 +0530 Message-Id: <1569386639-1242-4-git-send-email-vthiagar@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1569386639-1242-1-git-send-email-vthiagar@codeaurora.org> References: <1569386639-1242-1-git-send-email-vthiagar@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190924_214722_730025_21DF0D1C X-CRM114-Status: GOOD ( 10.63 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [198.145.29.96 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 Define helpers to set/clear a particular bit in a register. Signed-off-by: Vasanthakumar Thiagarajan --- drivers/net/wireless/ath/ath11k/ahb.c | 52 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index 0f26979..29157fb 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -482,49 +482,49 @@ static void ath11k_ahb_ext_grp_enable(struct ath11k_ext_irq_grp *irq_grp) enable_irq(irq_grp->ab->irq_num[irq_grp->irqs[i]]); } +static void ath11k_ahb_setbit32(struct ath11k_base *ab, u8 bit, u32 offset) +{ + u32 val; + + val = ath11k_ahb_read32(ab, offset); + ath11k_ahb_write32(ab, offset, val | BIT(bit)); +} + +static void ath11k_ahb_clearbit32(struct ath11k_base *ab, u8 bit, u32 offset) +{ + u32 val; + + val = ath11k_ahb_read32(ab, offset); + ath11k_ahb_write32(ab, offset, val & ~BIT(bit)); +} + static void ath11k_ahb_ce_irq_enable(struct ath11k_base *ab, u16 ce_id) { const struct ce_pipe_config *ce_config; - u32 val; ce_config = &target_ce_config_wlan[ce_id]; - if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_OUT) { - val = ath11k_ahb_read32(ab, CE_HOST_IE_ADDRESS); - val |= BIT(ce_id); - ath11k_ahb_write32(ab, CE_HOST_IE_ADDRESS, val); - } + if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_OUT) + ath11k_ahb_setbit32(ab, ce_id, CE_HOST_IE_ADDRESS); if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_IN) { - val = ath11k_ahb_read32(ab, CE_HOST_IE_2_ADDRESS); - val |= BIT(ce_id); - ath11k_ahb_write32(ab, CE_HOST_IE_2_ADDRESS, val); - - val = ath11k_ahb_read32(ab, CE_HOST_IE_3_ADDRESS); - val |= BIT(ce_id + CE_HOST_IE_3_SHIFT); - ath11k_ahb_write32(ab, CE_HOST_IE_3_ADDRESS, val); + ath11k_ahb_setbit32(ab, ce_id, CE_HOST_IE_2_ADDRESS); + ath11k_ahb_setbit32(ab, ce_id + CE_HOST_IE_3_SHIFT, + CE_HOST_IE_3_ADDRESS); } } static void ath11k_ahb_ce_irq_disable(struct ath11k_base *ab, u16 ce_id) { const struct ce_pipe_config *ce_config; - u32 val; ce_config = &target_ce_config_wlan[ce_id]; - if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_OUT) { - val = ath11k_ahb_read32(ab, CE_HOST_IE_ADDRESS); - val &= ~BIT(ce_id); - ath11k_ahb_write32(ab, CE_HOST_IE_ADDRESS, val); - } + if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_OUT) + ath11k_ahb_clearbit32(ab, ce_id, CE_HOST_IE_ADDRESS); if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_IN) { - val = ath11k_ahb_read32(ab, CE_HOST_IE_2_ADDRESS); - val &= ~BIT(ce_id); - ath11k_ahb_write32(ab, CE_HOST_IE_2_ADDRESS, val); - - val = ath11k_ahb_read32(ab, CE_HOST_IE_3_ADDRESS); - val &= ~BIT(ce_id + CE_HOST_IE_3_SHIFT); - ath11k_ahb_write32(ab, CE_HOST_IE_3_ADDRESS, val); + ath11k_ahb_clearbit32(ab, ce_id, CE_HOST_IE_2_ADDRESS); + ath11k_ahb_clearbit32(ab, ce_id + CE_HOST_IE_3_SHIFT, + CE_HOST_IE_3_ADDRESS); } } From patchwork Wed Sep 25 04:43:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 11160005 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5DD711747 for ; Wed, 25 Sep 2019 04:47:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AF2221A4A for ; Wed, 25 Sep 2019 04:47:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xd8nJXh1"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="HsF56hGS"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="HsF56hGS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AF2221A4A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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:References:In-Reply-To: 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: List-Owner; bh=hoDjuS+ruEeC+OrpAB2BOsnUQYLTEck48Z1t5FXeI8k=; b=Xd8nJXh10CiHlL jnwe7/X1XxJZnTHsFRNJAm2638wTNsuC1VfWA7k4iq5RiO6GnyRPoY15+V8N+m03qOJPCOe5En4jl X4mgMvsMAMn90+kFM4C+gAvz6lI77GxCdKDI9WNOWweNUgREk+4RdGoEvsgZLNCkJ66Q9mfzvBJ5J IGUMfvZQDpgIULioRCJRxVCWgWYF2CLSzyMwUKD2/ywAUKHS8mwvgqlxJ0O354ERHLScapSVHbiBM Te2vU5eZv02cWSLl4IOhowSzZVTwYliyk7d1Wu3xtmcw7v4fi+dU345ot1cQuDeLbgz7sXpz4NMDr WQBZZzoBnt2jJWLk2e2w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCzD5-0003Js-Nj; Wed, 25 Sep 2019 04:47:27 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCzD2-0003Ga-20 for ath11k@lists.infradead.org; Wed, 25 Sep 2019 04:47:25 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C13CA611BE; Wed, 25 Sep 2019 04:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569386843; bh=d313B6s70fWHkAq0p6h2IHjUJEXKtLQz2X93dCIktEU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HsF56hGStHtg71GwPbA3NEoVv35ebOuBdZUAjUtfaH3jcL39bP2yolW0C0UyWxMR+ t5Mmx8nS581Im6JIPASzEmEHhXN82Ku5y+F2b9QJY2Xii988CRognzdb50/WLO8k2/ KPw8uR+DC8u9P5cE8HDrK576AgpZ7lAqpcUa0dTU= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from vasanth-lnx.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vthiagar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A0C3D602E1 for ; Wed, 25 Sep 2019 04:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569386843; bh=d313B6s70fWHkAq0p6h2IHjUJEXKtLQz2X93dCIktEU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HsF56hGStHtg71GwPbA3NEoVv35ebOuBdZUAjUtfaH3jcL39bP2yolW0C0UyWxMR+ t5Mmx8nS581Im6JIPASzEmEHhXN82Ku5y+F2b9QJY2Xii988CRognzdb50/WLO8k2/ KPw8uR+DC8u9P5cE8HDrK576AgpZ7lAqpcUa0dTU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A0C3D602E1 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=vthiagar@codeaurora.org From: Vasanthakumar Thiagarajan To: ath11k@lists.infradead.org Subject: [PATCH bringup 5/5] ath11k: Few clean ups in comments Date: Wed, 25 Sep 2019 10:13:59 +0530 Message-Id: <1569386639-1242-5-git-send-email-vthiagar@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1569386639-1242-1-git-send-email-vthiagar@codeaurora.org> References: <1569386639-1242-1-git-send-email-vthiagar@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190924_214724_133606_87FC54BD X-CRM114-Status: UNSURE ( 8.89 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [198.145.29.96 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 Remove stale comments and fix spelling typo. Signed-off-by: Vasanthakumar Thiagarajan --- drivers/net/wireless/ath/ath11k/ahb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index 29157fb..8efbecc 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -392,7 +392,7 @@ ATH11K_HOST2RXDMA_RING_MASK_2, }; -/* enum ext_irq_num - irq nubers that can be used by external modules +/* enum ext_irq_num - irq numbers that can be used by external modules * like datapath */ enum ext_irq_num { @@ -584,8 +584,6 @@ int ath11k_ahb_start(struct ath11k_base *ab) ath11k_ahb_ce_irqs_enable(ab); ath11k_ce_rx_post_buf(ab); - /* Bring up other components as appropriate */ - return 0; } @@ -615,7 +613,6 @@ void ath11k_ahb_stop(struct ath11k_base *ab) ath11k_ahb_kill_tasklets(ab); del_timer_sync(&ab->rx_replenish_retry); ath11k_ce_cleanup_pipes(ab); - /* Shutdown other components as appropriate */ } int ath11k_ahb_power_up(struct ath11k_base *ab)