qed: Adapter flash update support.
This patch adds the required driver support for updating the flash or non volatile memory of the adapter. At highlevel, flash upgrade comprises of reading the flash images from the input file, validating the images and writing them to the respective paritions. Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com> Signed-off-by: Ariel Elior <ariel.elior@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
62e4d4386a
commit
3a69cae80c
@@ -483,6 +483,15 @@ struct qed_int_info {
|
||||
u8 used_cnt;
|
||||
};
|
||||
|
||||
#define QED_NVM_SIGNATURE 0x12435687
|
||||
|
||||
enum qed_nvm_flash_cmd {
|
||||
QED_NVM_FLASH_CMD_FILE_DATA = 0x2,
|
||||
QED_NVM_FLASH_CMD_FILE_START = 0x3,
|
||||
QED_NVM_FLASH_CMD_NVM_CHANGE = 0x4,
|
||||
QED_NVM_FLASH_CMD_NVM_MAX,
|
||||
};
|
||||
|
||||
struct qed_common_cb_ops {
|
||||
void (*arfs_filter_op)(void *dev, void *fltr, u8 fw_rc);
|
||||
void (*link_update)(void *dev,
|
||||
@@ -657,6 +666,16 @@ struct qed_common_ops {
|
||||
void (*chain_free)(struct qed_dev *cdev,
|
||||
struct qed_chain *p_chain);
|
||||
|
||||
/**
|
||||
* @brief nvm_flash - Flash nvm data.
|
||||
*
|
||||
* @param cdev
|
||||
* @param name - file containing the data
|
||||
*
|
||||
* @return 0 on success, error otherwise.
|
||||
*/
|
||||
int (*nvm_flash)(struct qed_dev *cdev, const char *name);
|
||||
|
||||
/**
|
||||
* @brief nvm_get_image - reads an entire image from nvram
|
||||
*
|
||||
|
Reference in New Issue
Block a user