Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / acorn26 / podulebus / powerrom.c
blob9a393da34892b8da32d6b00ac51e1beb46497cda
1 /* $NetBSD: powerrom.c,v 1.4 2002/10/02 03:25:47 thorpej Exp $ */
3 /* Test driver to see if we can talk to PowerROMs */
5 #include <sys/param.h>
7 __KERNEL_RCSID(0, "$NetBSD: powerrom.c,v 1.4 2002/10/02 03:25:47 thorpej Exp $");
9 #include <sys/device.h>
10 #include <sys/systm.h>
11 #include <dev/podulebus/podulebus.h>
12 #include <dev/podulebus/podules.h>
14 struct powerrom_softc {
15 device_t sc_dev;
18 int powerrom_match(device_t, cfdata_t, void *);
19 void powerrom_attach(device_t, device_t, void *);
21 CFATTACH_DECL_NEW(powerrom, sizeof(struct powerrom_softc),
22 powerrom_match, powerrom_attach, NULL, NULL);
24 int
25 powerrom_match(device_t parent, cfdata_t cf, void *aux)
27 struct podulebus_attach_args *pa = aux;
29 return (pa->pa_product == PODULE_ALSYSTEMS_SCSI);
32 void
33 powerrom_attach(device_t parent, device_t self, void *aux)
35 struct podulebus_attach_args *pa = aux;
37 if (podulebus_initloader(pa) == 0)
38 aprint_normal_dev(self, "card id = 0x%x",
39 podloader_callloader(pa, 0, 0));
40 aprint_normal("\n");