Exemplo n.º 1
0
int pci_write_config_word(struct pci_device *pci, unsigned int where, uint16_t value)
{
	dde_kit_pci_writew(PCI_BUS(pci->busdevfn), PCI_SLOT(pci->busdevfn), PCI_FUNC(pci->busdevfn),
	                   where, value);

	return 0;
}
Exemplo n.º 2
0
static int dde_linux26_pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val)
{
    switch(size) {
    case 1:
        dde_kit_pci_writeb(bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), where, val);
        break;
    case 2:
        dde_kit_pci_writew(bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), where, val);
        break;
    case 4:
        dde_kit_pci_writel(bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), where, val);
        break;
    }

    return 0;
}