|
@@ -118,6 +118,16 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
118
|
118
|
#define PCI_CLASS_SERIAL_USB_EHCI 0x20 /**< ECHI USB controller */
|
119
|
119
|
#define PCI_CLASS_SERIAL_USB_XHCI 0x30 /**< xHCI USB controller */
|
120
|
120
|
|
|
121
|
+/** Construct PCI class
|
|
122
|
+ *
|
|
123
|
+ * @v base Base class (or PCI_ANY_ID)
|
|
124
|
+ * @v sub Subclass (or PCI_ANY_ID)
|
|
125
|
+ * @v progif Programming interface (or PCI_ANY_ID)
|
|
126
|
+ */
|
|
127
|
+#define PCI_CLASS( base, sub, progif ) \
|
|
128
|
+ ( ( ( (base) & 0xff ) << 16 ) | ( ( (sub) & 0xff ) << 8 ) | \
|
|
129
|
+ ( ( (progif) & 0xff) << 0 ) )
|
|
130
|
+
|
121
|
131
|
/** A PCI device ID list entry */
|
122
|
132
|
struct pci_device_id {
|
123
|
133
|
/** Name */
|
|
@@ -147,10 +157,8 @@ struct pci_class_id {
|
147
|
157
|
* @v sub Subclass (or PCI_ANY_ID)
|
148
|
158
|
* @v progif Programming interface (or PCI_ANY_ID)
|
149
|
159
|
*/
|
150
|
|
-#define PCI_CLASS(base,sub,progif) { \
|
151
|
|
- .class = ( ( ( (base) & 0xff ) << 16 ) | \
|
152
|
|
- ( ( (sub) & 0xff ) << 8 ) | \
|
153
|
|
- ( ( (progif) & 0xff) << 0 ) ), \
|
|
160
|
+#define PCI_CLASS_ID( base, sub, progif ) { \
|
|
161
|
+ .class = PCI_CLASS ( base, sub, progif ), \
|
154
|
162
|
.mask = ( ( ( ( (base) == PCI_ANY_ID ) ? 0x00 : 0xff ) << 16 ) | \
|
155
|
163
|
( ( ( (sub) == PCI_ANY_ID ) ? 0x00 : 0xff ) << 8 ) | \
|
156
|
164
|
( ( ( (progif) == PCI_ANY_ID ) ? 0x00 : 0xff ) << 0 ) ), \
|