123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- sizeof(u32) + \
- sizeof(u32) + \
- sizeof(u32))
- enum bmi_cmd_id {
- BMI_NO_COMMAND = 0,
- BMI_DONE = 1,
- BMI_READ_MEMORY = 2,
- BMI_WRITE_MEMORY = 3,
- BMI_EXECUTE = 4,
- BMI_SET_APP_START = 5,
- BMI_READ_SOC_REGISTER = 6,
- BMI_READ_SOC_WORD = 6,
- BMI_WRITE_SOC_REGISTER = 7,
- BMI_WRITE_SOC_WORD = 7,
- BMI_GET_TARGET_ID = 8,
- BMI_GET_TARGET_INFO = 8,
- BMI_ROMPATCH_INSTALL = 9,
- BMI_ROMPATCH_UNINSTALL = 10,
- BMI_ROMPATCH_ACTIVATE = 11,
- BMI_ROMPATCH_DEACTIVATE = 12,
- BMI_LZ_STREAM_START = 13,
- BMI_LZ_DATA = 14,
- BMI_NVRAM_PROCESS = 15,
- }
- struct bmi_cmd {
- __le32 id
- union {
- struct {
- } done
- struct {
- __le32 addr;
- __le32 len
- } read_mem
- struct {
- __le32 addr;
- __le32 len
- u8 payload[0]
- } write_mem
- struct {
- __le32 addr;
- __le32 param
- } execute
- struct {
- __le32 addr;
- } set_app_start
- struct {
- __le32 addr;
- } read_soc_reg
- struct {
- __le32 addr;
- __le32 value
- } write_soc_reg
- struct {
- } get_target_info
- struct {
- __le32 rom_addr
- __le32 ram_addr
- __le32 size
- __le32 activate
- } rompatch_install
- struct {
- __le32 patch_id
- } rompatch_uninstall
- struct {
- __le32 count
- __le32 patch_ids[0]
- } rompatch_activate
- struct {
- __le32 count
- __le32 patch_ids[0]
- } rompatch_deactivate
- struct {
- __le32 addr;
- } lz_start
- struct {
- __le32 len
- u8 payload[0]
- } lz_data
- struct {
- u8 name[BMI_NVRAM_SEG_NAME_SZ];
- } nvram_process
- u8 payload[BMI_MAX_CMDBUF_SIZE];
- }
- } __packed
- union bmi_resp {
- struct {
- u8 payload[0]
- } read_mem
- struct {
- __le32 result
- } execute
- struct {
- __le32 value
- } read_soc_reg
- struct {
- __le32 len
- __le32 version
- __le32 type
- } get_target_info
- struct {
- __le32 patch_id
- } rompatch_install
- struct {
- __le32 patch_id
- } rompatch_uninstall
- struct {
-
- __le32 result
- } nvram_process
- u8 payload[BMI_MAX_CMDBUF_SIZE];
- } __packed
- struct bmi_target_info {
- u32 version
- u32 type
- }
- void ath10k_bmi_start(struct ath10k *ar)
- int ath10k_bmi_done(struct ath10k *ar)
- int ath10k_bmi_get_target_info(struct ath10k *ar,
- struct bmi_target_info *target_info)
- int ath10k_bmi_read_memory(struct ath10k *ar, u32 address,
- void *buffer, u32 length)
- int ath10k_bmi_write_memory(struct ath10k *ar, u32 address,
- const void *buffer, u32 length)
- ({ \
- int ret
- u32 addr; \
- __le32 tmp
- \
- addr = host_interest_item_address(HI_ITEM(item))
- ret = ath10k_bmi_read_memory(ar, addr, (u8 *)&tmp, 4)
- if (!ret) \
- *val = __le32_to_cpu(tmp)
- ret
- })
- ({ \
- int ret
- u32 address; \
- __le32 v = __cpu_to_le32(val)
- \
- address = host_interest_item_address(HI_ITEM(item))
- ret = ath10k_bmi_write_memory(ar, address, \
- (u8 *)&v, sizeof(v))
- ret
- })
- int ath10k_bmi_execute(struct ath10k *ar, u32 address, u32 param, u32 *result)
- int ath10k_bmi_lz_stream_start(struct ath10k *ar, u32 address);
- int ath10k_bmi_lz_data(struct ath10k *ar, const void *buffer, u32 length)
- int ath10k_bmi_fast_download(struct ath10k *ar, u32 address,
- const void *buffer, u32 length)
|