Firmware IE containers can dynamically provide various information what firmware supports. Also it can embed more than one image so updating firmware is easy, user just needs to update one file in /lib/firmware/. The firmware API 2 or higher will use the IE container format, the current API 1 will not use the new format but it still is supported for some time. Firmware API 2 files are named as firmware-2.bin (which contains both amss.bin and m3.bin images) and API 1 files are amss.bin and m3.bin. Currently ath11k PCI driver provides firmware binary (amss.bin) path to MHI driver, MHI driver reads firmware from filesystem and boots it. Add provision to read firmware files from ath11k driver and provide the amss.bin firmware data and size to MHI using a pointer. Currently enum ath11k_fw_features is empty, the patches adding features will add the flags. With AHB devices there's no amss.bin or m3.bin, so no changes in how AHB firmware files are used. But AHB devices can use future additions to the meta data, for example in enum ath11k_fw_features. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9 Co-developed-by: P Praneesh <quic_ppranees@quicinc.com> Signed-off-by: P Praneesh <quic_ppranees@quicinc.com> Signed-off-by: Anilkumar Kolli <quic_akolli@quicinc.com> Co-developed-by: Kalle Valo <quic_kvalo@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230727100430.3603551-4-kvalo@kernel.org
27 lines
615 B
C
27 lines
615 B
C
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
|
/*
|
|
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
|
*/
|
|
|
|
#ifndef ATH11K_FW_H
|
|
#define ATH11K_FW_H
|
|
|
|
#define ATH11K_FW_API2_FILE "firmware-2.bin"
|
|
#define ATH11K_FIRMWARE_MAGIC "QCOM-ATH11K-FW"
|
|
|
|
enum ath11k_fw_ie_type {
|
|
ATH11K_FW_IE_TIMESTAMP = 0,
|
|
ATH11K_FW_IE_FEATURES = 1,
|
|
ATH11K_FW_IE_AMSS_IMAGE = 2,
|
|
ATH11K_FW_IE_M3_IMAGE = 3,
|
|
};
|
|
|
|
enum ath11k_fw_features {
|
|
/* keep last */
|
|
ATH11K_FW_FEATURE_COUNT,
|
|
};
|
|
|
|
int ath11k_fw_pre_init(struct ath11k_base *ab);
|
|
void ath11k_fw_destroy(struct ath11k_base *ab);
|
|
|
|
#endif /* ATH11K_FW_H */
|