In message <[EMAIL PROTECTED]> "Gary T. Corcoran" writes:
: At first I thought "res1" would be the base address I was looking for.
: However, it appears (boy I wish this stuff was documented!) that
: bus_alloc_resource returns a "struct resource *".  But I looked and
: looked and I can't find the definition of what a "struct resource" is.
: So I'm still in the dark as to how to get my I/O base address from
: the pointer returned by the bus_alloc_resource.  How do I do that?

bt = rman_get_bustag(res1);
bh = rman_get_bushandle(res1);

bus_space_read_{1,2,4}(bt, bh, offset)
bus_space_write_{1,2,4}(bt, bh, offset, value)

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to