Rename the machine-dependent autoconfiguration entry point `cpu_configure()',

and rename config_init() to configure() and call cpu_configure() from there.
This commit is contained in:
thorpej 1999-09-15 18:10:33 +00:00
parent 252971afdb
commit 3b01d1b872
25 changed files with 65 additions and 59 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.34 1999/06/07 20:16:09 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.35 1999/09/15 18:10:35 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@ -46,7 +46,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.34 1999/06/07 20:16:09 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.35 1999/09/15 18:10:35 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -70,11 +70,11 @@ void parse_prom_bootdev __P((void));
int atoi __P((char *));
/*
* configure:
* cpu_configure:
* called at boot time, configure all devices on system
*/
void
configure()
cpu_configure()
{
parse_prom_bootdev();

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.64 1999/06/07 20:16:10 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.65 1999/09/15 18:10:35 thorpej Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -56,7 +56,7 @@ u_long boot_partition;
* called at boot time, configure all devices on system
*/
void
configure()
cpu_configure()
{
int s;
#ifdef DEBUG_KERNEL_START

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.30 1999/06/07 20:16:10 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.31 1999/09/15 18:10:35 thorpej Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -169,14 +169,14 @@ cpu_rootconf()
/*
* void configure()
* void cpu_configure()
*
* Configure all the root devices
* The root devices are expected to configure their own children
*/
void
configure()
cpu_configure()
{
/*
* Configure all the roots.

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.29 1999/06/07 20:16:10 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.30 1999/09/15 18:10:36 thorpej Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@ -55,7 +55,7 @@ int atari_realconfig;
* called at boot time, configure all devices on system
*/
void
configure()
cpu_configure()
{
extern int atari_realconfig;

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.3 1999/08/23 22:29:37 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.4 1999/09/15 18:10:36 thorpej Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -71,7 +71,7 @@ extern int cold; /* cold start flag initialized in locore.s */
* Determine i/o configuration for a machine.
*/
void
configure()
cpu_configure()
{
/* startrtclock(); */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.47 1999/08/23 22:29:38 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.48 1999/09/15 18:10:36 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -258,7 +258,7 @@ mainbussearch(parent, cf, aux)
* Determine the device configuration for the running system.
*/
void
configure()
cpu_configure()
{
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.39 1999/08/23 22:29:38 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.40 1999/09/15 18:10:36 thorpej Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -81,7 +81,7 @@ extern int cold; /* cold start flag initialized in locore.s */
* Determine i/o configuration for a machine.
*/
void
configure()
cpu_configure()
{
startrtclock();

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.51 1999/06/07 20:16:11 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.52 1999/09/15 18:10:37 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@ -77,11 +77,11 @@ static void findbootdev __P((void));
static int target_to_unit __P((u_long, u_long, u_long));
/*
* configure:
* cpu_configure:
* called at boot time, configure all devices on the system
*/
void
configure()
cpu_configure()
{
extern int cold;

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.13 1999/06/24 08:14:48 tsubai Exp $ */
/* $NetBSD: autoconf.c,v 1.14 1999/09/15 18:10:37 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -69,7 +69,7 @@ u_int *heathrow_FCR = NULL;
* Determine device configuration for a machine.
*/
void
configure()
cpu_configure()
{
int node, reg[5];
int msr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.21 1999/08/23 22:29:39 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.22 1999/09/15 18:10:37 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -179,7 +179,7 @@ mainbus_print(aux, cp)
* Determine mass storage and memory configuration for a machine.
*/
void
configure()
cpu_configure()
{
booted_device = NULL; /* set by device drivers (if found) */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.6 1999/08/23 22:29:39 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.7 1999/09/15 18:10:38 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -89,7 +89,7 @@ void findroot __P((struct device **, int *));
* for attached scsi devices.
*/
void
configure()
cpu_configure()
{
int s;
extern struct idrom idrom;

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.5 1999/08/23 22:29:39 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.6 1999/09/15 18:10:38 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -150,7 +150,7 @@ mainbus_print(aux, cp)
* Determine mass storage and memory configuration for a machine.
*/
void
configure()
cpu_configure()
{
booted_device = NULL; /* set by device drivers (if found) */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.6 1999/06/07 20:16:12 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.7 1999/09/15 18:10:40 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -51,7 +51,7 @@ int booted_partition; /* ...and partition on that device */
* Determine device configuration for a machine.
*/
void
configure()
cpu_configure()
{
if (config_rootfound("mainbus", NULL) == NULL)
panic("configure: mainbus not configured");

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.29 1999/06/07 20:16:12 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.30 1999/09/15 18:10:40 thorpej Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -67,7 +67,7 @@ struct device *booted_device; /* boot device, set by dk_establish */
* Determine i/o configuration for a machine.
*/
void
configure()
cpu_configure()
{
extern int safepri;
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.9 1999/06/07 20:16:12 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.10 1999/09/15 18:10:41 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -78,7 +78,7 @@ int getpno __P((char **cp));
* This is done at boot time.
*/
void
configure()
cpu_configure()
{
(void)splhigh(); /* To be really shure.. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.38 1999/08/23 22:29:40 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.39 1999/09/15 18:10:41 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.38 1999/08/23 22:29:40 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.39 1999/09/15 18:10:41 thorpej Exp $");
/*
* Setup the system to run on the current machine.
@ -97,7 +97,7 @@ void findroot __P((struct device **, int *));
* for attached scsi devices.
*/
void
configure()
cpu_configure()
{
/* Kick off autoconfiguration. */
(void)splhigh();

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.2 1999/09/14 10:22:36 tsubai Exp $ */
/* $NetBSD: autoconf.c,v 1.3 1999/09/15 18:10:41 thorpej Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -77,7 +77,7 @@ extern int cold; /* cold start flag initialized in locore.s */
* Determine i/o configuration for a machine.
*/
void
configure()
cpu_configure()
{
startrtclock();

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.121 1999/08/23 22:29:40 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.122 1999/09/15 18:10:42 thorpej Exp $ */
/*
* Copyright (c) 1996
@ -768,7 +768,7 @@ st_crazymap(n)
* command.
*/
void
configure()
cpu_configure()
{
extern struct user *proc0paddr; /* XXX see below */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.20 1999/08/23 22:29:40 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.21 1999/09/15 18:10:42 thorpej Exp $ */
/*
* Copyright (c) 1996
@ -466,7 +466,7 @@ st_crazymap(n)
* command.
*/
void
configure()
cpu_configure()
{
#if 0
extern struct user *proc0paddr; /* XXX see below */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.52 1999/06/07 20:16:13 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.53 1999/09/15 18:10:43 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@ int cold = 1;
* Called by machdep.c: cpu_startup()
*/
void
configure()
cpu_configure()
{
/* General device autoconfiguration. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.42 1999/08/08 16:33:13 ragge Exp $ */
/* $NetBSD: autoconf.c,v 1.43 1999/09/15 18:10:43 thorpej Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@ -66,7 +66,7 @@ struct device *booted_from;
#define MAINBUS 0
void
configure()
cpu_configure()
{
if (config_rootfound("mainbus", NULL) == NULL)

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.19 1999/06/07 20:16:14 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.20 1999/09/15 18:10:43 thorpej Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@ -67,7 +67,7 @@ int x68k_realconfig;
* called at boot time, configure all devices on system
*/
void
configure()
cpu_configure()
{
extern int x68k_realconfig;

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_main.c,v 1.154 1999/07/22 21:08:31 thorpej Exp $ */
/* $NetBSD: init_main.c,v 1.155 1999/09/15 18:10:34 thorpej Exp $ */
/*
* Copyright (c) 1995 Christopher G. Demetriou. All rights reserved.
@ -214,8 +214,7 @@ main()
#if NRND > 0
rnd_init();
#endif
config_init(); /* init autoconfiguration data structures */
configure(); /* ...and configure the hardware */
configure(); /* configure the hardware */
/*
* Initialize process and pgrp structures.

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_autoconf.c,v 1.40 1999/06/20 00:51:37 ragge Exp $ */
/* $NetBSD: subr_autoconf.c,v 1.41 1999/09/15 18:10:34 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@ -91,15 +91,23 @@ struct devicelist alldevs; /* list of all devices */
struct evcntlist allevents; /* list of all event counters */
/*
* Initialize autoconfiguration data structures.
* Configure the system's hardware.
*/
void
config_init()
configure()
{
TAILQ_INIT(&deferred_config_queue);
TAILQ_INIT(&alldevs);
TAILQ_INIT(&alldevs);
TAILQ_INIT(&allevents);
/*
* Do the machine-dependent portion of autoconfiguration. This
* sets the configuration machinery here in motion by "finding"
* the root bus. When this function returns, we expect interrupts
* to be enabled.
*/
cpu_configure();
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: device.h,v 1.32 1999/06/20 00:51:37 ragge Exp $ */
/* $NetBSD: device.h,v 1.33 1999/09/15 18:10:33 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@ -171,8 +171,7 @@ struct pdevinit {
extern struct devicelist alldevs; /* list of all devices */
extern struct evcntlist allevents; /* list of all event counters */
void configure __P((void)); /* machine-dependent */
void config_init __P((void));
void configure __P((void));
struct cfdata *config_search __P((cfmatch_t, struct device *, void *));
struct cfdata *config_rootsearch __P((cfmatch_t, char *, void *));
struct device *config_found_sm __P((struct device *, void *, cfprint_t,