Subject: Re: com rumblings...
To: None <>
From: Izumi Tsutsui <>
List: tech-kern
Date: 06/17/2006 01:30:21 wrote:

> > Hmm, my intention to create fake softcs is to make
> > CSR_{READ,WRITE} macros take softc as most drivers do.
> > If it's okay to make them take struct com_regs, faked one
> > isn't needed. (I don't have strong insistence which is better)
> >   
> FWIW, if I were dealing with a sane driver where nearly all routines had
> the softc passed in, I would have made CSR_READ/WRITE take that softc. 
> But since there were a number of functions that operate without a softc
> (basically the console stuff), I decided it was better to create a
> structure that had only the data in it needed for the console.

Okay, the problem is that most macros/functions to read/write
registers in each driver use bus_space stuff stored in softc,
but consinit related functions have to use it before the device
is attached. There are a bunch of ugliness around consinit stuff
(especially on framebuffers), so I thought faking softc is
just one of them :-)

BTW, even without fake softcs I still think we can avoid
all MD changes.
Izumi Tsutsui