newbus ioport usage
Nate Lawson
nate at root.org
Mon Jan 26 17:25:00 PST 2004
On Mon, 26 Jan 2004, M. Warner Losh wrote:
> In message: <20040126165523.W30461 at root.org>
> Nate Lawson <nate at root.org> writes:
> : Ok, I'm doing the set/alloc and it works. However, one weird thing. If I
> : allocate all ports at boot time, it succeeds. My driver goes through
> : multiple release/allocate cycles and it all works as expected. However if
> : I boot and attach to only one of the registers, subsequent attempts to
> : attach the second one fail. The resources are 2 IO ports, 0x101c and
> : 0x101d. Both are 1 byte.
>
> Deos devinfo -r show any cause for the problem? Maybe you aren't
> releasing them properly? Also, why not allocate them as a block of 2?
I'll look into that. I can't allocate them in one block as they come and
go, based on system state. In one state, one is available and in another,
both are available. If I boot while only one is available and then you
plug in the AC adapter, new ones appear. This is acpi, btw.
-Nate
More information about the freebsd-arch
mailing list