PERFORCE change 131627 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Dec 25 14:44:43 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=131627
Change 131627 by hselasky at hselasky_laptop001 on 2007/12/25 22:44:31
Need a function to clear interrupts. Probably this is
not the right way to do it. We need an interrupt-sharing
framework around this, but until further it is good
enough, hence there is only one device using these
kinds of interrupts.
Affected files ...
.. //depot/projects/usb/src/sys/arm/at91/at91_pio.c#8 edit
.. //depot/projects/usb/src/sys/arm/at91/at91_piovar.h#5 edit
Differences ...
==== //depot/projects/usb/src/sys/arm/at91/at91_pio.c#8 (text) ====
@@ -384,6 +384,14 @@
return;
}
+uint32_t
+at91_pio_gpio_clear_interrupt(uint32_t pio)
+{
+ uint32_t *PIO = (uint32_t *)(AT91RM92_BASE + pio);
+ /* reading this register will clear the interrupts */
+ return (PIO[PIO_ISR / 4]);
+}
+
static device_method_t at91_pio_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, at91_pio_probe),
==== //depot/projects/usb/src/sys/arm/at91/at91_piovar.h#5 (text+ko) ====
@@ -40,5 +40,6 @@
int use_deglitch);
void at91_pio_gpio_set_interrupt(uint32_t pio, uint32_t data_mask,
int enable_interrupt);
+uint32_t at91_pio_gpio_clear_interrupt(uint32_t pio);
#endif /* ARM_AT91_AT91_PIOVAR_H */
More information about the p4-projects
mailing list