Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4393881pxb; Mon, 21 Feb 2022 20:08:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlEwVNEhBlsR9cjQNWvZVKufy8hNmbj5deyX5J5m6LsWhBNQdnjF90khwqwTOIyEjg8arq X-Received: by 2002:a63:b50b:0:b0:373:9242:6b98 with SMTP id y11-20020a63b50b000000b0037392426b98mr18137618pge.553.1645502905487; Mon, 21 Feb 2022 20:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645502905; cv=none; d=google.com; s=arc-20160816; b=M9EGYFP9stS6YfIlgapTQRe+i138qMmPIUNbMF67YtlxOPmbrFdGKQ0C+oFhx63Wb2 jR2ygo1sUFJD+UsNgKj/u91199SW3jg05KjoKJpdIm/+2zWo1R43/P96Qhj6PIJYbNWI BifFJgUsCckZ8a/pPjzn0EPXbH0U34VocgpwXsQF6sg/4/V5UCk/gILF2c+ORvtFH+/K 2hxAWKkv5wu1sjb/u6ylKTt8181Xts/rgJP3VM/DsFAuU8NYEsRuysFb6XVZp4Cg8cfX yS4xiK6WbxesgcTOM5stBUdr+sFPvolHZN8sa4ImpomQziAE77br1I2sd1hQ1ItZ6+iV aHOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=L1bokp1G9fBeLK8gLpcFIjs/Yz8FtQGBQGgWAqeHO3w=; b=E4+WHs4SM3APZDNusVlceXl8bB32Ws1mr+mhYIXI+B8yyN5zVHSSzbI4yjFcaQhcwu 0TZHQc9B87rneXf+8MmpdI1ObCTES4apTJr9ueWOLzeuagVp/9Gda35/mxS7yy1GnMgV 1t3FrwdWBgLmpSnbQuqwyA4hjFgzwCkbJsI6naW+upahOMS35MzUJyaIVxVo6psIuVZ4 uYd41f8NCrGDvQX0HlRKEj9Jfxq2kzLzSsjLmoQm+C5+fsBfss5K+Q24hPQIN+Y5sfKF bA+16rq7l8Ed3NMVGvUvYV1W8rm4DakvuRgQ9uvJJSP+EI58nwi5aVFw8QPtCrsp0pe0 ITjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="W5U/jExp"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h1si18629964pgq.150.2022.02.21.20.08.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 20:08:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="W5U/jExp"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0FCF86E346; Mon, 21 Feb 2022 20:08:14 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243660AbiBUJmg (ORCPT + 72 others); Mon, 21 Feb 2022 04:42:36 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350820AbiBUJlW (ORCPT ); Mon, 21 Feb 2022 04:41:22 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC5B33D1DF; Mon, 21 Feb 2022 01:17:31 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id 5927ACE0E90; Mon, 21 Feb 2022 09:17:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C9BBC340EB; Mon, 21 Feb 2022 09:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645435048; bh=iJfhffaxaqucqlfWHbQPFYGDjZ9N6RtcLoLdRTMnIyY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=W5U/jExpVNMAES/DEUdOWgigHuCG/oVtAsjj8JoBZTk2KEHetUKwb/cFaweqMcNAZ Z6kpwWnalZu3uEYgA/hKbYwgNWdczdkAG5opvih6GdxATlVYnbb1hZ94JVrmrJzLCt Fij2h2sF3q0hcphj5MGm8M/rEKwxj/Cxcg/O1rq5Vh4894Nx3wCdolR3ZX9srwsl+b pazkXtAD5wAfujHr0UukkEKa61if2dhZzzdey4hZ8PjrwItoCeeue6BkvHDyxASYfn JkAX8Rh0kpzfmFf/a/tQv96UClGLX1hT+mrObJ1QIOty5JcVw3BAIO6DrLVS6cMwej abJ2tgBzjtTQg== From: Kalle Valo To: Manikanta Pubbisetty Cc: , , , Subject: Re: [PATCH v2 05/19] ath11k: Remove core PCI references from PCI common code 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> Date: Mon, 21 Feb 2022 11:17:25 +0200 In-Reply-To: (Manikanta Pubbisetty's message of "Mon, 21 Feb 2022 12:25:45 +0530") Message-ID: <875yp8zihm.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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 :) -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches