Module Name: src Committed By: reinoud Date: Sat May 10 20:12:16 UTC 2014
Modified Files: src/sys/arch/evbarm/evbarm: autoconf.c src/sys/arch/evbarm/include: autoconf.h Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/evbarm/autoconf.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/include/autoconf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/evbarm/evbarm/autoconf.c diff -u src/sys/arch/evbarm/evbarm/autoconf.c:1.16 src/sys/arch/evbarm/evbarm/autoconf.c:1.17 --- src/sys/arch/evbarm/evbarm/autoconf.c:1.16 Mon Jan 21 20:20:32 2013 +++ src/sys/arch/evbarm/evbarm/autoconf.c Sat May 10 20:12:16 2014 @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v #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 @@ cpu_configure(void) 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); +} + Index: src/sys/arch/evbarm/include/autoconf.h diff -u src/sys/arch/evbarm/include/autoconf.h:1.7 src/sys/arch/evbarm/include/autoconf.h:1.8 --- src/sys/arch/evbarm/include/autoconf.h:1.7 Sat Oct 27 17:17:48 2012 +++ src/sys/arch/evbarm/include/autoconf.h Sat May 10 20:12:16 2014 @@ -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 @@ struct mainbus_attach_args { #endif extern void (*evbarm_device_register)(device_t, void *); +extern void (*evbarm_device_register_post_config)(device_t, void *); #endif /* _EVBARM_AUTOCONF_H_ */