[Midnightbsd-cvs] src [8907] trunk/sys/dev/uart: uart: add resume method and enable it for attachments

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Sep 26 18:42:31 EDT 2016


Revision: 8907
          http://svnweb.midnightbsd.org/src/?rev=8907
Author:   laffer1
Date:     2016-09-26 18:42:31 -0400 (Mon, 26 Sep 2016)
Log Message:
-----------
uart: add resume method and enable it for attachments

Modified Paths:
--------------
    trunk/sys/dev/uart/uart_bus.h
    trunk/sys/dev/uart/uart_bus_acpi.c
    trunk/sys/dev/uart/uart_bus_isa.c
    trunk/sys/dev/uart/uart_bus_pci.c
    trunk/sys/dev/uart/uart_core.c

Modified: trunk/sys/dev/uart/uart_bus.h
===================================================================
--- trunk/sys/dev/uart/uart_bus.h	2016-09-26 22:42:02 UTC (rev 8906)
+++ trunk/sys/dev/uart/uart_bus.h	2016-09-26 22:42:31 UTC (rev 8907)
@@ -137,6 +137,7 @@
 
 int uart_bus_attach(device_t dev);
 int uart_bus_detach(device_t dev);
+int uart_bus_resume(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);

Modified: trunk/sys/dev/uart/uart_bus_acpi.c
===================================================================
--- trunk/sys/dev/uart/uart_bus_acpi.c	2016-09-26 22:42:02 UTC (rev 8906)
+++ trunk/sys/dev/uart/uart_bus_acpi.c	2016-09-26 22:42:31 UTC (rev 8907)
@@ -47,6 +47,7 @@
 	DEVMETHOD(device_probe,		uart_acpi_probe),
 	DEVMETHOD(device_attach,	uart_bus_attach),
 	DEVMETHOD(device_detach,	uart_bus_detach),
+	DEVMETHOD(device_resume,	uart_bus_resume),
 	{ 0, 0 }
 };
 

Modified: trunk/sys/dev/uart/uart_bus_isa.c
===================================================================
--- trunk/sys/dev/uart/uart_bus_isa.c	2016-09-26 22:42:02 UTC (rev 8906)
+++ trunk/sys/dev/uart/uart_bus_isa.c	2016-09-26 22:42:31 UTC (rev 8907)
@@ -50,6 +50,7 @@
 	DEVMETHOD(device_probe,		uart_isa_probe),
 	DEVMETHOD(device_attach,	uart_bus_attach),
 	DEVMETHOD(device_detach,	uart_bus_detach),
+	DEVMETHOD(device_resume,	uart_bus_resume),
 	{ 0, 0 }
 };
 

Modified: trunk/sys/dev/uart/uart_bus_pci.c
===================================================================
--- trunk/sys/dev/uart/uart_bus_pci.c	2016-09-26 22:42:02 UTC (rev 8906)
+++ trunk/sys/dev/uart/uart_bus_pci.c	2016-09-26 22:42:31 UTC (rev 8907)
@@ -51,6 +51,7 @@
 	DEVMETHOD(device_probe,		uart_pci_probe),
 	DEVMETHOD(device_attach,	uart_bus_attach),
 	DEVMETHOD(device_detach,	uart_bus_detach),
+	DEVMETHOD(device_resume,	uart_bus_resume),
 	DEVMETHOD_END
 };
 

Modified: trunk/sys/dev/uart/uart_core.c
===================================================================
--- trunk/sys/dev/uart/uart_core.c	2016-09-26 22:42:02 UTC (rev 8906)
+++ trunk/sys/dev/uart/uart_core.c	2016-09-26 22:42:31 UTC (rev 8907)
@@ -577,3 +577,12 @@
 
 	return (0);
 }
+
+int
+uart_bus_resume(device_t dev)
+{
+	struct uart_softc *sc;
+
+	sc = device_get_softc(dev);
+	return (UART_ATTACH(sc));
+}



More information about the Midnightbsd-cvs mailing list