提交 0d4d72bf 编写于 作者: K Kalle Valo

ath6kl: add board address to struct ath6kl_hw

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: NKalle Valo <kvalo@qca.qualcomm.com>
上级 856f4b31
...@@ -548,6 +548,7 @@ struct ath6kl { ...@@ -548,6 +548,7 @@ struct ath6kl {
u32 app_start_override_addr; u32 app_start_override_addr;
u32 board_ext_data_addr; u32 board_ext_data_addr;
u32 reserved_ram_size; u32 reserved_ram_size;
u32 board_addr;
} hw; } hw;
u16 conf_flags; u16 conf_flags;
......
...@@ -57,6 +57,7 @@ static const struct ath6kl_hw hw_list[] = { ...@@ -57,6 +57,7 @@ static const struct ath6kl_hw hw_list[] = {
.app_load_addr = 0x1234, .app_load_addr = 0x1234,
.board_ext_data_addr = 0x437000, .board_ext_data_addr = 0x437000,
.reserved_ram_size = 19456, .reserved_ram_size = 19456,
.board_addr = 0x433900,
}, },
{ {
.id = AR6004_REV2_VERSION, .id = AR6004_REV2_VERSION,
...@@ -64,6 +65,7 @@ static const struct ath6kl_hw hw_list[] = { ...@@ -64,6 +65,7 @@ static const struct ath6kl_hw hw_list[] = {
.app_load_addr = 0x1234, .app_load_addr = 0x1234,
.board_ext_data_addr = 0x437000, .board_ext_data_addr = 0x437000,
.reserved_ram_size = 11264, .reserved_ram_size = 11264,
.board_addr = 0x43d400,
}, },
}; };
...@@ -1031,12 +1033,8 @@ static int ath6kl_upload_board_file(struct ath6kl *ar) ...@@ -1031,12 +1033,8 @@ static int ath6kl_upload_board_file(struct ath6kl *ar)
* For AR6004, host determine Target RAM address for * For AR6004, host determine Target RAM address for
* writing board data. * writing board data.
*/ */
if (ar->target_type == TARGET_TYPE_AR6004) { if (ar->hw.board_addr != 0) {
if (ar->version.target_ver == AR6004_REV1_VERSION) board_address = ar->hw.board_addr;
board_address = AR6004_REV1_BOARD_DATA_ADDRESS;
else
board_address = AR6004_REV2_BOARD_DATA_ADDRESS;
ath6kl_bmi_write(ar, ath6kl_bmi_write(ar,
ath6kl_get_hi_item_addr(ar, ath6kl_get_hi_item_addr(ar,
HI_ITEM(hi_board_data)), HI_ITEM(hi_board_data)),
......
...@@ -334,9 +334,6 @@ struct host_interest { ...@@ -334,9 +334,6 @@ struct host_interest {
(((target_type) == TARGET_TYPE_AR6003) ? AR6003_VTOP(vaddr) : \ (((target_type) == TARGET_TYPE_AR6003) ? AR6003_VTOP(vaddr) : \
(((target_type) == TARGET_TYPE_AR6004) ? AR6004_VTOP(vaddr) : 0)) (((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 #define ATH6KL_FWLOG_PAYLOAD_SIZE 1500
struct ath6kl_dbglog_buf { struct ath6kl_dbglog_buf {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册