summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath10k/bmi.h
diff options
context:
space:
mode:
authorManikanta Pubbisetty <c_mpubbi@qti.qualcomm.com>2015-10-09 11:55:59 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2015-10-14 08:58:35 +0300
commitdb0984e51a187f5bbe41231af7e671cc12586346 (patch)
tree3320db5ed6d0c2995844194eac1711b3dc40d934 /drivers/net/wireless/ath/ath10k/bmi.h
parent0a51b343abfe2c0dbcbd9ec3c4b18bb8779fefa8 (diff)
ath10k: select board data based on BMI chip id and board id
QCA99X0 uses radio specific board names based on chip id and board id combinations. We get these IDs from the target using BMI after otp.bin has been started. This patch reorders the call to the function ath10k_core_fetch_board_file so that we have OTP binary before requesting for boardid-chipid. We get this OTP data after parsing firmware-N.bin. [kvalo@qca.qualcomm.com: try BMI_PARAM_GET_EEPROM_BOARD_ID with all boards and detect if command is not supported] Signed-off-by: Manikanta Pubbisetty <c_mpubbi@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/bmi.h')
-rw-r--r--drivers/net/wireless/ath/ath10k/bmi.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/bmi.h b/drivers/net/wireless/ath/ath10k/bmi.h
index df7c7616533b..7d3231acfb24 100644
--- a/drivers/net/wireless/ath/ath10k/bmi.h
+++ b/drivers/net/wireless/ath/ath10k/bmi.h
@@ -82,6 +82,16 @@ enum bmi_cmd_id {
#define BMI_NVRAM_SEG_NAME_SZ 16
+#define BMI_PARAM_GET_EEPROM_BOARD_ID 0x10
+
+#define ATH10K_BMI_BOARD_ID_FROM_OTP_MASK 0x7c00
+#define ATH10K_BMI_BOARD_ID_FROM_OTP_LSB 10
+
+#define ATH10K_BMI_CHIP_ID_FROM_OTP_MASK 0x18000
+#define ATH10K_BMI_CHIP_ID_FROM_OTP_LSB 15
+
+#define ATH10K_BMI_BOARD_ID_STATUS_MASK 0xff
+
struct bmi_cmd {
__le32 id; /* enum bmi_cmd_id */
union {