PERFORCE change 94246 for review

Marcel Moolenaar marcel at FreeBSD.org
Wed Mar 29 15:49:34 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=94246

Change 94246 by marcel at marcel_nfs on 2006/03/29 15:48:36

	Add an IVAR for subordinate drivers to get a
	pointer to our hardware mutex. This way all
	drivers can end up using the same mutex for
	accessing the hardware.

Affected files ...

.. //depot/projects/uart/dev/scc/scc_bus.h#6 edit
.. //depot/projects/uart/dev/scc/scc_core.c#12 edit

Differences ...

==== //depot/projects/uart/dev/scc/scc_bus.h#6 (text+ko) ====

@@ -37,6 +37,7 @@
 #define	SCC_IVAR_CLOCK		2
 #define	SCC_IVAR_MODE		3
 #define	SCC_IVAR_REGSHFT	4
+#define	SCC_IVAR_HWMTX		5
 
 /* Hardware class -- the SCC type. */
 #define	SCC_CLASS_SAB82532	0

==== //depot/projects/uart/dev/scc/scc_core.c#12 (text+ko) ====

@@ -462,6 +462,9 @@
 	case SCC_IVAR_REGSHFT:
 		*result = cl->cl_regshft;
 		break;
+	case SCC_IVAR_HWMTX:
+		*result = (uintptr_t)&sc->sc_hwmtx;
+		break;
 	default:
 		return (EINVAL);
 	}


More information about the p4-projects mailing list