| /linux/drivers/net/ethernet/meta/fbnic/ |
| H A D | fbnic_irq.c | 13 struct fbnic_dev *fbd = (struct fbnic_dev *)data; in fbnic_fw_msix_intr() local 15 fbnic_mbx_poll(fbd); in fbnic_fw_msix_intr() 17 fbnic_wr32(fbd, FBNIC_INTR_MASK_CLEAR(0), 1u << FBNIC_FW_MSIX_ENTRY); in fbnic_fw_msix_intr() 22 static int __fbnic_fw_enable_mbx(struct fbnic_dev *fbd, int vector) in __fbnic_fw_enable_mbx() argument 27 fbnic_mbx_init(fbd); in __fbnic_fw_enable_mbx() 28 err = fbnic_mbx_poll_tx_ready(fbd); in __fbnic_fw_enable_mbx() 30 dev_warn(fbd->dev, "FW mailbox did not enter ready state\n"); in __fbnic_fw_enable_mbx() 36 fbnic_wr32(fbd, FBNIC_INTR_MASK_CLEAR(0), 1u << FBNIC_FW_MSIX_ENTRY); in __fbnic_fw_enable_mbx() 50 int fbnic_fw_request_mbx(struct fbnic_dev *fbd) in fbnic_fw_request_mbx() argument 52 struct pci_dev *pdev = to_pci_dev(fbd->dev); in fbnic_fw_request_mbx() [all …]
|
| H A D | fbnic_pci.c | 37 u32 fbnic_rd32(struct fbnic_dev *fbd, u32 reg) in fbnic_rd32() argument 39 u32 __iomem *csr = READ_ONCE(fbd->uc_addr0); in fbnic_rd32() 56 WRITE_ONCE(fbd->uc_addr0, NULL); in fbnic_rd32() 57 WRITE_ONCE(fbd->uc_addr4, NULL); in fbnic_rd32() 59 dev_err(fbd->dev, in fbnic_rd32() 64 if (!fbnic_init_failure(fbd)) in fbnic_rd32() 65 netif_device_detach(fbd->netdev); in fbnic_rd32() 70 bool fbnic_fw_present(struct fbnic_dev *fbd) in fbnic_fw_present() argument 72 return !!READ_ONCE(fbd->uc_addr4); in fbnic_fw_present() 75 void fbnic_fw_wr32(struct fbnic_dev *fbd, u32 reg, u32 val) in fbnic_fw_wr32() argument [all …]
|
| H A D | fbnic_rpc.c | 54 void fbnic_rss_disable_hw(struct fbnic_dev *fbd) in fbnic_rss_disable_hw() argument 57 if (!fbnic_bmc_present(fbd)) in fbnic_rss_disable_hw() 58 wr32(fbd, FBNIC_RPC_RMI_CONFIG, in fbnic_rss_disable_hw() 81 void fbnic_rss_reinit_hw(struct fbnic_dev *fbd, struct fbnic_net *fbn) in fbnic_rss_reinit_hw() argument 86 wr32(fbd, FBNIC_RPC_RSS_TBL(0, i), fbn->indir_tbl[0][i]); in fbnic_rss_reinit_hw() 87 wr32(fbd, FBNIC_RPC_RSS_TBL(1, i), fbn->indir_tbl[1][i]); in fbnic_rss_reinit_hw() 91 wr32(fbd, FBNIC_RPC_RSS_KEY(i), fbn->rss_key[i]); in fbnic_rss_reinit_hw() 94 wr32(fbd, FBNIC_RPC_ACT_TBL0_DEFAULT, FBNIC_RPC_ACT_TBL0_DROP); in fbnic_rss_reinit_hw() 95 wrfl(fbd); in fbnic_rss_reinit_hw() 97 wr32(fbd, FBNIC_RPC_ACT_TBL1_DEFAULT, 0); in fbnic_rss_reinit_hw() [all …]
|
| H A D | fbnic_fw.c | 15 static void __fbnic_mbx_wr_desc(struct fbnic_dev *fbd, int mbx_idx, in __fbnic_mbx_wr_desc() argument 24 fw_wr32(fbd, desc_offset + 1, upper_32_bits(desc)); in __fbnic_mbx_wr_desc() 25 fw_wrfl(fbd); in __fbnic_mbx_wr_desc() 26 fw_wr32(fbd, desc_offset, lower_32_bits(desc)); in __fbnic_mbx_wr_desc() 29 static void __fbnic_mbx_invalidate_desc(struct fbnic_dev *fbd, int mbx_idx, in __fbnic_mbx_invalidate_desc() argument 38 fw_wr32(fbd, desc_offset, desc); in __fbnic_mbx_invalidate_desc() 39 fw_wrfl(fbd); in __fbnic_mbx_invalidate_desc() 40 fw_wr32(fbd, desc_offset + 1, 0); in __fbnic_mbx_invalidate_desc() 43 u64 __fbnic_mbx_rd_desc(struct fbnic_dev *fbd, int mbx_idx, int desc_idx) in __fbnic_mbx_rd_desc() argument 48 desc = fw_rd32(fbd, desc_offset); in __fbnic_mbx_rd_desc() [all …]
|
| H A D | fbnic_netdev.c | 15 struct fbnic_dev *fbd = fbn->fbd; in __fbnic_open() local 31 err = fbnic_fw_xmit_ownership_msg(fbd, true); in __fbnic_open() 33 dev_warn(fbd->dev, in __fbnic_open() 43 err = fbnic_fw_init_heartbeat(fbd, false); in __fbnic_open() 47 err = fbnic_mac_request_irq(fbd); in __fbnic_open() 52 fbnic_bmc_rpc_init(fbd); in __fbnic_open() 53 fbnic_rss_reinit(fbd, fbn); in __fbnic_open() 61 fbnic_fw_xmit_ownership_msg(fbn->fbd, false); in __fbnic_open() 76 fbnic_napi_name_irqs(fbn->fbd); in fbnic_open() 89 fbnic_mac_free_irq(fbn->fbd); in fbnic_stop() [all …]
|
| H A D | fbnic_debugfs.c | 320 struct fbnic_dev *fbd = nv->fbd; in fbnic_dbg_nv_init() local 327 nv->dbg_nv = debugfs_create_dir(name, fbd->dbg_fbd); in fbnic_dbg_nv_init() 335 &fbd->uc_addr0[FBNIC_QUEUE(0)]; in fbnic_dbg_nv_init() 357 &fbd->uc_addr0[FBNIC_QUEUE(0)]; in fbnic_dbg_nv_init() 382 struct fbnic_dev *fbd = s->private; in fbnic_dbg_mac_addr_show() local 393 struct fbnic_mac_addr *mac_addr = &fbd->mac_addr[i]; in fbnic_dbg_mac_addr_show() 408 struct fbnic_dev *fbd = s->private; in fbnic_dbg_tce_tcam_show() local 418 for (i = 0; i < ARRAY_SIZE(fbd->mac_addr); i++) { in fbnic_dbg_tce_tcam_show() 419 struct fbnic_mac_addr *mac_addr = &fbd->mac_addr[i]; in fbnic_dbg_tce_tcam_show() 442 struct fbnic_dev *fbd = s->private; in fbnic_dbg_act_tcam_show() local [all …]
|
| H A D | fbnic_fw_log.c | 11 void fbnic_fw_log_enable(struct fbnic_dev *fbd, bool send_hist) in fbnic_fw_log_enable() argument 15 if (!fbnic_fw_log_ready(fbd)) in fbnic_fw_log_enable() 18 if (fbd->fw_cap.running.mgmt.version < MIN_FW_VER_CODE_HIST) in fbnic_fw_log_enable() 21 err = fbnic_fw_xmit_send_logs(fbd, true, send_hist); in fbnic_fw_log_enable() 23 dev_warn(fbd->dev, "Unable to enable firmware logs: %d\n", err); in fbnic_fw_log_enable() 26 void fbnic_fw_log_disable(struct fbnic_dev *fbd) in fbnic_fw_log_disable() argument 30 err = fbnic_fw_xmit_send_logs(fbd, false, false); in fbnic_fw_log_disable() 32 dev_warn(fbd->dev, "Unable to disable firmware logs: %d\n", in fbnic_fw_log_disable() 36 int fbnic_fw_log_init(struct fbnic_dev *fbd) in fbnic_fw_log_init() argument 38 struct fbnic_fw_log *log = &fbd->fw_log; in fbnic_fw_log_init() [all …]
|
| H A D | fbnic_hwmon.c | 34 struct fbnic_dev *fbd = dev_get_drvdata(dev); in fbnic_hwmon_read() local 35 const struct fbnic_mac *mac = fbd->mac; in fbnic_hwmon_read() 39 return id < 0 ? id : mac->get_sensor(fbd, id, val); in fbnic_hwmon_read() 58 void fbnic_hwmon_register(struct fbnic_dev *fbd) in fbnic_hwmon_register() argument 63 fbd->hwmon = hwmon_device_register_with_info(fbd->dev, "fbnic", in fbnic_hwmon_register() 64 fbd, &fbnic_chip_info, in fbnic_hwmon_register() 66 if (IS_ERR(fbd->hwmon)) { in fbnic_hwmon_register() 67 dev_notice(fbd->dev, in fbnic_hwmon_register() 69 fbd->hwmon); in fbnic_hwmon_register() 70 fbd->hwmon = NULL; in fbnic_hwmon_register() [all …]
|
| H A D | fbnic_ethtool.c | 147 struct fbnic_dev *fbd = fbn->fbd; in fbnic_get_drvinfo() local 149 fbnic_get_fw_ver_commit_str(fbd, drvinfo->fw_version, in fbnic_get_drvinfo() 157 return fbnic_csr_regs_len(fbn->fbd) * sizeof(u32); in fbnic_get_regs_len() 165 fbnic_csr_get_regs(fbn->fbd, data, ®s->version); in fbnic_get_regs() 216 struct fbnic_dev *fbd = orig->fbd; in fbnic_clone_swap() local 220 fbnic_synchronize_irq(fbd, FBNIC_NON_NAPI_VECTORS + i); in fbnic_clone_swap() 396 err = fbnic_wait_all_queues_idle(fbn->fbd, true); in fbnic_set_ringparam() 539 struct fbnic_dev *fbd = fbn->fbd; in fbnic_get_ethtool_stats() local 542 fbnic_get_hw_stats(fbn->fbd); in fbnic_get_ethtool_stats() 544 spin_lock(&fbd->hw_stats.lock); in fbnic_get_ethtool_stats() [all …]
|
| H A D | fbnic_fw.h | 98 u64 __fbnic_mbx_rd_desc(struct fbnic_dev *fbd, int mbx_idx, int desc_idx); 99 void fbnic_mbx_init(struct fbnic_dev *fbd); 100 void fbnic_mbx_clean(struct fbnic_dev *fbd); 101 int fbnic_mbx_set_cmpl(struct fbnic_dev *fbd, 103 void fbnic_mbx_clear_cmpl(struct fbnic_dev *fbd, 105 void fbnic_mbx_poll(struct fbnic_dev *fbd); 106 int fbnic_mbx_poll_tx_ready(struct fbnic_dev *fbd); 107 void fbnic_mbx_flush_tx(struct fbnic_dev *fbd); 132 enum fbnic_fw_self_test_codes fbnic_fw_mbx_self_test(struct fbnic_dev *fbd); 133 int fbnic_fw_xmit_test_msg(struct fbnic_dev *fbd, [all …]
|
| H A D | fbnic_txrx.c | 1381 struct fbnic_dev *fbd = nv->fbd; in fbnic_nv_irq_disable() local 1384 fbnic_wr32(fbd, FBNIC_INTR_MASK_SET(v_idx / 32), 1 << (v_idx % 32)); in fbnic_nv_irq_disable() 1389 struct fbnic_dev *fbd = nv->fbd; in fbnic_nv_irq_rearm() local 1392 fbnic_wr32(fbd, FBNIC_INTR_CQ_REARM(v_idx), in fbnic_nv_irq_rearm() 1545 struct fbnic_dev *fbd = nv->fbd; in fbnic_free_napi_vector() local 1560 fbnic_napi_free_irq(fbd, nv); in fbnic_free_napi_vector() 1640 static int fbnic_alloc_napi_vector(struct fbnic_dev *fbd, struct fbnic_net *fbn, in fbnic_alloc_napi_vector() argument 1646 u32 __iomem *uc_addr = fbd->uc_addr0; in fbnic_alloc_napi_vector() 1677 nv->fbd = fbd; in fbnic_alloc_napi_vector() 1687 pci_irq_vector(to_pci_dev(fbd->dev), in fbnic_alloc_napi_vector() [all …]
|
| H A D | fbnic_txrx.h | 158 struct fbnic_dev *fbd; member 203 int fbnic_wait_all_queues_idle(struct fbnic_dev *fbd, bool may_fail);
|
| H A D | fbnic_csr.h | 1259 enum fbnic_reg_self_test_codes fbnic_csr_regs_test(struct fbnic_dev *fbd);
|
| /linux/drivers/gpu/drm/bridge/ |
| H A D | tc358768.c | 162 u32 fbd; /* PLL feedback divider */ member 395 u32 fbd; in tc358768_calc_pll() local 397 for (fbd = 1; fbd <= 512; ++fbd) { in tc358768_calc_pll() 400 pll = (u32)div_u64((u64)refclk * fbd, divisor); in tc358768_calc_pll() 415 best_fbd = fbd; in tc358768_calc_pll() 432 priv->fbd = best_fbd; in tc358768_calc_pll() 709 u32 fbd, prd, frs; in tc358768_setup_pll() local 718 fbd = priv->fbd; in tc358768_setup_pll() 723 clk_get_rate(priv->refclk), fbd, prd, frs); in tc358768_setup_pll() 731 tc358768_write(priv, TC358768_PLLCTL0, ((prd - 1) << 12) | (fbd - 1)); in tc358768_setup_pll()
|