summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath6kl/main.c
diff options
context:
space:
mode:
authorKevin Fang <kevin.fang@qca.qualcomm.com>2011-07-11 17:14:13 +0800
committerKalle Valo <kvalo@qca.qualcomm.com>2011-08-31 10:10:53 +0300
commit31024d99003486c90c793dea58b55f7920f0488b (patch)
tree1d9b749c4e249581e4064584f10606d3cdcfcec9 /drivers/net/wireless/ath/ath6kl/main.c
parent0ce77920adcb16d6449de9ca481a553ea6008c6d (diff)
downloadlwn-31024d99003486c90c793dea58b55f7920f0488b.tar.gz
lwn-31024d99003486c90c793dea58b55f7920f0488b.zip
ath6kl: Add beginning of AR6004 initialisation support
Support isn't complete yet. Signed-off-by: Kevin Fang <kevin.fang@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/main.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/main.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index c336eae0cf48..f236aa8c6b8f 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -298,6 +298,10 @@ int ath6kl_access_datadiag(struct ath6kl *ar, u32 address,
return status;
}
+/* FIXME: move to a better place, target.h? */
+#define AR6003_RESET_CONTROL_ADDRESS 0x00004000
+#define AR6004_RESET_CONTROL_ADDRESS 0x00004000
+
static void ath6kl_reset_device(struct ath6kl *ar, u32 target_type,
bool wait_fot_compltn, bool cold_reset)
{
@@ -305,12 +309,24 @@ static void ath6kl_reset_device(struct ath6kl *ar, u32 target_type,
u32 address;
u32 data;
- if (target_type != TARGET_TYPE_AR6003)
+ if (target_type != TARGET_TYPE_AR6003 &&
+ target_type != TARGET_TYPE_AR6004)
return;
data = cold_reset ? RESET_CONTROL_COLD_RST : RESET_CONTROL_MBOX_RST;
- address = RTC_BASE_ADDRESS;
+ switch (target_type) {
+ case TARGET_TYPE_AR6003:
+ address = AR6003_RESET_CONTROL_ADDRESS;
+ break;
+ case TARGET_TYPE_AR6004:
+ address = AR6004_RESET_CONTROL_ADDRESS;
+ break;
+ default:
+ address = AR6003_RESET_CONTROL_ADDRESS;
+ break;
+ }
+
status = ath6kl_write_reg_diag(ar, &address, &data);
if (status)