Subject: Re: Cardbus BAR Mapping questions/PCI differences
To: None <tech-kern@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-kern
Date: 03/16/2006 00:59:52
On Wed, Mar 15, 2006 at 08:03:32AM -0000, Phil Quinton wrote:
> In article <44170BA8.3090000@tadpole.com>, garrett_damore@tadpole.com 
> says...
> 
> > This a bit in the mapping register that determines whether the mapping
> > is for IO space or memory space.
> > 
> > I'm surprised that the "ath" driver has to know about this detail though
> > -- it should be handled automatically as part of Cardbus_mapreg_map.
> 
> That's the thing, ALL the drivers in dev/cardbus do it.. After they 
> Cardbus_mapreg_map, they take the bus_addr_t * returned from the map 
> command.. OR it with the memory type MEM or IO and then 
> Cardbus_conf_write it back.
> 
> I Don't understand why.

I figure they do it either because of a defect in the Cardbus API, or
because the Cardbus front-ends are "cut & paste" copies of each other.
We badly need to extract a subroutine or three from the sources in
dev/cardbus/.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933