Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Dec 2006 01:20:12 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 111860 for review
Message-ID:  <200612180120.kBI1KCXl085031@repoman.freebsd.org>

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

Change 111860 by imp@imp_bugs on 2006/12/18 01:19:36

	Implementations for new rouintes.

Affected files ...

.. //depot/projects/arm/src/sys/arm/at91/at91_pio.c#26 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/at91/at91_pio.c#26 (text+ko) ====

@@ -478,6 +478,17 @@
 }
 
 void
+at91_pio_gpio_high_z(uint32_t pio, uint32_t high_z_mask, int enable)
+{
+	uint32_t *PIO = (uint32_t *)(AT91RM92_BASE + pio);
+
+	if (enable)
+		PIO[PIO_MDER / 4] = high_z_mask;
+	else
+		PIO[PIO_MDDR / 4] = high_z_mask;
+}
+
+void
 at91_pio_gpio_set(uint32_t pio, uint32_t data_mask)
 {
 	uint32_t *PIO = (uint32_t *)(AT91RM92_BASE + pio);
@@ -493,6 +504,14 @@
 	PIO[PIO_CODR / 4] = data_mask;
 }
 
+uint32_t
+at91_pio_gpio_read(uint32_t pio, uint32_t data_mask)
+{
+	uint32_t *PIO = (uint32_t *)(AT91RM92_BASE + pio);
+
+	return PIO[PIO_PDSR / 4] & data_mask;
+}
+
 static device_method_t at91_pio_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		at91_pio_probe),



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