Provide a hook for board-specific code to register a device_register()

function.
This commit is contained in:
thorpej 2003-07-04 00:33:20 +00:00
parent 3ce3399c7b
commit 5432dacfcb
2 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.4 2003/06/30 15:17:11 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.5 2003/07/04 00:33:20 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -53,6 +53,8 @@
struct device *booted_device;
int booted_partition;
void (*evbarm_device_register)(struct device *, void *);
/*
* Set up the root device from the boot args
*/
@ -94,4 +96,7 @@ cpu_configure(void)
void
device_register(struct device *dev, void *aux)
{
if (evbarm_device_register != NULL)
(*evbarm_device_register)(dev, aux);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.h,v 1.2 2001/11/07 00:33:23 thorpej Exp $ */
/* $NetBSD: autoconf.h,v 1.3 2003/07/04 00:33:21 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -43,4 +43,7 @@ struct mainbus_attach_args {
const char *ma_name;
};
struct device;
extern void (*evbarm_device_register)(struct device *, void *);
#endif /* _EVBARM_AUTOCONF_H_ */