Date: Tue, 18 Dec 2007 21:38:16 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 131184 for review Message-ID: <200712182138.lBILcGrZ055075@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=131184 Change 131184 by hselasky@hselasky_laptop001 on 2007/12/18 21:37:17 More patches to support the AT91 USB Device Controller Interface. Affected files ... .. //depot/projects/usb/src/sys/arm/at91/at91.c#5 edit .. //depot/projects/usb/src/sys/arm/at91/at91_pio.c#7 edit .. //depot/projects/usb/src/sys/arm/at91/at91_piovar.h#4 edit Differences ... ==== //depot/projects/usb/src/sys/arm/at91/at91.c#5 (text) ==== @@ -301,7 +301,7 @@ { "at91_udp", 0, AT91RM92_BASE + AT91RM92_UDP_BASE, AT91RM92_UDP_SIZE, - AT91RM92_IRQ_UDP + AT91RM92_IRQ_UDP, AT91RM92_IRQ_PIOC }, { "at91_mci", 0, ==== //depot/projects/usb/src/sys/arm/at91/at91_pio.c#7 (text) ==== @@ -371,6 +371,19 @@ return; } +void +at91_pio_gpio_set_interrupt(uint32_t pio, uint32_t data_mask, + int enable_interrupt) +{ + uint32_t *PIO = (uint32_t *)(AT91RM92_BASE + pio); + + if (enable_interrupt) + PIO[PIO_IER / 4] = data_mask; + else + PIO[PIO_IDR / 4] = data_mask; + return; +} + 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#4 (text+ko) ==== @@ -38,5 +38,7 @@ uint8_t at91_pio_gpio_get(uint32_t pio, uint32_t data_mask); void at91_pio_gpio_set_deglitch(uint32_t pio, uint32_t data_mask, int use_deglitch); +void at91_pio_gpio_set_interrupt(uint32_t pio, uint32_t data_mask, + int enable_interrupt); #endif /* ARM_AT91_AT91_PIOVAR_H */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712182138.lBILcGrZ055075>