summaryrefslogtreecommitdiffstats
path: root/sys/arm/ti/ti_gpio.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm/ti/ti_gpio.h')
-rw-r--r--sys/arm/ti/ti_gpio.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/arm/ti/ti_gpio.h b/sys/arm/ti/ti_gpio.h
index 6bd53c8..f16728b 100644
--- a/sys/arm/ti/ti_gpio.h
+++ b/sys/arm/ti/ti_gpio.h
@@ -39,10 +39,19 @@
*/
#define MAX_GPIO_INTRS 8
+#ifndef ARM_INTRNG
struct ti_gpio_mask_arg {
void *softc;
int pin;
};
+#else
+struct ti_gpio_irqsrc {
+ struct intr_irqsrc tgi_isrc;
+ u_int tgi_irq;
+ uint32_t tgi_mask;
+ uint32_t tgi_cfgreg;
+};
+#endif
/**
* Structure that stores the driver context.
@@ -52,11 +61,11 @@ struct ti_gpio_mask_arg {
struct ti_gpio_softc {
device_t sc_dev;
device_t sc_busdev;
-
+#ifndef ARM_INTRNG
/* Interrupt trigger type and level. */
enum intr_trigger *sc_irq_trigger;
enum intr_polarity *sc_irq_polarity;
-
+#endif
int sc_bank;
int sc_maxpin;
struct mtx sc_mtx;
@@ -65,11 +74,13 @@ struct ti_gpio_softc {
struct resource *sc_mem_res;
int sc_irq_rid;
struct resource *sc_irq_res;
-
+#ifndef ARM_INTRNG
/* Interrupt events. */
struct intr_event **sc_events;
struct ti_gpio_mask_arg *sc_mask_args;
-
+#else
+ struct ti_gpio_irqsrc *sc_isrcs;
+#endif
/* The handle for the register IRQ handlers. */
void *sc_irq_hdl;
};
OpenPOWER on IntegriCloud