/drivers/gpu/drm/nouveau/nvkm/subdev/bar/ |
D | base.c | 27 nvkm_bar_flush(struct nvkm_bar *bar) in nvkm_bar_flush() argument 29 if (bar && bar->func->flush) in nvkm_bar_flush() 30 bar->func->flush(bar); in nvkm_bar_flush() 36 return device->bar->func->bar1.vmm(device->bar); in nvkm_bar_bar1_vmm() 42 struct nvkm_bar *bar = device->bar; in nvkm_bar_bar1_reset() local 43 if (bar) { in nvkm_bar_bar1_reset() 44 bar->func->bar1.init(bar); in nvkm_bar_bar1_reset() 45 bar->func->bar1.wait(bar); in nvkm_bar_bar1_reset() 55 struct nvkm_bar *bar = device->bar; in nvkm_bar_bar2_vmm() local 56 if (bar && bar->bar2) in nvkm_bar_bar2_vmm() [all …]
|
D | nv50.c | 34 struct nv50_bar *bar = nv50_bar(base); in nv50_bar_flush() local 35 struct nvkm_device *device = bar->base.subdev.device; in nv50_bar_flush() 37 spin_lock_irqsave(&bar->base.lock, flags); in nv50_bar_flush() 43 spin_unlock_irqrestore(&bar->base.lock, flags); in nv50_bar_flush() 59 nv50_bar_bar1_fini(struct nvkm_bar *bar) in nv50_bar_bar1_fini() argument 61 nvkm_wr32(bar->subdev.device, 0x001708, 0x00000000); in nv50_bar_bar1_fini() 68 struct nv50_bar *bar = nv50_bar(base); in nv50_bar_bar1_init() local 69 nvkm_wr32(device, 0x001708, 0x80000000 | bar->bar1->node->offset >> 4); in nv50_bar_bar1_init() 79 nv50_bar_bar2_fini(struct nvkm_bar *bar) in nv50_bar_bar2_fini() argument 81 nvkm_wr32(bar->subdev.device, 0x00170c, 0x00000000); in nv50_bar_bar2_fini() [all …]
|
D | gf100.c | 34 return gf100_bar(base)->bar[1].vmm; in gf100_bar_bar1_vmm() 46 gf100_bar_bar1_fini(struct nvkm_bar *bar) in gf100_bar_bar1_fini() argument 48 nvkm_mask(bar->subdev.device, 0x001704, 0x80000000, 0x00000000); in gf100_bar_bar1_fini() 55 struct gf100_bar *bar = gf100_bar(base); in gf100_bar_bar1_init() local 56 const u32 addr = nvkm_memory_addr(bar->bar[1].inst) >> 12; in gf100_bar_bar1_init() 63 return gf100_bar(base)->bar[0].vmm; in gf100_bar_bar2_vmm() 67 gf100_bar_bar2_fini(struct nvkm_bar *bar) in gf100_bar_bar2_fini() argument 69 nvkm_mask(bar->subdev.device, 0x001714, 0x80000000, 0x00000000); in gf100_bar_bar2_fini() 76 struct gf100_bar *bar = gf100_bar(base); in gf100_bar_bar2_init() local 77 u32 addr = nvkm_memory_addr(bar->bar[0].inst) >> 12; in gf100_bar_bar2_init() [all …]
|
D | tu102.c | 28 tu102_bar_bar2_wait(struct nvkm_bar *bar) in tu102_bar_bar2_wait() argument 30 struct nvkm_device *device = bar->subdev.device; in tu102_bar_bar2_wait() 38 tu102_bar_bar2_fini(struct nvkm_bar *bar) in tu102_bar_bar2_fini() argument 40 nvkm_mask(bar->subdev.device, 0xb80f48, 0x80000000, 0x00000000); in tu102_bar_bar2_fini() 47 struct gf100_bar *bar = gf100_bar(base); in tu102_bar_bar2_init() local 48 u32 addr = nvkm_memory_addr(bar->bar[0].inst) >> 12; in tu102_bar_bar2_init() 49 if (bar->bar2_halve) in tu102_bar_bar2_init() 55 tu102_bar_bar1_wait(struct nvkm_bar *bar) in tu102_bar_bar1_wait() argument 57 struct nvkm_device *device = bar->subdev.device; in tu102_bar_bar1_wait() 65 tu102_bar_bar1_fini(struct nvkm_bar *bar) in tu102_bar_bar1_fini() argument [all …]
|
D | Kbuild | 2 nvkm-y += nvkm/subdev/bar/base.o 3 nvkm-y += nvkm/subdev/bar/nv50.o 4 nvkm-y += nvkm/subdev/bar/g84.o 5 nvkm-y += nvkm/subdev/bar/gf100.o 6 nvkm-y += nvkm/subdev/bar/gk20a.o 7 nvkm-y += nvkm/subdev/bar/gm107.o 8 nvkm-y += nvkm/subdev/bar/gm20b.o 9 nvkm-y += nvkm/subdev/bar/tu102.o
|
/drivers/net/ethernet/netronome/nfp/nfpcore/ |
D | nfp6000_pcie.c | 97 #define NFP_PCIE_P2C_FIXED_SIZE(bar) (1 << (bar)->bitsize) argument 98 #define NFP_PCIE_P2C_BULK_SIZE(bar) (1 << (bar)->bitsize) argument 99 #define NFP_PCIE_P2C_GENERAL_TARGET_OFFSET(bar, x) ((x) << ((bar)->bitsize - 2)) argument 100 #define NFP_PCIE_P2C_GENERAL_TOKEN_OFFSET(bar, x) ((x) << ((bar)->bitsize - 4)) argument 101 #define NFP_PCIE_P2C_GENERAL_SIZE(bar) (1 << ((bar)->bitsize - 4)) argument 103 #define NFP_PCIE_CFG_BAR_PCIETOCPPEXPANSIONBAR(bar, slot) \ argument 104 (0x400 + ((bar) * 8 + (slot)) * 4) 106 #define NFP_PCIE_CPP_BAR_PCIETOCPPEXPANSIONBAR(bar, slot) \ argument 107 (((bar) * 8 + (slot)) * 4) 152 struct nfp_bar bar[NFP_PCI_BAR_MAX]; member [all …]
|
/drivers/pci/controller/cadence/ |
D | pcie-cadence-host.c | 211 enum cdns_pcie_rp_bar bar, in cdns_pcie_host_bar_ib_config() argument 218 if (!rc->avail_ib_bar[bar]) in cdns_pcie_host_bar_ib_config() 221 rc->avail_ib_bar[bar] = false; in cdns_pcie_host_bar_ib_config() 227 cdns_pcie_writel(pcie, CDNS_PCIE_AT_IB_RP_BAR_ADDR0(bar), addr0); in cdns_pcie_host_bar_ib_config() 228 cdns_pcie_writel(pcie, CDNS_PCIE_AT_IB_RP_BAR_ADDR1(bar), addr1); in cdns_pcie_host_bar_ib_config() 230 if (bar == RP_NO_BAR) in cdns_pcie_host_bar_ib_config() 234 value &= ~(LM_RC_BAR_CFG_CTRL_MEM_64BITS(bar) | in cdns_pcie_host_bar_ib_config() 235 LM_RC_BAR_CFG_CTRL_PREF_MEM_64BITS(bar) | in cdns_pcie_host_bar_ib_config() 236 LM_RC_BAR_CFG_CTRL_MEM_32BITS(bar) | in cdns_pcie_host_bar_ib_config() 237 LM_RC_BAR_CFG_CTRL_PREF_MEM_32BITS(bar) | in cdns_pcie_host_bar_ib_config() [all …]
|
D | pcie-cadence.h | 50 #define CDNS_PCIE_LM_EP_FUNC_BAR_CFG(bar, fn) \ argument 51 (((bar) < BAR_4) ? CDNS_PCIE_LM_EP_FUNC_BAR_CFG0(fn) : CDNS_PCIE_LM_EP_FUNC_BAR_CFG1(fn)) 56 #define CDNS_PCIE_LM_EP_VFUNC_BAR_CFG(bar, fn) \ argument 57 (((bar) < BAR_4) ? CDNS_PCIE_LM_EP_VFUNC_BAR_CFG0(fn) : CDNS_PCIE_LM_EP_VFUNC_BAR_CFG1(fn)) 104 #define LM_RC_BAR_CFG_CTRL_DISABLED(bar) \ argument 105 (CDNS_PCIE_LM_BAR_CFG_CTRL_DISABLED << (((bar) * 8) + 6)) 106 #define LM_RC_BAR_CFG_CTRL_IO_32BITS(bar) \ argument 107 (CDNS_PCIE_LM_BAR_CFG_CTRL_IO_32BITS << (((bar) * 8) + 6)) 108 #define LM_RC_BAR_CFG_CTRL_MEM_32BITS(bar) \ argument 109 (CDNS_PCIE_LM_BAR_CFG_CTRL_MEM_32BITS << (((bar) * 8) + 6)) [all …]
|
/drivers/xen/xen-pciback/ |
D | conf_space_header.c | 129 struct pci_bar_info *bar = data; in rom_write() local 131 if (unlikely(!bar)) { in rom_write() 140 bar->which = 1; in rom_write() 144 if (tmpval != bar->val && value == bar->val) { in rom_write() 146 pci_write_config_dword(dev, offset, bar->val); in rom_write() 148 bar->which = 0; in rom_write() 162 struct pci_bar_info *bar = data; in bar_write() local 167 if (unlikely(!bar)) { in bar_write() 182 bar->which = 1; in bar_write() 186 if (tmpval != bar->val && value == bar->val) { in bar_write() [all …]
|
/drivers/net/ethernet/sfc/ |
D | ef100.c | 37 unsigned int bar; member 71 u32 bar = ef100_pci_get_bar_bits(efx, entry_location, EF100_BAR); in ef100_pci_parse_ef100_entry() local 75 bar, offset); in ef100_pci_parse_ef100_entry() 83 if (bar == ESE_GZ_CFGBAR_EF100_BAR_NUM_EXPANSION_ROM || in ef100_pci_parse_ef100_entry() 84 bar == ESE_GZ_CFGBAR_EF100_BAR_NUM_INVALID) { in ef100_pci_parse_ef100_entry() 87 bar); in ef100_pci_parse_ef100_entry() 91 result->bar = bar; in ef100_pci_parse_ef100_entry() 97 static bool ef100_pci_does_bar_overflow(struct efx_nic *efx, int bar, in ef100_pci_does_bar_overflow() argument 101 pci_resource_len(efx->pci_dev, bar); in ef100_pci_does_bar_overflow() 114 u32 bar; in ef100_pci_parse_continue_entry() local [all …]
|
/drivers/pci/ |
D | mmap.c | 22 int pci_mmap_page_range(struct pci_dev *pdev, int bar, in pci_mmap_page_range() argument 28 pci_resource_to_user(pdev, bar, &pdev->resource[bar], &start, &end); in pci_mmap_page_range() 32 return pci_mmap_resource_range(pdev, bar, vma, mmap_state, in pci_mmap_page_range() 43 int pci_mmap_resource_range(struct pci_dev *pdev, int bar, in pci_mmap_resource_range() argument 50 size = ((pci_resource_len(pdev, bar) - 1) >> PAGE_SHIFT) + 1; in pci_mmap_resource_range() 60 ret = pci_iobar_pfn(pdev, bar, vma); in pci_mmap_resource_range() 64 vma->vm_pgoff += (pci_resource_start(pdev, bar) >> PAGE_SHIFT); in pci_mmap_resource_range() 81 int pci_mmap_resource_range(struct pci_dev *pdev, int bar, in pci_mmap_resource_range() argument 92 pci_resource_to_user(pdev, bar, &pdev->resource[bar], &start, &end); in pci_mmap_resource_range() 94 return pci_mmap_page_range(pdev, bar, vma, mmap_state, write_combine); in pci_mmap_resource_range()
|
/drivers/vfio/pci/ |
D | vfio_pci_rdwr.c | 203 static int vfio_pci_setup_barmap(struct vfio_pci_core_device *vdev, int bar) in vfio_pci_setup_barmap() argument 209 if (vdev->barmap[bar]) in vfio_pci_setup_barmap() 212 ret = pci_request_selected_regions(pdev, 1 << bar, "vfio"); in vfio_pci_setup_barmap() 216 io = pci_iomap(pdev, bar, 0); in vfio_pci_setup_barmap() 218 pci_release_selected_regions(pdev, 1 << bar); in vfio_pci_setup_barmap() 222 vdev->barmap[bar] = io; in vfio_pci_setup_barmap() 232 int bar = VFIO_PCI_OFFSET_TO_INDEX(*ppos); in vfio_pci_bar_rw() local 236 struct resource *res = &vdev->pdev->resource[bar]; in vfio_pci_bar_rw() 239 if (pci_resource_start(pdev, bar)) in vfio_pci_bar_rw() 240 end = pci_resource_len(pdev, bar); in vfio_pci_bar_rw() [all …]
|
/drivers/dma/dw-edma/ |
D | dw-edma-pcie.c | 28 .bar = a, \ 34 enum pci_barno bar; member 57 .rg.bar = BAR_0, 128 pdata->rg.bar = FIELD_GET(DW_PCIE_VSEC_DMA_BAR, val); in dw_edma_pcie_get_vsec_dma_data() 171 mask = BIT(vsec_data.rg.bar); in dw_edma_pcie_probe() 173 mask |= BIT(vsec_data.ll_wr[i].bar); in dw_edma_pcie_probe() 174 mask |= BIT(vsec_data.dt_wr[i].bar); in dw_edma_pcie_probe() 177 mask |= BIT(vsec_data.ll_rd[i].bar); in dw_edma_pcie_probe() 178 mask |= BIT(vsec_data.dt_rd[i].bar); in dw_edma_pcie_probe() 242 dw->rg_region.vaddr = pcim_iomap_table(pdev)[vsec_data.rg.bar]; in dw_edma_pcie_probe() [all …]
|
/drivers/misc/ |
D | pci_endpoint_test.c | 111 void __iomem *bar[PCI_STD_NUM_BARS]; member 143 int bar, int offset) in pci_endpoint_test_bar_readl() argument 145 return readl(test->bar[bar] + offset); in pci_endpoint_test_bar_readl() 149 int bar, u32 offset, u32 value) in pci_endpoint_test_bar_writel() argument 151 writel(value, test->bar[bar] + offset); in pci_endpoint_test_bar_writel() 276 if (!test->bar[barno]) in pci_endpoint_test_bar() 728 enum pci_barno bar; in pci_endpoint_test_ioctl() local 739 bar = arg; in pci_endpoint_test_ioctl() 740 if (bar > BAR_5) in pci_endpoint_test_ioctl() 742 if (is_am654_pci_dev(pdev) && bar == BAR_0) in pci_endpoint_test_ioctl() [all …]
|
/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/ |
D | nv50.c | 49 struct nvkm_vma *bar; member 127 struct nvkm_vma *bar = NULL, *ebar; in nv50_instobj_kmap() local 137 while ((ret = nvkm_vmm_get(vmm, 12, size, &bar))) { in nv50_instobj_kmap() 147 eobj->bar->addr); in nv50_instobj_kmap() 149 ebar = eobj->bar; in nv50_instobj_kmap() 150 eobj->bar = NULL; in nv50_instobj_kmap() 162 ret = nvkm_memory_map(memory, 0, vmm, bar, NULL, 0); in nv50_instobj_kmap() 164 if (ret || iobj->bar) { in nv50_instobj_kmap() 167 nvkm_vmm_put(vmm, &bar); in nv50_instobj_kmap() 173 iobj->bar = bar; in nv50_instobj_kmap() [all …]
|
/drivers/misc/habanalabs/common/pci/ |
D | pci.c | 34 int rc, i, bar; in hl_pci_bars_map() local 43 bar = i * 2; /* 64-bit BARs */ in hl_pci_bars_map() 44 hdev->pcie_bar[bar] = is_wc[i] ? in hl_pci_bars_map() 45 pci_ioremap_wc_bar(pdev, bar) : in hl_pci_bars_map() 46 pci_ioremap_bar(pdev, bar); in hl_pci_bars_map() 47 if (!hdev->pcie_bar[bar]) { in hl_pci_bars_map() 59 bar = i * 2; /* 64-bit BARs */ in hl_pci_bars_map() 60 if (hdev->pcie_bar[bar]) in hl_pci_bars_map() 61 iounmap(hdev->pcie_bar[bar]); in hl_pci_bars_map() 78 int i, bar; in hl_pci_bars_unmap() local [all …]
|
/drivers/pci/endpoint/functions/ |
D | pci-epf-test.c | 626 int bar; in pci_epf_test_unbind() local 630 for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { in pci_epf_test_unbind() 631 epf_bar = &epf->bar[bar]; in pci_epf_test_unbind() 633 if (epf_test->reg[bar]) { in pci_epf_test_unbind() 636 pci_epf_free_space(epf, epf_test->reg[bar], bar, in pci_epf_test_unbind() 644 int bar, add; in pci_epf_test_set_bar() local 655 for (bar = 0; bar < PCI_STD_NUM_BARS; bar += add) { in pci_epf_test_set_bar() 656 epf_bar = &epf->bar[bar]; in pci_epf_test_set_bar() 664 if (!!(epc_features->reserved_bar & (1 << bar))) in pci_epf_test_set_bar() 670 pci_epf_free_space(epf, epf_test->reg[bar], bar, in pci_epf_test_set_bar() [all …]
|
/drivers/pci/endpoint/ |
D | pci-epf-core.c | 251 void pci_epf_free_space(struct pci_epf *epf, void *addr, enum pci_barno bar, in pci_epf_free_space() argument 263 epf_bar = epf->bar; in pci_epf_free_space() 270 dma_free_coherent(dev, epf_bar[bar].size, addr, in pci_epf_free_space() 271 epf_bar[bar].phys_addr); in pci_epf_free_space() 273 epf_bar[bar].phys_addr = 0; in pci_epf_free_space() 274 epf_bar[bar].addr = NULL; in pci_epf_free_space() 275 epf_bar[bar].size = 0; in pci_epf_free_space() 276 epf_bar[bar].barno = 0; in pci_epf_free_space() 277 epf_bar[bar].flags = 0; in pci_epf_free_space() 291 void *pci_epf_alloc_space(struct pci_epf *epf, size_t size, enum pci_barno bar, in pci_epf_alloc_space() argument [all …]
|
/drivers/virtio/ |
D | virtio_pci_modern_dev.c | 26 u8 bar; in vp_modern_map_capability() local 31 bar), in vp_modern_map_capability() 32 &bar); in vp_modern_map_capability() 39 if (bar >= PCI_STD_NUM_BARS || !(mdev->modern_bars & (1 << bar))) { in vp_modern_map_capability() 41 "virtio_pci: bar unexpectedly changed to %u\n", bar); in vp_modern_map_capability() 84 minlen + offset > pci_resource_len(dev, bar)) { in vp_modern_map_capability() 89 bar, (unsigned long)pci_resource_len(dev, bar)); in vp_modern_map_capability() 93 p = pci_iomap_range(dev, bar, offset, length); in vp_modern_map_capability() 97 length, offset, bar); in vp_modern_map_capability() 99 *pa = pci_resource_start(dev, bar) + offset; in vp_modern_map_capability() [all …]
|
/drivers/uio/ |
D | uio_netx.c | 54 int bar; in netx_pci_probe() local 68 bar = 0; in netx_pci_probe() 72 bar = 0; in netx_pci_probe() 76 bar = 2; in netx_pci_probe() 81 info->mem[0].addr = pci_resource_start(dev, bar); in netx_pci_probe() 84 info->mem[0].internal_addr = ioremap(pci_resource_start(dev, bar), in netx_pci_probe() 85 pci_resource_len(dev, bar)); in netx_pci_probe() 90 info->mem[0].size = pci_resource_len(dev, bar); in netx_pci_probe()
|
/drivers/dma/ |
D | plx_dma.c | 107 void __iomem *bar; member 203 val = readl(plxdev->bar + PLX_REG_CTRL); in __plx_dma_stop() 208 plxdev->bar + PLX_REG_CTRL); in __plx_dma_stop() 211 val = readl(plxdev->bar + PLX_REG_CTRL); in __plx_dma_stop() 223 plxdev->bar + PLX_REG_CTRL); in __plx_dma_stop() 225 writel(0, plxdev->bar + PLX_REG_DESC_RING_COUNT); in __plx_dma_stop() 226 writel(0, plxdev->bar + PLX_REG_DESC_RING_ADDR); in __plx_dma_stop() 227 writel(0, plxdev->bar + PLX_REG_DESC_RING_ADDR_HI); in __plx_dma_stop() 228 writel(0, plxdev->bar + PLX_REG_DESC_RING_NEXT_ADDR); in __plx_dma_stop() 353 writew(PLX_REG_CTRL_START_VAL, plxdev->bar + PLX_REG_CTRL); in plx_dma_issue_pending() [all …]
|
/drivers/infiniband/hw/usnic/ |
D | usnic_vnic.c | 44 struct vnic_dev_bar bar[PCI_NUM_RESOURCES]; member 357 for (i = 0; i < ARRAY_SIZE(vnic->bar); i++) { in usnic_vnic_discover_resources() 360 vnic->bar[i].len = pci_resource_len(pdev, i); in usnic_vnic_discover_resources() 361 vnic->bar[i].vaddr = pci_iomap(pdev, i, vnic->bar[i].len); in usnic_vnic_discover_resources() 362 if (!vnic->bar[i].vaddr) { in usnic_vnic_discover_resources() 368 vnic->bar[i].bus_addr = pci_resource_start(pdev, i); in usnic_vnic_discover_resources() 371 vnic->vdev = vnic_dev_register(NULL, pdev, pdev, vnic->bar, in usnic_vnic_discover_resources() 372 ARRAY_SIZE(vnic->bar)); in usnic_vnic_discover_resources() 395 for (i = 0; i < ARRAY_SIZE(vnic->bar); i++) { in usnic_vnic_discover_resources() 398 if (!vnic->bar[i].vaddr) in usnic_vnic_discover_resources() [all …]
|
/drivers/mfd/ |
D | cs5535-mfd.c | 71 int err, bar; in cs5535_mfd_probe() local 77 for (bar = 0; bar < NR_BARS; bar++) { in cs5535_mfd_probe() 78 struct resource *r = &cs5535_mfd_resources[bar]; in cs5535_mfd_probe() 81 r->start = pci_resource_start(pdev, bar); in cs5535_mfd_probe() 82 r->end = pci_resource_end(pdev, bar); in cs5535_mfd_probe()
|
/drivers/misc/bcm-vk/ |
D | bcm_vk.h | 361 void __iomem *bar[MAX_BAR]; member 450 static inline u32 vkread32(struct bcm_vk *vk, enum pci_barno bar, u64 offset) in vkread32() argument 452 return readl(vk->bar[bar] + offset); in vkread32() 457 enum pci_barno bar, in vkwrite32() argument 460 writel(value, vk->bar[bar] + offset); in vkwrite32() 463 static inline u8 vkread8(struct bcm_vk *vk, enum pci_barno bar, u64 offset) in vkread8() argument 465 return readb(vk->bar[bar] + offset); in vkread8() 470 enum pci_barno bar, in vkwrite8() argument 473 writeb(value, vk->bar[bar] + offset); in vkwrite8()
|
/drivers/crypto/qat/qat_c3xxxvf/ |
D | adf_drv.c | 50 struct adf_bar *bar = &accel_pci_dev->pci_bars[i]; in adf_cleanup_accel() local 52 if (bar->virt_addr) in adf_cleanup_accel() 53 pci_iounmap(accel_pci_dev->pci_dev, bar->virt_addr); in adf_cleanup_accel() 159 struct adf_bar *bar = &accel_pci_dev->pci_bars[i++]; in adf_probe() local 161 bar->base_addr = pci_resource_start(pdev, bar_nr); in adf_probe() 162 if (!bar->base_addr) in adf_probe() 164 bar->size = pci_resource_len(pdev, bar_nr); in adf_probe() 165 bar->virt_addr = pci_iomap(accel_pci_dev->pci_dev, bar_nr, 0); in adf_probe() 166 if (!bar->virt_addr) { in adf_probe()
|