git: 2a04c3a47b74 - main - intelspi: Add generic resource methods to bus interface
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 03 Aug 2023 16:11:58 UTC
The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=2a04c3a47b74aa1114787fe24bbddf180ac57a5a commit 2a04c3a47b74aa1114787fe24bbddf180ac57a5a Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2023-08-03 16:10:50 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2023-08-03 16:10:50 +0000 intelspi: Add generic resource methods to bus interface That allows intelspi grandchildren to allocate IRQs MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41242 --- sys/dev/intel/spi_acpi.c | 9 +++++++++ sys/dev/intel/spi_pci.c | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/sys/dev/intel/spi_acpi.c b/sys/dev/intel/spi_acpi.c index 015694f4a008..4c22d7a351c4 100644 --- a/sys/dev/intel/spi_acpi.c +++ b/sys/dev/intel/spi_acpi.c @@ -93,6 +93,15 @@ static device_method_t intelspi_acpi_methods[] = { DEVMETHOD(device_suspend, intelspi_suspend), DEVMETHOD(device_resume, intelspi_resume), + /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + /* SPI interface */ DEVMETHOD(spibus_transfer, intelspi_transfer), diff --git a/sys/dev/intel/spi_pci.c b/sys/dev/intel/spi_pci.c index c55b5a12228e..cb2b8bd82bfb 100644 --- a/sys/dev/intel/spi_pci.c +++ b/sys/dev/intel/spi_pci.c @@ -119,6 +119,15 @@ static device_method_t intelspi_pci_methods[] = { DEVMETHOD(device_suspend, intelspi_suspend), DEVMETHOD(device_resume, intelspi_resume), + /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + /* SPI interface */ DEVMETHOD(spibus_transfer, intelspi_transfer),