PERFORCE change 94962 for review
Marcel Moolenaar
marcel at FreeBSD.org
Tue Apr 11 00:59:53 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=94962
Change 94962 by marcel at marcel_nfs on 2006/04/11 00:59:26
override the serdev I/F methods for ihand() and ipend() for the
puc(4) attachment.
Affected files ...
.. //depot/projects/uart/dev/uart/uart_bus.h#46 edit
.. //depot/projects/uart/dev/uart/uart_bus_puc.c#12 edit
.. //depot/projects/uart/dev/uart/uart_core.c#53 edit
Differences ...
==== //depot/projects/uart/dev/uart/uart_bus.h#46 (text+ko) ====
@@ -140,6 +140,7 @@
int uart_bus_attach(device_t dev);
int uart_bus_detach(device_t dev);
serdev_intr_t *uart_bus_ihand(device_t dev, int ipend);
+int uart_bus_ipend(device_t dev);
int uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan);
int uart_bus_sysdev(device_t dev);
==== //depot/projects/uart/dev/uart/uart_bus_puc.c#12 (text+ko) ====
@@ -1,4 +1,5 @@
/*-
+ * Copyright (c) 2006 Marcel Moolenaar. All rights reserved.
* Copyright (c) 2002 JF Hay. All rights reserved.
* Copyright (c) 2001 M. Warner Losh. All rights reserved.
*
@@ -36,6 +37,9 @@
#include <sys/rman.h>
#include <machine/resource.h>
+#include <sys/serial.h>
+#include <serdev_if.h>
+
#include <dev/pci/pcivar.h>
#include <dev/puc/pucvar.h>
@@ -49,6 +53,9 @@
DEVMETHOD(device_probe, uart_puc_probe),
DEVMETHOD(device_attach, uart_bus_attach),
DEVMETHOD(device_detach, uart_bus_detach),
+ /* Serdev interface */
+ DEVMETHOD(serdev_ihand, uart_bus_ihand),
+ DEVMETHOD(serdev_ipend, uart_bus_ipend),
{ 0, 0 }
};
==== //depot/projects/uart/dev/uart/uart_core.c#53 (text+ko) ====
@@ -267,6 +267,15 @@
}
int
+uart_bus_ipend(device_t dev)
+{
+ struct uart_softc *sc;
+
+ sc = device_get_softc(dev);
+ return (UART_IPEND(sc));
+}
+
+int
uart_bus_sysdev(device_t dev)
{
struct uart_softc *sc;
More information about the p4-projects
mailing list