diff options
author | 2021-02-25 23:07:48 +0000 | |
---|---|---|
committer | 2021-02-25 23:07:48 +0000 | |
commit | 619b146d99f441b1442881c022ac42665e3f35f6 (patch) | |
tree | e1d9439463005c45445c11778f55f682ced89162 /sys/dev/fdt/dwpcie.c | |
parent | mention that FIX_CRLF_FILES is rooted in WRKDIST, pointed out by espie@. (diff) | |
download | wireguard-openbsd-619b146d99f441b1442881c022ac42665e3f35f6.tar.xz wireguard-openbsd-619b146d99f441b1442881c022ac42665e3f35f6.zip |
Add some infrastructure in the PCI chipset tag for pci_probe_device_hook()
so that we can provide IOMMU-hooked bus DMA tags for each PCI device.
ok kettenis@
Diffstat (limited to 'sys/dev/fdt/dwpcie.c')
-rw-r--r-- | sys/dev/fdt/dwpcie.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/fdt/dwpcie.c b/sys/dev/fdt/dwpcie.c index 07443c41211..70637fc9b4c 100644 --- a/sys/dev/fdt/dwpcie.c +++ b/sys/dev/fdt/dwpcie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwpcie.c,v 1.24 2020/12/28 12:24:31 kettenis Exp $ */ +/* $OpenBSD: dwpcie.c,v 1.25 2021/02/25 23:07:49 patrick Exp $ */ /* * Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org> * @@ -264,6 +264,7 @@ void dwpcie_decompose_tag(void *, pcitag_t, int *, int *, int *); int dwpcie_conf_size(void *, pcitag_t); pcireg_t dwpcie_conf_read(void *, pcitag_t, int); void dwpcie_conf_write(void *, pcitag_t, int, pcireg_t); +int dwpcie_probe_device_hook(void *, struct pci_attach_args *); int dwpcie_intr_map(struct pci_attach_args *, pci_intr_handle_t *); const char *dwpcie_intr_string(void *, pci_intr_handle_t); @@ -535,6 +536,7 @@ dwpcie_attach_deferred(struct device *self) sc->sc_pc.pc_conf_size = dwpcie_conf_size; sc->sc_pc.pc_conf_read = dwpcie_conf_read; sc->sc_pc.pc_conf_write = dwpcie_conf_write; + sc->sc_pc.pc_probe_device_hook = dwpcie_probe_device_hook; sc->sc_pc.pc_intr_v = sc; sc->sc_pc.pc_intr_map = dwpcie_intr_map; @@ -1131,6 +1133,12 @@ dwpcie_conf_write(void *v, pcitag_t tag, int reg, pcireg_t data) } int +dwpcie_probe_device_hook(void *v, struct pci_attach_args *pa) +{ + return 0; +} + +int dwpcie_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) { int pin = pa->pa_rawintrpin; |