linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: use ath10k_pci_soc_ functions for all warm_reset instances
@ 2019-07-28  9:11 Tomislav Požega
  2019-09-17 14:10 ` Kalle Valo
       [not found] ` <20190917141014.6A1DA602F3@smtp.codeaurora.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Tomislav Požega @ 2019-07-28  9:11 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo

Use ath10k_pci_soc_read32 / ath10k_pci_soc_write32 functions for
the rest of warm_reset functions. Until now these have been used
only for ath10k_pci_warm_reset_si0, but since they already exist
it makes sense to simplify code a bit.
Runtime tested with QCA9862.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
---
 drivers/net/wireless/ath/ath10k/pci.c |   26 +++++++++++---------------
 1 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index a0b4d26..bf16f17 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2567,35 +2567,31 @@ static void ath10k_pci_warm_reset_cpu(struct ath10k *ar)
 
 	ath10k_pci_write32(ar, FW_INDICATOR_ADDRESS, 0);
 
-	val = ath10k_pci_read32(ar, RTC_SOC_BASE_ADDRESS +
-				SOC_RESET_CONTROL_ADDRESS);
-	ath10k_pci_write32(ar, RTC_SOC_BASE_ADDRESS + SOC_RESET_CONTROL_ADDRESS,
-			   val | SOC_RESET_CONTROL_CPU_WARM_RST_MASK);
+	val = ath10k_pci_soc_read32(ar, SOC_RESET_CONTROL_ADDRESS);
+	ath10k_pci_soc_write32(ar, SOC_RESET_CONTROL_ADDRESS,
+				val | SOC_RESET_CONTROL_CPU_WARM_RST_MASK);
 }
 
 static void ath10k_pci_warm_reset_ce(struct ath10k *ar)
 {
 	u32 val;
 
-	val = ath10k_pci_read32(ar, RTC_SOC_BASE_ADDRESS +
-				SOC_RESET_CONTROL_ADDRESS);
+	val = ath10k_pci_soc_read32(ar, SOC_RESET_CONTROL_ADDRESS);
 
-	ath10k_pci_write32(ar, RTC_SOC_BASE_ADDRESS + SOC_RESET_CONTROL_ADDRESS,
-			   val | SOC_RESET_CONTROL_CE_RST_MASK);
+	ath10k_pci_soc_write32(ar, SOC_RESET_CONTROL_ADDRESS,
+				val | SOC_RESET_CONTROL_CE_RST_MASK);
 	msleep(10);
-	ath10k_pci_write32(ar, RTC_SOC_BASE_ADDRESS + SOC_RESET_CONTROL_ADDRESS,
-			   val & ~SOC_RESET_CONTROL_CE_RST_MASK);
+	ath10k_pci_soc_write32(ar, SOC_RESET_CONTROL_ADDRESS,
+				val & ~SOC_RESET_CONTROL_CE_RST_MASK);
 }
 
 static void ath10k_pci_warm_reset_clear_lf(struct ath10k *ar)
 {
 	u32 val;
 
-	val = ath10k_pci_read32(ar, RTC_SOC_BASE_ADDRESS +
-				SOC_LF_TIMER_CONTROL0_ADDRESS);
-	ath10k_pci_write32(ar, RTC_SOC_BASE_ADDRESS +
-			   SOC_LF_TIMER_CONTROL0_ADDRESS,
-			   val & ~SOC_LF_TIMER_CONTROL0_ENABLE_MASK);
+	val = ath10k_pci_soc_read32(ar, SOC_LF_TIMER_CONTROL0_ADDRESS);
+	ath10k_pci_soc_write32(ar, SOC_LF_TIMER_CONTROL0_ADDRESS,
+				val & ~SOC_LF_TIMER_CONTROL0_ENABLE_MASK);
 }
 
 static int ath10k_pci_warm_reset(struct ath10k *ar)
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath10k: use ath10k_pci_soc_ functions for all warm_reset instances
  2019-07-28  9:11 [PATCH] ath10k: use ath10k_pci_soc_ functions for all warm_reset instances Tomislav Požega
@ 2019-09-17 14:10 ` Kalle Valo
       [not found] ` <20190917141014.6A1DA602F3@smtp.codeaurora.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-09-17 14:10 UTC (permalink / raw)
  To: Tomislav Požega; +Cc: linux-wireless

Tomislav Požega wrote:

> Use ath10k_pci_soc_read32 / ath10k_pci_soc_write32 functions for
> the rest of warm_reset functions. Until now these have been used
> only for ath10k_pci_warm_reset_si0, but since they already exist
> it makes sense to simplify code a bit.
> Runtime tested with QCA9862.
> 
> Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

9c44bf4c1255 ath10k: use ath10k_pci_soc_ functions for all warm_reset instances

-- 
https://patchwork.kernel.org/patch/11062915/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath10k: use ath10k_pci_soc_ functions for all warm_reset instances
       [not found] ` <20190917141014.6A1DA602F3@smtp.codeaurora.org>
@ 2019-09-17 16:54   ` Tom Psyborg
  2019-09-17 17:30     ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Psyborg @ 2019-09-17 16:54 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On 17/09/2019, Kalle Valo <kvalo@codeaurora.org> wrote:
> Tomislav Požega wrote:
>
>> Use ath10k_pci_soc_read32 / ath10k_pci_soc_write32 functions for
>> the rest of warm_reset functions. Until now these have been used
>> only for ath10k_pci_warm_reset_si0, but since they already exist
>> it makes sense to simplify code a bit.
>> Runtime tested with QCA9862.
>>
>> Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>
is this a typo or should've I add your SoB line to that commit? btw
what about this patch it's been sent out quite a several months ago?
https://patchwork.kernel.org/patch/10860301/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath10k: use ath10k_pci_soc_ functions for all warm_reset instances
  2019-09-17 16:54   ` Tom Psyborg
@ 2019-09-17 17:30     ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-09-17 17:30 UTC (permalink / raw)
  To: Tom Psyborg; +Cc: linux-wireless

Tom Psyborg <pozega.tomislav@gmail.com> writes:

> On 17/09/2019, Kalle Valo <kvalo@codeaurora.org> wrote:
>> Tomislav Požega wrote:
>>
>>> Use ath10k_pci_soc_read32 / ath10k_pci_soc_write32 functions for
>>> the rest of warm_reset functions. Until now these have been used
>>> only for ath10k_pci_warm_reset_si0, but since they already exist
>>> it makes sense to simplify code a bit.
>>> Runtime tested with QCA9862.
>>>
>>> Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
>>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>
> is this a typo or should've I add your SoB line to that commit?

This is just because of my pwcli patchwork script and it's stgit mode.
It takes the commit log directly from the pending branch, where I need
to add my s-o-b as I publish the branch.

In general you should only add your own s-o-b line:

https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin

> btw what about this patch it's been sent out quite a several months
> ago? https://patchwork.kernel.org/patch/10860301/

I have not looked at that yet but it's in my queue.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-17 17:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-28  9:11 [PATCH] ath10k: use ath10k_pci_soc_ functions for all warm_reset instances Tomislav Požega
2019-09-17 14:10 ` Kalle Valo
     [not found] ` <20190917141014.6A1DA602F3@smtp.codeaurora.org>
2019-09-17 16:54   ` Tom Psyborg
2019-09-17 17:30     ` Kalle Valo

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).