#include <linux/types.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/string.h>
#include "qed.h"
#include "qed_hsi.h"
#include "qed_hw.h"
#include "qed_init_ops.h"
#include "qed_iro_hsi.h"
#include "qed_reg_addr.h"
#include "qed_sriov.h"
#define QED_INIT_MAX_POLL_COUNT …
#define QED_INIT_POLL_PERIOD_US …
static u32 pxp_global_win[] = …;
static const u32 iro_arr[] = …;
void qed_init_iro_array(struct qed_dev *cdev)
{ … }
void qed_init_store_rt_reg(struct qed_hwfn *p_hwfn, u32 rt_offset, u32 val)
{ … }
void qed_init_store_rt_agg(struct qed_hwfn *p_hwfn,
u32 rt_offset, u32 *p_val, size_t size)
{ … }
static int qed_init_rt(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt,
u32 addr, u16 rt_offset, u16 size, bool b_must_dmae)
{ … }
int qed_init_alloc(struct qed_hwfn *p_hwfn)
{ … }
void qed_init_free(struct qed_hwfn *p_hwfn)
{ … }
static int qed_init_array_dmae(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt,
u32 addr,
u32 dmae_data_offset,
u32 size,
const u32 *buf,
bool b_must_dmae,
bool b_can_dmae)
{ … }
static int qed_init_fill_dmae(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt,
u32 addr, u32 fill_count)
{ … }
static void qed_init_fill(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt,
u32 addr, u32 fill, u32 fill_count)
{ … }
static int qed_init_cmd_array(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt,
struct init_write_op *cmd,
bool b_must_dmae, bool b_can_dmae)
{ … }
static int qed_init_cmd_wr(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt,
struct init_write_op *p_cmd, bool b_can_dmae)
{ … }
static inline bool comp_eq(u32 val, u32 expected_val)
{ … }
static inline bool comp_and(u32 val, u32 expected_val)
{ … }
static inline bool comp_or(u32 val, u32 expected_val)
{ … }
static void qed_init_cmd_rd(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt, struct init_read_op *cmd)
{ … }
static int qed_init_cmd_cb(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt,
struct init_callback_op *p_cmd)
{ … }
static u8 qed_init_cmd_mode_match(struct qed_hwfn *p_hwfn,
u16 *p_offset, int modes)
{ … }
static u32 qed_init_cmd_mode(struct qed_hwfn *p_hwfn,
struct init_if_mode_op *p_cmd, int modes)
{ … }
static u32 qed_init_cmd_phase(struct init_if_phase_op *p_cmd,
u32 phase, u32 phase_id)
{ … }
int qed_init_run(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt, int phase, int phase_id, int modes)
{ … }
void qed_gtt_init(struct qed_hwfn *p_hwfn)
{ … }
int qed_init_fw_data(struct qed_dev *cdev, const u8 *data)
{ … }