Home
last modified time | relevance | path

Searched refs:oct (Results 1 – 25 of 53) sorted by relevance

123

/openbmc/linux/drivers/net/ethernet/cavium/liquidio/
H A Dcn66xx_device.c89 r64 = lio_pci_readq(oct, CN6XXX_DPI_SLI_PRTX_CFG(oct->pcie_port)); in lio_cn6xxx_setup_pcie_mps()
91 lio_pci_writeq(oct, r64, CN6XXX_DPI_SLI_PRTX_CFG(oct->pcie_port)); in lio_cn6xxx_setup_pcie_mps()
112 r64 = octeon_read_csr64(oct, CN6XXX_SLI_S2M_PORTX_CTL(oct->pcie_port)); in lio_cn6xxx_setup_pcie_mrrs()
114 octeon_write_csr64(oct, CN6XXX_SLI_S2M_PORTX_CTL(oct->pcie_port), r64); in lio_cn6xxx_setup_pcie_mrrs()
117 r64 = lio_pci_readq(oct, CN6XXX_DPI_SLI_PRTX_CFG(oct->pcie_port)); in lio_cn6xxx_setup_pcie_mrrs()
119 lio_pci_writeq(oct, r64, CN6XXX_DPI_SLI_PRTX_CFG(oct->pcie_port)); in lio_cn6xxx_setup_pcie_mrrs()
420 bar1 = lio_pci_readq(oct, CN6XXX_BAR1_REG(idx, oct->pcie_port)); in lio_cn6xxx_bar1_idx_setup()
423 bar1 = lio_pci_readq(oct, CN6XXX_BAR1_REG(idx, oct->pcie_port)); in lio_cn6xxx_bar1_idx_setup()
433 bar1 = lio_pci_readq(oct, CN6XXX_BAR1_REG(idx, oct->pcie_port)); in lio_cn6xxx_bar1_idx_setup()
440 lio_pci_writeq(oct, mask, CN6XXX_BAR1_REG(idx, oct->pcie_port)); in lio_cn6xxx_bar1_idx_write()
[all …]
H A Dcn68xx_device.c57 lio_pci_readq(oct, CN6XXX_DPI_CTL)); in lio_cn68xx_set_dpi_regs()
62 lio_cn6xxx_soft_reset(oct); in lio_cn68xx_soft_reset()
63 lio_cn68xx_set_dpi_regs(oct); in lio_cn68xx_soft_reset()
97 lio_cn68xx_setup_pkt_ctl_regs(oct); in lio_cn68xx_setup_device_regs()
130 if (octeon_map_pci_barx(oct, 0, 0)) in lio_setup_cn68xx_octeon_device()
136 octeon_unmap_pci_barx(oct, 0); in lio_setup_cn68xx_octeon_device()
160 lio_cn6xxx_setup_reg_address(oct, oct->chip, &oct->reg_list); in lio_setup_cn68xx_octeon_device()
163 if (lio_is_210nv(oct)) in lio_setup_cn68xx_octeon_device()
173 octeon_unmap_pci_barx(oct, 0); in lio_setup_cn68xx_octeon_device()
174 octeon_unmap_pci_barx(oct, 1); in lio_setup_cn68xx_octeon_device()
[all …]
H A Dcn23xx_pf_device.c84 lio_pci_readq(oct, CN23XX_DPI_SLI_PRTX_CFG(oct->pcie_port))); in cn23xx_dump_pf_initialized_regs()
91 oct, CN23XX_SLI_S2M_PORTX_CTL(oct->pcie_port)))); in cn23xx_dump_pf_initialized_regs()
213 oct->octeon_id); in cn23xx_pf_soft_reset()
231 oct->octeon_id); in cn23xx_pf_soft_reset()
821 oct, in cn23xx_enable_io_queues()
1048 oct, CN23XX_PEM_BAR1_INDEX_REG(oct->pcie_port, idx)); in cn23xx_bar1_idx_setup()
1053 oct, CN23XX_PEM_BAR1_INDEX_REG(oct->pcie_port, idx)); in cn23xx_bar1_idx_setup()
1065 oct, CN23XX_PEM_BAR1_INDEX_REG(oct->pcie_port, idx))); in cn23xx_bar1_idx_setup()
1077 oct, CN23XX_PEM_BAR1_INDEX_REG(oct->pcie_port, idx)); in cn23xx_bar1_idx_read()
1298 oct->sriov_info.trs, oct->sriov_info.max_vfs, in cn23xx_sriov_config()
[all …]
H A Docteon_device.c661 vfree(oct); in octeon_free_device_mem()
717 return oct; in octeon_allocate_device_mem()
734 if (oct) { in octeon_allocate_device()
741 if (!oct) in octeon_allocate_device()
748 snprintf(oct->device_name, sizeof(oct->device_name), in octeon_allocate_device()
751 return oct; in octeon_allocate_device()
807 oct->loc.bus, oct->loc.dev, oct->loc.func, refcount); in octeon_register_device()
825 oct->loc.bus, oct->loc.dev, oct->loc.func, refcount); in octeon_deregister_device()
939 oct->droq[0] = vzalloc(sizeof(*oct->droq[0])); in octeon_setup_output_queues()
1284 if (oct && (q_no < MAX_OCTEON_INSTR_QUEUES(oct)) && in octeon_get_tx_qsize()
[all …]
H A Dcn23xx_vf_device.c59 d64 = octeon_read_csr64(oct, in cn23xx_vf_reset_io_queues()
78 dev_err(&oct->pci_dev->dev, in cn23xx_vf_reset_io_queues()
91 dev_err(&oct->pci_dev->dev, in cn23xx_vf_reset_io_queues()
108 if (cn23xx_vf_reset_io_queues(oct, oct->sriov_info.rings_per_vf)) in cn23xx_vf_setup_global_input_regs()
237 if (oct->msix_on) { in cn23xx_setup_vf_iq_regs()
274 vfree(oct->mbox[0]); in cn23xx_free_vf_mbox()
288 mbox->oct_dev = oct; in cn23xx_setup_vf_mbox()
309 oct->mbox[0] = mbox; in cn23xx_setup_vf_mbox()
450 oct->instr_queue[q_no]->txpciq.s.pkind = oct->pfvf_hsword.pkind; in cn23xx_octeon_pfvf_handshake()
466 oct->pfvf_hsword.pkind); in cn23xx_octeon_pfvf_handshake()
[all …]
H A Docteon_console.c206 oct, oct->bootmem_desc_addr, in __cvmx_bootmem_check_version()
210 oct, oct->bootmem_desc_addr, in __cvmx_bootmem_check_version()
237 oct, named_addr, in __cvmx_bootmem_find_named_block_flags()
267 oct, oct->bootmem_desc_addr, in cvmx_bootmem_phy_named_block_find()
273 oct, oct->bootmem_desc_addr, in cvmx_bootmem_phy_named_block_find()
280 oct, oct->bootmem_desc_addr, in cvmx_bootmem_phy_named_block_find()
290 oct, named_addr, in cvmx_bootmem_phy_named_block_find()
557 oct->fn_list.bar1_idx_setup(oct, addr, oct->console_nb_info.bar1_index, in octeon_init_consoles()
565 oct->num_consoles = octeon_read_device_mem32(oct, in octeon_init_consoles()
571 oct->num_consoles); in octeon_init_consoles()
[all …]
H A Docteon_mem_ops.c35 mask = oct->fn_list.bar1_idx_read(oct, idx); in octeon_toggle_bar1_swapmode()
37 oct->fn_list.bar1_idx_write(oct, idx, mask); in octeon_toggle_bar1_swapmode()
40 #define octeon_toggle_bar1_swapmode(oct, idx) argument
52 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastwrite()
61 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastwrite()
76 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastread()
108 mapped_addr = oct->mmio[1].hw_addr in __octeon_pci_rw_core_mem()
123 index_reg_val = oct->fn_list.bar1_idx_read(oct, MEMOPS_IDX); in __octeon_pci_rw_core_mem()
125 oct->fn_list.bar1_idx_setup(oct, addr, MEMOPS_IDX, 1); in __octeon_pci_rw_core_mem()
126 mapped_addr = oct->mmio[1].hw_addr in __octeon_pci_rw_core_mem()
[all …]
H A Drequest_manager.c58 if (OCTEON_CN6XXX(oct)) in octeon_init_instr_queue()
67 oct->chip_id); in octeon_init_instr_queue()
75 iq->oct_dev = oct; in octeon_init_instr_queue()
132 oct->fn_list.setup_iq_regs(oct, iq_no); in octeon_init_instr_queue()
183 oct->num_iqs--; in octeon_delete_instr_queue()
227 oct->num_iqs++; in octeon_setup_iq()
228 if (oct->fn_list.enable_io_queues(oct)) { in octeon_setup_iq()
498 if (!oct) in __check_db_timeout()
597 if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct)) { in octeon_prepare_soft_command()
701 if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct)) { in octeon_send_soft_command()
[all …]
H A Dlio_vf_rep.c113 struct octeon_device *oct; in lio_vf_rep_open() local
116 oct = vf_rep->oct; in lio_vf_rep_open()
146 struct octeon_device *oct; in lio_vf_rep_stop() local
149 oct = vf_rep->oct; in lio_vf_rep_stop()
206 oct = vf_rep->oct; in lio_vf_rep_change_mtu()
231 struct octeon_device *oct = vf_rep->oct; in lio_vf_rep_phys_port_name() local
304 if (!oct) in lio_vf_rep_pkt_recv()
373 struct octeon_device *oct = vf_rep->oct; in lio_vf_rep_pkt_xmit() local
470 oct = vf_rep->oct; in lio_vf_rep_fetch_stats()
521 vf_rep->oct = oct; in lio_vf_rep_create()
[all …]
H A Dlio_vf_main.c180 oct->fn_list.disable_interrupt(oct, OCTEON_ALL_INTR); in stop_pci_io()
228 stop_pci_io(oct); in liquidio_pcie_error_detected()
473 oct->fn_list.disable_io_queues(oct); in octeon_destroy_resources()
506 oct->fn_list.disable_interrupt(oct, OCTEON_ALL_INTR); in octeon_destroy_resources()
538 oct->fn_list.free_mbox(oct); in octeon_destroy_resources()
2318 if (oct->fn_list.setup_device_regs(oct)) { in octeon_device_init()
2352 if (oct->fn_list.setup_mbox(oct)) { in octeon_device_init()
2368 if (octeon_setup_interrupt(oct, oct->sriov_info.rings_per_vf)) in octeon_device_init()
2381 oct->fn_list.enable_interrupt(oct, OCTEON_ALL_INTR); in octeon_device_init()
2391 oct->fn_list.enable_interrupt(oct, OCTEON_ALL_INTR); in octeon_device_init()
[all …]
H A Dlio_main.c174 if (OCTEON_CN23XX_PF(oct) && oct->msix_on) { in octeon_droq_bh()
316 free_irq(oct->pci_dev->irq, oct); in stop_pci_io()
733 if (!oct) in disable_all_vf_links()
988 oct->fn_list.disable_io_queues(oct); in octeon_destroy_resources()
1044 free_irq(oct->pci_dev->irq, oct); in octeon_destroy_resources()
1061 oct->fn_list.free_mbox(oct); in octeon_destroy_resources()
1123 oct->fn_list.soft_reset(oct); in octeon_destroy_resources()
1795 if (!OCTEON_CN23XX_PF(oct) || !oct->msix_on) { in liquidio_open()
1825 if (!OCTEON_CN23XX_PF(oct) || !oct->msix_on) in liquidio_open()
3134 oct = priv->oct; in liquidio_eswitch_mode_get()
[all …]
H A Dlio_core.c127 lio_dma_alloc(oct, in lio_setup_glists()
736 if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct) || in liquidio_napi_drv_callback()
995 oct->fn_list.disable_interrupt(oct, OCTEON_ALL_INTR); in liquidio_legacy_intr_handler()
997 ret = oct->fn_list.process_interrupt_regs(oct); in liquidio_legacy_intr_handler()
1004 oct->fn_list.enable_interrupt(oct, OCTEON_ALL_INTR); in liquidio_legacy_intr_handler()
1053 oct->msix_entries = kcalloc(oct->num_msix_irqs, in octeon_setup_interrupt()
1122 oct->octeon_id, oct->pf_num, i); in octeon_setup_interrupt()
1127 oct->octeon_id, oct->vf_num, i); in octeon_setup_interrupt()
1140 oct); in octeon_setup_interrupt()
1184 oct->octeon_id, oct->pf_num, 0); in octeon_setup_interrupt()
[all …]
H A Dcn66xx_device.h68 int lio_cn6xxx_soft_reset(struct octeon_device *oct);
69 void lio_cn6xxx_enable_error_reporting(struct octeon_device *oct);
70 void lio_cn6xxx_setup_pcie_mps(struct octeon_device *oct,
72 void lio_cn6xxx_setup_pcie_mrrs(struct octeon_device *oct,
78 int lio_cn6xxx_enable_io_queues(struct octeon_device *oct);
79 void lio_cn6xxx_disable_io_queues(struct octeon_device *oct);
84 u32 lio_cn6xxx_bar1_idx_read(struct octeon_device *oct, u32 idx);
89 void cn6xxx_get_pcie_qlmport(struct octeon_device *oct);
92 u32 lio_cn6xxx_coprocessor_clock(struct octeon_device *oct);
94 int lio_setup_cn66xx_octeon_device(struct octeon_device *oct);
[all …]
H A Dlio_ethtool.c424 oct->speed_boot == oct->speed_setting) in lio_set_link_ksettings()
1107 oct->fn_list.disable_io_queues(oct); in lio_reset_queues()
1148 oct->fn_list.free_mbox(oct); in lio_reset_queues()
1178 if (oct->fn_list.setup_device_regs(oct)) { in lio_reset_queues()
1195 if (oct->fn_list.setup_mbox(oct)) { in lio_reset_queues()
1210 if (oct->fn_list.enable_io_queues(oct)) { in lio_reset_queues()
2560 reg, oct->pcie_port, oct->pf_num, in cn23xx_read_csr_reg()
2567 reg, oct->pcie_port, oct->pf_num, in cn23xx_read_csr_reg()
2574 reg, oct->pcie_port, oct->pf_num, in cn23xx_read_csr_reg()
2587 oct->pcie_port, oct->pf_num, (u64)octeon_read_csr64(oct, reg)); in cn23xx_read_csr_reg()
[all …]
H A Docteon_main.h98 if (oct->mmio[baridx].done) in octeon_unmap_pci_barx()
99 iounmap(oct->mmio[baridx].hw_addr); in octeon_unmap_pci_barx()
101 if (oct->mmio[baridx].start) in octeon_unmap_pci_barx()
122 oct->mmio[baridx].start = pci_resource_start(oct->pci_dev, baridx * 2); in octeon_map_pci_barx()
123 oct->mmio[baridx].len = pci_resource_len(oct->pci_dev, baridx * 2); in octeon_map_pci_barx()
125 mapped_len = oct->mmio[baridx].len; in octeon_map_pci_barx()
132 oct->mmio[baridx].hw_addr = in octeon_map_pci_barx()
134 oct->mmio[baridx].mapped_len = mapped_len; in octeon_map_pci_barx()
138 oct->mmio[baridx].len); in octeon_map_pci_barx()
140 if (!oct->mmio[baridx].hw_addr) { in octeon_map_pci_barx()
[all …]
H A Docteon_droq.c214 vfree(oct->droq[q_no]); in octeon_delete_droq()
215 oct->droq[q_no] = NULL; in octeon_delete_droq()
216 oct->num_oqs--; in octeon_delete_droq()
238 droq->oct_dev = oct; in octeon_init_droq()
306 oct->fn_list.setup_oq_regs(oct, q_no); in octeon_init_droq()
767 (oct, in octeon_droq_process_packets()
818 (oct, in octeon_droq_process_poll_pkts()
854 lio_enable_irq(oct->droq[q_no], oct->instr_queue[q_no]); in octeon_enable_irq()
858 lio_enable_irq(oct->droq[q_no], oct->instr_queue[q_no]); in octeon_enable_irq()
962 oct->num_oqs++; in octeon_create_droq()
[all …]
H A Docteon_nic.c52 if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct)) { in octeon_alloc_soft_command_resp()
68 rdp->pcie_port = oct->pcie_port; in octeon_alloc_soft_command_resp()
73 if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct)) in octeon_alloc_soft_command_resp()
145 spin_lock_bh(&oct->cmd_resp_wqlock); in octnet_send_nic_ctrl_pkt()
151 spin_unlock_bh(&oct->cmd_resp_wqlock); in octnet_send_nic_ctrl_pkt()
152 dev_err(&oct->pci_dev->dev, in octnet_send_nic_ctrl_pkt()
158 sc = octnic_alloc_ctrl_pkt_sc(oct, nctrl); in octnet_send_nic_ctrl_pkt()
162 spin_unlock_bh(&oct->cmd_resp_wqlock); in octnet_send_nic_ctrl_pkt()
168 octeon_free_soft_command(oct, sc); in octnet_send_nic_ctrl_pkt()
171 spin_unlock_bh(&oct->cmd_resp_wqlock); in octnet_send_nic_ctrl_pkt()
[all …]
H A Docteon_device.h423 struct octeon_device *oct; member
621 #define OCTEON_CN6XXX(oct) ({ \ argument
622 typeof(oct) _oct = (oct); \
625 #define OCTEON_CN23XX_PF(oct) ((oct)->chip_id == OCTEON_CN23XX_PF_VID) argument
626 #define OCTEON_CN23XX_VF(oct) ((oct)->chip_id == OCTEON_CN23XX_VF_VID) argument
627 #define CHIP_CONF(oct, TYPE) \ argument
628 (((struct octeon_ ## TYPE *)((oct)->chip))->conf)
638 void octeon_free_device_mem(struct octeon_device *oct);
655 int octeon_register_device(struct octeon_device *oct,
758 int octeon_mem_access_ok(struct octeon_device *oct);
[all …]
H A Dresponse_manager.c36 INIT_LIST_HEAD(&oct->response_list[i].head); in octeon_setup_response_list()
37 spin_lock_init(&oct->response_list[i].lock); in octeon_setup_response_list()
40 spin_lock_init(&oct->cmd_resp_wqlock); in octeon_setup_response_list()
43 if (!oct->dma_comp_wq.wq) { in octeon_setup_response_list()
48 cwq = &oct->dma_comp_wq; in octeon_setup_response_list()
50 cwq->wk.ctxptr = oct; in octeon_setup_response_list()
51 oct->cmd_resp_state = OCT_DRV_ONLINE; in octeon_setup_response_list()
60 destroy_workqueue(oct->dma_comp_wq.wq); in octeon_delete_response_list()
230 struct cavium_wq *cwq = &oct->dma_comp_wq; in oct_poll_req_completion()
232 lio_process_ordered_list(oct, 0); in oct_poll_req_completion()
[all …]
/openbmc/linux/drivers/net/ethernet/marvell/octeon_ep/
H A Doctep_cn9k_pf.c164 cn93_reset_iq(oct, q); in octep_reset_io_queues_cn93_pf()
165 cn93_reset_oq(oct, q); in octep_reset_io_queues_cn93_pf()
191 if (oct->pcie_port) in octep_configure_ring_mapping_cn93_pf()
221 val = octep_read_csr64(oct, CN93_SDP_MAC_PF_RING_CTL(oct->pcie_port)); in octep_init_config_cn93_pf()
545 oct->hw_ops.setup_iq_regs(oct, i); in octep_reinit_regs_cn93_pf()
548 oct->hw_ops.setup_oq_regs(oct, i); in octep_reinit_regs_cn93_pf()
550 oct->hw_ops.enable_interrupts(oct); in octep_reinit_regs_cn93_pf()
551 oct->hw_ops.enable_io_queues(oct); in octep_reinit_regs_cn93_pf()
554 writel(oct->oq[i]->max_count, oct->oq[i]->pkts_credit_reg); in octep_reinit_regs_cn93_pf()
705 cn93_dump_regs(oct, q); in octep_dump_registers_cn93_pf()
[all …]
H A Doctep_main.c169 return oct->hw_ops.non_ioq_intr_handler(oct); in octep_non_ioq_intr_handler()
272 free_irq(oct->msix_entries[i].vector, oct); in octep_request_irqs()
293 free_irq(oct->msix_entries[i].vector, oct); in octep_free_irqs()
490 oct->hw_ops.reset_io_queues(oct); in octep_open()
517 oct->hw_ops.enable_io_queues(oct); in octep_open()
520 oct->hw_ops.enable_interrupts(oct); in octep_open()
567 oct->hw_ops.disable_interrupts(oct); in octep_stop()
574 oct->hw_ops.disable_io_queues(oct); in octep_stop()
575 oct->hw_ops.reset_io_queues(oct); in octep_stop()
898 oct->hw_ops.poll_non_ioq_interrupts(oct); in octep_intr_poll_task()
[all …]
H A Doctep_main.h70 int (*soft_reset)(struct octep_device *oct);
71 void (*reinit_regs)(struct octep_device *oct);
294 u16 rev = (oct->rev_id & 0xC) >> 2; in OCTEP_MAJOR_REV()
301 return (oct->rev_id & 0x3); in OCTEP_MINOR_REV()
335 dev_dbg(&oct->pdev->dev, in OCTEP_PCI_WIN_READ()
357 dev_dbg(&oct->pdev->dev, in OCTEP_PCI_WIN_WRITE()
364 int octep_setup_iqs(struct octep_device *oct);
365 void octep_free_iqs(struct octep_device *oct);
366 void octep_clean_iqs(struct octep_device *oct);
367 int octep_setup_oqs(struct octep_device *oct);
[all …]
H A Doctep_tx.c187 oct->iq[q_no] = iq; in octep_setup_iq()
189 iq->octep_dev = oct; in octep_setup_iq()
190 iq->netdev = oct->netdev; in octep_setup_iq()
191 iq->dev = &oct->pdev->dev; in octep_setup_iq()
241 oct->hw_ops.setup_iq_regs(oct, q_no); in octep_setup_iq()
243 oct->num_iqs++; in octep_setup_iq()
253 oct->iq[q_no] = NULL; in octep_setup_iq()
286 oct->iq[q_no] = NULL; in octep_free_iq()
287 oct->num_iqs--; in octep_free_iq()
299 oct->num_iqs = 0; in octep_setup_iqs()
[all …]
H A Doctep_ctrl_net.c100 struct pci_dev *pdev = oct->pdev; in octep_ctrl_net_init()
104 INIT_LIST_HEAD(&oct->ctrl_req_wait_list); in octep_ctrl_net_init()
107 ctrl_mbox = &oct->ctrl_mbox; in octep_ctrl_net_init()
132 err = octep_send_mbox_req(oct, &d, true); in octep_ctrl_net_get_link_status()
178 err = octep_send_mbox_req(oct, &d, true); in octep_ctrl_net_get_mac_addr()
226 err = octep_send_mbox_req(oct, &d, true); in octep_ctrl_net_get_if_stats()
247 err = octep_send_mbox_req(oct, &d, true); in octep_ctrl_net_get_link_info()
299 struct net_device *netdev = oct->netdev; in process_mbox_notify()
350 process_mbox_resp(oct, &msg); in octep_ctrl_net_recv_fw_messages()
352 process_mbox_notify(oct, &msg); in octep_ctrl_net_recv_fw_messages()
[all …]
H A Doctep_rx.c131 oct->oq[q_no] = oq; in octep_setup_oq()
133 oq->octep_dev = oct; in octep_setup_oq()
146 if (oct->caps_enabled) in octep_setup_oq()
172 oct->hw_ops.setup_oq_regs(oct, q_no); in octep_setup_oq()
173 oct->num_oqs++; in octep_setup_oq()
186 oct->oq[q_no] = NULL; in octep_setup_oq()
240 oct->oq[q_no] = NULL; in octep_free_oq()
241 oct->num_oqs--; in octep_free_oq()
254 oct->num_oqs = 0; in octep_setup_oqs()
287 writel(oct->oq[i]->max_count, oct->oq[i]->pkts_credit_reg); in octep_oq_dbell_init()
[all …]

123