This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PCI - address management


This is a proposal - it works for me and I think it's safe in general.  
The problem is that I have a PCI device which powers up "dumb", i.e. it 
supports a number of PCI regions, but *only* after being initialized 
programmatically.  Once this initialization takes place, it acts 
normally.  So, my problem was how to call the PCI library and
have it assign resources "sanely".  What I came up with is to let
the "get_device_info" function remember the upper limit of the
I/O and memory addresses that it sees (currently, only the allocator
keeps track of these).  This way, the device can be configured
safely.  This also works properly with a "hot" bus - calling
the initial pci_configure_bus() will only end up calculating
what address resources are free.

I realize that this is an anomaly, but it's something I think
we've needed for a while. 

Attached is my patch that solves this, which I will commit
soon if there is no major uproar :-)

-- 
------------------------------------------------------------
Gary Thomas                 |
MLB Associates              |  Consulting for the
+1 (970) 229-1963           |    Embedded world
http://www.mlbassoc.com/    |
email: <gary at mlbassoc dot com>  |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------

Attachment: diffs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]