All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] [PATCH 0/3] ath10k: cleanup - respin
@ 2013-04-23  8:24 Bartosz Markowski
  2013-04-23  8:24 ` [ath9k-devel] [PATCH 1/3] ath10k: remove excessive CONFIG_PM_SLEEP checks Bartosz Markowski
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bartosz Markowski @ 2013-04-23  8:24 UTC (permalink / raw)
  To: ath9k-devel

Couple of updated patches.

Bartosz Markowski (3):
  ath10k: remove excessive CONFIG_PM_SLEEP checks
  ath10k: kill PCIE_LOCAL_REG_READ/WRITE macros
  ath10k: update supported firmware tag to .599

 drivers/net/wireless/ath/ath10k/core.c |    5 +----
 drivers/net/wireless/ath/ath10k/hw.h   |    2 +-
 drivers/net/wireless/ath/ath10k/pci.c  |   16 +++++++---------
 drivers/net/wireless/ath/ath10k/pci.h  |   11 ++++++-----
 4 files changed, 15 insertions(+), 19 deletions(-)

-- 
1.7.10

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

* [ath9k-devel] [PATCH 1/3] ath10k: remove excessive CONFIG_PM_SLEEP checks
  2013-04-23  8:24 [ath9k-devel] [PATCH 0/3] ath10k: cleanup - respin Bartosz Markowski
@ 2013-04-23  8:24 ` Bartosz Markowski
  2013-04-23  8:24 ` [ath9k-devel] [PATCH 2/3] ath10k: kill PCIE_LOCAL_REG_READ/WRITE macros Bartosz Markowski
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Bartosz Markowski @ 2013-04-23  8:24 UTC (permalink / raw)
  To: ath9k-devel

There's no big overhead and without those #ifdefs
the code looks simpler.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 07102b8..ccd2722 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -72,10 +72,8 @@ static void ath10k_send_suspend_complete(struct ath10k *ar)
 {
 	ath10k_dbg(ATH10K_DBG_CORE, "%s\n", __func__);
 
-#if defined(CONFIG_PM_SLEEP)
 	ar->is_target_paused = true;
 	wake_up(&ar->event_queue);
-#endif
 }
 
 static int ath10k_check_fw_version(struct ath10k *ar)
@@ -458,9 +456,8 @@ struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev,
 	INIT_WORK(&ar->offchan_tx_work, ath10k_offchan_tx_work);
 	skb_queue_head_init(&ar->offchan_tx_queue);
 
-#if defined(CONFIG_PM_SLEEP)
 	init_waitqueue_head(&ar->event_queue);
-#endif
+
 	return ar;
 
 err_wq:
-- 
1.7.10

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

* [ath9k-devel] [PATCH 2/3] ath10k: kill PCIE_LOCAL_REG_READ/WRITE macros
  2013-04-23  8:24 [ath9k-devel] [PATCH 0/3] ath10k: cleanup - respin Bartosz Markowski
  2013-04-23  8:24 ` [ath9k-devel] [PATCH 1/3] ath10k: remove excessive CONFIG_PM_SLEEP checks Bartosz Markowski
@ 2013-04-23  8:24 ` Bartosz Markowski
  2013-04-23  8:24 ` [ath9k-devel] [PATCH 3/3] ath10k: update supported firmware tag to .599 Bartosz Markowski
  2013-04-24 10:37 ` [ath9k-devel] [PATCH 0/3] ath10k: cleanup - respin Kalle Valo
  3 siblings, 0 replies; 5+ messages in thread
From: Bartosz Markowski @ 2013-04-23  8:24 UTC (permalink / raw)
  To: ath9k-devel

Convert them into inline functions with better names.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/pci.c |   16 +++++++---------
 drivers/net/wireless/ath/ath10k/pci.h |   11 ++++++-----
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 0d1523b..02874b4 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2109,8 +2109,7 @@ static void ath10k_pci_device_reset(struct ath10k_pci *ar_pci)
 	if (!mem)
 		return;
 
-	A_PCIE_LOCAL_REG_WRITE(mem, PCIE_SOC_WAKE_ADDRESS,
-			       PCIE_SOC_WAKE_V_MASK);
+	ath10k_pci_reg_write32(mem, PCIE_SOC_WAKE_ADDRESS, PCIE_SOC_WAKE_V_MASK);
 	for (i = 0; i < ATH_PCI_RESET_WAIT_MAX; i++) {
 		if (ath10k_pci_target_is_awake(ar))
 			break;
@@ -2118,12 +2117,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);
+	val = ath10k_pci_reg_read32(mem, SOC_GLOBAL_RESET_ADDRESS);
 	val |= 1;
-	A_PCIE_LOCAL_REG_WRITE(mem, SOC_GLOBAL_RESET_ADDRESS, val);
+	ath10k_pci_reg_write32(mem, SOC_GLOBAL_RESET_ADDRESS, val);
 
 	for (i = 0; i < ATH_PCI_RESET_WAIT_MAX; i++) {
-		if (A_PCIE_LOCAL_REG_READ(mem, RTC_STATE_ADDRESS) &
+		if (ath10k_pci_reg_read32(mem, RTC_STATE_ADDRESS) &
 					  RTC_STATE_COLD_RESET_MASK)
 			break;
 		msleep(1);
@@ -2131,17 +2130,16 @@ 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, val);
+	ath10k_pci_reg_write32(mem, SOC_GLOBAL_RESET_ADDRESS, val);
 
 	for (i = 0; i < ATH_PCI_RESET_WAIT_MAX; i++) {
-		if (!(A_PCIE_LOCAL_REG_READ(mem, RTC_STATE_ADDRESS) &
+		if (!(ath10k_pci_reg_read32(mem, RTC_STATE_ADDRESS) &
 					    RTC_STATE_COLD_RESET_MASK))
 			break;
 		msleep(1);
 	}
 
-	A_PCIE_LOCAL_REG_WRITE(mem, PCIE_SOC_WAKE_ADDRESS,
-			       PCIE_SOC_WAKE_RESET);
+	ath10k_pci_reg_write32(mem, PCIE_SOC_WAKE_ADDRESS, PCIE_SOC_WAKE_RESET);
 }
 
 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 188593e..ad97a6b 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -229,12 +229,13 @@ 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 + (u32)(addr))
+static inline u32 ath10k_pci_reg_read32(void __iomem *mem, u32 addr) {
+	return ioread32(mem + PCIE_LOCAL_BASE_ADDRESS + addr);
+}
 
-#define A_PCIE_LOCAL_REG_WRITE(mem, addr, val) \
-	iowrite32((val),		       \
-		  ((mem) + PCIE_LOCAL_BASE_ADDRESS + (u32)(addr)))
+static inline void ath10k_pci_reg_write32(void __iomem *mem, u32 addr, u32 val) {
+	iowrite32(val, mem + PCIE_LOCAL_BASE_ADDRESS + addr);
+}
 
 #define ATH_PCI_RESET_WAIT_MAX 10 /* ms */
 #define PCIE_WAKE_TIMEOUT 5000	/* 5ms */
-- 
1.7.10

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

* [ath9k-devel] [PATCH 3/3] ath10k: update supported firmware tag to .599
  2013-04-23  8:24 [ath9k-devel] [PATCH 0/3] ath10k: cleanup - respin Bartosz Markowski
  2013-04-23  8:24 ` [ath9k-devel] [PATCH 1/3] ath10k: remove excessive CONFIG_PM_SLEEP checks Bartosz Markowski
  2013-04-23  8:24 ` [ath9k-devel] [PATCH 2/3] ath10k: kill PCIE_LOCAL_REG_READ/WRITE macros Bartosz Markowski
@ 2013-04-23  8:24 ` Bartosz Markowski
  2013-04-24 10:37 ` [ath9k-devel] [PATCH 0/3] ath10k: cleanup - respin Kalle Valo
  3 siblings, 0 replies; 5+ messages in thread
From: Bartosz Markowski @ 2013-04-23  8:24 UTC (permalink / raw)
  To: ath9k-devel

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/hw.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index 82465a8..9049e4c 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -24,7 +24,7 @@
 #define SUPPORTED_FW_MAJOR	1
 #define SUPPORTED_FW_MINOR	0
 #define SUPPORTED_FW_RELEASE	0
-#define SUPPORTED_FW_BUILD	548
+#define SUPPORTED_FW_BUILD	599
 
 /* AR9888 1.0 definitions */
 #define AR9888_HW_1_0_VERSION		0x4000002c
-- 
1.7.10

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

* [ath9k-devel] [PATCH 0/3] ath10k: cleanup - respin
  2013-04-23  8:24 [ath9k-devel] [PATCH 0/3] ath10k: cleanup - respin Bartosz Markowski
                   ` (2 preceding siblings ...)
  2013-04-23  8:24 ` [ath9k-devel] [PATCH 3/3] ath10k: update supported firmware tag to .599 Bartosz Markowski
@ 2013-04-24 10:37 ` Kalle Valo
  3 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2013-04-24 10:37 UTC (permalink / raw)
  To: ath9k-devel

Bartosz Markowski <bartosz.markowski@tieto.com> writes:

> Couple of updated patches.
>
> Bartosz Markowski (3):
>   ath10k: remove excessive CONFIG_PM_SLEEP checks
>   ath10k: kill PCIE_LOCAL_REG_READ/WRITE macros
>   ath10k: update supported firmware tag to .599

Thanks, applied.

-- 
Kalle Valo

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

end of thread, other threads:[~2013-04-24 10:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-23  8:24 [ath9k-devel] [PATCH 0/3] ath10k: cleanup - respin Bartosz Markowski
2013-04-23  8:24 ` [ath9k-devel] [PATCH 1/3] ath10k: remove excessive CONFIG_PM_SLEEP checks Bartosz Markowski
2013-04-23  8:24 ` [ath9k-devel] [PATCH 2/3] ath10k: kill PCIE_LOCAL_REG_READ/WRITE macros Bartosz Markowski
2013-04-23  8:24 ` [ath9k-devel] [PATCH 3/3] ath10k: update supported firmware tag to .599 Bartosz Markowski
2013-04-24 10:37 ` [ath9k-devel] [PATCH 0/3] ath10k: cleanup - respin Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.