xref: /netbsd/sys/arch/bebox/bebox/cpu.c (revision bf9ec67e)
1 static int cpumatch(struct device *, struct cfdata *, void *);
2 static void cpuattach(struct device *, struct device *, void *);
3 
4 struct cfattach cpu_ca = {
5 	sizeof(struct device), cpumatch, cpuattach
6 };
7 
8 extern struct cfdriver cpu_cd;
9 
10 int
11 cpumatch(struct device *parent, struct cfdata *cf, void *aux)
12 {
13 	struct mainbus_attach_args *mba = aux;
14 
15 	if (strcmp(mba->mba_name, cpu_cd.cd_name) != 0)
16 		return 0;
17 
18 	if (cpu_info_store.ci_dev != NULL)
19 		return 0;
20 
21 	return 1;
22 }
23 
24 void
25 cpuattach(struct device *parent, struct device *self, void *aux)
26 {
27 	(void) cpu_attach_common(self, 0);
28 }
29