History log of /netbsd-current/sys/arch/arm/fdt/pcihost_fdt.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.33 12-Jan-2024 skrll

Trailing whitespace.


Revision tags: netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base
# 1.32 15-Oct-2022 jmcneill

Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED


Revision tags: bouyer-sunxi-drm-base
# 1.31 06-Sep-2022 skrll

pcihost: Track MSI/MSI-X interrupt handlers.

Track the MSI/MSI-X interrupt handlers so that fdtbus_intr_disestablish
doesn't get called for them.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.


# 1.30 04-Sep-2022 skrll

Revert previous

kern/56994: wm(4) panic on attach in interrupt_distribute, sometimes


# 1.29 04-Sep-2022 skrll

pcihost: Don't call fdtbus_intr_disestablish for MSI/MSI-X interrupts.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.


# 1.28 13-Aug-2022 jmcneill

Process "ranges" property even when linux,pci-probe-only is set.

When the linux,pci-probe-only flag is set, we still need to process the
ranges property to determine whether or not to set PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_OKAY flags on the bus.


# 1.27 06-Sep-2021 jmcneill

Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.


Revision tags: thorpej-i2c-spi-conf2-base
# 1.26 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.25 12-May-2021 thorpej

branches: 1.25.4;
Pass along our device handle to the PCI bus instance we attach.


Revision tags: cjep_staticlib_x-base
# 1.24 24-Apr-2021 thorpej

branches: 1.24.2; 1.24.4;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.23 27-Jan-2021 thorpej

branches: 1.23.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


# 1.22 27-Jan-2021 thorpej

Use DEVICE_COMPAT_EOL.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


# 1.18 10-Oct-2020 jmcneill

branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.32 15-Oct-2022 jmcneill

Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED


Revision tags: bouyer-sunxi-drm-base
# 1.31 06-Sep-2022 skrll

pcihost: Track MSI/MSI-X interrupt handlers.

Track the MSI/MSI-X interrupt handlers so that fdtbus_intr_disestablish
doesn't get called for them.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.


# 1.30 04-Sep-2022 skrll

Revert previous

kern/56994: wm(4) panic on attach in interrupt_distribute, sometimes


# 1.29 04-Sep-2022 skrll

pcihost: Don't call fdtbus_intr_disestablish for MSI/MSI-X interrupts.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.


# 1.28 13-Aug-2022 jmcneill

Process "ranges" property even when linux,pci-probe-only is set.

When the linux,pci-probe-only flag is set, we still need to process the
ranges property to determine whether or not to set PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_OKAY flags on the bus.


# 1.27 06-Sep-2021 jmcneill

Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.


Revision tags: thorpej-i2c-spi-conf2-base
# 1.26 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.25 12-May-2021 thorpej

branches: 1.25.4;
Pass along our device handle to the PCI bus instance we attach.


Revision tags: cjep_staticlib_x-base
# 1.24 24-Apr-2021 thorpej

branches: 1.24.2; 1.24.4;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.23 27-Jan-2021 thorpej

branches: 1.23.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


# 1.22 27-Jan-2021 thorpej

Use DEVICE_COMPAT_EOL.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


# 1.18 10-Oct-2020 jmcneill

branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.31 06-Sep-2022 skrll

pcihost: Track MSI/MSI-X interrupt handlers.

Track the MSI/MSI-X interrupt handlers so that fdtbus_intr_disestablish
doesn't get called for them.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.


# 1.30 04-Sep-2022 skrll

Revert previous

kern/56994: wm(4) panic on attach in interrupt_distribute, sometimes


# 1.29 04-Sep-2022 skrll

pcihost: Don't call fdtbus_intr_disestablish for MSI/MSI-X interrupts.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.


# 1.28 13-Aug-2022 jmcneill

Process "ranges" property even when linux,pci-probe-only is set.

When the linux,pci-probe-only flag is set, we still need to process the
ranges property to determine whether or not to set PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_OKAY flags on the bus.


# 1.27 06-Sep-2021 jmcneill

Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.


Revision tags: thorpej-i2c-spi-conf2-base
# 1.26 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.25 12-May-2021 thorpej

branches: 1.25.4;
Pass along our device handle to the PCI bus instance we attach.


Revision tags: cjep_staticlib_x-base
# 1.24 24-Apr-2021 thorpej

branches: 1.24.2; 1.24.4;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.23 27-Jan-2021 thorpej

branches: 1.23.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


# 1.22 27-Jan-2021 thorpej

Use DEVICE_COMPAT_EOL.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


# 1.18 10-Oct-2020 jmcneill

branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.30 04-Sep-2022 skrll

Revert previous

kern/56994: wm(4) panic on attach in interrupt_distribute, sometimes


# 1.29 04-Sep-2022 skrll

pcihost: Don't call fdtbus_intr_disestablish for MSI/MSI-X interrupts.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.


# 1.28 13-Aug-2022 jmcneill

Process "ranges" property even when linux,pci-probe-only is set.

When the linux,pci-probe-only flag is set, we still need to process the
ranges property to determine whether or not to set PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_OKAY flags on the bus.


# 1.27 06-Sep-2021 jmcneill

Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.


Revision tags: thorpej-i2c-spi-conf2-base
# 1.26 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.25 12-May-2021 thorpej

branches: 1.25.4;
Pass along our device handle to the PCI bus instance we attach.


Revision tags: cjep_staticlib_x-base
# 1.24 24-Apr-2021 thorpej

branches: 1.24.2; 1.24.4;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.23 27-Jan-2021 thorpej

branches: 1.23.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


# 1.22 27-Jan-2021 thorpej

Use DEVICE_COMPAT_EOL.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


# 1.18 10-Oct-2020 jmcneill

branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.29 04-Sep-2022 skrll

pcihost: Don't call fdtbus_intr_disestablish for MSI/MSI-X interrupts.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.


# 1.28 13-Aug-2022 jmcneill

Process "ranges" property even when linux,pci-probe-only is set.

When the linux,pci-probe-only flag is set, we still need to process the
ranges property to determine whether or not to set PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_OKAY flags on the bus.


# 1.27 06-Sep-2021 jmcneill

Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.


Revision tags: thorpej-i2c-spi-conf2-base
# 1.26 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.25 12-May-2021 thorpej

branches: 1.25.4;
Pass along our device handle to the PCI bus instance we attach.


Revision tags: cjep_staticlib_x-base
# 1.24 24-Apr-2021 thorpej

branches: 1.24.2; 1.24.4;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.23 27-Jan-2021 thorpej

branches: 1.23.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


# 1.22 27-Jan-2021 thorpej

Use DEVICE_COMPAT_EOL.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


# 1.18 10-Oct-2020 jmcneill

branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.28 13-Aug-2022 jmcneill

Process "ranges" property even when linux,pci-probe-only is set.

When the linux,pci-probe-only flag is set, we still need to process the
ranges property to determine whether or not to set PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_OKAY flags on the bus.


# 1.27 06-Sep-2021 jmcneill

Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.


Revision tags: thorpej-i2c-spi-conf2-base
# 1.26 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.25 12-May-2021 thorpej

branches: 1.25.4;
Pass along our device handle to the PCI bus instance we attach.


Revision tags: cjep_staticlib_x-base
# 1.24 24-Apr-2021 thorpej

branches: 1.24.2; 1.24.4;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.23 27-Jan-2021 thorpej

branches: 1.23.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


# 1.22 27-Jan-2021 thorpej

Use DEVICE_COMPAT_EOL.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


# 1.18 10-Oct-2020 jmcneill

branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.27 06-Sep-2021 jmcneill

Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.


Revision tags: thorpej-i2c-spi-conf2-base
# 1.26 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.25 12-May-2021 thorpej

branches: 1.25.4;
Pass along our device handle to the PCI bus instance we attach.


Revision tags: cjep_staticlib_x-base
# 1.24 24-Apr-2021 thorpej

branches: 1.24.2; 1.24.4;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.23 27-Jan-2021 thorpej

branches: 1.23.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


# 1.22 27-Jan-2021 thorpej

Use DEVICE_COMPAT_EOL.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


# 1.18 10-Oct-2020 jmcneill

branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.26 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.25 12-May-2021 thorpej

branches: 1.25.4;
Pass along our device handle to the PCI bus instance we attach.


Revision tags: cjep_staticlib_x-base
# 1.24 24-Apr-2021 thorpej

branches: 1.24.2; 1.24.4;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.23 27-Jan-2021 thorpej

branches: 1.23.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


# 1.22 27-Jan-2021 thorpej

Use DEVICE_COMPAT_EOL.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


# 1.18 10-Oct-2020 jmcneill

branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.25 12-May-2021 thorpej

Pass along our device handle to the PCI bus instance we attach.


Revision tags: cjep_staticlib_x-base thorpej-i2c-spi-conf-base
# 1.24 24-Apr-2021 thorpej

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.23 27-Jan-2021 thorpej

branches: 1.23.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


# 1.22 27-Jan-2021 thorpej

Use DEVICE_COMPAT_EOL.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


# 1.18 10-Oct-2020 jmcneill

branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.24 24-Apr-2021 thorpej

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.23 27-Jan-2021 thorpej

branches: 1.23.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


# 1.22 27-Jan-2021 thorpej

Use DEVICE_COMPAT_EOL.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


# 1.18 10-Oct-2020 jmcneill

branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.23 27-Jan-2021 thorpej

Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


# 1.22 27-Jan-2021 thorpej

Use DEVICE_COMPAT_EOL.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


Revision tags: thorpej-futex-base
# 1.18 10-Oct-2020 jmcneill

Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.21 25-Jan-2021 thorpej

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


Revision tags: thorpej-futex-base
# 1.18 10-Oct-2020 jmcneill

Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.20 18-Jan-2021 thorpej

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


Revision tags: thorpej-futex-base
# 1.18 10-Oct-2020 jmcneill

Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.19 15-Jan-2021 ryo

add fdtbus_intr_establish_xname() function


Revision tags: thorpej-futex-base
# 1.18 10-Oct-2020 jmcneill

Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.18 10-Oct-2020 jmcneill

Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.17 07-Jul-2020 thorpej

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.16 14-Jun-2020 chs

replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.15 07-Jan-2020 skrll

Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())


# 1.14 07-Jan-2020 skrll

oops more KNF


# 1.13 07-Jan-2020 skrll

KNF


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.12 28-Dec-2019 jmcneill

Do not use Early Write Acknowledge for PCIe I/O and config space.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.11 23-Jun-2019 jmcneill

branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.11 23-Jun-2019 jmcneill

Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.10 12-Jun-2019 jmcneill

Support configuring ranges where only prefetchable memory is defined


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.


# 1.9 12-Jun-2019 jmcneill

Enable RK3399 PCIe.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.8 28-Feb-2019 jakllsch

branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.


# 1.7 28-Feb-2019 jakllsch

Implement support for IO space, and better-handle both variants of MMIO space.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.6 19-Nov-2018 jmcneill

Clear PCI_FLAGS_IO_OKAY as we don't support it yet.


# 1.5 16-Nov-2018 jakllsch

make pcihost_intr_evcnt static, like the other functions


# 1.4 16-Nov-2018 jmcneill

Add intr_establish_xname support to arm and expose it to intrctl


# 1.3 11-Nov-2018 jmcneill

Add MSI/MSI-X support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.2 09-Sep-2018 jmcneill

branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.


# 1.1 08-Sep-2018 jmcneill

Add FDT generic PCI host controller driver.