1 /* $NetBSD: cpu_ofbus.c,v 1.6 2005/12/11 12:19:04 christos Exp $ */
4 __KERNEL_RCSID(0, "$NetBSD: cpu_ofbus.c,v 1.6 2005/12/11 12:19:04 christos Exp $");
8 #include <sys/device.h>
10 #include <machine/cpu.h>
12 #include <dev/ofw/openfirm.h>
15 * int cpu_ofbus_match(struct device *parent, struct cfdata *cf, void *aux)
17 * Probe for the main cpu. Currently all this does is return 1 to
18 * indicate that the cpu was found.
22 cpu_ofbus_match(struct device
*parent
, struct cfdata
*cf
, void *aux
)
24 struct ofbus_attach_args
*aa
= aux
;
27 if (OF_getprop(aa
->oba_phandle
, "device_type", buf
, sizeof(buf
)) < 0)
29 if (strcmp("cpu", buf
))
35 * void cpu_ofbus_attach(struct device *parent, struct device *dev, void *aux)
41 cpu_ofbus_attach(struct device
*parent
, struct device
*self
, void *aux
)
46 CFATTACH_DECL(cpu_ofbus
, sizeof(struct device
),
47 cpu_ofbus_match
, cpu_ofbus_attach
, NULL
, NULL
);