Home
last modified time | relevance | path

Searched refs:dsaf_dev (Results 1 – 12 of 12) sorted by relevance

/drivers/net/ethernet/hisilicon/hns/
Dhns_dsaf_main.c33 int hns_dsaf_get_cfg(struct dsaf_device *dsaf_dev) in hns_dsaf_get_cfg() argument
39 struct device_node *np = dsaf_dev->dev->of_node; in hns_dsaf_get_cfg()
42 dsaf_dev->dsaf_ver = AE_VERSION_2; in hns_dsaf_get_cfg()
44 dsaf_dev->dsaf_ver = AE_VERSION_1; in hns_dsaf_get_cfg()
48 dev_err(dsaf_dev->dev, "get dsaf name fail, ret=%d!\n", ret); in hns_dsaf_get_cfg()
51 strncpy(dsaf_dev->ae_dev.name, name, AE_NAME_SIZE); in hns_dsaf_get_cfg()
52 dsaf_dev->ae_dev.name[AE_NAME_SIZE - 1] = '\0'; in hns_dsaf_get_cfg()
56 dev_err(dsaf_dev->dev, "get dsaf mode fail, ret=%d!\n", ret); in hns_dsaf_get_cfg()
66 dev_err(dsaf_dev->dev, in hns_dsaf_get_cfg()
67 "%s prs mode str fail!\n", dsaf_dev->ae_dev.name); in hns_dsaf_get_cfg()
[all …]
Dhns_dsaf_mac.c153 mac_cb->dsaf_dev->ae_dev.name, in hns_mac_adjust_link()
173 if (mac_cb->dsaf_dev->dsaf_mode <= DSAF_MODE_ENABLE) { in hns_mac_get_inner_port_num()
177 mac_cb->dsaf_dev->ae_dev.name, in hns_mac_get_inner_port_num()
181 } else if (mac_cb->dsaf_dev->dsaf_mode < DSAF_MODE_MAX) { in hns_mac_get_inner_port_num()
185 mac_cb->dsaf_dev->ae_dev.name, in hns_mac_get_inner_port_num()
191 mac_cb->dsaf_dev->ae_dev.name, mac_cb->mac_id); in hns_mac_get_inner_port_num()
197 if (vmid >= mac_cb->dsaf_dev->rcb_common[comm_idx]->max_vfn) { in hns_mac_get_inner_port_num()
199 mac_cb->dsaf_dev->ae_dev.name, mac_cb->mac_id, vmid); in hns_mac_get_inner_port_num()
203 switch (mac_cb->dsaf_dev->dsaf_mode) { in hns_mac_get_inner_port_num()
226 mac_cb->dsaf_dev->ae_dev.name, mac_cb->mac_id); in hns_mac_get_inner_port_num()
[all …]
Dhns_dsaf_main.h186 struct dsaf_device *dsaf_dev; member
303 static inline void *hns_dsaf_dev_priv(const struct dsaf_device *dsaf_dev) in hns_dsaf_dev_priv() argument
305 return (void *)((u8 *)dsaf_dev + sizeof(*dsaf_dev)); in hns_dsaf_dev_priv()
342 static inline void hns_dsaf_tbl_tcam_addr_cfg(struct dsaf_device *dsaf_dev, in hns_dsaf_tbl_tcam_addr_cfg() argument
345 dsaf_set_dev_field(dsaf_dev, DSAF_TBL_TCAM_ADDR_0_REG, in hns_dsaf_tbl_tcam_addr_cfg()
350 static inline void hns_dsaf_tbl_tcam_load_pul(struct dsaf_device *dsaf_dev) in hns_dsaf_tbl_tcam_load_pul() argument
354 o_tbl_pul = dsaf_read_dev(dsaf_dev, DSAF_TBL_PUL_0_REG); in hns_dsaf_tbl_tcam_load_pul()
356 dsaf_write_dev(dsaf_dev, DSAF_TBL_PUL_0_REG, o_tbl_pul); in hns_dsaf_tbl_tcam_load_pul()
358 dsaf_write_dev(dsaf_dev, DSAF_TBL_PUL_0_REG, o_tbl_pul); in hns_dsaf_tbl_tcam_load_pul()
361 static inline void hns_dsaf_tbl_line_addr_cfg(struct dsaf_device *dsaf_dev, in hns_dsaf_tbl_line_addr_cfg() argument
[all …]
Dhns_dsaf_misc.c85 void hns_dsaf_rst(struct dsaf_device *dsaf_dev, u32 val) in hns_dsaf_rst() argument
98 dsaf_write_reg(dsaf_dev->sc_base, xbar_reg_addr, in hns_dsaf_rst()
100 dsaf_write_reg(dsaf_dev->sc_base, nt_reg_addr, in hns_dsaf_rst()
104 void hns_dsaf_xge_srst_by_port(struct dsaf_device *dsaf_dev, u32 port, u32 val) in hns_dsaf_xge_srst_by_port() argument
120 dsaf_write_reg(dsaf_dev->sc_base, reg_addr, reg_val); in hns_dsaf_xge_srst_by_port()
123 void hns_dsaf_xge_core_srst_by_port(struct dsaf_device *dsaf_dev, in hns_dsaf_xge_core_srst_by_port() argument
139 dsaf_write_reg(dsaf_dev->sc_base, reg_addr, reg_val); in hns_dsaf_xge_core_srst_by_port()
142 void hns_dsaf_ge_srst_by_port(struct dsaf_device *dsaf_dev, u32 port, u32 val) in hns_dsaf_ge_srst_by_port() argument
155 dsaf_write_reg(dsaf_dev->sc_base, in hns_dsaf_ge_srst_by_port()
159 dsaf_write_reg(dsaf_dev->sc_base, in hns_dsaf_ge_srst_by_port()
[all …]
Dhns_dsaf_ppe.c30 base_addr = ppe_common->dsaf_dev->ppe_base in hns_ppe_common_get_ioaddr()
33 base_addr = ppe_common->dsaf_dev->sds_base in hns_ppe_common_get_ioaddr()
46 int hns_ppe_common_get_cfg(struct dsaf_device *dsaf_dev, int comm_index) in hns_ppe_common_get_cfg() argument
56 ppe_common = devm_kzalloc(dsaf_dev->dev, sizeof(*ppe_common) + in hns_ppe_common_get_cfg()
62 ppe_common->dsaf_dev = dsaf_dev; in hns_ppe_common_get_cfg()
68 ppe_common->dev = dsaf_dev->dev; in hns_ppe_common_get_cfg()
72 dsaf_dev->ppe_common[comm_index] = ppe_common; in hns_ppe_common_get_cfg()
77 void hns_ppe_common_free_cfg(struct dsaf_device *dsaf_dev, u32 comm_index) in hns_ppe_common_free_cfg() argument
79 dsaf_dev->ppe_common[comm_index] = NULL; in hns_ppe_common_free_cfg()
89 base_addr = ppe_common->dsaf_dev->ppe_base + in hns_ppe_get_iobase()
[all …]
Dhns_ae_adapt.c71 ppe_comm = vf_cb->dsaf_dev->ppe_common[ppe_common_index]; in hns_get_ppe_cb()
76 struct dsaf_device *dsaf_dev, int port) in hns_ae_get_q_num_per_vf() argument
80 return dsaf_dev->rcb_common[common_idx]->max_q_per_vf; in hns_ae_get_q_num_per_vf()
84 struct dsaf_device *dsaf_dev, int port) in hns_ae_get_vf_num_per_port() argument
88 return dsaf_dev->rcb_common[common_idx]->max_vfn; in hns_ae_get_vf_num_per_port()
92 struct dsaf_device *dsaf_dev, int port) in hns_ae_get_base_ring_pair() argument
95 struct rcb_common_cb *rcb_comm = dsaf_dev->rcb_common[common_idx]; in hns_ae_get_base_ring_pair()
117 struct dsaf_device *dsaf_dev; in hns_ae_get_handle() local
122 dsaf_dev = hns_ae_get_dsaf_dev(dev); in hns_ae_get_handle()
125 ring_pair_cb = hns_ae_get_base_ring_pair(dsaf_dev, port_idx); in hns_ae_get_handle()
[all …]
Dhns_dsaf_rcb.c186 u32 bd_size_type = rcb_common->dsaf_dev->buf_size_type; in hns_rcb_ring_init()
342 dev_err(rcb_common->dsaf_dev->dev, in hns_rcb_common_init_hw()
406 buf_size = rcb_common->dsaf_dev->buf_size; in hns_rcb_ring_get_cfg()
407 desc_num = rcb_common->dsaf_dev->desc_num; in hns_rcb_ring_get_cfg()
470 struct device_node *np = rcb_common->dsaf_dev->dev->of_node; in hns_rcb_get_cfg()
475 ring_pair_cb->dev = rcb_common->dsaf_dev->dev; in hns_rcb_get_cfg()
496 u32 hns_rcb_get_coalesced_frames(struct dsaf_device *dsaf_dev, int port) in hns_rcb_get_coalesced_frames() argument
499 struct rcb_common_cb *rcb_comm = dsaf_dev->rcb_common[comm_index]; in hns_rcb_get_coalesced_frames()
510 u32 hns_rcb_get_coalesce_usecs(struct dsaf_device *dsaf_dev, int comm_index) in hns_rcb_get_coalesce_usecs() argument
512 struct rcb_common_cb *rcb_comm = dsaf_dev->rcb_common[comm_index]; in hns_rcb_get_coalesce_usecs()
[all …]
Dhns_dsaf_rcb.h89 struct dsaf_device *dsaf_dev; member
104 int hns_rcb_common_get_cfg(struct dsaf_device *dsaf_dev, int comm_index);
105 void hns_rcb_common_free_cfg(struct dsaf_device *dsaf_dev, u32 comm_index);
120 u32 hns_rcb_get_coalesced_frames(struct dsaf_device *dsaf_dev, int comm_index);
121 u32 hns_rcb_get_coalesce_usecs(struct dsaf_device *dsaf_dev, int comm_index);
122 void hns_rcb_set_coalesce_usecs(struct dsaf_device *dsaf_dev,
124 int hns_rcb_set_coalesced_frames(struct dsaf_device *dsaf_dev,
Dhns_dsaf_ppe.h79 struct dsaf_device *dsaf_dev; member
91 int hns_ppe_init(struct dsaf_device *dsaf_dev);
93 void hns_ppe_uninit(struct dsaf_device *dsaf_dev);
95 void hns_ppe_reset_common(struct dsaf_device *dsaf_dev, u8 ppe_common_index);
Dhns_dsaf_xgmac.c118 struct dsaf_device *dsaf_dev in hns_xgmac_enable() local
122 hns_dsaf_xge_core_srst_by_port(dsaf_dev, port, 1); in hns_xgmac_enable()
146 struct dsaf_device *dsaf_dev in hns_xgmac_disable() local
160 hns_dsaf_xge_core_srst_by_port(dsaf_dev, port, 0); in hns_xgmac_disable()
197 struct dsaf_device *dsaf_dev in hns_xgmac_init() local
201 hns_dsaf_xge_srst_by_port(dsaf_dev, port, 0); in hns_xgmac_init()
203 hns_dsaf_xge_srst_by_port(dsaf_dev, port, 1); in hns_xgmac_init()
423 struct dsaf_device *dsaf_dev in hns_xgmac_free() local
428 hns_dsaf_xge_srst_by_port(dsaf_dev, mac_id, 0); in hns_xgmac_free()
Dhns_dsaf_mac.h309 struct dsaf_device *dsaf_dev; member
423 int hns_mac_init(struct dsaf_device *dsaf_dev);
433 void hns_mac_uninit(struct dsaf_device *dsaf_dev);
Dhns_dsaf_gmac.c108 struct dsaf_device *dsaf_dev in hns_gmac_free() local
113 hns_dsaf_ge_srst_by_port(dsaf_dev, mac_id, 0); in hns_gmac_free()
297 struct dsaf_device *dsaf_dev in hns_gmac_init() local
302 hns_dsaf_ge_srst_by_port(dsaf_dev, port, 0); in hns_gmac_init()
304 hns_dsaf_ge_srst_by_port(dsaf_dev, port, 1); in hns_gmac_init()