Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Dec 2007 22:44:42 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 131627 for review
Message-ID:  <200712252244.lBPMigIp072822@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=131627

Change 131627 by hselasky@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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712252244.lBPMigIp072822>