/* * Note: the caller has already checked that offset is * suitably aligned and that len is 1, 2 or 4.
*/
cfg_data = hose->cfg_data + (offset & 3); switch (len) { case 1:
*val = in_8(cfg_data); break; case 2:
*val = in_le16(cfg_data); break; default:
*val = in_le32(cfg_data); break;
} return PCIBIOS_SUCCESSFUL;
}
int indirect_read_config(struct pci_bus *bus, unsignedint devfn, int offset, int len, u32 *val)
{ struct pci_controller *hose = pci_bus_to_host(bus);
/* suppress setting of PCI_PRIMARY_BUS */ if (hose->indirect_type & PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) if ((offset == PCI_PRIMARY_BUS) &&
(bus->number == hose->first_busno))
val &= 0xffffff00;
/* Workaround for PCI_28 Errata in 440EPx/GRx */ if ((hose->indirect_type & PPC_INDIRECT_TYPE_BROKEN_MRM) &&
offset == PCI_CACHE_LINE_SIZE) {
val = 0;
}
/* * Note: the caller has already checked that offset is * suitably aligned and that len is 1, 2 or 4.
*/
cfg_data = hose->cfg_data + (offset & 3); switch (len) { case 1:
out_8(cfg_data, val); break; case 2:
out_le16(cfg_data, val); break; default:
out_le32(cfg_data, val); break;
} return PCIBIOS_SUCCESSFUL;
}
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.