Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3728217pxb; Mon, 21 Feb 2022 04:43:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0NcP9A+EckfPoFcLDodCbF8jntqwiJCESZbFZCL0rVoqYHqqTZzJFfm/SC6rOSs6bGJek X-Received: by 2002:a17:90a:9f48:b0:1bc:3064:7567 with SMTP id q8-20020a17090a9f4800b001bc30647567mr5702864pjv.53.1645447379963; Mon, 21 Feb 2022 04:42:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645447379; cv=none; d=google.com; s=arc-20160816; b=b9ht9Xtw8TLoJIiXvhRCOUhg2O/rg7t6cZC89966gN6F8t7zpSgiMVRWegQk4e0DTV 1Mbe6wAuyfpt9re4+FxbUDe6Z/AurYYGcsZMCYP8QgjAxx0KCfCeARkOo4aJ8I9Rq3ud ORcccSxUSFf6ZTW6ZoXQ8oRdeILIjsiRsMXlE8mIv9M0a8ff+9f9SyA/Hwuxeco8Fx3r EJjZniQLFrk53c72PaE7L2Aa6Ih1rcz5LTanT6PMZSRBBiSakz3D2gVhbsUjLyymG/il 0pc5j3/1pBeahZDKpQUa241uhvsFPGsx93K88EUbeI6WPCwwcdknI5CLDpil5DQ50aJ1 fOrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=IllAWlnl/SYaMR8rAmC0CK5PLIeHha4xbUrs57x67pE=; b=ZAQ1sJL4gXTZ0K8T1m/9CvMyKK0o0aGSF3mZlrSg6MYGSq0JYb+3HvASpT+5S0EN2j UhiL7KF1BiBaQi7FrpMMmRa1VIS3wfUiWRTuEifUkoIYrszA95Lamp2WD78CZTBDKp94 ciFW1F0VL0sqFr/6dmjtNSSOxcpSNDo84zcY7+YnDzXg0i/jmDcixqKnC2lRqtomYi// Uh1BUVeBzwKErbZBVasxuEz2eXdLv5Q6P/Rt4gq6nue/7aXEl6/OgaC3E8JYoXk9hONX Wpy5EzsvxIRSVDoeCFZWrgUvtAELqj4gdd0/c+pbJxdsozYUxvb8R2e3QUsjMIyKNJID csfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=MmfPgWfg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10si18385170plt.569.2022.02.21.04.42.43; Mon, 21 Feb 2022 04:42:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=MmfPgWfg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345478AbiBUKsC (ORCPT + 72 others); Mon, 21 Feb 2022 05:48:02 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355320AbiBUKrm (ORCPT ); Mon, 21 Feb 2022 05:47:42 -0500 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFC6054BFD; Mon, 21 Feb 2022 02:08:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645438123; x=1676974123; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=IllAWlnl/SYaMR8rAmC0CK5PLIeHha4xbUrs57x67pE=; b=MmfPgWfg1PIAGJleVVv56onNwHgKUFWrL/0AuQ7hsRmbkw58pEN5f4/W brOGmLW0BlZYVixllUaEkrweINX4DceYr8IGFKiRRQYsv95vzWqBQDCJc vGVFu5t795fdF6rM9T60w1PsuK6HBWr2BPYAEjPyxPxitaVZ/LEuRDmah g=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-01.qualcomm.com with ESMTP; 21 Feb 2022 02:08:42 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2022 02:08:41 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Mon, 21 Feb 2022 02:08:41 -0800 Received: from [10.216.7.34] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Mon, 21 Feb 2022 02:08:37 -0800 Message-ID: <04138c2c-7dff-3378-ffd7-cfb0c146a763@quicinc.com> Date: Mon, 21 Feb 2022 15:38:31 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v2 05/19] ath11k: Remove core PCI references from PCI common code Content-Language: en-US To: Kalle Valo CC: , , , References: <1642337235-8618-1-git-send-email-quic_mpubbise@quicinc.com> <1642337235-8618-6-git-send-email-quic_mpubbise@quicinc.com> <87a6fggo0h.fsf@kernel.org> <875yp8zihm.fsf@kernel.org> From: Manikanta Pubbisetty In-Reply-To: <875yp8zihm.fsf@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2/21/2022 2:47 PM, Kalle Valo wrote: > Manikanta Pubbisetty writes: > >> On 1/28/2022 3:50 PM, Kalle Valo wrote: >>> Manikanta Pubbisetty writes: >>> >>>> Remove core PCI and ath11k PCI references(struct ath11k_pci) >>>> from PCI common code. Since, PCI common code will be used >>>> by hybrid bus devices, this code should be independent >>>> from ATH11K PCI references and Linux core PCI references >>>> like struct pci_dev. >>>> >>>> Since this change introduces function callbacks for bus wakeup >>>> and bus release operations, wakeup_mhi HW param is no longer >>>> needed and hence it is removed completely. Alternatively, bus >>>> wakeup/release ops for QCA9074 are initialized to NULL as >>>> QCA9704 does not need bus wakeup/release for register accesses. >>>> >>>> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00573-QCAMSLSWPLZ-1 >>>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 >>>> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 >>>> Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00192-QCAHKSWPL_SILICONZ-1 >>>> >>>> Signed-off-by: Manikanta Pubbisetty >>> >>> [...] >>> >>>> @@ -651,6 +653,13 @@ struct ath11k_bus_params { >>>> bool fixed_bdf_addr; >>>> bool fixed_mem_region; >>>> bool static_window_map; >>>> + struct { >>>> + void (*wakeup)(struct ath11k_base *ab); >>>> + void (*release)(struct ath11k_base *ab); >>>> + int (*get_msi_irq)(struct ath11k_base *ab, unsigned int vector); >>>> + void (*window_write32)(struct ath11k_base *ab, u32 offset, u32 value); >>>> + u32 (*window_read32)(struct ath11k_base *ab, u32 offset); >>>> + } ops; >>>> }; >>> >>> Please don't use bus_params for this, I'm starting to suspect that we >>> actually need to remove struct ath11k_bus_params altogether. It would be >>> cleaner to have separate 'struct ath11k_pci_ops' or something like that. >>> >> >> Sure, something like 'struct ath11k_bus_ops' in ath11k_base struct >> would be appropriate. > > But we have 'struct ath11k_hif_ops' already, and that's basically > ath11k_bus_ops with a confusing name :) (IIRC HIF means Host InterFace, > or something like that.) So having both ath11k_bus_ops and > ath11k_hif_ops would become even more confusing. > > You are basically abstracting out PCI functionality, that's why I > suggested ath11k_pci_ops. But yeah, naming is hard :) > Hmmm, makes sense :)