Lines Matching refs:oct
31 octeon_toggle_bar1_swapmode(struct octeon_device *oct, u32 idx) in octeon_toggle_bar1_swapmode() argument
35 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
44 octeon_pci_fastwrite(struct octeon_device *oct, u8 __iomem *mapped_addr, in octeon_pci_fastwrite() 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()
68 octeon_pci_fastread(struct octeon_device *oct, u8 __iomem *mapped_addr, in octeon_pci_fastread() argument
76 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastread()
85 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastread()
94 __octeon_pci_rw_core_mem(struct octeon_device *oct, u64 addr, in __octeon_pci_rw_core_mem() argument
102 static_mapping_base = oct->console_nb_info.dram_region_base; in __octeon_pci_rw_core_mem()
106 int bar1_index = oct->console_nb_info.bar1_index; in __octeon_pci_rw_core_mem()
108 mapped_addr = oct->mmio[1].hw_addr in __octeon_pci_rw_core_mem()
113 octeon_pci_fastread(oct, mapped_addr, hostbuf, len); in __octeon_pci_rw_core_mem()
115 octeon_pci_fastwrite(oct, mapped_addr, hostbuf, len); in __octeon_pci_rw_core_mem()
120 spin_lock_irqsave(&oct->mem_access_lock, flags); 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()
141 octeon_pci_fastread(oct, mapped_addr, hostbuf, in __octeon_pci_rw_core_mem()
144 octeon_pci_fastwrite(oct, mapped_addr, hostbuf, in __octeon_pci_rw_core_mem()
154 oct->fn_list.bar1_idx_write(oct, MEMOPS_IDX, index_reg_val); in __octeon_pci_rw_core_mem()
156 spin_unlock_irqrestore(&oct->mem_access_lock, flags); in __octeon_pci_rw_core_mem()
160 octeon_pci_read_core_mem(struct octeon_device *oct, in octeon_pci_read_core_mem() argument
165 __octeon_pci_rw_core_mem(oct, coreaddr, buf, len, 1); in octeon_pci_read_core_mem()
169 octeon_pci_write_core_mem(struct octeon_device *oct, in octeon_pci_write_core_mem() argument
174 __octeon_pci_rw_core_mem(oct, coreaddr, (u8 *)buf, len, 0); in octeon_pci_write_core_mem()
177 u64 octeon_read_device_mem64(struct octeon_device *oct, u64 coreaddr) in octeon_read_device_mem64() argument
181 __octeon_pci_rw_core_mem(oct, coreaddr, (u8 *)&ret, 8, 1); in octeon_read_device_mem64()
186 u32 octeon_read_device_mem32(struct octeon_device *oct, u64 coreaddr) in octeon_read_device_mem32() argument
190 __octeon_pci_rw_core_mem(oct, coreaddr, (u8 *)&ret, 4, 1); in octeon_read_device_mem32()
195 void octeon_write_device_mem32(struct octeon_device *oct, u64 coreaddr, in octeon_write_device_mem32() argument
200 __octeon_pci_rw_core_mem(oct, coreaddr, (u8 *)&t, 4, 0); in octeon_write_device_mem32()