Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
0002 /******************************************************************************
0003  *
0004  * Copyright(c) 2020-2021 Intel Corporation
0005  *
0006  *****************************************************************************/
0007 
0008 #ifndef __IWL_PNVM_H__
0009 #define __IWL_PNVM_H__
0010 
0011 #include "fw/notif-wait.h"
0012 
0013 #define MVM_UCODE_PNVM_TIMEOUT  (HZ / 4)
0014 
0015 #define MAX_PNVM_NAME  64
0016 
0017 int iwl_pnvm_load(struct iwl_trans *trans,
0018           struct iwl_notif_wait_data *notif_wait);
0019 
0020 static inline
0021 void iwl_pnvm_get_fs_name(struct iwl_trans *trans,
0022               u8 *pnvm_name, size_t max_len)
0023 {
0024     int pre_len;
0025 
0026     /*
0027      * The prefix unfortunately includes a hyphen at the end, so
0028      * don't add the dot here...
0029      */
0030     snprintf(pnvm_name, max_len, "%spnvm", trans->cfg->fw_name_pre);
0031 
0032     /* ...but replace the hyphen with the dot here. */
0033     pre_len = strlen(trans->cfg->fw_name_pre);
0034     if (pre_len < max_len && pre_len > 0)
0035         pnvm_name[pre_len - 1] = '.';
0036 }
0037 
0038 #endif /* __IWL_PNVM_H__ */