Hi, i'm currently porting QuanCom PWDOG1 Watchdog card to FreeBSD, (you
can find the current code at http://chiakotay.nexlab.it/acaro/pwdog.c).
I defined my softc struct:
struct pwdog1_softc {
bus_space_tag_t bst;
bus_space_handle_t bsh;
struct resource *res;
int rid;
};
In my attach() function i do NewBus initialization:
sc = (struct pwdog1_softc *) device_get_softc(dev);
sc->rid = 0;
sc->res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->rid, 0, ~0, 1, RF_ACTIVE);
sc->bst = rman_get_bustag(sc->res);
sc->bsh = rman_get_bushandle(sc->res);
but the problem is that bus_alloc_resource() returns NULL. I don't have
a clue about WHY it should. It's running on: FreeBSD 5.2.1-RELEASE with
GENERIC kernel in a dual pentium 200MMX.
Thanks in advance
--
Claudio "thefly" Martella
[EMAIL PROTECTED]
GNU/PG keyid: 0x8EA95625
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"