1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright(c) 2020-2023 Intel Corporation
9 #include "fw/notif-wait.h"
11 #define MVM_UCODE_PNVM_TIMEOUT (HZ / 4)
13 #define MAX_PNVM_NAME 64
15 int iwl_pnvm_load(struct iwl_trans *trans,
16 struct iwl_notif_wait_data *notif_wait,
17 const struct iwl_ucode_capabilities *capa);
20 void iwl_pnvm_get_fs_name(struct iwl_trans *trans,
21 u8 *pnvm_name, size_t max_len)
23 char _fw_name_pre[FW_NAME_PRE_BUFSIZE];
24 const char *fw_name_pre;
27 fw_name_pre = iwl_drv_get_fwname_pre(trans, _fw_name_pre);
30 * The prefix unfortunately includes a hyphen at the end, so
31 * don't add the dot here...
33 snprintf(pnvm_name, max_len, "%spnvm", fw_name_pre);
35 /* ...but replace the hyphen with the dot here. */
36 pre_len = strlen(fw_name_pre);
37 if (pre_len < max_len && pre_len > 0)
38 pnvm_name[pre_len - 1] = '.';
41 #endif /* __IWL_PNVM_H__ */