/* * Functions for accessing PCI configuration space with type 1 accesses
*/ staticint sh4_pci_read(struct pci_bus *bus, unsignedint devfn, int where, int size, u32 *val)
{ struct pci_channel *chan = bus->sysdata; unsignedlong flags;
u32 data;
/* * PCIPDR may only be accessed as 32 bit words, * so we must do byte alignment by hand
*/
raw_spin_lock_irqsave(&pci_config_lock, flags);
pci_write_reg(chan, CONFIG_CMD(bus, devfn, where), SH4_PCIPAR);
data = pci_read_reg(chan, SH4_PCIPDR);
raw_spin_unlock_irqrestore(&pci_config_lock, flags);
/* * Since SH4 only does 32bit access we'll have to do a read, * mask,write operation. * We'll allow an odd byte offset, though it should be illegal.
*/ staticint sh4_pci_write(struct pci_bus *bus, unsignedint devfn, int where, int size, u32 val)
{ struct pci_channel *chan = bus->sysdata; unsignedlong flags; int shift;
u32 data;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.