Home
last modified time | relevance | path

Searched refs:bar (Results 1 – 25 of 226) sorted by relevance

12345678910

/drivers/gpu/drm/nouveau/nvkm/subdev/bar/
Dbase.c27 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 …]
Dnv50.c34 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 …]
Dgf100.c34 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 …]
Dtu102.c28 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 …]
DKbuild2 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/
Dnfp6000_pcie.c98 #define NFP_PCIE_P2C_FIXED_SIZE(bar) (1 << (bar)->bitsize) argument
99 #define NFP_PCIE_P2C_BULK_SIZE(bar) (1 << (bar)->bitsize) argument
100 #define NFP_PCIE_P2C_GENERAL_TARGET_OFFSET(bar, x) ((x) << ((bar)->bitsize - 2)) argument
101 #define NFP_PCIE_P2C_GENERAL_TOKEN_OFFSET(bar, x) ((x) << ((bar)->bitsize - 4)) argument
102 #define NFP_PCIE_P2C_GENERAL_SIZE(bar) (1 << ((bar)->bitsize - 4)) argument
150 struct nfp_bar bar[NFP_PCI_BAR_MAX]; member
174 static u32 nfp_bar_maptype(struct nfp_bar *bar) in nfp_bar_maptype() argument
176 return NFP_PCIE_BAR_PCIE2CPP_MapType_of(bar->barcfg); in nfp_bar_maptype()
179 static resource_size_t nfp_bar_resource_len(struct nfp_bar *bar) in nfp_bar_resource_len() argument
181 return pci_resource_len(bar->nfp->pdev, (bar->index / 8) * 2) / 8; in nfp_bar_resource_len()
[all …]
/drivers/pci/controller/cadence/
Dpcie-cadence-host.c219 enum cdns_pcie_rp_bar bar, in cdns_pcie_host_bar_ib_config() argument
226 if (!rc->avail_ib_bar[bar]) in cdns_pcie_host_bar_ib_config()
229 rc->avail_ib_bar[bar] = false; in cdns_pcie_host_bar_ib_config()
235 cdns_pcie_writel(pcie, CDNS_PCIE_AT_IB_RP_BAR_ADDR0(bar), addr0); in cdns_pcie_host_bar_ib_config()
236 cdns_pcie_writel(pcie, CDNS_PCIE_AT_IB_RP_BAR_ADDR1(bar), addr1); in cdns_pcie_host_bar_ib_config()
238 if (bar == RP_NO_BAR) in cdns_pcie_host_bar_ib_config()
242 value &= ~(LM_RC_BAR_CFG_CTRL_MEM_64BITS(bar) | in cdns_pcie_host_bar_ib_config()
243 LM_RC_BAR_CFG_CTRL_PREF_MEM_64BITS(bar) | in cdns_pcie_host_bar_ib_config()
244 LM_RC_BAR_CFG_CTRL_MEM_32BITS(bar) | in cdns_pcie_host_bar_ib_config()
245 LM_RC_BAR_CFG_CTRL_PREF_MEM_32BITS(bar) | in cdns_pcie_host_bar_ib_config()
[all …]
Dpcie-cadence.h50 #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/
Dconf_space_header.c129 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/
Def100.c37 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/vfio/pci/
Dvfio_pci_rdwr.c203 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/
Ddw-edma-pcie.c28 .bar = a, \
34 enum pci_barno bar; member
57 .rg.bar = BAR_0,
143 pdata->rg.bar = FIELD_GET(DW_PCIE_VSEC_DMA_BAR, val); in dw_edma_pcie_get_vsec_dma_data()
185 mask = BIT(vsec_data.rg.bar); in dw_edma_pcie_probe()
187 mask |= BIT(vsec_data.ll_wr[i].bar); in dw_edma_pcie_probe()
188 mask |= BIT(vsec_data.dt_wr[i].bar); in dw_edma_pcie_probe()
191 mask |= BIT(vsec_data.ll_rd[i].bar); in dw_edma_pcie_probe()
192 mask |= BIT(vsec_data.dt_rd[i].bar); in dw_edma_pcie_probe()
233 chip->reg_base = pcim_iomap_table(pdev)[vsec_data.rg.bar]; in dw_edma_pcie_probe()
[all …]
/drivers/misc/
Dpci_endpoint_test.c112 void __iomem *bar[PCI_STD_NUM_BARS]; member
144 int bar, int offset) in pci_endpoint_test_bar_readl() argument
146 return readl(test->bar[bar] + offset); in pci_endpoint_test_bar_readl()
150 int bar, u32 offset, u32 value) in pci_endpoint_test_bar_writel() argument
152 writel(value, test->bar[bar] + offset); in pci_endpoint_test_bar_writel()
274 if (!test->bar[barno]) in pci_endpoint_test_bar()
722 enum pci_barno bar; in pci_endpoint_test_ioctl() local
733 bar = arg; in pci_endpoint_test_ioctl()
734 if (bar > BAR_5) in pci_endpoint_test_ioctl()
736 if (is_am654_pci_dev(pdev) && bar == BAR_0) in pci_endpoint_test_ioctl()
[all …]
/drivers/tty/serial/8250/
D8250_pcilib.c16 u8 bar, unsigned int offset, int regshift) in serial8250_pci_setup_port() argument
18 if (bar >= PCI_STD_NUM_BARS) in serial8250_pci_setup_port()
21 if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) { in serial8250_pci_setup_port()
22 if (!pcim_iomap(dev, bar, 0) && !pcim_iomap_table(dev)) in serial8250_pci_setup_port()
27 port->port.mapbase = pci_resource_start(dev, bar) + offset; in serial8250_pci_setup_port()
28 port->port.membase = pcim_iomap_table(dev)[bar] + offset; in serial8250_pci_setup_port()
32 port->port.iobase = pci_resource_start(dev, bar) + offset; in serial8250_pci_setup_port()
/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/
Dnv50.c49 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/accel/habanalabs/common/pci/
Dpci.c36 int rc, i, bar; in hl_pci_bars_map() local
45 bar = i * 2; /* 64-bit BARs */ in hl_pci_bars_map()
46 hdev->pcie_bar[bar] = is_wc[i] ? in hl_pci_bars_map()
47 pci_ioremap_wc_bar(pdev, bar) : in hl_pci_bars_map()
48 pci_ioremap_bar(pdev, bar); in hl_pci_bars_map()
49 if (!hdev->pcie_bar[bar]) { in hl_pci_bars_map()
61 bar = i * 2; /* 64-bit BARs */ in hl_pci_bars_map()
62 if (hdev->pcie_bar[bar]) in hl_pci_bars_map()
63 iounmap(hdev->pcie_bar[bar]); in hl_pci_bars_map()
80 int i, bar; in hl_pci_bars_unmap() local
[all …]
/drivers/pci/endpoint/functions/
Dpci-epf-test.c694 int bar; in pci_epf_test_unbind() local
698 for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { in pci_epf_test_unbind()
699 epf_bar = &epf->bar[bar]; in pci_epf_test_unbind()
701 if (epf_test->reg[bar]) { in pci_epf_test_unbind()
704 pci_epf_free_space(epf, epf_test->reg[bar], bar, in pci_epf_test_unbind()
712 int bar, add; in pci_epf_test_set_bar() local
723 for (bar = 0; bar < PCI_STD_NUM_BARS; bar += add) { in pci_epf_test_set_bar()
724 epf_bar = &epf->bar[bar]; in pci_epf_test_set_bar()
732 if (!!(epc_features->reserved_bar & (1 << bar))) in pci_epf_test_set_bar()
738 pci_epf_free_space(epf, epf_test->reg[bar], bar, in pci_epf_test_set_bar()
[all …]
/drivers/pci/endpoint/
Dpci-epf-core.c219 void pci_epf_free_space(struct pci_epf *epf, void *addr, enum pci_barno bar, in pci_epf_free_space() argument
231 epf_bar = epf->bar; in pci_epf_free_space()
238 dma_free_coherent(dev, epf_bar[bar].size, addr, in pci_epf_free_space()
239 epf_bar[bar].phys_addr); in pci_epf_free_space()
241 epf_bar[bar].phys_addr = 0; in pci_epf_free_space()
242 epf_bar[bar].addr = NULL; in pci_epf_free_space()
243 epf_bar[bar].size = 0; in pci_epf_free_space()
244 epf_bar[bar].barno = 0; in pci_epf_free_space()
245 epf_bar[bar].flags = 0; in pci_epf_free_space()
259 void *pci_epf_alloc_space(struct pci_epf *epf, size_t size, enum pci_barno bar, in pci_epf_alloc_space() argument
[all …]
/drivers/dma/
Dplx_dma.c107 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/virtio/
Dvirtio_pci_modern_dev.c27 u8 bar; in vp_modern_map_capability() local
32 bar), in vp_modern_map_capability()
33 &bar); in vp_modern_map_capability()
40 if (bar >= PCI_STD_NUM_BARS || !(mdev->modern_bars & (1 << bar))) { in vp_modern_map_capability()
42 "virtio_pci: bar unexpectedly changed to %u\n", bar); in vp_modern_map_capability()
85 minlen + offset > pci_resource_len(dev, bar)) { in vp_modern_map_capability()
90 bar, (unsigned long)pci_resource_len(dev, bar)); in vp_modern_map_capability()
94 p = pci_iomap_range(dev, bar, offset, length); in vp_modern_map_capability()
98 length, offset, bar); in vp_modern_map_capability()
100 *pa = pci_resource_start(dev, bar) + offset; in vp_modern_map_capability()
[all …]
/drivers/uio/
Duio_netx.c54 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/gpu/drm/i915/gt/
Dintel_gsc.c86 unsigned long bar; member
100 .bar = DG1_GSC_HECI2_BASE,
111 .bar = DG1_GSC_HECI2_BASE,
121 .bar = DG2_GSC_HECI1_BASE,
127 .bar = DG2_GSC_HECI2_BASE,
239 adev->bar.parent = &pdev->resource[0]; in gsc_init_one()
240 adev->bar.start = def->bar + pdev->resource[0].start; in gsc_init_one()
241 adev->bar.end = adev->bar.start + def->bar_size - 1; in gsc_init_one()
242 adev->bar.flags = IORESOURCE_MEM; in gsc_init_one()
243 adev->bar.desc = IORES_DESC_NONE; in gsc_init_one()
/drivers/crypto/intel/qat/qat_c3xxxvf/
Dadf_drv.c51 struct adf_bar *bar = &accel_pci_dev->pci_bars[i]; in adf_cleanup_accel() local
53 if (bar->virt_addr) in adf_cleanup_accel()
54 pci_iounmap(accel_pci_dev->pci_dev, bar->virt_addr); in adf_cleanup_accel()
153 struct adf_bar *bar = &accel_pci_dev->pci_bars[i++]; in adf_probe() local
155 bar->base_addr = pci_resource_start(pdev, bar_nr); in adf_probe()
156 if (!bar->base_addr) in adf_probe()
158 bar->size = pci_resource_len(pdev, bar_nr); in adf_probe()
159 bar->virt_addr = pci_iomap(accel_pci_dev->pci_dev, bar_nr, 0); in adf_probe()
160 if (!bar->virt_addr) { in adf_probe()
/drivers/crypto/intel/qat/qat_dh895xccvf/
Dadf_drv.c51 struct adf_bar *bar = &accel_pci_dev->pci_bars[i]; in adf_cleanup_accel() local
53 if (bar->virt_addr) in adf_cleanup_accel()
54 pci_iounmap(accel_pci_dev->pci_dev, bar->virt_addr); in adf_cleanup_accel()
153 struct adf_bar *bar = &accel_pci_dev->pci_bars[i++]; in adf_probe() local
155 bar->base_addr = pci_resource_start(pdev, bar_nr); in adf_probe()
156 if (!bar->base_addr) in adf_probe()
158 bar->size = pci_resource_len(pdev, bar_nr); in adf_probe()
159 bar->virt_addr = pci_iomap(accel_pci_dev->pci_dev, bar_nr, 0); in adf_probe()
160 if (!bar->virt_addr) { in adf_probe()
/drivers/crypto/intel/qat/qat_c62xvf/
Dadf_drv.c51 struct adf_bar *bar = &accel_pci_dev->pci_bars[i]; in adf_cleanup_accel() local
53 if (bar->virt_addr) in adf_cleanup_accel()
54 pci_iounmap(accel_pci_dev->pci_dev, bar->virt_addr); in adf_cleanup_accel()
153 struct adf_bar *bar = &accel_pci_dev->pci_bars[i++]; in adf_probe() local
155 bar->base_addr = pci_resource_start(pdev, bar_nr); in adf_probe()
156 if (!bar->base_addr) in adf_probe()
158 bar->size = pci_resource_len(pdev, bar_nr); in adf_probe()
159 bar->virt_addr = pci_iomap(accel_pci_dev->pci_dev, bar_nr, 0); in adf_probe()
160 if (!bar->virt_addr) { in adf_probe()

12345678910