blob: 4ec20e17d25bb659f2b1b9ebc33566df59a36cbb [file] [log] [blame]
#ifndef ASM_PCI_H
#define ASM_PCI_H
/*
* Copyright (C) 2013, Red Hat Inc, Michael S. Tsirkin <mst@redhat.com>
*
* This work is licensed under the terms of the GNU LGPL, version 2.
*/
#include "libcflat.h"
#include "pci.h"
#include "x86/io.h"
static inline uint32_t pci_config_read(pcidevaddr_t dev, uint8_t reg)
{
uint32_t index = reg | (dev << 8) | (0x1 << 31);
outl(index, 0xCF8);
return inl(0xCFC);
}
#endif