Example #1
0
int pci_read_config_word(struct pci_device *pci, unsigned int where, uint16_t *value)
{
	dde_kit_pci_readw(PCI_BUS(pci->busdevfn), PCI_SLOT(pci->busdevfn), PCI_FUNC(pci->busdevfn),
	                  where, value);

	return 0;
}
Example #2
0
static int dde_linux26_pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val)
{
    switch(size) {
    case 1:
        dde_kit_pci_readb(bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), where,  (u8 *)val);
        break;
    case 2:
        dde_kit_pci_readw(bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), where, (u16 *)val);
        break;
    case 4:
        dde_kit_pci_readl(bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), where,        val);
        break;
    }

    return 0;
}