/* $NetBSD: cpu_ofbus.c,v 1.1 2001/05/09 15:19:00 matt Exp $ */ #include #include #include #include #include /* * int cpu_ofbus_match(struct device *parent, struct cfdata *cf, void *aux) * * Probe for the main cpu. Currently all this does is return 1 to * indicate that the cpu was found. */ static int cpu_ofbus_match(parent, cf, aux) struct device *parent; struct cfdata *cf; void *aux; { struct ofbus_attach_args *aa = aux; char buf[32]; if (OF_getprop(aa->oba_phandle, "device_type", buf, sizeof(buf)) < 0) return (0); if (strcmp("cpu", buf)) return (0); return(1); } /* * void cpu_ofbus_attach(struct device *parent, struct device *dev, void *aux) * * Attach the main cpu */ static void cpu_ofbus_attach(parent, self, aux) struct device *parent; struct device *self; void *aux; { cpu_attach(self); } struct cfattach cpu_ofbus_ca = { sizeof(struct device), cpu_ofbus_match, cpu_ofbus_attach };