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/alpha/pci/lca_pci.c | |
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/alpha/pci/lca_pci.c')
-rw-r--r-- | sys/arch/alpha/pci/lca_pci.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/alpha/pci/lca_pci.c b/sys/arch/alpha/pci/lca_pci.c index 0aef2d52572..20725619bf8 100644 --- a/sys/arch/alpha/pci/lca_pci.c +++ b/sys/arch/alpha/pci/lca_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lca_pci.c,v 1.9 2006/03/26 20:23:08 brad Exp $ */ +/* $OpenBSD: lca_pci.c,v 1.10 2010/12/04 17:06:31 miod Exp $ */ /* $NetBSD: lca_pci.c,v 1.13 1997/09/02 13:19:35 thorpej Exp $ */ /* @@ -48,6 +48,7 @@ int lca_bus_maxdevs(void *, int); pcitag_t lca_make_tag(void *, int, int, int); void lca_decompose_tag(void *, pcitag_t, int *, int *, int *); +int lca_conf_size(void *, pcitag_t); pcireg_t lca_conf_read(void *, pcitag_t, int); void lca_conf_write(void *, pcitag_t, int, pcireg_t); @@ -62,6 +63,7 @@ lca_pci_init(pc, v) pc->pc_bus_maxdevs = lca_bus_maxdevs; pc->pc_make_tag = lca_make_tag; pc->pc_decompose_tag = lca_decompose_tag; + pc->pc_conf_size = lca_conf_size; pc->pc_conf_read = lca_conf_read; pc->pc_conf_write = lca_conf_write; } @@ -109,6 +111,12 @@ lca_decompose_tag(cpv, tag, bp, dp, fp) *fp = (tag >> 8) & 0x7; } +int +lca_conf_size(void *cpv, pcitag_t tag) +{ + return PCI_CONFIG_SPACE_SIZE; +} + pcireg_t lca_conf_read(cpv, tag, offset) void *cpv; |