inw/outw on PowerPC in rtems

Till Straumann strauman at slac.stanford.edu
Fri Mar 21 16:34:28 UTC 2003


gregory.menke at gsfc.nasa.gov wrote:

>I'm putting together a 3c59x PCI driver for RTEMS, its at a point
>where I'm testing it now- but I'm having trouble accessing the card.
>I have the PCI side under control, but the chipset exists in io space,
>and the inw/outw functions don't seem to be doing the right things.
>
 inw accesses ISA I/O space. Unless your
BSP uses the same base address for ISA and PCI I/O space (plus: the 
firmware/BSP
has to configure your card's base address consistently - PreP and CHRP 
should
probably work), you'll have a problem.

I usually prefer in_le32() which gives you more control over the base 
address.
Using in_le32() with a BSP defined base address makes your driver easier to
use on different BSPs.

The respective macros and inlines are defined in 
libcpu/powerpc/shared/include/io.h

HTH
-- Till

>
>I'm about to start the search down into gcc/newlib/rtems and find
>them, but I was hoping someone might have a hint as to their location
>and status before I do so.  Any suggestions welcomed...
>
>Thanks,
>
>Greg
>
>
>






More information about the users mailing list