diff options
author | imp <imp@FreeBSD.org> | 2007-05-16 18:42:38 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2007-05-16 18:42:38 +0000 |
commit | fabb40094da49469f53cbd0d9270525530ff4173 (patch) | |
tree | 122909ff3315da885255c685b3233c48abcfa184 /sys/dev | |
parent | 0d8779bca9792e703fe368a0a4d6f4bda248b4ed (diff) | |
download | FreeBSD-src-fabb40094da49469f53cbd0d9270525530ff4173.zip FreeBSD-src-fabb40094da49469f53cbd0d9270525530ff4173.tar.gz |
Change PCIM_CIS_ASI_TUPLE to _CONFIG.
Add PCI_MAX_BAR_0
minor style nit.
Add PCIM_CIS_CONFIG_MASK
Diffstat (limited to 'sys/dev')
-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 5b8481d..9e5ab03 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 4bcf1b5..c6d61bd 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 |