• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/dev/liquidio/base/

Lines Matching refs:oct

47 lio_toggle_bar1_swapmode(struct octeon_device *oct, uint32_t idx)
51 mask = oct->fn_list.bar1_idx_read(oct, idx);
53 oct->fn_list.bar1_idx_write(oct, idx, mask);
57 #define lio_toggle_bar1_swapmode(oct, idx)
61 lio_write_bar1_mem8(struct octeon_device *oct, uint32_t reg, uint64_t val)
64 bus_space_write_1(oct->mem_bus_space[1].tag,
65 oct->mem_bus_space[1].handle, reg, val);
70 lio_read_bar1_mem32(struct octeon_device *oct, uint32_t reg)
73 return (bus_space_read_4(oct->mem_bus_space[1].tag,
74 oct->mem_bus_space[1].handle, reg));
78 lio_write_bar1_mem32(struct octeon_device *oct, uint32_t reg, uint32_t val)
81 bus_space_write_4(oct->mem_bus_space[1].tag,
82 oct->mem_bus_space[1].handle, reg, val);
87 lio_read_bar1_mem64(struct octeon_device *oct, uint32_t reg)
91 return (lio_read_bar1_mem32(oct, reg) |
92 ((uint64_t)lio_read_bar1_mem32(oct, reg + 4) << 32));
94 return (bus_space_read_8(oct->mem_bus_space[1].tag,
95 oct->mem_bus_space[1].handle, reg));
100 lio_write_bar1_mem64(struct octeon_device *oct, uint32_t reg, uint64_t val)
104 lio_write_bar1_mem32(oct, reg, (uint32_t)val);
105 lio_write_bar1_mem32(oct, reg + 4, val >> 32);
107 bus_space_write_8(oct->mem_bus_space[1].tag,
108 oct->mem_bus_space[1].handle, reg, val);
113 lio_pci_fastwrite(struct octeon_device *oct, uint32_t offset,
118 lio_write_bar1_mem8(oct, offset++, *(hostbuf++));
122 lio_toggle_bar1_swapmode(oct, MEMOPS_IDX);
125 lio_write_bar1_mem64(oct, offset, *((uint64_t *)hostbuf));
131 lio_toggle_bar1_swapmode(oct, MEMOPS_IDX);
134 lio_write_bar1_mem8(oct, offset++, *(hostbuf++));
138 lio_read_bar1_mem8(struct octeon_device *oct, uint32_t reg)
141 return (bus_space_read_1(oct->mem_bus_space[1].tag,
142 oct->mem_bus_space[1].handle, reg));
146 lio_pci_fastread(struct octeon_device *oct, uint32_t offset,
151 *(hostbuf++) = lio_read_bar1_mem8(oct, offset++);
155 lio_toggle_bar1_swapmode(oct, MEMOPS_IDX);
158 *((uint64_t *)hostbuf) = lio_read_bar1_mem64(oct, offset);
164 lio_toggle_bar1_swapmode(oct, MEMOPS_IDX);
167 *(hostbuf++) = lio_read_bar1_mem8(oct, offset++);
173 lio_pci_rw_core_mem(struct octeon_device *oct, uint64_t addr,
180 static_mapping_base = oct->console_nb_info.dram_region_base;
184 int bar1_index = oct->console_nb_info.bar1_index;
189 lio_pci_fastread(oct, offset, hostbuf, len);
191 lio_pci_fastwrite(oct, offset, hostbuf, len);
195 mtx_lock(&oct->mem_access_lock);
198 index_reg_val = oct->fn_list.bar1_idx_read(oct, MEMOPS_IDX);
200 oct->fn_list.bar1_idx_setup(oct, addr, MEMOPS_IDX, 1);
215 lio_pci_fastread(oct, offset, hostbuf,
218 lio_pci_fastwrite(oct, offset, hostbuf,
228 oct->fn_list.bar1_idx_write(oct, MEMOPS_IDX, index_reg_val);
230 mtx_unlock(&oct->mem_access_lock);
234 lio_pci_read_core_mem(struct octeon_device *oct, uint64_t coreaddr,
238 lio_pci_rw_core_mem(oct, coreaddr, buf, len, 1);
242 lio_pci_write_core_mem(struct octeon_device *oct, uint64_t coreaddr,
246 lio_pci_rw_core_mem(oct, coreaddr, buf, len, 0);
250 lio_read_device_mem64(struct octeon_device *oct, uint64_t coreaddr)
254 lio_pci_rw_core_mem(oct, coreaddr, (uint8_t *)&ret, 8, 1);
260 lio_read_device_mem32(struct octeon_device *oct, uint64_t coreaddr)
264 lio_pci_rw_core_mem(oct, coreaddr, (uint8_t *)&ret, 4, 1);
270 lio_write_device_mem32(struct octeon_device *oct, uint64_t coreaddr,
275 lio_pci_rw_core_mem(oct, coreaddr, (uint8_t *)&t, 4, 0);