1N/A** Support for NE2000 PCI clones added David Monro June 1997 1N/A** Generalised for other PCI NICs by Ken Yap July 1997 1N/A** Most of this is taken from: 1N/A * This program is free software; you can redistribute it and/or 1N/A * modify it under the terms of the GNU General Public License as 1N/A * published by the Free Software Foundation; either version 2, or (at 1N/A * your option) any later version. 1N/A/* Header type 0 (normal devices) */ 1N/A bits 31..11 are address, 1N/A 10..2 are reserved */ 1N/A/* Header type 1 (PCI-to-PCI bridges) */ 1N/A/* 0x34 same as for htype 0 */ 1N/A/* 0x35-0x3b is reserved */ 1N/A/* 0x3c-0x3d are same as for htype 0 */ 1N/A/* Capability lists */ 1N/A/* Power Management Registers */ 1N/A/* Slot Identification */ 1N/A/* Message Signalled Interrupts registers */ 1N/A/* PCI signature: "PCI " */ 1N/A/* PCI service signature: "$PCI" */ 1N/A#
define PCI_SERVICE ((
'$' << 0) + (
'P' <<
8) + (
'C' <<
16) + (
'I' <<
24))
1N/A unsigned long entry;
/* 32 bit physical address */ 1N/A unsigned char length;
/* Length in paragraphs should be 01 */ 1N/A unsigned char checksum;
/* All bytes must add up to zero */ 1N/A /* membase and ioaddr are silly and depricated */ 1N/A/* Helper functions to find the size of a pci bar */ 1N/A/* Helper function to find pci capabilities */ 1N/A/* Most pci drivers will use this */ 1N/A/* On a few occasions the hardware is standardized enough that 1N/A * we only need to know the class of the device and not the exact 1N/A * type to drive the device correctly. If this is the case 1N/A * set a class value other than 0.