Module Name:    src
Committed By:   jmcneill
Date:           Sun Aug 28 16:19:08 UTC 2011

Modified Files:
        src/distrib/sets/lists/modules: md.i386
        src/sys/external/bsd/drm/dist/bsd-core: mach64_drv.c mga_drv.c
            r128_drv.c savage_drv.c sis_drv.c tdfx_drv.c
        src/sys/modules: Makefile
Added Files:
        src/sys/modules/mach64drm: Makefile mach64drm.ioconf
        src/sys/modules/mgadrm: Makefile mgadrm.ioconf
        src/sys/modules/r128drm: Makefile r128drm.ioconf
        src/sys/modules/savagedrm: Makefile savagedrm.ioconf
        src/sys/modules/sisdrm: Makefile sisdrm.ioconf
        src/sys/modules/tdfxdrm: Makefile tdfxdrm.ioconf

Log Message:
add mach64drm, mgadrm, r128drm, savagedrm, sisdrm, and tdfxdrm modules


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm/dist/bsd-core/mach64_drv.c \
    src/sys/external/bsd/drm/dist/bsd-core/r128_drv.c \
    src/sys/external/bsd/drm/dist/bsd-core/savage_drv.c \
    src/sys/external/bsd/drm/dist/bsd-core/sis_drv.c \
    src/sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm/dist/bsd-core/mga_drv.c
cvs rdiff -u -r1.89 -r1.90 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/mach64drm/Makefile \
    src/sys/modules/mach64drm/mach64drm.ioconf
cvs rdiff -u -r0 -r1.1 src/sys/modules/mgadrm/Makefile \
    src/sys/modules/mgadrm/mgadrm.ioconf
cvs rdiff -u -r0 -r1.1 src/sys/modules/r128drm/Makefile \
    src/sys/modules/r128drm/r128drm.ioconf
cvs rdiff -u -r0 -r1.1 src/sys/modules/savagedrm/Makefile \
    src/sys/modules/savagedrm/savagedrm.ioconf
cvs rdiff -u -r0 -r1.1 src/sys/modules/sisdrm/Makefile \
    src/sys/modules/sisdrm/sisdrm.ioconf
cvs rdiff -u -r0 -r1.1 src/sys/modules/tdfxdrm/Makefile \
    src/sys/modules/tdfxdrm/tdfxdrm.ioconf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/modules/md.i386
diff -u src/distrib/sets/lists/modules/md.i386:1.34 src/distrib/sets/lists/modules/md.i386:1.35
--- src/distrib/sets/lists/modules/md.i386:1.34	Sun Aug 28 15:56:21 2011
+++ src/distrib/sets/lists/modules/md.i386	Sun Aug 28 16:19:08 2011
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.34 2011/08/28 15:56:21 jmcneill Exp $
+# $NetBSD: md.i386,v 1.35 2011/08/28 16:19:08 jmcneill Exp $
 ./@MODULEDIR@/acpiacad				base-kernel-modules	kmod
 ./@MODULEDIR@/acpiacad/acpiacad.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/acpibat				base-kernel-modules	kmod
@@ -85,14 +85,16 @@
 ./@MODULEDIR@/itesio/itesio.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/lg3303				base-kernel-modules	kmod
 ./@MODULEDIR@/lg3303/lg3303.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/mach64drm				base-kernel-modules	kmod
+./@MODULEDIR@/mach64drm/mach64drm.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/mgadrm				base-kernel-modules	kmod
+./@MODULEDIR@/mgadrm/mgadrm.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/mt2131				base-kernel-modules	kmod
 ./@MODULEDIR@/mt2131/mt2131.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/nsclpcsio				base-kernel-modules	kmod
 ./@MODULEDIR@/nsclpcsio/nsclpcsio.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/nxt2k				base-kernel-modules	kmod
 ./@MODULEDIR@/nxt2k/nxt2k.kmod			base-kernel-modules	kmod
-./@MODULEDIR@/radeondrm				base-kernel-modules	kmod
-./@MODULEDIR@/radeondrm/radeondrm.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/odcm				base-kernel-modules	kmod
 ./@MODULEDIR@/odcm/odcm.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/pad				base-kernel-modules	kmod
@@ -103,6 +105,16 @@
 ./@MODULEDIR@/powernow/powernow.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/pwdog				base-kernel-modules	kmod
 ./@MODULEDIR@/pwdog/pwdog.kmod			base-kernel-modules	kmod
+./@MODULEDIR@/r128drm				base-kernel-modules	kmod
+./@MODULEDIR@/r128drm/r128drm.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/radeondrm				base-kernel-modules	kmod
+./@MODULEDIR@/radeondrm/radeondrm.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/savagedrm				base-kernel-modules	kmod
+./@MODULEDIR@/savagedrm/savagedrm.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/sisdrm				base-kernel-modules	kmod
+./@MODULEDIR@/sisdrm/sisdrm.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/tdfxdrm				base-kernel-modules	kmod
+./@MODULEDIR@/tdfxdrm/tdfxdrm.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/thinkpad				base-kernel-modules	kmod
 ./@MODULEDIR@/thinkpad/thinkpad.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/tprof_amdpmi			base-kernel-modules	kmod

Index: src/sys/external/bsd/drm/dist/bsd-core/mach64_drv.c
diff -u src/sys/external/bsd/drm/dist/bsd-core/mach64_drv.c:1.5 src/sys/external/bsd/drm/dist/bsd-core/mach64_drv.c:1.6
--- src/sys/external/bsd/drm/dist/bsd-core/mach64_drv.c:1.5	Sun Dec  6 22:51:25 2009
+++ src/sys/external/bsd/drm/dist/bsd-core/mach64_drv.c	Sun Aug 28 16:19:08 2011
@@ -163,62 +163,35 @@
 CFATTACH_DECL_NEW(mach64drm, sizeof(struct drm_device),
     mach64drm_probe, mach64drm_attach, drm_detach, NULL);
 
-#ifdef _MODULE
-
-MODULE(MODULE_CLASS_DRIVER, mach64drm, NULL);
+MODULE(MODULE_CLASS_DRIVER, mach64drm, "drm");
 
-CFDRIVER_DECL(mach64drm, DV_DULL, NULL);
-extern struct cfattach mach64drm_ca;
-static int drmloc[] = { -1 };
-static struct cfparent drmparent = {
-	"drm", "vga", DVUNIT_ANY
-};
-static struct cfdata mach64drm_cfdata[] = {
-	{
-		.cf_name = "mach64drm",
-		.cf_atname = "mach64drm",
-		.cf_unit = 0,
-		.cf_fstate = FSTATE_STAR,
-		.cf_loc = drmloc,
-		.cf_flags = 0,
-		.cf_pspec = &drmparent,
-	},
-	{ NULL }
-};
+#ifdef _MODULE
+#include "ioconf.c"
+#endif
 
 static int
 mach64drm_modcmd(modcmd_t cmd, void *arg)
 {
-	int err;
+	int error = 0;
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-		err = config_cfdriver_attach(&mach64drm_cd);
-		if (err)
-			return err;
-		err = config_cfattach_attach("mach64drm", &mach64drm_ca);
-		if (err) {
-			config_cfdriver_detach(&mach64drm_cd);
-			return err;
-		}
-		err = config_cfdata_attach(mach64drm_cfdata, 1);
-		if (err) {
-			config_cfattach_detach("mach64drm", &mach64drm_ca);
-			config_cfdriver_detach(&mach64drm_cd);
-			return err;
-		}
-		return 0;
+#ifdef _MODULE
+		error = config_init_component(cfdriver_ioconf_mach64drm,
+		    cfattach_ioconf_mach64drm, cfdata_ioconf_mach64drm);
+#endif
+		break;
 	case MODULE_CMD_FINI:
-		err = config_cfdata_detach(mach64drm_cfdata);
-		if (err)
-			return err;
-		config_cfattach_detach("mach64drm", &mach64drm_ca);
-		config_cfdriver_detach(&mach64drm_cd);
-		return 0;
+#ifdef _MODULE
+		error = config_fini_component(cfdriver_ioconf_mach64drm,
+		    cfattach_ioconf_mach64drm, cfdata_ioconf_mach64drm);
+#endif
+		break;
 	default:
 		return ENOTTY;
 	}
+
+	return 0;
 }
-#endif /* _MODULE */
 
 #endif
Index: src/sys/external/bsd/drm/dist/bsd-core/r128_drv.c
diff -u src/sys/external/bsd/drm/dist/bsd-core/r128_drv.c:1.5 src/sys/external/bsd/drm/dist/bsd-core/r128_drv.c:1.6
--- src/sys/external/bsd/drm/dist/bsd-core/r128_drv.c:1.5	Sun Dec  6 22:51:25 2009
+++ src/sys/external/bsd/drm/dist/bsd-core/r128_drv.c	Sun Aug 28 16:19:08 2011
@@ -161,62 +161,35 @@
 CFATTACH_DECL_NEW(r128drm, sizeof(struct drm_device),
     r128drm_probe, r128drm_attach, drm_detach, NULL);
 
-#ifdef _MODULE
-
-MODULE(MODULE_CLASS_DRIVER, r128drm, NULL);
+MODULE(MODULE_CLASS_DRIVER, r128drm, "drm,ati_pcigart");
 
-CFDRIVER_DECL(r128drm, DV_DULL, NULL);
-extern struct cfattach r128drm_ca;
-static int drmloc[] = { -1 };
-static struct cfparent drmparent = {
-	"drm", "vga", DVUNIT_ANY
-};
-static struct cfdata r128drm_cfdata[] = {
-	{
-		.cf_name = "r128drm",
-		.cf_atname = "r128drm",
-		.cf_unit = 0,
-		.cf_fstate = FSTATE_STAR,
-		.cf_loc = drmloc,
-		.cf_flags = 0,
-		.cf_pspec = &drmparent,
-	},
-	{ NULL }
-};
+#ifdef _MODULE
+#include "ioconf.c"
+#endif
 
 static int
 r128drm_modcmd(modcmd_t cmd, void *arg)
 {
-	int err;
+	int error = 0;
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-		err = config_cfdriver_attach(&r128drm_cd);
-		if (err)
-			return err;
-		err = config_cfattach_attach("r128drm", &r128drm_ca);
-		if (err) {
-			config_cfdriver_detach(&r128drm_cd);
-			return err;
-		}
-		err = config_cfdata_attach(r128drm_cfdata, 1);
-		if (err) {
-			config_cfattach_detach("r128drm", &r128drm_ca);
-			config_cfdriver_detach(&r128drm_cd);
-			return err;
-		}
-		return 0;
+#ifdef _MODULE
+		error = config_init_component(cfdriver_ioconf_r128drm,
+		    cfattach_ioconf_r128drm, cfdata_ioconf_r128drm);
+#endif
+		break;
 	case MODULE_CMD_FINI:
-		err = config_cfdata_detach(r128drm_cfdata);
-		if (err)
-			return err;
-		config_cfattach_detach("r128drm", &r128drm_ca);
-		config_cfdriver_detach(&r128drm_cd);
-		return 0;
+#ifdef _MODULE
+		error = config_fini_component(cfdriver_ioconf_r128drm,
+		    cfattach_ioconf_r128drm, cfdata_ioconf_r128drm);
+#endif
+		break;
 	default:
 		return ENOTTY;
 	}
+
+	return error;
 }
-#endif /* _MODULE */
 
 #endif
Index: src/sys/external/bsd/drm/dist/bsd-core/savage_drv.c
diff -u src/sys/external/bsd/drm/dist/bsd-core/savage_drv.c:1.5 src/sys/external/bsd/drm/dist/bsd-core/savage_drv.c:1.6
--- src/sys/external/bsd/drm/dist/bsd-core/savage_drv.c:1.5	Sun Dec  6 22:51:25 2009
+++ src/sys/external/bsd/drm/dist/bsd-core/savage_drv.c	Sun Aug 28 16:19:08 2011
@@ -146,62 +146,35 @@
 CFATTACH_DECL_NEW(savagedrm, sizeof(struct drm_device),
     savagedrm_probe, savagedrm_attach, drm_detach, NULL);
 
-#ifdef _MODULE
-
-MODULE(MODULE_CLASS_DRIVER, savagedrm, NULL);
+MODULE(MODULE_CLASS_DRIVER, savagedrm, "drm");
 
-CFDRIVER_DECL(savagedrm, DV_DULL, NULL);
-extern struct cfattach savagedrm_ca;
-static int drmloc[] = { -1 };
-static struct cfparent drmparent = {
-	"drm", "vga", DVUNIT_ANY
-};
-static struct cfdata savagedrm_cfdata[] = {
-	{
-		.cf_name = "savagedrm",
-		.cf_atname = "savagedrm",
-		.cf_unit = 0,
-		.cf_fstate = FSTATE_STAR,
-		.cf_loc = drmloc,
-		.cf_flags = 0,
-		.cf_pspec = &drmparent,
-	},
-	{ NULL }
-};
+#ifdef _MODULE
+#include "ioconf.c"
+#endif
 
 static int
 savagedrm_modcmd(modcmd_t cmd, void *arg)
 {
-	int err;
+	int error = 0;
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-		err = config_cfdriver_attach(&savagedrm_cd);
-		if (err)
-			return err;
-		err = config_cfattach_attach("savagedrm", &savagedrm_ca);
-		if (err) {
-			config_cfdriver_detach(&savagedrm_cd);
-			return err;
-		}
-		err = config_cfdata_attach(savagedrm_cfdata, 1);
-		if (err) {
-			config_cfattach_detach("savagedrm", &savagedrm_ca);
-			config_cfdriver_detach(&savagedrm_cd);
-			return err;
-		}
-		return 0;
+#ifdef _MODULE
+		error = config_init_component(cfdriver_ioconf_savagedrm,
+		    cfattach_ioconf_savagedrm, cfdata_ioconf_savagedrm);
+#endif
+		break;
 	case MODULE_CMD_FINI:
-		err = config_cfdata_detach(savagedrm_cfdata);
-		if (err)
-			return err;
-		config_cfattach_detach("savagedrm", &savagedrm_ca);
-		config_cfdriver_detach(&savagedrm_cd);
-		return 0;
+#ifdef _MODULE
+		error = config_fini_component(cfdriver_ioconf_savagedrm,
+		    cfattach_ioconf_savagedrm, cfdata_ioconf_savagedrm);
+#endif
+		break;
 	default:
 		return ENOTTY;
 	}
+
+	return 0;
 }
-#endif /* _MODULE */
 
 #endif
Index: src/sys/external/bsd/drm/dist/bsd-core/sis_drv.c
diff -u src/sys/external/bsd/drm/dist/bsd-core/sis_drv.c:1.5 src/sys/external/bsd/drm/dist/bsd-core/sis_drv.c:1.6
--- src/sys/external/bsd/drm/dist/bsd-core/sis_drv.c:1.5	Sun Dec  6 22:51:25 2009
+++ src/sys/external/bsd/drm/dist/bsd-core/sis_drv.c	Sun Aug 28 16:19:08 2011
@@ -140,62 +140,35 @@
 CFATTACH_DECL_NEW(sisdrm, sizeof(struct drm_device),
     sisdrm_probe, sisdrm_attach, drm_detach, NULL);
 
-#ifdef _MODULE
-
-MODULE(MODULE_CLASS_DRIVER, sisdrm, NULL);
+MODULE(MODULE_CLASS_DRIVER, sisdrm, "drm");
 
-CFDRIVER_DECL(sisdrm, DV_DULL, NULL);
-extern struct cfattach sisdrm_ca;
-static int drmloc[] = { -1 };
-static struct cfparent drmparent = {
-	"drm", "vga", DVUNIT_ANY
-};
-static struct cfdata sisdrm_cfdata[] = {
-	{
-		.cf_name = "sisdrm",
-		.cf_atname = "sisdrm",
-		.cf_unit = 0,
-		.cf_fstate = FSTATE_STAR,
-		.cf_loc = drmloc,
-		.cf_flags = 0,
-		.cf_pspec = &drmparent,
-	},
-	{ NULL }
-};
+#ifdef _MODULE
+#include "ioconf.c"
+#endif
 
 static int
 sisdrm_modcmd(modcmd_t cmd, void *arg)
 {
-	int err;
+	int error = 0;
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-		err = config_cfdriver_attach(&sisdrm_cd);
-		if (err)
-			return err;
-		err = config_cfattach_attach("sisdrm", &sisdrm_ca);
-		if (err) {
-			config_cfdriver_detach(&sisdrm_cd);
-			return err;
-		}
-		err = config_cfdata_attach(sisdrm_cfdata, 1);
-		if (err) {
-			config_cfattach_detach("sisdrm", &sisdrm_ca);
-			config_cfdriver_detach(&sisdrm_cd);
-			return err;
-		}
-		return 0;
+#ifdef _MODULE
+		error = config_init_component(cfdriver_ioconf_sisdrm,
+		    cfattach_ioconf_sisdrm, cfdata_ioconf_sisdrm);
+#endif
+		break;
 	case MODULE_CMD_FINI:
-		err = config_cfdata_detach(sisdrm_cfdata);
-		if (err)
-			return err;
-		config_cfattach_detach("sisdrm", &sisdrm_ca);
-		config_cfdriver_detach(&sisdrm_cd);
-		return 0;
+#ifdef _MODULE
+		error = config_fini_component(cfdriver_ioconf_sisdrm,
+		    cfattach_ioconf_sisdrm, cfdata_ioconf_sisdrm);
+#endif
+		break;
 	default:
 		return ENOTTY;
 	}
+
+	return 0;
 }
-#endif /* _MODULE */
 
 #endif
Index: src/sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c
diff -u src/sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c:1.5 src/sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c:1.6
--- src/sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c:1.5	Sun Dec  6 22:51:25 2009
+++ src/sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c	Sun Aug 28 16:19:08 2011
@@ -142,62 +142,35 @@
 CFATTACH_DECL_NEW(tdfxdrm, sizeof(struct drm_device),
     tdfxdrm_probe, tdfxdrm_attach, drm_detach, NULL);
 
-#ifdef _MODULE
-
-MODULE(MODULE_CLASS_DRIVER, tdfxdrm, NULL);
+MODULE(MODULE_CLASS_DRIVER, tdfxdrm, "drm");
 
-CFDRIVER_DECL(tdfxdrm, DV_DULL, NULL);
-extern struct cfattach tdfxdrm_ca;
-static int drmloc[] = { -1 };
-static struct cfparent drmparent = {
-	"drm", "vga", DVUNIT_ANY
-};
-static struct cfdata tdfxdrm_cfdata[] = {
-	{
-		.cf_name = "tdfxdrm",
-		.cf_atname = "tdfxdrm",
-		.cf_unit = 0,
-		.cf_fstate = FSTATE_STAR,
-		.cf_loc = drmloc,
-		.cf_flags = 0,
-		.cf_pspec = &drmparent,
-	},
-	{ NULL }
-};
+#ifdef _MODULE
+#include "ioconf.c"
+#endif
 
 static int
 tdfxdrm_modcmd(modcmd_t cmd, void *arg)
 {
-	int err;
+	int error = 0;
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-		err = config_cfdriver_attach(&tdfxdrm_cd);
-		if (err)
-			return err;
-		err = config_cfattach_attach("tdfxdrm", &tdfxdrm_ca);
-		if (err) {
-			config_cfdriver_detach(&tdfxdrm_cd);
-			return err;
-		}
-		err = config_cfdata_attach(tdfxdrm_cfdata, 1);
-		if (err) {
-			config_cfattach_detach("tdfxdrm", &tdfxdrm_ca);
-			config_cfdriver_detach(&tdfxdrm_cd);
-			return err;
-		}
-		return 0;
+#ifdef _MODULE
+		error = config_init_component(cfdriver_ioconf_tdfxdrm,
+		    cfattach_ioconf_tdfxdrm, cfdata_ioconf_tdfxdrm);
+#endif
+		break;
 	case MODULE_CMD_FINI:
-		err = config_cfdata_detach(tdfxdrm_cfdata);
-		if (err)
-			return err;
-		config_cfattach_detach("tdfxdrm", &tdfxdrm_ca);
-		config_cfdriver_detach(&tdfxdrm_cd);
-		return 0;
+#ifdef _MODULE
+		error = config_fini_component(cfdriver_ioconf_tdfxdrm,
+		    cfattach_ioconf_tdfxdrm, cfdata_ioconf_tdfxdrm);
+#endif
+		break;
 	default:
 		return ENOTTY;
 	}
+
+	return 0;
 }
-#endif /* _MODULE */
 
 #endif

Index: src/sys/external/bsd/drm/dist/bsd-core/mga_drv.c
diff -u src/sys/external/bsd/drm/dist/bsd-core/mga_drv.c:1.8 src/sys/external/bsd/drm/dist/bsd-core/mga_drv.c:1.9
--- src/sys/external/bsd/drm/dist/bsd-core/mga_drv.c:1.8	Mon Apr  4 20:37:57 2011
+++ src/sys/external/bsd/drm/dist/bsd-core/mga_drv.c	Sun Aug 28 16:19:08 2011
@@ -226,62 +226,35 @@
 CFATTACH_DECL_NEW(mgadrm, sizeof(struct drm_device),
     mgadrm_probe, mgadrm_attach, drm_detach, NULL);
 
-#ifdef _MODULE
-
-MODULE(MODULE_CLASS_DRIVER, mgadrm, NULL);
+MODULE(MODULE_CLASS_DRIVER, mgadrm, "drm");
 
-CFDRIVER_DECL(mgadrm, DV_DULL, NULL);
-extern struct cfattach mgadrm_ca;
-static int drmloc[] = { -1 };
-static struct cfparent drmparent = {
-	"drm", "vga", DVUNIT_ANY
-};
-static struct cfdata mgadrm_cfdata[] = {
-	{
-		.cf_name = "mgadrm",
-		.cf_atname = "mgadrm",
-		.cf_unit = 0,
-		.cf_fstate = FSTATE_STAR,
-		.cf_loc = drmloc,
-		.cf_flags = 0,
-		.cf_pspec = &drmparent,
-	},
-	{ NULL }
-};
+#ifdef _MODULE
+#include "ioconf.c"
+#endif
 
 static int
 mgadrm_modcmd(modcmd_t cmd, void *arg)
 {
-	int err;
+	int error = 0;
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-		err = config_cfdriver_attach(&mgadrm_cd);
-		if (err)
-			return err;
-		err = config_cfattach_attach("mgadrm", &mgadrm_ca);
-		if (err) {
-			config_cfdriver_detach(&mgadrm_cd);
-			return err;
-		}
-		err = config_cfdata_attach(mgadrm_cfdata, 1);
-		if (err) {
-			config_cfattach_detach("mgadrm", &mgadrm_ca);
-			config_cfdriver_detach(&mgadrm_cd);
-			return err;
-		}
-		return 0;
+#ifdef _MODULE
+		error = config_init_component(cfdriver_ioconf_mgadrm,
+		    cfattach_ioconf_mgadrm, cfdata_ioconf_mgadrm);
+#endif
+		break;
 	case MODULE_CMD_FINI:
-		err = config_cfdata_detach(mgadrm_cfdata);
-		if (err)
-			return err;
-		config_cfattach_detach("mgadrm", &mgadrm_ca);
-		config_cfdriver_detach(&mgadrm_cd);
-		return 0;
+#ifdef _MODULE
+		error = config_fini_component(cfdriver_ioconf_mgadrm,
+		    cfattach_ioconf_mgadrm, cfdata_ioconf_mgadrm);
+#endif
+		break;
 	default:
 		return ENOTTY;
 	}
+
+	return error;
 }
-#endif /* _MODULE */
 
 #endif

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.89 src/sys/modules/Makefile:1.90
--- src/sys/modules/Makefile:1.89	Fri Aug 12 08:00:53 2011
+++ src/sys/modules/Makefile	Sun Aug 28 16:19:07 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.89 2011/08/12 08:00:53 mbalmer Exp $
+#	$NetBSD: Makefile,v 1.90 2011/08/28 16:19:07 jmcneill Exp $
 
 .include <bsd.own.mk>
 
@@ -150,6 +150,7 @@
 .endif
 
 .if ${MACHINE_ARCH} == "i386"
+SUBDIR+=	ati_pcigart
 SUBDIR+=	azalia
 SUBDIR+=	compat_freebsd
 SUBDIR+=	compat_ibcs2
@@ -157,12 +158,18 @@
 SUBDIR+=	compat_svr4
 SUBDIR+=	drm
 SUBDIR+=	i915drm
+SUBDIR+=	mach64drm
+SUBDIR+=	mgadrm
 SUBDIR+=	nsclpcsio
-SUBDIR+=	radeondrm
-SUBDIR+=	viadrm
 SUBDIR+=	pad
 SUBDIR+=	padlock
+SUBDIR+=	r128drm
+SUBDIR+=	radeondrm
+SUBDIR+=	savagedrm
+SUBDIR+=	sisdrm
+SUBDIR+=	tdfxdrm
 SUBDIR+=	viac7temp
+SUBDIR+=	viadrm
 .endif
 
 #

Added files:

Index: src/sys/modules/mach64drm/Makefile
diff -u /dev/null src/sys/modules/mach64drm/Makefile:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/mach64drm/Makefile	Sun Aug 28 16:19:07 2011
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1 2011/08/28 16:19:07 jmcneill Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/external/bsd/drm/dist/bsd-core
+.PATH:	${S}/external/bsd/drm/dist/shared-core
+
+KMOD=   mach64drm
+IOCONF=	mach64drm.ioconf
+
+SRCS=	mach64_drv.c
+SRCS+=	mach64_dma.c
+SRCS+=	mach64_irq.c
+SRCS+=	mach64_state.c
+
+CPPFLAGS+=	-I${S}/external/bsd/drm/dist/bsd-core \
+		-I${S}/external/bsd/drm/dist/shared-core
+
+.include <bsd.kmodule.mk>
Index: src/sys/modules/mach64drm/mach64drm.ioconf
diff -u /dev/null src/sys/modules/mach64drm/mach64drm.ioconf:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/mach64drm/mach64drm.ioconf	Sun Aug 28 16:19:07 2011
@@ -0,0 +1,9 @@
+#	$NetBSD: mach64drm.ioconf,v 1.1 2011/08/28 16:19:07 jmcneill Exp $
+
+ioconf mach64drm
+
+include "conf/files"
+
+pseudo-root drm*
+
+mach64drm* at drm?

Index: src/sys/modules/mgadrm/Makefile
diff -u /dev/null src/sys/modules/mgadrm/Makefile:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/mgadrm/Makefile	Sun Aug 28 16:19:07 2011
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1 2011/08/28 16:19:07 jmcneill Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/external/bsd/drm/dist/bsd-core
+.PATH:	${S}/external/bsd/drm/dist/shared-core
+
+KMOD=   mgadrm
+IOCONF=	mgadrm.ioconf
+
+SRCS=	mga_drv.c
+SRCS+=	mga_dma.c
+SRCS+=	mga_irq.c
+SRCS+=	mga_state.c
+SRCS+=	mga_warp.c
+
+CPPFLAGS+=	-I${S}/external/bsd/drm/dist/bsd-core \
+		-I${S}/external/bsd/drm/dist/shared-core
+
+.include <bsd.kmodule.mk>
Index: src/sys/modules/mgadrm/mgadrm.ioconf
diff -u /dev/null src/sys/modules/mgadrm/mgadrm.ioconf:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/mgadrm/mgadrm.ioconf	Sun Aug 28 16:19:07 2011
@@ -0,0 +1,9 @@
+#	$NetBSD: mgadrm.ioconf,v 1.1 2011/08/28 16:19:07 jmcneill Exp $
+
+ioconf mgadrm
+
+include "conf/files"
+
+pseudo-root drm*
+
+mgadrm* at drm?

Index: src/sys/modules/r128drm/Makefile
diff -u /dev/null src/sys/modules/r128drm/Makefile:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/r128drm/Makefile	Sun Aug 28 16:19:08 2011
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1 2011/08/28 16:19:08 jmcneill Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/external/bsd/drm/dist/bsd-core
+.PATH:	${S}/external/bsd/drm/dist/shared-core
+
+KMOD=   r128drm
+IOCONF=	r128drm.ioconf
+
+SRCS=	r128_drv.c
+SRCS+=	r128_cce.c
+SRCS+=	r128_irq.c
+SRCS+=	r128_state.c
+
+CPPFLAGS+=	-I${S}/external/bsd/drm/dist/bsd-core \
+		-I${S}/external/bsd/drm/dist/shared-core
+
+.include <bsd.kmodule.mk>
Index: src/sys/modules/r128drm/r128drm.ioconf
diff -u /dev/null src/sys/modules/r128drm/r128drm.ioconf:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/r128drm/r128drm.ioconf	Sun Aug 28 16:19:08 2011
@@ -0,0 +1,9 @@
+#	$NetBSD: r128drm.ioconf,v 1.1 2011/08/28 16:19:08 jmcneill Exp $
+
+ioconf r128drm 
+
+include "conf/files"
+
+pseudo-root drm*
+
+r128drm* at drm?

Index: src/sys/modules/savagedrm/Makefile
diff -u /dev/null src/sys/modules/savagedrm/Makefile:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/savagedrm/Makefile	Sun Aug 28 16:19:08 2011
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2011/08/28 16:19:08 jmcneill Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/external/bsd/drm/dist/bsd-core
+.PATH:	${S}/external/bsd/drm/dist/shared-core
+
+KMOD=   savagedrm
+IOCONF=	savagedrm.ioconf
+
+SRCS=	savage_drv.c
+SRCS+=	savage_bci.c
+SRCS+=	savage_state.c
+
+CPPFLAGS+=	-I${S}/external/bsd/drm/dist/bsd-core \
+		-I${S}/external/bsd/drm/dist/shared-core
+
+.include <bsd.kmodule.mk>
Index: src/sys/modules/savagedrm/savagedrm.ioconf
diff -u /dev/null src/sys/modules/savagedrm/savagedrm.ioconf:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/savagedrm/savagedrm.ioconf	Sun Aug 28 16:19:08 2011
@@ -0,0 +1,9 @@
+#	$NetBSD: savagedrm.ioconf,v 1.1 2011/08/28 16:19:08 jmcneill Exp $
+
+ioconf savagedrm
+
+include "conf/files"
+
+pseudo-root drm*
+
+savagedrm* at drm?

Index: src/sys/modules/sisdrm/Makefile
diff -u /dev/null src/sys/modules/sisdrm/Makefile:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/sisdrm/Makefile	Sun Aug 28 16:19:08 2011
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2011/08/28 16:19:08 jmcneill Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/external/bsd/drm/dist/bsd-core
+.PATH:	${S}/external/bsd/drm/dist/shared-core
+
+KMOD=   sisdrm
+IOCONF=	sisdrm.ioconf
+
+SRCS=	sis_drv.c
+SRCS+=	sis_ds.c
+SRCS+=	sis_mm.c
+
+CPPFLAGS+=	-I${S}/external/bsd/drm/dist/bsd-core \
+		-I${S}/external/bsd/drm/dist/shared-core
+
+.include <bsd.kmodule.mk>
Index: src/sys/modules/sisdrm/sisdrm.ioconf
diff -u /dev/null src/sys/modules/sisdrm/sisdrm.ioconf:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/sisdrm/sisdrm.ioconf	Sun Aug 28 16:19:08 2011
@@ -0,0 +1,9 @@
+#	$NetBSD: sisdrm.ioconf,v 1.1 2011/08/28 16:19:08 jmcneill Exp $
+
+ioconf sisdrm
+
+include "conf/files"
+
+pseudo-root drm*
+
+sisdrm* at drm?

Index: src/sys/modules/tdfxdrm/Makefile
diff -u /dev/null src/sys/modules/tdfxdrm/Makefile:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/tdfxdrm/Makefile	Sun Aug 28 16:19:08 2011
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile,v 1.1 2011/08/28 16:19:08 jmcneill Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/external/bsd/drm/dist/bsd-core
+.PATH:	${S}/external/bsd/drm/dist/shared-core
+
+KMOD=   tdfxdrm
+IOCONF=	tdfxdrm.ioconf
+
+SRCS=	tdfx_drv.c
+
+CPPFLAGS+=	-I${S}/external/bsd/drm/dist/bsd-core \
+		-I${S}/external/bsd/drm/dist/shared-core
+
+.include <bsd.kmodule.mk>
Index: src/sys/modules/tdfxdrm/tdfxdrm.ioconf
diff -u /dev/null src/sys/modules/tdfxdrm/tdfxdrm.ioconf:1.1
--- /dev/null	Sun Aug 28 16:19:09 2011
+++ src/sys/modules/tdfxdrm/tdfxdrm.ioconf	Sun Aug 28 16:19:08 2011
@@ -0,0 +1,9 @@
+#	$NetBSD: tdfxdrm.ioconf,v 1.1 2011/08/28 16:19:08 jmcneill Exp $
+
+ioconf tdfxdrm
+
+include "conf/files"
+
+pseudo-root drm*
+
+tdfxdrm* at drm?

Reply via email to