From patchwork Mon Jun 11 21:09:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 10458845 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 786416020F for ; Mon, 11 Jun 2018 21:10:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5ECD12859A for ; Mon, 11 Jun 2018 21:10:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53927285D4; Mon, 11 Jun 2018 21:10:26 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable 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 B8A7C2859A for ; Mon, 11 Jun 2018 21:10:25 +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:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=2bBPCe14EZvIysV2fCq1iMb5NR7KWj9SBiy93HQCyyU=; b=pkrokyaNNJYhLPh7/Jzy0JKOOV 6ocaC4a4pT/yK1ija68WPWyyLKECMg74nIrLwIMNgaN+/Ky1yg8K7RHep7L5FZqEjFyOrYus7zbLE 12Sy4PfFxsu0nlUyq+7wwfmgnlC+i48mA6dGXr8YWoZBmyNap7x7JpI832KTseIHh9nNRJgKLDcRW r4dAy7BMVOorT9HlFb/T2Yscvt4zpeHOpSErC2S0bz5mfcn4fKJljyqojcvZWaQsbgH07Zbr9+PxF U+E2JBSPRnSNxDcnXjCROsSErcbntqt2bHrBaDGUd1uUsjeOQ9XCUPfwfmOzmbXCUujO+uS2SibWa eTDDu9MQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSU4u-0007Q9-O3; Mon, 11 Jun 2018 21:10:16 +0000 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSU4g-0006tC-DO for ath10k@lists.infradead.org; Mon, 11 Jun 2018 21:10:10 +0000 Received: by mail-pg0-x241.google.com with SMTP id q4-v6so9290000pgr.1 for ; Mon, 11 Jun 2018 14:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4N1pUEOqtYoE4QrdjqlrMFZw5wZoa1dipcGG1369/Aw=; b=oJJKpjaix09E94mcXEet12pwrhpx7j+CL5fNO063w+R3UdOfuv6S21LlKMq0doD0BT kXR4Ae/rv3CQb3dXppGRyTLTiblkqTwcWprf8pwAYHdM9cdmIXSBz7DxwY0hY+U+Bwfc Z48ivrIwjI+76CZmBKCXVICmnVvRumZbEsYAY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4N1pUEOqtYoE4QrdjqlrMFZw5wZoa1dipcGG1369/Aw=; b=kZs5rD13Q2+pNNjKOUFR+bJhxSMGeJl+NAIW7PVqwndLQkR0M+NTa4Sbcypl+Lj+hf jZKZQ98XmeMPTrF1KiLP3Jkx+9GsbBKhKYwX209Aqs5OnOygVh5QcnY9JLm6TctGnmDJ ouBnCdGGPApjqes5gcwi+nDFo7/KcuXuL+hJJZ80qwbDRAHtP8E1cqNudt1Y7eC8UnmK SI37F8roB9o/wkZOzZSraWPOVtXM80lFhV3fLfqU4evHejdpy9pFdbU9PGiWLpO+k806 ACGVmnO1J41XPZRUkhnChxIFZRDjdfKUwsltOTkAjLhS0cxN/kv+REbTsx2OMJEIqUyc B+wA== X-Gm-Message-State: APt69E0R0bGDm+FdFSiG9Of/OvMLhugOH/F3uXAHWv9f/JZqQI1+0z4L sGlwNxAUE1ZnvSapiwHjf1Ay4g== X-Google-Smtp-Source: ADUXVKJYQapMSht1dA/6twVYsUzknjvwG2homiHZU+PSQH4nhA0XAZtUqAJrFZwQL/oRuI1jdOEQSA== X-Received: by 2002:a62:ed13:: with SMTP id u19-v6mr754569pfh.125.1528751401663; Mon, 11 Jun 2018 14:10:01 -0700 (PDT) Received: from ban.mtv.corp.google.com ([2620:0:1000:1501:bc2f:3082:9938:5d41]) by smtp.gmail.com with ESMTPSA id c4-v6sm49116184pfe.53.2018.06.11.14.09.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jun 2018 14:10:00 -0700 (PDT) From: Brian Norris To: Kalle Valo Subject: [PATCH 2/4] ath10k: snoc: stop including pci.h Date: Mon, 11 Jun 2018 14:09:44 -0700 Message-Id: <20180611210946.241341-2-briannorris@chromium.org> X-Mailer: git-send-email 2.18.0.rc1.242.g61856ae69a-goog In-Reply-To: <20180611210946.241341-1-briannorris@chromium.org> References: <20180611210946.241341-1-briannorris@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180611_141002_571184_AEA37F0E X-CRM114-Status: GOOD ( 13.61 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Brian Norris , Govind Singh , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP It's easier to violate abstractions and introduce bugs when snoc.h is including pci.h. Let's not do that. I'm not extremely familiar with this driver yet, but several of the shared PCI/SNOC bits seem to be related to the Copy Engine, so move them to ce.h. Signed-off-by: Brian Norris --- drivers/net/wireless/ath/ath10k/ce.h | 42 ++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/pci.h | 42 -------------------------- drivers/net/wireless/ath/ath10k/snoc.h | 1 - 3 files changed, 42 insertions(+), 43 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/ce.h b/drivers/net/wireless/ath/ath10k/ce.h index dbeffaef6024..b8fb5382dede 100644 --- a/drivers/net/wireless/ath/ath10k/ce.h +++ b/drivers/net/wireless/ath/ath10k/ce.h @@ -383,4 +383,46 @@ static inline u32 ath10k_ce_interrupt_summary(struct ath10k *ar) return CE_INTERRUPT_SUMMARY; } +/* Host software's Copy Engine configuration. */ +#define CE_ATTR_FLAGS 0 + +/* + * Configuration information for a Copy Engine pipe. + * Passed from Host to Target during startup (one per CE). + * + * NOTE: Structure is shared between Host software and Target firmware! + */ +struct ce_pipe_config { + __le32 pipenum; + __le32 pipedir; + __le32 nentries; + __le32 nbytes_max; + __le32 flags; + __le32 reserved; +}; + +/* + * Directions for interconnect pipe configuration. + * These definitions may be used during configuration and are shared + * between Host and Target. + * + * Pipe Directions are relative to the Host, so PIPEDIR_IN means + * "coming IN over air through Target to Host" as with a WiFi Rx operation. + * Conversely, PIPEDIR_OUT means "going OUT from Host through Target over air" + * as with a WiFi Tx operation. This is somewhat awkward for the "middle-man" + * Target since things that are "PIPEDIR_OUT" are coming IN to the Target + * over the interconnect. + */ +#define PIPEDIR_NONE 0 +#define PIPEDIR_IN 1 /* Target-->Host, WiFi Rx direction */ +#define PIPEDIR_OUT 2 /* Host->Target, WiFi Tx direction */ +#define PIPEDIR_INOUT 3 /* bidirectional */ + +/* Establish a mapping between a service/direction and a pipe. */ +struct service_to_pipe { + __le32 service_id; + __le32 pipedir; + __le32 pipenum; +}; + #endif /* _CE_H_ */ diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h index e52fd83156b6..0ed436657108 100644 --- a/drivers/net/wireless/ath/ath10k/pci.h +++ b/drivers/net/wireless/ath/ath10k/pci.h @@ -86,48 +86,6 @@ struct pcie_state { /* PCIE_CONFIG_FLAG definitions */ #define PCIE_CONFIG_FLAG_ENABLE_L1 0x0000001 -/* Host software's Copy Engine configuration. */ -#define CE_ATTR_FLAGS 0 - -/* - * Configuration information for a Copy Engine pipe. - * Passed from Host to Target during startup (one per CE). - * - * NOTE: Structure is shared between Host software and Target firmware! - */ -struct ce_pipe_config { - __le32 pipenum; - __le32 pipedir; - __le32 nentries; - __le32 nbytes_max; - __le32 flags; - __le32 reserved; -}; - -/* - * Directions for interconnect pipe configuration. - * These definitions may be used during configuration and are shared - * between Host and Target. - * - * Pipe Directions are relative to the Host, so PIPEDIR_IN means - * "coming IN over air through Target to Host" as with a WiFi Rx operation. - * Conversely, PIPEDIR_OUT means "going OUT from Host through Target over air" - * as with a WiFi Tx operation. This is somewhat awkward for the "middle-man" - * Target since things that are "PIPEDIR_OUT" are coming IN to the Target - * over the interconnect. - */ -#define PIPEDIR_NONE 0 -#define PIPEDIR_IN 1 /* Target-->Host, WiFi Rx direction */ -#define PIPEDIR_OUT 2 /* Host->Target, WiFi Tx direction */ -#define PIPEDIR_INOUT 3 /* bidirectional */ - -/* Establish a mapping between a service/direction and a pipe. */ -struct service_to_pipe { - __le32 service_id; - __le32 pipedir; - __le32 pipenum; -}; - /* Per-pipe state. */ struct ath10k_pci_pipe { /* Handle of underlying Copy Engine */ diff --git a/drivers/net/wireless/ath/ath10k/snoc.h b/drivers/net/wireless/ath/ath10k/snoc.h index 05dc98f46ccd..f9e530189d48 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.h +++ b/drivers/net/wireless/ath/ath10k/snoc.h @@ -19,7 +19,6 @@ #include "hw.h" #include "ce.h" -#include "pci.h" struct ath10k_snoc_drv_priv { enum ath10k_hw_rev hw_rev;