Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm Define and implement device_register_post_co...



details:   https://anonhg.NetBSD.org/src/rev/2d62010fa693
branches:  trunk
changeset: 329138:2d62010fa693
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Sat May 10 20:12:16 2014 +0000

description:
Define and implement device_register_post_config() hook analog to the
device_register() hook.

Already found on sparc64 and librump. Tested compilation and running of
machines with and without the hook defined.

diffstat:

 sys/arch/evbarm/evbarm/autoconf.c  |  15 ++++++++++++---
 sys/arch/evbarm/include/autoconf.h |   3 ++-
 2 files changed, 14 insertions(+), 4 deletions(-)

diffs (59 lines):

diff -r 69d64c0db71e -r 2d62010fa693 sys/arch/evbarm/evbarm/autoconf.c
--- a/sys/arch/evbarm/evbarm/autoconf.c Sat May 10 19:31:00 2014 +0000
+++ b/sys/arch/evbarm/evbarm/autoconf.c Sat May 10 20:12:16 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.16 2013/01/21 20:20:32 jakllsch Exp $   */
+/*     $NetBSD: autoconf.c,v 1.17 2014/05/10 20:12:16 reinoud Exp $    */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.16 2013/01/21 20:20:32 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2014/05/10 20:12:16 reinoud Exp $");
 
 #include "opt_md.h"
 
@@ -48,6 +48,7 @@
 #include <machine/bootconfig.h>
 
 void   (*evbarm_device_register)(device_t, void *);
+void   (*evbarm_device_register_post_config)(device_t, void *);
 
 #ifndef MEMORY_DISK_IS_ROOT
 static void get_device(char *name);
@@ -141,7 +142,15 @@
 void
 device_register(device_t dev, void *aux)
 {
-
        if (evbarm_device_register != NULL)
                (*evbarm_device_register)(dev, aux);
 }
+
+
+void
+device_register_post_config(device_t dev, void *aux)
+{
+       if (evbarm_device_register_post_config != NULL)
+               (*evbarm_device_register_post_config)(dev, aux);
+}
+
diff -r 69d64c0db71e -r 2d62010fa693 sys/arch/evbarm/include/autoconf.h
--- a/sys/arch/evbarm/include/autoconf.h        Sat May 10 19:31:00 2014 +0000
+++ b/sys/arch/evbarm/include/autoconf.h        Sat May 10 20:12:16 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.h,v 1.7 2012/10/27 17:17:48 chs Exp $ */
+/*     $NetBSD: autoconf.h,v 1.8 2014/05/10 20:12:16 reinoud Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -39,5 +39,6 @@
 #endif
 
 extern void (*evbarm_device_register)(device_t, void *);
+extern void (*evbarm_device_register_post_config)(device_t, void *);
 
 #endif /* _EVBARM_AUTOCONF_H_ */



Home | Main Index | Thread Index | Old Index