Commit 3c99a1e0 authored by Henrik Brix Andersen's avatar Henrik Brix Andersen Committed by Christopher Friedt
Browse files

drivers: pcie: reintroduce support for I/O BARs



Reintroduce support for accessing I/O BARs which was removed in
43d84147.

Signed-off-by: default avatarHenrik Brix Andersen <henrik@brixandersen.dk>
parent 7756809c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ void z_x86_early_serial_init(void)
{
#if defined(DEVICE_MMIO_IS_IN_RAM) && !defined(CONFIG_UART_NS16550_ACCESS_IOPORT)
#ifdef X86_SOC_EARLY_SERIAL_PCIDEV
	struct pcie_mbar mbar;
	struct pcie_bar mbar;
	pcie_get_mbar(X86_SOC_EARLY_SERIAL_PCIDEV, 0, &mbar);
	pcie_set_cmd(X86_SOC_EARLY_SERIAL_PCIDEV, PCIE_CONF_CMDSTAT_MEM, true);
	device_map(&mmio, mbar.phys_addr, mbar.size, K_MEM_CACHE_NONE);
+1 −1
Original line number Diff line number Diff line
@@ -606,7 +606,7 @@ may be used directly:
   void some_init_code(...)
   {
      ...
      struct pcie_mbar mbar;
      struct pcie_bar mbar;
      bool bar_found = pcie_get_mbar(bdf, index, &mbar);

      device_map(DEVICE_MMIO_RAM_PTR(dev), mbar.phys_addr, mbar.size, K_MEM_CACHE_NONE);
+1 −1
Original line number Diff line number Diff line
@@ -238,7 +238,7 @@ int e1000_probe(const struct device *ddev)
	const pcie_bdf_t bdf = PCIE_BDF(0, 3, 0);
	struct e1000_dev *dev = ddev->data;
	uint32_t ral, rah;
	struct pcie_mbar mbar;
	struct pcie_bar mbar;

	if (!pcie_probe(bdf, PCIE_ID(PCI_VENDOR_ID_INTEL,
				     PCI_DEVICE_ID_I82540EM))) {
+1 −1
Original line number Diff line number Diff line
@@ -849,7 +849,7 @@ static int i2c_dw_initialize(const struct device *dev)

#if DT_ANY_INST_ON_BUS_STATUS_OKAY(pcie)
	if (rom->pcie) {
		struct pcie_mbar mbar;
		struct pcie_bar mbar;

		if (!pcie_probe(rom->pcie_bdf, rom->pcie_id)) {
			return -EINVAL;
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ static bool map_msix_table_entries(pcie_bdf_t bdf,
{
	uint32_t table_offset;
	uint8_t table_bir;
	struct pcie_mbar bar;
	struct pcie_bar bar;
	uintptr_t mapped_table;
	int i;

Loading