diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-12-04 17:06:33 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-12-04 17:06:33 +0000 |
commit | 4b7076ea351a93ed49ec893da421f6291344206e (patch) | |
tree | 8e5937b390074e65576adaef9e87dde05d917958 /sys/arch/loongson/include/pci_machdep.h | |
parent | a0570286cbc603d45d495c2ab02e4654ae5c8a90 (diff) |
Introduce a new pci routine, pci_conf_size(), which returns the size of a
given pcitag_t configuration address space. Currently, all pci controllers
will return the usual 0x100 bytes of PCI configuration space, but this will
eventually change on PCIe-capable controlers.
ok kettenis@
Diffstat (limited to 'sys/arch/loongson/include/pci_machdep.h')
-rw-r--r-- | sys/arch/loongson/include/pci_machdep.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/loongson/include/pci_machdep.h b/sys/arch/loongson/include/pci_machdep.h index f4af5f559fb..679ad54dcb9 100644 --- a/sys/arch/loongson/include/pci_machdep.h +++ b/sys/arch/loongson/include/pci_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.h,v 1.3 2010/06/29 22:08:28 jordan Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.4 2010/12/04 17:06:31 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -44,6 +44,7 @@ struct mips_pci_chipset { pcitag_t (*pc_make_tag)(void *, int, int, int); void (*pc_decompose_tag)(void *, pcitag_t, int *, int *, int *); + int (*pc_conf_size)(void *, pcitag_t); pcireg_t (*pc_conf_read)(void *, pcitag_t, int); void (*pc_conf_write)(void *, pcitag_t, int, pcireg_t); @@ -66,6 +67,8 @@ struct mips_pci_chipset { (*(c)->pc_make_tag)((c)->pc_conf_v, (b), (d), (f)) #define pci_decompose_tag(c, t, bp, dp, fp) \ (*(c)->pc_decompose_tag)((c)->pc_conf_v, (t), (bp), (dp), (fp)) +#define pci_conf_size(c, t) \ + (*(c)->pc_conf_size)((c)->pc_conf_v, (t)) #define pci_conf_read(c, t, r) \ (*(c)->pc_conf_read)((c)->pc_conf_v, (t), (r)) #define pci_conf_write(c, t, r, v) \ |