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 */
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
{
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
);
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
);
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));