diff options
| author | thorpej <thorpej@NetBSD.org> | 1999-11-15 23:41:10 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 1999-11-15 23:41:10 +0000 |
| commit | a49d3ecb3365f46837d06be9ab7213ebfe189f97 (patch) | |
| tree | 23746ce13aa8e40b3c0fa8779687f42f5f33f0b9 /sys/dev | |
| parent | 7f7397e6039c73d4dde660f61031373caa75ec28 (diff) | |
Add a macro to generate a class code given class, subclass, and interface.
From UCHIYAMA Yasushi's PCI BIOS patches.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/pcireg.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h index 5431acd9b4f..63ecb7dec8c 100644 --- a/sys/dev/pci/pcireg.h +++ b/sys/dev/pci/pcireg.h @@ -1,4 +1,4 @@ -/* $NetBSD: pcireg.h,v 1.20 1999/09/27 03:20:47 cgd Exp $ */ +/* $NetBSD: pcireg.h,v 1.21 1999/11/15 23:41:10 thorpej Exp $ */ /* * Copyright (c) 1995, 1996, 1999 @@ -119,6 +119,11 @@ typedef u_int8_t pci_revision_t; #define PCI_REVISION(cr) \ (((cr) >> PCI_REVISION_SHIFT) & PCI_REVISION_MASK) +#define PCI_CLASS_CODE(class, subclass, interface) \ + ((((class) & PCI_CLASS_MASK) << PCI_CLASS_SHIFT) | + (((subclass) & PCI_SUBCLASS_MASK) << PCI_SUBCLASS_SHIFT) | + (((interface) & PCI_INTERFACE_MASK) << PCI_INTERFACE_SHIFT)) + /* base classes */ #define PCI_CLASS_PREHISTORIC 0x00 #define PCI_CLASS_MASS_STORAGE 0x01 |
