Lines Matching full:bar
121 void __iomem *bar[PCI_STD_NUM_BARS]; member
284 memcpy_toio(test->bar[barno] + offset, write_buf, size); in pci_endpoint_test_bar_memcmp()
286 memcpy_fromio(read_buf, test->bar[barno] + offset, size); in pci_endpoint_test_bar_memcmp()
304 if (!test->bar[barno]) in pci_endpoint_test_bar()
312 * iterating over the whole BAR size (which might be much larger). in pci_endpoint_test_bar()
338 /* Keep the BAR pattern in the top byte. */ in bar_test_pattern_with_offset()
359 test->bar[barno] + j); in pci_endpoint_test_bars_write_bar()
378 val = readl_relaxed(test->bar[barno] + j); in pci_endpoint_test_bars_read_bar()
381 "BAR%d incorrect data at offset: %#x, got: %#x expected: %#x\n", in pci_endpoint_test_bars_read_bar()
392 enum pci_barno bar; in pci_endpoint_test_bars() local
396 for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) in pci_endpoint_test_bars()
397 if (test->bar[bar]) in pci_endpoint_test_bars()
398 pci_endpoint_test_bars_write_bar(test, bar); in pci_endpoint_test_bars()
402 * If there is an address translation issue on the EP, writing one BAR in pci_endpoint_test_bars()
403 * might have overwritten another BAR. Ensure that this is not the case. in pci_endpoint_test_bars()
404 * (Reading back the BAR directly after writing can not detect this.) in pci_endpoint_test_bars()
406 for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { in pci_endpoint_test_bars()
407 if (test->bar[bar]) { in pci_endpoint_test_bars()
408 ret = pci_endpoint_test_bars_read_bar(test, bar); in pci_endpoint_test_bars()
862 enum pci_barno bar; in pci_endpoint_test_doorbell() local
888 bar = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_DB_BAR); in pci_endpoint_test_doorbell()
895 bar = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_DB_BAR); in pci_endpoint_test_doorbell()
897 writel(data, test->bar[bar] + addr); in pci_endpoint_test_doorbell()
928 enum pci_barno bar; in pci_endpoint_test_ioctl() local
939 bar = arg; in pci_endpoint_test_ioctl()
940 if (bar <= NO_BAR || bar > BAR_5) in pci_endpoint_test_ioctl()
942 if (is_am654_pci_dev(pdev) && bar == BAR_0) in pci_endpoint_test_ioctl()
944 ret = pci_endpoint_test_bar(test, bar); in pci_endpoint_test_ioctl()
1008 enum pci_barno bar; in pci_endpoint_test_probe() local
1052 for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { in pci_endpoint_test_probe()
1053 if (pci_resource_flags(pdev, bar) & IORESOURCE_MEM) { in pci_endpoint_test_probe()
1054 base = pci_ioremap_bar(pdev, bar); in pci_endpoint_test_probe()
1056 dev_err(dev, "Failed to read BAR%d\n", bar); in pci_endpoint_test_probe()
1057 WARN_ON(bar == test_reg_bar); in pci_endpoint_test_probe()
1059 test->bar[bar] = base; in pci_endpoint_test_probe()
1063 test->base = test->bar[test_reg_bar]; in pci_endpoint_test_probe()
1066 dev_err(dev, "Cannot perform PCI test without BAR%d\n", in pci_endpoint_test_probe()
1117 for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { in pci_endpoint_test_probe()
1118 if (test->bar[bar]) in pci_endpoint_test_probe()
1119 pci_iounmap(pdev, test->bar[bar]); in pci_endpoint_test_probe()
1133 enum pci_barno bar; in pci_endpoint_test_remove() local
1149 for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { in pci_endpoint_test_remove()
1150 if (test->bar[bar]) in pci_endpoint_test_remove()
1151 pci_iounmap(pdev, test->bar[bar]); in pci_endpoint_test_remove()