add a PCI_HDRTYPE_TYPE() macro, to get the 'type' portion of the
headertype register (i.e., not including the 'multifunction' bit).
This commit is contained in:
parent
2102dd3e20
commit
27b21a3a47
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcireg.h,v 1.14 1998/04/14 21:22:44 thorpej Exp $ */
|
||||
/* $NetBSD: pcireg.h,v 1.15 1998/05/18 17:17:04 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Christopher G. Demetriou. All rights reserved.
|
||||
@ -230,6 +230,8 @@ typedef u_int8_t pci_revision_t;
|
||||
#define PCI_HDRTYPE(bhlcr) \
|
||||
(((bhlcr) >> PCI_HDRTYPE_SHIFT) & PCI_HDRTYPE_MASK)
|
||||
|
||||
#define PCI_HDRTYPE_TYPE(bhlcr) \
|
||||
(PCI_HDRTYPE(bhlcr) & 0x7f)
|
||||
#define PCI_HDRTYPE_MULTIFN(bhlcr) \
|
||||
((PCI_HDRTYPE(bhlcr) & 0x80) != 0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user