diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-10-16 09:46:11 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-10-21 09:41:19 -0400 |
commit | 233eb97fc9d0f44f2ea99fe48118aa3d2dc25d64 (patch) | |
tree | 2c2c1d419f23cf4821ed09fb90cd962d22fa4e0f | |
parent | 5e90de860bc2d82dcb73caef86c05cb49c2b5792 (diff) |
ath10k: implement ath10k_pci_soc_read/write32()
To make it easier to access SOC registers. No functional
changes.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath10k/pci.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/pci.h | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index d09f8a2861ba..5c7838398e9a 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c | |||
@@ -2454,8 +2454,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev, | |||
2454 | return ret; | 2454 | return ret; |
2455 | } | 2455 | } |
2456 | 2456 | ||
2457 | chip_id = ath10k_pci_read32(ar, | 2457 | chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS); |
2458 | RTC_SOC_BASE_ADDRESS + SOC_CHIP_ID_ADDRESS); | ||
2459 | 2458 | ||
2460 | ath10k_do_pci_sleep(ar); | 2459 | ath10k_do_pci_sleep(ar); |
2461 | 2460 | ||
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h index 52fb7b973571..a304c3384902 100644 --- a/drivers/net/wireless/ath/ath10k/pci.h +++ b/drivers/net/wireless/ath/ath10k/pci.h | |||
@@ -318,6 +318,16 @@ static inline u32 ath10k_pci_read32(struct ath10k *ar, u32 offset) | |||
318 | return ioread32(ar_pci->mem + offset); | 318 | return ioread32(ar_pci->mem + offset); |
319 | } | 319 | } |
320 | 320 | ||
321 | static inline u32 ath10k_pci_soc_read32(struct ath10k *ar, u32 addr) | ||
322 | { | ||
323 | return ath10k_pci_read32(ar, RTC_SOC_BASE_ADDRESS + addr); | ||
324 | } | ||
325 | |||
326 | static inline void ath10k_pci_soc_write32(struct ath10k *ar, u32 addr, u32 val) | ||
327 | { | ||
328 | ath10k_pci_write32(ar, RTC_SOC_BASE_ADDRESS + addr, val); | ||
329 | } | ||
330 | |||
321 | int ath10k_do_pci_wake(struct ath10k *ar); | 331 | int ath10k_do_pci_wake(struct ath10k *ar); |
322 | void ath10k_do_pci_sleep(struct ath10k *ar); | 332 | void ath10k_do_pci_sleep(struct ath10k *ar); |
323 | 333 | ||