]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
ath6kl: add board address to struct ath6kl_hw
authorKalle Valo <kvalo@qca.qualcomm.com>
Mon, 14 Nov 2011 17:30:39 +0000 (19:30 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 16 Nov 2011 08:22:33 +0000 (10:22 +0200)
This is to make it configurable by firmware IEs. Also determine if we need
to write or read the board address to the chip by checking if board address
is set or not.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/core.h
drivers/net/wireless/ath/ath6kl/init.c
drivers/net/wireless/ath/ath6kl/target.h

index f5a8334ca51e4cd1a3a050e4d1e0495fa3c503af..83167be882e9de6b98108cc4558db0c9a07611f9 100644 (file)
@@ -548,6 +548,7 @@ struct ath6kl {
                u32 app_start_override_addr;
                u32 board_ext_data_addr;
                u32 reserved_ram_size;
+               u32 board_addr;
        } hw;
 
        u16 conf_flags;
index 77444d1edd5abdd01237437e95f2ea55f1c93038..bed468d3208bfc10bc56f2bf4f3415f22352ab55 100644 (file)
@@ -57,6 +57,7 @@ static const struct ath6kl_hw hw_list[] = {
                .app_load_addr                  = 0x1234,
                .board_ext_data_addr            = 0x437000,
                .reserved_ram_size              = 19456,
+               .board_addr                     = 0x433900,
        },
        {
                .id                             = AR6004_REV2_VERSION,
@@ -64,6 +65,7 @@ static const struct ath6kl_hw hw_list[] = {
                .app_load_addr                  = 0x1234,
                .board_ext_data_addr            = 0x437000,
                .reserved_ram_size              = 11264,
+               .board_addr                     = 0x43d400,
        },
 };
 
@@ -1031,12 +1033,8 @@ static int ath6kl_upload_board_file(struct ath6kl *ar)
         * For AR6004, host determine Target RAM address for
         * writing board data.
         */
-       if (ar->target_type == TARGET_TYPE_AR6004) {
-               if (ar->version.target_ver == AR6004_REV1_VERSION)
-                       board_address = AR6004_REV1_BOARD_DATA_ADDRESS;
-               else
-                       board_address = AR6004_REV2_BOARD_DATA_ADDRESS;
-
+       if (ar->hw.board_addr != 0) {
+               board_address = ar->hw.board_addr;
                ath6kl_bmi_write(ar,
                                ath6kl_get_hi_item_addr(ar,
                                HI_ITEM(hi_board_data)),
index ece0f1312ea9c38ba4c398a9c2ee43d9475ff3c4..108a723a1085ad1cb9f7d879498dae8a4eda73d3 100644 (file)
@@ -334,9 +334,6 @@ struct host_interest {
        (((target_type) == TARGET_TYPE_AR6003) ? AR6003_VTOP(vaddr) : \
        (((target_type) == TARGET_TYPE_AR6004) ? AR6004_VTOP(vaddr) : 0))
 
-#define AR6004_REV1_BOARD_DATA_ADDRESS          0x433900
-#define AR6004_REV2_BOARD_DATA_ADDRESS          0x43d400
-
 #define ATH6KL_FWLOG_PAYLOAD_SIZE              1500
 
 struct ath6kl_dbglog_buf {