Re: how to write info to a pci device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I use Denx Embedded Linux on a PowerPC (MPC5200), and I use big endian direct access functions such as in_8, in_be16, in_be32, out_8, out_be16 and out_be32. Having the device mapped into memory, all I have to do is to use the right function in relation to the number of bits I want to write on it.


Bora SAHIN wrote:

Eric> outb seem to be Intel specific and writeb need to map I/0 memory with ioremap

Eric> Which method is more standard for a pci device (portable)?

I think writeb() is more portable because e.g. in a PowerPC system you cant use inb(), outb()! Also
PowerPC is big endian, PCI is little endian. Sometimes you may have to use byte/word/double
word(Intel terminology) reverse inst. to access it in a PPC system. This functions can do it
magically for you!

--
Sauro Salomoni

Ztec - Z Tecnologia em Comunicação
www.ztec.com.br

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux