svn commit: r298343 - head/sys/arm64/cavium
Andrew Turner
andrew at FreeBSD.org
Wed Apr 20 13:23:08 UTC 2016
Author: andrew
Date: Wed Apr 20 13:23:06 2016
New Revision: 298343
URL: https://svnweb.freebsd.org/changeset/base/298343
Log:
Pull out the MSI/MSI-X handling calls to simplify future intrng
integration.
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/arm64/cavium/thunder_pcie_pem.c
Modified: head/sys/arm64/cavium/thunder_pcie_pem.c
==============================================================================
--- head/sys/arm64/cavium/thunder_pcie_pem.c Wed Apr 20 07:44:50 2016 (r298342)
+++ head/sys/arm64/cavium/thunder_pcie_pem.c Wed Apr 20 13:23:06 2016 (r298343)
@@ -126,6 +126,11 @@ static int thunder_pem_adjust_resource(d
struct resource *, rman_res_t, rman_res_t);
static struct resource * thunder_pem_alloc_resource(device_t, device_t, int,
int *, rman_res_t, rman_res_t, rman_res_t, u_int);
+static int thunder_pem_alloc_msi(device_t, device_t, int, int, int *);
+static int thunder_pem_release_msi(device_t, device_t, int, int *);
+static int thunder_pem_map_msi(device_t, device_t, int, uint64_t *, uint32_t *);
+static int thunder_pem_alloc_msix(device_t, device_t, int *);
+static int thunder_pem_release_msix(device_t, device_t, int);
static int thunder_pem_attach(device_t);
static int thunder_pem_deactivate_resource(device_t, device_t, int, int,
struct resource *);
@@ -169,11 +174,12 @@ static device_method_t thunder_pem_metho
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
- DEVMETHOD(pcib_map_msi, arm_map_msi),
- DEVMETHOD(pcib_alloc_msix, arm_alloc_msix),
- DEVMETHOD(pcib_release_msix, arm_release_msix),
- DEVMETHOD(pcib_alloc_msi, arm_alloc_msi),
- DEVMETHOD(pcib_release_msi, arm_release_msi),
+ DEVMETHOD(pcib_map_msi, thunder_pem_map_msi),
+ DEVMETHOD(pcib_alloc_msix, thunder_pem_alloc_msix),
+ DEVMETHOD(pcib_release_msix, thunder_pem_release_msix),
+ DEVMETHOD(pcib_alloc_msi, thunder_pem_alloc_msi),
+ DEVMETHOD(pcib_release_msi, thunder_pem_release_msi),
+
DEVMETHOD_END
};
@@ -315,6 +321,43 @@ thunder_pem_adjust_resource(device_t dev
}
static int
+thunder_pem_alloc_msi(device_t pci, device_t child, int count, int maxcount,
+ int *irqs)
+{
+
+ return (arm_alloc_msi(pci, child, count, maxcount, irqs));
+}
+
+static int
+thunder_pem_release_msi(device_t pci, device_t child, int count, int *irqs)
+{
+
+ return (arm_release_msi(pci, child, count, irqs));
+}
+
+static int
+thunder_pem_map_msi(device_t pci, device_t child, int irq, uint64_t *addr,
+ uint32_t *data)
+{
+
+ return (arm_map_msi(pci, child, irq, addr, data));
+}
+
+static int
+thunder_pem_alloc_msix(device_t pci, device_t child, int *irq)
+{
+
+ return (arm_alloc_msix(pci, child, irq));
+}
+
+static int
+thunder_pem_release_msix(device_t pci, device_t child, int irq)
+{
+
+ return (arm_release_msix(pci, child, irq));
+}
+
+static int
thunder_pem_identify(device_t dev)
{
struct thunder_pem_softc *sc;
More information about the svn-src-head
mailing list