Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jul 2018 17:25:09 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r336070 - in head/sys: arm/freescale/imx modules/imx modules/imx/imx_wdog
Message-ID:  <201807071725.w67HP9PI051878@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Sat Jul  7 17:25:09 2018
New Revision: 336070
URL: https://svnweb.freebsd.org/changeset/base/336070

Log:
  Add pnp info and a module makefile for the imx_wdog watchdog driver.

Added:
  head/sys/modules/imx/imx_wdog/
  head/sys/modules/imx/imx_wdog/Makefile   (contents, props changed)
Modified:
  head/sys/arm/freescale/imx/imx_wdog.c
  head/sys/modules/imx/Makefile

Modified: head/sys/arm/freescale/imx/imx_wdog.c
==============================================================================
--- head/sys/arm/freescale/imx/imx_wdog.c	Sat Jul  7 15:55:58 2018	(r336069)
+++ head/sys/arm/freescale/imx/imx_wdog.c	Sat Jul  7 17:25:09 2018	(r336070)
@@ -209,6 +209,13 @@ imx_wdog_attach(device_t dev)
 		sc->sc_pde_enabled = true;
 
 	EVENTHANDLER_REGISTER(watchdog_list, imx_watchdog, sc, 0);
+
+	/*
+	 * The watchdog hardware cannot be disabled, so there's little point in
+	 * coding up a detach() routine to carefully tear everything down, just
+	 * make the device busy so that detach can't happen.
+	 */
+	device_busy(sc->sc_dev);
 	return (0);
 }
 
@@ -227,3 +234,4 @@ static driver_t imx_wdog_driver = {
 static devclass_t imx_wdog_devclass;
 
 DRIVER_MODULE(imx_wdog, simplebus, imx_wdog_driver, imx_wdog_devclass, 0, 0);
+SIMPLEBUS_PNP_INFO(compat_data);

Modified: head/sys/modules/imx/Makefile
==============================================================================
--- head/sys/modules/imx/Makefile	Sat Jul  7 15:55:58 2018	(r336069)
+++ head/sys/modules/imx/Makefile	Sat Jul  7 17:25:09 2018	(r336070)
@@ -5,5 +5,6 @@ SUBDIR = \
 	../ffec \
 	imx_i2c \
 	imx_spi \
+	imx_wdog \
 	
 .include <bsd.subdir.mk>

Added: head/sys/modules/imx/imx_wdog/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/modules/imx/imx_wdog/Makefile	Sat Jul  7 17:25:09 2018	(r336070)
@@ -0,0 +1,14 @@
+# $FreeBSD$
+
+.PATH: ${SRCTOP}/sys/arm/freescale/imx
+
+KMOD=	imx_wdog
+SRCS=	imx_wdog.c
+
+# Generated files...
+SRCS+=	\
+	bus_if.h \
+	device_if.h \
+	ofw_bus_if.h \
+
+.include <bsd.kmod.mk>



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