Subject: Re: pcmcia power management hooks for com device (was Re: NetBSD master CVS tree commits)
To: None <perry@piermont.com>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 10/04/1997 11:26:18
On Sat, 04 Oct 1997 13:35:42 -0400
"Perry E. Metzger" <perry@piermont.com> wrote:
> enami tsugutomo writes:
> > Where is appropriate place to put power management staff for com
> > device?
>
> I believe they did that already for PCMCIA.
As far as I know, the power management changes to the "com" driver have
_NOT_ been committed to the marc-pcmcia branch.
Firstly, you need to make sure there is a call to pcmcia_function_disable()
at the end of com_pcmcia_attach().
Then, you need a pcmcia_function_enable() on first open, and
a pcmcia_function_disable() in the close routine (the close is called
on the _last_ close of the device).
Also, you need a check at the top of the hardware interrupt routine
that the device is enabled ... if not, you need to return "not my interrupt",
else you'll lose when you attempt to read the hardware registers :-)
Those should be the only places for pcmcia serial ports; I don't think you
can use them as the console...
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: +1 408 866 1912
NAS: M/S 258-6 Work: +1 415 604 0935
Moffett Field, CA 94035 Pager: +1 415 428 6939