/*
 * FIXME:  this file should really be generated from config.
 * For now, we hand craft all this stuff (painfully).
 */
#include <sys/param.h>
#include <sys/conf.h>
#include <sys/device.h>
#include <sys/mount.h>

struct cfdriver mainbus_cd = {
	NULL, "mainbus", DV_DULL
};


struct cfdriver pci_cd = {
	NULL, "pci", DV_DULL
};

struct cfdriver de_cd = {
	NULL, "de", DV_IFNET
};

struct cfdriver fxp_cd = {
	NULL, "fxp", DV_IFNET
};

extern struct cfattach mainbus_ca;
extern struct cfattach pci_ca;
extern struct cfattach de_ca;
extern struct cfattach fxp_ca;

/* locators */
static int loc[3] = {
	-1, -1, -1,
};

const char *nullcf_locnames[] = {NULL};
const char *pcibuscf_locnames[] = { "bus", NULL};
const char *pcicf_locnames[] = { "dev", "function", NULL};
const char *mainbuscf_locnames[] = { "base", "dack", "irq", NULL};

/* parent vectors */
static short pv[3] = {
	1, -1, 0, 
};

#define NORM FSTATE_NOTFOUND
#define STAR FSTATE_STAR

struct cfdata cfdata[] = {
    /* attachment       driver        unit state   loc    flags   parents
       locnames */
    {&mainbus_ca,	&mainbus_cd,	 0, NORM, loc,        0,    pv+ 1,
     nullcf_locnames},
    {&pci_ca,		&pci_cd,	 0, NORM, loc+2,      0,    pv+ 2,
     pcibuscf_locnames},
    {&de_ca,		&de_cd,		 0, STAR, loc+1,      0,    pv+ 0,
     pcicf_locnames},
    {&fxp_ca,		&fxp_cd,	 0, STAR, loc+1,      0,    pv+ 0,
     pcicf_locnames},
    {0}
};

short cfroots[] = {
	 0 /* mainbus0 */,
	-1
};

