Lines Matching refs:oct
30 octeon_toggle_bar1_swapmode(struct octeon_device *oct, u32 idx) in octeon_toggle_bar1_swapmode() argument
34 mask = oct->fn_list.bar1_idx_read(oct, idx); in octeon_toggle_bar1_swapmode()
36 oct->fn_list.bar1_idx_write(oct, idx, mask); in octeon_toggle_bar1_swapmode()
39 #define octeon_toggle_bar1_swapmode(oct, idx) argument
43 octeon_pci_fastwrite(struct octeon_device *oct, u8 __iomem *mapped_addr, in octeon_pci_fastwrite() argument
51 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastwrite()
60 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastwrite()
67 octeon_pci_fastread(struct octeon_device *oct, u8 __iomem *mapped_addr, in octeon_pci_fastread() argument
75 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastread()
84 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastread()
93 __octeon_pci_rw_core_mem(struct octeon_device *oct, u64 addr, in __octeon_pci_rw_core_mem() argument
101 static_mapping_base = oct->console_nb_info.dram_region_base; in __octeon_pci_rw_core_mem()
105 int bar1_index = oct->console_nb_info.bar1_index; in __octeon_pci_rw_core_mem()
107 mapped_addr = oct->mmio[1].hw_addr in __octeon_pci_rw_core_mem()
112 octeon_pci_fastread(oct, mapped_addr, hostbuf, len); in __octeon_pci_rw_core_mem()
114 octeon_pci_fastwrite(oct, mapped_addr, hostbuf, len); in __octeon_pci_rw_core_mem()
119 spin_lock_irqsave(&oct->mem_access_lock, flags); in __octeon_pci_rw_core_mem()
122 index_reg_val = oct->fn_list.bar1_idx_read(oct, MEMOPS_IDX); in __octeon_pci_rw_core_mem()
124 oct->fn_list.bar1_idx_setup(oct, addr, MEMOPS_IDX, 1); in __octeon_pci_rw_core_mem()
125 mapped_addr = oct->mmio[1].hw_addr in __octeon_pci_rw_core_mem()
140 octeon_pci_fastread(oct, mapped_addr, hostbuf, in __octeon_pci_rw_core_mem()
143 octeon_pci_fastwrite(oct, mapped_addr, hostbuf, in __octeon_pci_rw_core_mem()
153 oct->fn_list.bar1_idx_write(oct, MEMOPS_IDX, index_reg_val); in __octeon_pci_rw_core_mem()
155 spin_unlock_irqrestore(&oct->mem_access_lock, flags); in __octeon_pci_rw_core_mem()
159 octeon_pci_read_core_mem(struct octeon_device *oct, in octeon_pci_read_core_mem() argument
164 __octeon_pci_rw_core_mem(oct, coreaddr, buf, len, 1); in octeon_pci_read_core_mem()
168 octeon_pci_write_core_mem(struct octeon_device *oct, in octeon_pci_write_core_mem() argument
173 __octeon_pci_rw_core_mem(oct, coreaddr, (u8 *)buf, len, 0); in octeon_pci_write_core_mem()
176 u64 octeon_read_device_mem64(struct octeon_device *oct, u64 coreaddr) in octeon_read_device_mem64() argument
180 __octeon_pci_rw_core_mem(oct, coreaddr, (u8 *)&ret, 8, 1); in octeon_read_device_mem64()
185 u32 octeon_read_device_mem32(struct octeon_device *oct, u64 coreaddr) in octeon_read_device_mem32() argument
189 __octeon_pci_rw_core_mem(oct, coreaddr, (u8 *)&ret, 4, 1); in octeon_read_device_mem32()
194 void octeon_write_device_mem32(struct octeon_device *oct, u64 coreaddr, in octeon_write_device_mem32() argument
199 __octeon_pci_rw_core_mem(oct, coreaddr, (u8 *)&t, 4, 0); in octeon_write_device_mem32()