* [ath9k-devel] [PATCH 0/3] ath10k: kill unnecessary macros
@ 2013-04-22 13:23 Bartosz Markowski
2013-04-22 13:23 ` [ath9k-devel] [PATCH 1/3] ath10k: kill A_PCIE_LOCAL_REG_READ Bartosz Markowski
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Bartosz Markowski @ 2013-04-22 13:23 UTC (permalink / raw)
To: ath9k-devel
* use iowrite32/ioread32 directly
* fix comment
Bartosz Markowski (3):
ath10k: kill A_PCIE_LOCAL_REG_READ
ath10k: kill A_PCIE_LOCAL_REG_WRITE
ath10k: fix comment to reflect time in mili-seconds
drivers/net/wireless/ath/ath10k/pci.c | 19 ++++++++-----------
drivers/net/wireless/ath/ath10k/pci.h | 11 ++---------
2 files changed, 10 insertions(+), 20 deletions(-)
--
1.7.10
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ath9k-devel] [PATCH 1/3] ath10k: kill A_PCIE_LOCAL_REG_READ
2013-04-22 13:23 [ath9k-devel] [PATCH 0/3] ath10k: kill unnecessary macros Bartosz Markowski
@ 2013-04-22 13:23 ` Bartosz Markowski
2013-04-23 7:29 ` Kalle Valo
2013-04-22 13:23 ` [ath9k-devel] [PATCH 2/3] ath10k: kill A_PCIE_LOCAL_REG_WRITE Bartosz Markowski
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Bartosz Markowski @ 2013-04-22 13:23 UTC (permalink / raw)
To: ath9k-devel
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 8 +++-----
drivers/net/wireless/ath/ath10k/pci.h | 3 ---
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index e75b36b..6e3f51f 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2125,13 +2125,12 @@ static void ath10k_pci_device_reset(struct ath10k_pci *ar_pci)
}
/* Put Target, including PCIe, into RESET. */
- val = A_PCIE_LOCAL_REG_READ(mem, SOC_GLOBAL_RESET_ADDRESS_T(ar));
+ val = ioread32(mem + PCIE_LOCAL_BASE_ADDRESS_T(ar) + SOC_GLOBAL_RESET_ADDRESS_T(ar));
val |= 1;
A_PCIE_LOCAL_REG_WRITE(mem, SOC_GLOBAL_RESET_ADDRESS_T(ar), val);
for (i = 0; i < ATH_PCI_RESET_WAIT_MAX; i++) {
- if (A_PCIE_LOCAL_REG_READ(mem, RTC_STATE_ADDRESS_T(ar)) &
- RTC_STATE_COLD_RESET_MASK_T(ar))
+ if (ioread32(mem + PCIE_LOCAL_BASE_ADDRESS_T(ar) + RTC_STATE_ADDRESS_T(ar)) & RTC_STATE_COLD_RESET_MASK_T(ar))
break;
msleep(1);
}
@@ -2141,8 +2140,7 @@ static void ath10k_pci_device_reset(struct ath10k_pci *ar_pci)
A_PCIE_LOCAL_REG_WRITE(mem, SOC_GLOBAL_RESET_ADDRESS_T(ar), val);
for (i = 0; i < ATH_PCI_RESET_WAIT_MAX; i++) {
- if (!(A_PCIE_LOCAL_REG_READ(mem, RTC_STATE_ADDRESS_T(ar)) &
- RTC_STATE_COLD_RESET_MASK_T(ar)))
+ if (!(ioread32(mem + PCIE_LOCAL_BASE_ADDRESS_T(ar) + RTC_STATE_ADDRESS_T(ar)) & RTC_STATE_COLD_RESET_MASK_T(ar)))
break;
msleep(1);
}
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index a3b5e88..fc2fe91 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -228,9 +228,6 @@ static inline struct ath10k_pci *ath10k_pci_priv(struct ath10k *ar)
return ar->hif.priv;
}
-#define A_PCIE_LOCAL_REG_READ(mem, addr) \
- ioread32((mem) + PCIE_LOCAL_BASE_ADDRESS_T(ar) + (u32)(addr))
-
#define A_PCIE_LOCAL_REG_WRITE(mem, addr, val) \
iowrite32((val), \
((mem) + PCIE_LOCAL_BASE_ADDRESS_T(ar) + (u32)(addr)))
--
1.7.10
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [ath9k-devel] [PATCH 2/3] ath10k: kill A_PCIE_LOCAL_REG_WRITE
2013-04-22 13:23 [ath9k-devel] [PATCH 0/3] ath10k: kill unnecessary macros Bartosz Markowski
2013-04-22 13:23 ` [ath9k-devel] [PATCH 1/3] ath10k: kill A_PCIE_LOCAL_REG_READ Bartosz Markowski
@ 2013-04-22 13:23 ` Bartosz Markowski
2013-04-22 13:23 ` [ath9k-devel] [PATCH 3/3] ath10k: fix comment to reflect time in mili-seconds Bartosz Markowski
2013-04-23 7:32 ` [ath9k-devel] [PATCH 0/3] ath10k: kill unnecessary macros Kalle Valo
3 siblings, 0 replies; 7+ messages in thread
From: Bartosz Markowski @ 2013-04-22 13:23 UTC (permalink / raw)
To: ath9k-devel
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 11 +++++------
drivers/net/wireless/ath/ath10k/pci.h | 4 ----
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 6e3f51f..48e4f86 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2116,8 +2116,8 @@ static void ath10k_pci_device_reset(struct ath10k_pci *ar_pci)
if (!mem)
return;
- A_PCIE_LOCAL_REG_WRITE(mem, PCIE_SOC_WAKE_ADDRESS_T(ar),
- PCIE_SOC_WAKE_V_MASK_T(ar));
+ iowrite32(PCIE_SOC_WAKE_V_MASK_T(ar), mem + PCIE_LOCAL_BASE_ADDRESS_T(ar) + PCIE_SOC_WAKE_ADDRESS_T(ar));
+
for (i = 0; i < ATH_PCI_RESET_WAIT_MAX; i++) {
if (ath10k_pci_target_is_awake(ar))
break;
@@ -2127,7 +2127,7 @@ static void ath10k_pci_device_reset(struct ath10k_pci *ar_pci)
/* Put Target, including PCIe, into RESET. */
val = ioread32(mem + PCIE_LOCAL_BASE_ADDRESS_T(ar) + SOC_GLOBAL_RESET_ADDRESS_T(ar));
val |= 1;
- A_PCIE_LOCAL_REG_WRITE(mem, SOC_GLOBAL_RESET_ADDRESS_T(ar), val);
+ iowrite32(val, mem + PCIE_LOCAL_BASE_ADDRESS_T(ar) + SOC_GLOBAL_RESET_ADDRESS_T(ar));
for (i = 0; i < ATH_PCI_RESET_WAIT_MAX; i++) {
if (ioread32(mem + PCIE_LOCAL_BASE_ADDRESS_T(ar) + RTC_STATE_ADDRESS_T(ar)) & RTC_STATE_COLD_RESET_MASK_T(ar))
@@ -2137,7 +2137,7 @@ static void ath10k_pci_device_reset(struct ath10k_pci *ar_pci)
/* Pull Target, including PCIe, out of RESET. */
val &= ~1;
- A_PCIE_LOCAL_REG_WRITE(mem, SOC_GLOBAL_RESET_ADDRESS_T(ar), val);
+ iowrite32(val, mem + PCIE_LOCAL_BASE_ADDRESS_T(ar) + SOC_GLOBAL_RESET_ADDRESS_T(ar));
for (i = 0; i < ATH_PCI_RESET_WAIT_MAX; i++) {
if (!(ioread32(mem + PCIE_LOCAL_BASE_ADDRESS_T(ar) + RTC_STATE_ADDRESS_T(ar)) & RTC_STATE_COLD_RESET_MASK_T(ar)))
@@ -2145,8 +2145,7 @@ static void ath10k_pci_device_reset(struct ath10k_pci *ar_pci)
msleep(1);
}
- A_PCIE_LOCAL_REG_WRITE(mem, PCIE_SOC_WAKE_ADDRESS_T(ar),
- PCIE_SOC_WAKE_RESET_T(ar));
+ iowrite32(PCIE_SOC_WAKE_RESET_T(ar), mem + PCIE_LOCAL_BASE_ADDRESS_T(ar) + PCIE_SOC_WAKE_ADDRESS_T(ar));
}
static void ath10k_pci_dump_features(struct ath10k_pci *ar_pci)
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index fc2fe91..a1a498b 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -228,10 +228,6 @@ static inline struct ath10k_pci *ath10k_pci_priv(struct ath10k *ar)
return ar->hif.priv;
}
-#define A_PCIE_LOCAL_REG_WRITE(mem, addr, val) \
- iowrite32((val), \
- ((mem) + PCIE_LOCAL_BASE_ADDRESS_T(ar) + (u32)(addr)))
-
#define ATH_PCI_RESET_WAIT_MAX 10 /* Ms */
#define PCIE_WAKE_TIMEOUT 5000 /* 5Ms */
--
1.7.10
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [ath9k-devel] [PATCH 3/3] ath10k: fix comment to reflect time in mili-seconds
2013-04-22 13:23 [ath9k-devel] [PATCH 0/3] ath10k: kill unnecessary macros Bartosz Markowski
2013-04-22 13:23 ` [ath9k-devel] [PATCH 1/3] ath10k: kill A_PCIE_LOCAL_REG_READ Bartosz Markowski
2013-04-22 13:23 ` [ath9k-devel] [PATCH 2/3] ath10k: kill A_PCIE_LOCAL_REG_WRITE Bartosz Markowski
@ 2013-04-22 13:23 ` Bartosz Markowski
2013-04-23 7:32 ` [ath9k-devel] [PATCH 0/3] ath10k: kill unnecessary macros Kalle Valo
3 siblings, 0 replies; 7+ messages in thread
From: Bartosz Markowski @ 2013-04-22 13:23 UTC (permalink / raw)
To: ath9k-devel
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/pci.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index a1a498b..4b0351f 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -228,8 +228,8 @@ static inline struct ath10k_pci *ath10k_pci_priv(struct ath10k *ar)
return ar->hif.priv;
}
-#define ATH_PCI_RESET_WAIT_MAX 10 /* Ms */
-#define PCIE_WAKE_TIMEOUT 5000 /* 5Ms */
+#define ATH_PCI_RESET_WAIT_MAX 10 /* ms */
+#define PCIE_WAKE_TIMEOUT 5000 /* 5ms */
#define BAR_NUM 0
--
1.7.10
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [ath9k-devel] [PATCH 1/3] ath10k: kill A_PCIE_LOCAL_REG_READ
2013-04-22 13:23 ` [ath9k-devel] [PATCH 1/3] ath10k: kill A_PCIE_LOCAL_REG_READ Bartosz Markowski
@ 2013-04-23 7:29 ` Kalle Valo
2013-04-23 7:30 ` Markowski Bartosz
0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2013-04-23 7:29 UTC (permalink / raw)
To: ath9k-devel
Bartosz Markowski <bartosz.markowski@tieto.com> writes:
> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
[...]
> -#define A_PCIE_LOCAL_REG_READ(mem, addr) \
> - ioread32((mem) + PCIE_LOCAL_BASE_ADDRESS_T(ar) + (u32)(addr))
I think it would be better to convert this to a function and call it
ath10k_pci_reg_read32() or something like that. And the same for the
write function.
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ath9k-devel] [PATCH 1/3] ath10k: kill A_PCIE_LOCAL_REG_READ
2013-04-23 7:29 ` Kalle Valo
@ 2013-04-23 7:30 ` Markowski Bartosz
0 siblings, 0 replies; 7+ messages in thread
From: Markowski Bartosz @ 2013-04-23 7:30 UTC (permalink / raw)
To: ath9k-devel
On 23/04/13 09:29, Kalle Valo wrote:
> Bartosz Markowski <bartosz.markowski@tieto.com> writes:
>
>> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
> [...]
>
>> -#define A_PCIE_LOCAL_REG_READ(mem, addr) \
>> - ioread32((mem) + PCIE_LOCAL_BASE_ADDRESS_T(ar) + (u32)(addr))
> I think it would be better to convert this to a function and call it
> ath10k_pci_reg_read32() or something like that. And the same for the
> write function.
>
ok
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ath9k-devel] [PATCH 0/3] ath10k: kill unnecessary macros
2013-04-22 13:23 [ath9k-devel] [PATCH 0/3] ath10k: kill unnecessary macros Bartosz Markowski
` (2 preceding siblings ...)
2013-04-22 13:23 ` [ath9k-devel] [PATCH 3/3] ath10k: fix comment to reflect time in mili-seconds Bartosz Markowski
@ 2013-04-23 7:32 ` Kalle Valo
3 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2013-04-23 7:32 UTC (permalink / raw)
To: ath9k-devel
Bartosz Markowski <bartosz.markowski@tieto.com> writes:
> * use iowrite32/ioread32 directly
> * fix comment
>
> Bartosz Markowski (3):
> ath10k: kill A_PCIE_LOCAL_REG_READ
> ath10k: kill A_PCIE_LOCAL_REG_WRITE
> ath10k: fix comment to reflect time in mili-seconds
Thanks. Patch 1-2 dropped, patch 3 applied.
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-04-23 7:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-22 13:23 [ath9k-devel] [PATCH 0/3] ath10k: kill unnecessary macros Bartosz Markowski
2013-04-22 13:23 ` [ath9k-devel] [PATCH 1/3] ath10k: kill A_PCIE_LOCAL_REG_READ Bartosz Markowski
2013-04-23 7:29 ` Kalle Valo
2013-04-23 7:30 ` Markowski Bartosz
2013-04-22 13:23 ` [ath9k-devel] [PATCH 2/3] ath10k: kill A_PCIE_LOCAL_REG_WRITE Bartosz Markowski
2013-04-22 13:23 ` [ath9k-devel] [PATCH 3/3] ath10k: fix comment to reflect time in mili-seconds Bartosz Markowski
2013-04-23 7:32 ` [ath9k-devel] [PATCH 0/3] ath10k: kill unnecessary macros Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox