From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C9C2FC43217 for ; Wed, 16 Nov 2022 16:39:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+usRqFQyfcmyMAQUIvvkG4xpX+MdpIFsl7E3VbSQPd4=; b=BdyNpf0ZkW96k9 CTkO8iOVKrk/odKtMoc5jjwlgK4k8+0Xb0mpWOD1Vdca07+3YmEwM079osmCqwwYP1kZ/6F+OdPTy blACToNLrYpVClNyth7YbMsmo9uqhx3jdu1yhkfL9ADToAKnHuT+EUCkfvr82xHOGYjsnKEJVABNW /0pM8xIx36B5i3bFnlwdAKmHAptSTWxOYZ3O6dAvI0UVndM8t82a6OQHHkgA6iUnUDeYHENiDRMyK 5bsT4V7I3wXZCmppE59nhbBDM77GM+cfFMPKLVIQayuOTMqXfRuxx3q6Hg12uI/4J/mONRceCbZUT h2MmQF9xKfV89h1cYSuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovLS0-005yHs-7o for ath12k@archiver.kernel.org; Wed, 16 Nov 2022 16:39:48 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovLRw-005yEE-P0 for ath12k@lists.infradead.org; Wed, 16 Nov 2022 16:39:46 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 414C761EE6 for ; Wed, 16 Nov 2022 16:39:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D136C433C1; Wed, 16 Nov 2022 16:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668616783; bh=VIPNevEjUaSNBkczAKK/FdH1SU9i1BIXIdu7MhsGUTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HKLVdkTGIfJhErsNlS9fs0mFrOvQPjJTUTqA00hDyltu3Mbpx2vPGCh0d2rBUraJ1 4IXrho6XrU0/xpnAh0WINsFOuU3y70PWZzBJYgshhTk5Kb6a7+ZK/+Deph2hR+dqbK MPqjLd6pN0lRhRWsVjcvBK0NPTgBJD3oO4OnbeuNizysiblipi8S8xEZ7bVZj+9PDI hL7hiVgA5pPBDauWgn+d4oCEl0CEQYIT/z5nyhsFnPF7N+2vtwf88T+WcY59Jk1Jc7 LIIJC0toLnexzpfr95zdjFSg5Fft78Ej3eVf5uikbCg+Imi0rPD1AEstfTX4gl7Duo WvZ7PsUNqLegA== From: Kalle Valo To: linux-wireless@vger.kernel.org Cc: ath12k@lists.infradead.org Subject: [PATCH v2 34/50] wifi: ath12k: add mhi.h Date: Wed, 16 Nov 2022 18:38:46 +0200 Message-Id: <20221116163902.24996-35-kvalo@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221116163902.24996-1-kvalo@kernel.org> References: <20221116163902.24996-1-kvalo@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221116_083944_868402_36E2B4E5 X-CRM114-Status: GOOD ( 11.46 ) X-BeenThere: ath12k@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath12k" Errors-To: ath12k-bounces+ath12k=archiver.kernel.org@lists.infradead.org From: Kalle Valo (Patches split into one patch per file for easier review, but the final commit will be one big patch. See the cover letter for more info.) Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath12k/mhi.h | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/mhi.h b/drivers/net/wireless/ath/ath12k/mhi.h new file mode 100644 index 000000000000..ebc23640ce7a --- /dev/null +++ b/drivers/net/wireless/ath/ath12k/mhi.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: BSD-3-Clause-Clear */ +/* + * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + */ +#ifndef _ATH12K_MHI_H +#define _ATH12K_MHI_H + +#include "pci.h" + +#define PCIE_TXVECDB 0x360 +#define PCIE_TXVECSTATUS 0x368 +#define PCIE_RXVECDB 0x394 +#define PCIE_RXVECSTATUS 0x39C + +#define MHISTATUS 0x48 +#define MHICTRL 0x38 +#define MHICTRL_RESET_MASK 0x2 + +enum ath12k_mhi_state { + ATH12K_MHI_INIT, + ATH12K_MHI_DEINIT, + ATH12K_MHI_POWER_ON, + ATH12K_MHI_POWER_OFF, + ATH12K_MHI_FORCE_POWER_OFF, + ATH12K_MHI_SUSPEND, + ATH12K_MHI_RESUME, + ATH12K_MHI_TRIGGER_RDDM, + ATH12K_MHI_RDDM, + ATH12K_MHI_RDDM_DONE, +}; + +extern const struct mhi_controller_config ath12k_mhi_config_qcn9274; +extern const struct mhi_controller_config ath12k_mhi_config_wcn7850; + +int ath12k_mhi_start(struct ath12k_pci *ar_pci); +void ath12k_mhi_stop(struct ath12k_pci *ar_pci); +int ath12k_mhi_register(struct ath12k_pci *ar_pci); +void ath12k_mhi_unregister(struct ath12k_pci *ar_pci); +void ath12k_mhi_set_mhictrl_reset(struct ath12k_base *ab); +void ath12k_mhi_clear_vector(struct ath12k_base *ab); + +void ath12k_mhi_suspend(struct ath12k_pci *ar_pci); +void ath12k_mhi_resume(struct ath12k_pci *ar_pci); + +#endif -- ath12k mailing list ath12k@lists.infradead.org https://lists.infradead.org/mailman/listinfo/ath12k