This is the mail archive of the ecos-discuss@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]

Re: Configuring PCI devices


On Wed, 2004-05-26 at 00:11, David Brennan wrote:
> I am trying to write a "device driver" for the Tundra Universe II chip. 
> I am using a "public" linux driver for guidance. I was trying to use 
> cyg_pci_read_uint32 to read the custom configuration registers for this 
> chip, but found that was not working. On further investigation, I 
> realized that offset is only a cyg_uint8. Since I am trying to access 
> registers with an offset greater than 256, what is the preferred method 
> of accessing these?
> 
> The Linux code dereferences from the bar[0] address directly, then adds 
> the offset, and reads the value with a readl macro call. Is that 
> "acceptable" under eCos. I am writing this for a i386 pc platform. But 
> if its possible to make it "cross platformable" I'm willing to work 
> within the eCos HAL restrictions.

You seem to have some confusion here.  cyg_pci_read_uint32() and 
brethren are for accessing PCI configuration registers.  If you want to
access PCI memory or I/O space, use the BAR[x] pointers.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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