Date: Wed, 11 Apr 2007 21:24:54 +1000 From: Alan Garfield <alan@fromorbit.com> To: takawata@jp.freebsd.org Cc: hackers@freebsd.org Subject: Re: Resources and ACPI Message-ID: <461CC586.5060507@fromorbit.com> In-Reply-To: <200704110951.l3B9p4hT024402@sana.init-main.com> References: <200704110951.l3B9p4hT024402@sana.init-main.com>
next in thread | previous in thread | raw e-mail | index | archive | help
takawata@jp.freebsd.org wrote: >> If the resources are allocated how do I access/see them? > > sc->sc_rid1 = 0; > sc->sc_res1 = bus_alloc_resource_any(self, SYS_RES_IOPORT, &sc->sc_rid, RF_ACTIVE); > sc->sc_rid2 = 0; > sc->sc_res2 = bus_alloc_resource_any(self, SYS_RES_IOPORT, &sc->sc_rid, RF_ACTIVE); > value_af = bus_space_read_8(rman_get_bustag(sc->sc_res2), rman_get_bushandle(sc->sc_res2), 1); Thanks for this, but how does on tell which resources have been allocated to which other than manually specifying them with bus_alloc_resource()? This is the bit that's confusing me, it seem like magic happens but I need to know which resource is which. Many thanks in advance! Alan.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?461CC586.5060507>