devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Bizon <mbizon@freebox.fr>
To: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>,
	ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, mka@chromium.org
Subject: Re: [PATCH v7 4/9] ath11k: Add register access logic for WCN6750
Date: Wed, 25 May 2022 20:46:43 +0200	[thread overview]
Message-ID: <bd6d97a4cc6665d0ee632444f75e3480160387ec.camel@freebox.fr> (raw)
In-Reply-To: <20220429170502.20080-5-quic_mpubbise@quicinc.com>


On Fri, 2022-04-29 at 22:34 +0530, Manikanta Pubbisetty wrote:

Hello Manikanta,

> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-
> QCAHKSWPL_SILICONZ-1

Nope your patch breaks QCN9074:

[   13.660963] ath11k_pci 0000:03:00.0: failed to set pcie link register 0x01e0e0a8: 0xffffffff != 0x00000010
[   13.675994] ath11k_pci 0000:03:00.0: failed to set sysclk: -110

device still seem to work though

> @@ -134,16 +134,13 @@ EXPORT_SYMBOL(ath11k_pcic_init_msi_config);
>  static inline u32 ath11k_pcic_get_window_start(struct ath11k_base *ab,
>  					       u32 offset)
>  {
> -	u32 window_start;
> +	u32 window_start = 0;
>  
> -	/* If offset lies within DP register range, use 3rd window */
>  	if ((offset ^ HAL_SEQ_WCSS_UMAC_OFFSET) < ATH11K_PCI_WINDOW_RANGE_MASK)
> -		window_start = 3 * ATH11K_PCI_WINDOW_START;
> -	/* If offset lies within CE register range, use 2nd window */
> -	else if ((offset ^ HAL_CE_WFSS_CE_REG_BASE) < ATH11K_PCI_WINDOW_RANGE_MASK)
> -		window_start = 2 * ATH11K_PCI_WINDOW_START;
> -	else
> -		window_start = ATH11K_PCI_WINDOW_START;
> +		window_start = ab->hw_params.dp_window_idx * ATH11K_PCI_WINDOW_START;
> +	else if ((offset ^ HAL_SEQ_WCSS_UMAC_CE0_SRC_REG(ab)) <
> +		 ATH11K_PCI_WINDOW_RANGE_MASK)
> +		window_start = ab->hw_params.ce_window_idx * ATH11K_PCI_WINDOW_START;
>  
>  	return window_start;
>  }


for some offsets, previous code could return ATH11K_PCI_WINDOW_START,
whereas new code now returns 0


> @@ -162,19 +159,12 @@ void ath11k_pcic_write32(struct ath11k_base *ab, u32 offset, u32 value)
>  
>  	if (offset < ATH11K_PCI_WINDOW_START) {
>  		iowrite32(value, ab->mem  + offset);
> -	} else {
> -		if (ab->hw_params.static_window_map)
> -			window_start = ath11k_pcic_get_window_start(ab, offset);
> -		else
> -			window_start = ATH11K_PCI_WINDOW_START;
> -
> -		if (window_start == ATH11K_PCI_WINDOW_START &&
> -		    ab->pci.ops->window_write32) {
> -			ab->pci.ops->window_write32(ab, offset, value);
> -		} else {
> -			iowrite32(value, ab->mem + window_start +
> -				  (offset & ATH11K_PCI_WINDOW_RANGE_MASK));
> -		}
> +	} else if (ab->hw_params.static_window_map) {
> +		window_start = ath11k_pcic_get_window_start(ab, offset);
> +		iowrite32(value, ab->mem + window_start +
> +			  (offset & ATH11K_PCI_WINDOW_RANGE_MASK));
> +	} else if (ab->pci.ops->window_write32) {
> +		ab->pci.ops->window_write32(ab, offset, value);
>  	}
> 

with previous code on QCN9074, when ath11k_pcic_get_window_start()
returned ATH11K_PCI_WINDOW_START, then it would call window_write32()

with new code on QCN9074, static_window_map is true, so window_write32
will never be called.

>  u32 ath11k_pcic_read32(struct ath11k_base *ab, u32 offset)

ditto here

-- 
Maxime




  parent reply	other threads:[~2022-05-25 18:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 17:04 [PATCH v7 0/9] add support for WCN6750 Manikanta Pubbisetty
2022-04-29 17:04 ` [PATCH v7 1/9] dt: bindings: net: add bindings of WCN6750 for ath11k Manikanta Pubbisetty
2022-05-02 13:59   ` Kalle Valo
2022-04-29 17:04 ` [PATCH v7 2/9] ath11k: Move parameters in bus_params to hw_params Manikanta Pubbisetty
2022-04-29 17:04 ` [PATCH v7 3/9] ath11k: Add HW params for WCN6750 Manikanta Pubbisetty
2022-04-29 17:04 ` [PATCH v7 4/9] ath11k: Add register access logic " Manikanta Pubbisetty
2022-05-02  9:12   ` Kalle Valo
2022-05-25 18:46   ` Maxime Bizon [this message]
2022-05-26  3:42     ` Manikanta Pubbisetty
2022-05-30 14:19       ` Maxime Bizon
2022-05-30 16:17         ` Kalle Valo
2022-05-30 16:22           ` Maxime Bizon
2022-04-29 17:04 ` [PATCH v7 5/9] ath11k: Fetch device information via QMI " Manikanta Pubbisetty
2022-05-02  9:29   ` Kalle Valo
2022-04-29 17:04 ` [PATCH v7 6/9] ath11k: Add QMI changes " Manikanta Pubbisetty
2022-04-29 17:05 ` [PATCH v7 7/9] ath11k: HAL changes to support WCN6750 Manikanta Pubbisetty
2022-04-29 17:05 ` [PATCH v7 8/9] ath11k: Datapath " Manikanta Pubbisetty
2022-04-29 17:05 ` [PATCH v7 9/9] ath11k: Add support for WCN6750 device Manikanta Pubbisetty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd6d97a4cc6665d0ee632444f75e3480160387ec.camel@freebox.fr \
    --to=mbizon@freebox.fr \
    --cc=ath11k@lists.infradead.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=quic_mpubbise@quicinc.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).