Subject: Re: When to bus_space_map()
To: Steven Grunza <>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: tech-kern
Date: 03/15/2001 16:25:06
Steven Grunza <> writes:

> When should I setup these bus_space() mappings and when should I unmap
> them?  The logical choices seem to be in either:

> A)
> Use _attach() to bus_space_map()  /  never call bus_space_unmap()

> I like choice (B) better since it would seem to allow better support for
> hot-swapping the board (for the cPCI version).

You can have a _detach() routine as well as an _attach() routine, and
perform the unmaps in the _detach() routine. Look at a PCMCIA driver
for examples.

        - Nathan