[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Driver Devel: Cardbus BAR Mapping/PCI Differences
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: Driver Devel: Cardbus BAR Mapping/PCI Differences
- From: Phil Quinton <pquinton_(_at_)_softhome_(_dot_)_net>
- Date: Fri, 17 Mar 2006 10:24:45 -0000
Hi,
I'm currently trying to migrate the satalink driver to Cardbus on
NetBSD, and I'm having difficulty getting detailed answers from their
mailling list and I noticed OpenBSD Cardbus code is based on the NetBSD
code but more upto date. So here goes with my questions:
1) When a Cardbus driver maps a BAR with Cardbus_mapreg_map, the
returned bus_addr is later on OR'd with say CARDBUS_MAPREG_TYPE_MEM as
used in the mapreg_map call, and Cardbus_conf_write'n back to the BAR.
Why?
2) Also, how would this work with a card that uses two BAR's.. satalink
uses BA5 and the pciide code uses BA4 (I think). Would I need to write
back the BAR's bus_addr, once mapped, for both?
3) I also notice that which ever CARDBUS_MAPREG_TYPE(IO MEM) is used as
a guide to "make sure the right access type is on the Cardbus bridge"
(as per driver comments). What if I wanted to map IO on one BAR and MEM
on another.. how does this effect the value written to the bridge, using
(*ct->ct_cf->cardbus_ctrl)?
Any advice is greatly appreciated,
Thanks for your time.
Phil Quinton.
Visit your host, monkey.org