Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3581182pxb; Mon, 21 Feb 2022 00:58:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJx2lIsl6HoE3v/iUO5uXMoVpxPF5tfZakF/ceIfs5gbSTDUWC4c5FbaRfCk4hZ7QV11IL X-Received: by 2002:a05:6402:38e:b0:410:c1a9:60aa with SMTP id o14-20020a056402038e00b00410c1a960aamr20532933edv.336.1645433903952; Mon, 21 Feb 2022 00:58:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645433903; cv=none; d=google.com; s=arc-20160816; b=iZSbs6BRYJW5ud0PdMqaQNytPZkpm+0Yp7OSfuDC8QVh1u10taAOUHEjyCqMwECicT tT8U+w5T8wymmDQjnV7PvRX4CocyTkfolhxifMOKgro3h+jEyeeClbd9fC4TMzsihjd+ ZEYHp8ADS1RB5fLwlUL8TRj0xz2VMQI5lyGHJ5n5GUJdhO6pVsI97ykeSz2OCy5yu4Tp HNnR5vs4C7DKfrI1mFBQyQbwGU0/MuVjBjog0dcpT4XQws4Icihv/fSloeejLyS6uPGu urGGmjHGJqQsuyyt9xX2taoLwwV6PuX3/0OrQaF5/LMwT3kGvMwf1p/m3F7bFseRx99+ tI8w== 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=KCB9+fgfvX79/Zhwfz6+z0T5e6wEWBako053p3e7e2A=; b=zyVMY0K+jDhEU8sLnok6XwXEiWKi598kKrvXkYCXGNFmbOfYMiEcF93rwMORE4aKzA ++Lul7GrkXiudJ1JOCbCqNWBjCMTCsaRIIFl8JWXQvEoNN1nVQteFkM2QdRJ21m1/2VN TxUYAQUN3vkBNhaxd77am711ILhzLWLoezcNVvbJ1uTqr/LP1NwRZAKVN3GpzbVWP9V9 r3te/CSi+Ih5bCOcVjiQ51pM/UPFmSy1yJv+TB0bmycMAlBZyflgkZuKONCZRSUDi4R4 tjSlJuq1Izj/KXb4vGk+k4qBaik5J/Lp4oPBpDf9qoiI8g081GvYI2ByYkLNJWcTu6Os GJrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=ymyD8wTo; 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 m27si7550569ejc.403.2022.02.21.00.58.03; Mon, 21 Feb 2022 00:58:23 -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=ymyD8wTo; 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 S243663AbiBUIEq (ORCPT + 72 others); Mon, 21 Feb 2022 03:04:46 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230207AbiBUIEp (ORCPT ); Mon, 21 Feb 2022 03:04:45 -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 DE2D0C67; Mon, 21 Feb 2022 00:04:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645430663; x=1676966663; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=KCB9+fgfvX79/Zhwfz6+z0T5e6wEWBako053p3e7e2A=; b=ymyD8wToeWaVKWcbfvf5PfsDlL2Oc5f7kbwBeSxo6tHO/OWNiTTVWpMC 03azO3Y5VPPliYaAaKSKYjwkFejenLeD8eZisB+LHyk2phZB+xfsc1Olo rcJ+6olNMjJmzmxRi7c1CYlu/08XkFlbw8Gv9sMGkLlLs0MnAtYm4jQPh E=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-01.qualcomm.com with ESMTP; 21 Feb 2022 00:04:22 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2022 00:04:22 -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 00:04:22 -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 00:04:19 -0800 Message-ID: <9acca69c-3d5d-b6b9-b5ca-c2411e206908@quicinc.com> Date: Mon, 21 Feb 2022 13:34:14 +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 02/19] ath11k: Refactor PCI code to support hybrid bus devices Content-Language: en-US To: Kalle Valo CC: , , , References: <1642337235-8618-1-git-send-email-quic_mpubbise@quicinc.com> <1642337235-8618-3-git-send-email-quic_mpubbise@quicinc.com> <87h79of470.fsf@kernel.org> From: Manikanta Pubbisetty In-Reply-To: <87h79of470.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: nasanex01b.na.qualcomm.com (10.46.141.250) 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 1/28/2022 5:43 PM, Kalle Valo wrote: > Manikanta Pubbisetty writes: > >> Unlike other ATH11K PCIe devices which are enumerated by APSS >> processor (Application Processor SubSystem), WCN6750 gets >> enumerated by the WPSS Q6 processor (Wireless Processor SubSystem); >> In simple terms, though WCN6750 is PCIe device, it is not attached >> to the APSS processor, APSS will not know of such a device being >> present in the system and therefore WCN6750 will be registered as >> a platform device to the kernel core like other supported AHB >> devices. >> >> WCN6750 uses both AHB and PCI APIs for it's operation, it uses >> AHB APIs for device probe/boot and PCI APIs for device setup >> and register accesses; Because of this nature, it is referred >> as a hybrid bus device. >> >> Refactor PCI code to support hybrid bus devices like WCN6750. >> >> 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 > > [...] > >> --- /dev/null >> +++ b/drivers/net/wireless/ath/ath11k/pci_cmn.c > > [...] > >> +static inline void ath11k_pci_select_window(struct ath11k_pci *ab_pci, u32 offset) >> +{ >> + struct ath11k_base *ab = ab_pci->ab; >> + >> + u32 window = FIELD_GET(ATH11K_PCI_WINDOW_VALUE_MASK, offset); >> + >> + lockdep_assert_held(&ab_pci->window_lock); >> + >> + if (window != ab_pci->register_window) { >> + iowrite32(ATH11K_PCI_WINDOW_ENABLE_BIT | window, >> + ab->mem + ATH11K_PCI_WINDOW_REG_ADDRESS); >> + ioread32(ab->mem + ATH11K_PCI_WINDOW_REG_ADDRESS); >> + ab_pci->register_window = window; >> + } >> +} > > So the style used in ath11k is ath11k__foo, so that a function > ath11k_pci_foo() should be in pci.c. This patch is now breaking that > style. Maybe pci_cmn.c should renamed to cpci.c, pcic.c or something > like that? Then the function prefix could be ath11k_cpci_, ath11k_pcic_ > or similar. > Makes sense, pcic.c and ath11k_pcic_* looks better, I'll make these changes.