Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/cardbus Add a number of CARDBUS_CLASS defines. Copi...
details: https://anonhg.NetBSD.org/src/rev/04737cb2011d
branches: trunk
changeset: 477203:04737cb2011d
user: augustss <augustss%NetBSD.org@localhost>
date: Fri Oct 15 11:10:58 1999 +0000
description:
Add a number of CARDBUS_CLASS defines. Copied from PCI_CLASS.
diffstat:
sys/dev/cardbus/cardbusvar.h | 45 +++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 44 insertions(+), 1 deletions(-)
diffs (59 lines):
diff -r 4e97ce858a49 -r 04737cb2011d sys/dev/cardbus/cardbusvar.h
--- a/sys/dev/cardbus/cardbusvar.h Fri Oct 15 10:59:56 1999 +0000
+++ b/sys/dev/cardbus/cardbusvar.h Fri Oct 15 11:10:58 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cardbusvar.h,v 1.2 1999/10/15 06:42:22 haya Exp $ */
+/* $NetBSD: cardbusvar.h,v 1.3 1999/10/15 11:10:58 augustss Exp $ */
/*
* Copyright (c) 1998 and 1999
@@ -77,6 +77,49 @@
#define CARDBUS_CLASS_REG 0x08
+#define CARDBUS_CLASS_SHIFT 24
+#define CARDBUS_CLASS_MASK 0xff
+#define CARDBUS_CLASS(cr) \
+ (((cr) >> CARDBUS_CLASS_SHIFT) & CARDBUS_CLASS_MASK)
+
+#define CARDBUS_SUBCLASS_SHIFT 16
+#define CARDBUS_SUBCLASS_MASK 0xff
+#define CARDBUS_SUBCLASS(cr) \
+ (((cr) >> CARDBUS_SUBCLASS_SHIFT) & CARDBUS_SUBCLASS_MASK)
+
+#define CARDBUS_INTERFACE_SHIFT 8
+#define CARDBUS_INTERFACE_MASK 0xff
+#define CARDBUS_INTERFACE(cr) \
+ (((cr) >> CARDBUS_INTERFACE_SHIFT) & CARDBUS_INTERFACE_MASK)
+
+#define CARDBUS_REVISION_SHIFT 0
+#define CARDBUS_REVISION_MASK 0xff
+#define CARDBUS_REVISION(cr) \
+ (((cr) >> CARDBUS_REVISION_SHIFT) & CARDBUS_REVISION_MASK)
+
+/* base classes */
+#define CARDBUS_CLASS_PREHISTORIC 0x00
+#define CARDBUS_CLASS_MASS_STORAGE 0x01
+#define CARDBUS_CLASS_NETWORK 0x02
+#define CARDBUS_CLASS_DISPLAY 0x03
+#define CARDBUS_CLASS_MULTIMEDIA 0x04
+#define CARDBUS_CLASS_MEMORY 0x05
+#define CARDBUS_CLASS_BRIDGE 0x06
+#define CARDBUS_CLASS_COMMUNICATIONS 0x07
+#define CARDBUS_CLASS_SYSTEM 0x08
+#define CARDBUS_CLASS_INPUT 0x09
+#define CARDBUS_CLASS_DOCK 0x0a
+#define CARDBUS_CLASS_PROCESSOR 0x0b
+#define CARDBUS_CLASS_SERIALBUS 0x0c
+#define CARDBUS_CLASS_UNDEFINED 0xff
+
+/* 0x0c serial bus subclasses */
+#define CARDBUS_SUBCLASS_SERIALBUS_FIREWIRE 0x00
+#define CARDBUS_SUBCLASS_SERIALBUS_ACCESS 0x01
+#define CARDBUS_SUBCLASS_SERIALBUS_SSA 0x02
+#define CARDBUS_SUBCLASS_SERIALBUS_USB 0x03
+#define CARDBUS_SUBCLASS_SERIALBUS_FIBER 0x04
+
/* BIST, Header Type, Latency Timer, Cache Line Size */
#define CARDBUS_BHLC_REG 0x0c
Home |
Main Index |
Thread Index |
Old Index