diff options
| author | Warner Losh <imp@FreeBSD.org> | 2007-05-16 18:42:38 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2007-05-16 18:42:38 +0000 |
| commit | 4b3337405d46175ef118dfcf41bf2d2edde1a59f (patch) | |
| tree | 122909ff3315da885255c685b3233c48abcfa184 /sys | |
| parent | 7a528f5c2ee1d9be97fc67139bfec86f3344cb3c (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/cardbus/cardbus_cis.c | 2 | ||||
| -rw-r--r-- | sys/dev/pci/pcireg.h | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c index 5b8481d3d301..9e5ab03eaa6c 100644 --- a/sys/dev/cardbus/cardbus_cis.c +++ b/sys/dev/cardbus/cardbus_cis.c @@ -451,7 +451,7 @@ cardbus_read_tuple_init(device_t cbdev, device_t child, uint32_t *start, space = *start & PCIM_CIS_ASI_MASK; switch (space) { - case PCIM_CIS_ASI_TUPLE: + case PCIM_CIS_ASI_CONFIG: if (cardbus_cis_debug) device_printf(cbdev, "CIS in PCI config space\n"); /* CIS in PCI config space need no initialization */ diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h index 4bcf1b5c6c8c..c6d61bd75bdf 100644 --- a/sys/dev/pci/pcireg.h +++ b/sys/dev/pci/pcireg.h @@ -116,8 +116,9 @@ /* config registers for header type 0 devices */ #define PCIR_BARS 0x10 -#define PCIR_BAR(x) (PCIR_BARS + (x) * 4) -#define PCI_RID2BAR(rid) (((rid)-PCIR_BARS)/4) +#define PCIR_BAR(x) (PCIR_BARS + (x) * 4) +#define PCI_MAX_BAR_0 5 /* Number of standard bars */ +#define PCI_RID2BAR(rid) (((rid) - PCIR_BARS) / 4) #define PCI_BAR_IO(x) (((x) & PCIM_BAR_SPACE) == PCIM_BAR_IO_SPACE) #define PCI_BAR_MEM(x) (((x) & PCIM_BAR_SPACE) == PCIM_BAR_MEM_SPACE) #define PCIM_BAR_SPACE 0x00000001 @@ -133,7 +134,7 @@ #define PCIM_BAR_IO_BASE 0xfffffffc #define PCIR_CIS 0x28 #define PCIM_CIS_ASI_MASK 0x7 -#define PCIM_CIS_ASI_TUPLE 0 +#define PCIM_CIS_ASI_CONFIG 0 #define PCIM_CIS_ASI_BAR0 1 #define PCIM_CIS_ASI_BAR1 2 #define PCIM_CIS_ASI_BAR2 3 @@ -143,6 +144,7 @@ #define PCIM_CIS_ASI_ROM 7 #define PCIM_CIS_ADDR_MASK 0x0ffffff8 #define PCIM_CIS_ROM_MASK 0xf0000000 +#define PCIM_CIS_CONFIG_MASK 0xff #define PCIR_SUBVEND_0 0x2c #define PCIR_SUBDEV_0 0x2e #define PCIR_BIOS 0x30 |
