Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3586923pxb; Mon, 21 Feb 2022 01:06:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZ2qRws3Mv1DB7zfZ5r8g5//FVuALKmk0Flu7k/qc6gAr43jm/LReoJ0RkkeyjpTrZeVMa X-Received: by 2002:aa7:9522:0:b0:4e1:d277:ce8 with SMTP id c2-20020aa79522000000b004e1d2770ce8mr17417004pfp.16.1645434380113; Mon, 21 Feb 2022 01:06:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645434380; cv=none; d=google.com; s=arc-20160816; b=QcavNbXvj9TWFSy5t4YztPQSLaa4sN1meHv4Io7RgxUSCuSwxKtbV/9ZsvYikW2Vqx E/2u/nZe6HfOSWfpL8nolISyBzkHXXZ5iafdVyeq+JTxN/aTyS8jM/ErUo6+/YORYcW/ qOej6mo3Da26ZGPZqolDiJBE3vE3C3HDjNOa6ODBJQWcHPaOxxXssOXsqalDBtgcTiyA Ya28BoYKDfcFQxkGstDWwHYiVkYfS2Z+ynLp5BXaOQRjRJz9O9ZdUax20TIbXRCNzTl+ +OYiqwG/a47XiTPPdQuW56od2JH+WHVoesj6DiWGQEAV12/oknV8byBvQ5cnSqoNC/ei MFiA== 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=f247xkeOdcUQ3Zk9XkWSFcO4La446ONgMI9XPSjYtFk=; b=qIXHn6u1XxKGVIIj4O0dZMrwIApOhNMfvCJxkcp2XpVVDq73IB+f61Tg7UXOYBxni9 aDPyXsz2TlolBDkFE3dSqHACmNaUwvWUV7rJ+mNmFhjOo8ysAlMwT4vM0nj827AIhHEo onWh7EIBA+t8iHHRGBbXcKbSvLYgYQ+lumKRXaCbuhCSi1QRQBosYsVNyEM+AUfnhHQb /mM8ResXVBGqOmhQs35xBBf7oky9c/uUUDBl/Egz1DCiziO+M67gkTXqNBeb41BK8mPL FJrOP2MGu1lFDUOQepbvfgJ5VfbJXR1EFhwiCdXa6tSgalVw5xy9s8Uf7AYA/JYtphNe 8QHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=XbsXhtXZ; 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 u34si17085175pgl.830.2022.02.21.01.06.10; Mon, 21 Feb 2022 01:06:20 -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=XbsXhtXZ; 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 S1345738AbiBUG4R (ORCPT + 72 others); Mon, 21 Feb 2022 01:56:17 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:55798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234841AbiBUG4R (ORCPT ); Mon, 21 Feb 2022 01:56:17 -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 BA1F52AD4; Sun, 20 Feb 2022 22:55:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645426554; x=1676962554; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=f247xkeOdcUQ3Zk9XkWSFcO4La446ONgMI9XPSjYtFk=; b=XbsXhtXZwGuAzrn4rmG70X72WOpe63je9OMPIjLigcW6vnvubjBGv0dq 4MDYvhVfbsaY2UHUfsNITikT0BcHM++GTyaqzV5yKg1E80OaBJITkL5Yc NbK5mNkJwIXtYt83U0hZHs0lLlHpNIrkxlW9DLC9Sd1W2daalL1XGQVX3 c=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-01.qualcomm.com with ESMTP; 20 Feb 2022 22:55:54 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg03-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2022 22:55:54 -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; Sun, 20 Feb 2022 22:55:53 -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; Sun, 20 Feb 2022 22:55:51 -0800 Message-ID: Date: Mon, 21 Feb 2022 12:25:45 +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> From: Manikanta Pubbisetty In-Reply-To: <87a6fggo0h.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 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.