drm/rockchip: Don't change hdmi reference clock rate
[drm/drm-misc.git] / drivers / net / ethernet / qlogic / qed / qed_init_ops.h
blob12e5c4e370d41adf02573d678196ed09860ee1e4
1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
2 /* QLogic qed NIC Driver
3 * Copyright (c) 2015-2017 QLogic Corporation
4 * Copyright (c) 2019-2020 Marvell International Ltd.
5 */
7 #ifndef _QED_INIT_OPS_H
8 #define _QED_INIT_OPS_H
10 #include <linux/types.h>
11 #include <linux/slab.h>
12 #include "qed.h"
14 /**
15 * qed_init_iro_array(): init iro_arr.
17 * @cdev: Qed dev pointer.
19 * Return: Void.
21 void qed_init_iro_array(struct qed_dev *cdev);
23 /**
24 * qed_init_run(): Run the init-sequence.
26 * @p_hwfn: HW device data.
27 * @p_ptt: P_ptt.
28 * @phase: Phase.
29 * @phase_id: Phase ID.
30 * @modes: Mode.
32 * Return: _qed_status_t
34 int qed_init_run(struct qed_hwfn *p_hwfn,
35 struct qed_ptt *p_ptt,
36 int phase,
37 int phase_id,
38 int modes);
40 /**
41 * qed_init_alloc(): Allocate RT array, Store 'values' ptrs.
43 * @p_hwfn: HW device data.
45 * Return: _qed_status_t.
47 int qed_init_alloc(struct qed_hwfn *p_hwfn);
49 /**
50 * qed_init_free(): Init HW function deallocate.
52 * @p_hwfn: HW device data.
54 * Return: Void.
56 void qed_init_free(struct qed_hwfn *p_hwfn);
58 /**
59 * qed_init_store_rt_reg(): Store a configuration value in the RT array.
61 * @p_hwfn: HW device data.
62 * @rt_offset: RT offset.
63 * @val: Val.
65 * Return: Void.
67 void qed_init_store_rt_reg(struct qed_hwfn *p_hwfn,
68 u32 rt_offset,
69 u32 val);
71 #define STORE_RT_REG(hwfn, offset, val) \
72 qed_init_store_rt_reg(hwfn, offset, val)
74 #define OVERWRITE_RT_REG(hwfn, offset, val) \
75 qed_init_store_rt_reg(hwfn, offset, val)
77 void qed_init_store_rt_agg(struct qed_hwfn *p_hwfn,
78 u32 rt_offset,
79 u32 *val,
80 size_t size);
82 #define STORE_RT_REG_AGG(hwfn, offset, val) \
83 qed_init_store_rt_agg(hwfn, offset, (u32 *)&(val), sizeof(val))
85 /**
86 * qed_gtt_init(): Initialize GTT global windows and set admin window
87 * related params of GTT/PTT to default values.
89 * @p_hwfn: HW device data.
91 * Return Void.
93 void qed_gtt_init(struct qed_hwfn *p_hwfn);
94 #endif