summaryrefslogtreecommitdiffstats
path: root/sys/sys/intr.h
diff options
context:
space:
mode:
authorskra <skra@FreeBSD.org>2016-06-05 16:07:57 +0000
committerskra <skra@FreeBSD.org>2016-06-05 16:07:57 +0000
commit833dcace9c72d5665a99cc9cab8222fcf22cdbeb (patch)
treeedef6ff23cc230265caf9e9744514c720d3ddcaa /sys/sys/intr.h
parent35ed7900179da58d69c441f8d527d5ce2c794a7e (diff)
downloadFreeBSD-src-833dcace9c72d5665a99cc9cab8222fcf22cdbeb.zip
FreeBSD-src-833dcace9c72d5665a99cc9cab8222fcf22cdbeb.tar.gz
(1) Add a new bus method to get a mapping data for an interrupt.
BUS_MAP_INTR() is used to get an interrupt mapping data according to provided hints. The hints could be modified afterwards, but only if mapping data was allocated. This method is intended to be called before BUS_ALLOC_RESOURCE(). An interrupt mapping data describes an interrupt - hardware number, type, configuration, cpu binding, and whatever is needed to setup it. (2) Introduce a method which allows storing of an additional data in struct resource to be available for bus drivers. This method is convenient in two ways: - there is no need to rework existing bus drivers as they can simply be extended to provide an additional data, - there is no need to modify any existing bus methods as struct resource is already passed to them as argument and thus stored data is simply accessible by other bus drivers. For now, implement this method only for INTRNG. This is motivated by needs of modern SOCs where hardware initialization is not straightforward and resources descriptions are complex, opaque for everyone but provider, and may vary from SOC to SOC. Typical situation is that one bus driver can fetch a resource description for its child device, but it's opaque for this driver. Another bus driver knows a provider for this kind of resource and can pass this resource description to it. In fact, something like device IVARS would be perfect for that if implemented generally enough. Unfortunatelly, IVARS are usable only by their owners now. Only owner knows its IVARS layout, thus other bus drivers are not able to use them. Differential Revision: https://reviews.freebsd.org/D6632
Diffstat (limited to 'sys/sys/intr.h')
-rw-r--r--sys/sys/intr.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/sys/sys/intr.h b/sys/sys/intr.h
index 8318e70..c137a6e 100644
--- a/sys/sys/intr.h
+++ b/sys/sys/intr.h
@@ -34,17 +34,6 @@
#define INTR_IRQ_INVALID 0xFFFFFFFF
-enum intr_map_data_type {
- INTR_MAP_DATA_ACPI,
- INTR_MAP_DATA_FDT,
- INTR_MAP_DATA_GPIO,
-};
-
-struct intr_map_data {
- enum intr_map_data_type type;
- size_t size;
-};
-
#ifdef DEV_ACPI
struct intr_map_data_acpi {
struct intr_map_data hdr;
OpenPOWER on IntegriCloud