From 4b7076ea351a93ed49ec893da421f6291344206e Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 4 Dec 2010 17:06:33 +0000 Subject: 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@ --- sys/arch/hppa/include/pci_machdep.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/arch/hppa/include') diff --git a/sys/arch/hppa/include/pci_machdep.h b/sys/arch/hppa/include/pci_machdep.h index c04ee8fc628..73362683c44 100644 --- a/sys/arch/hppa/include/pci_machdep.h +++ b/sys/arch/hppa/include/pci_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.h,v 1.6 2010/06/29 22:08:28 jordan Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.7 2010/12/04 17:06:31 miod Exp $ */ /* * Copyright (c) 2003 Michael Shalayeff @@ -46,6 +46,7 @@ struct hppa_pci_chipset_tag { 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); @@ -71,6 +72,8 @@ struct hppa_pci_chipset_tag { (*(c)->pc_make_tag)((c)->_cookie, (b), (d), (f)) #define pci_decompose_tag(c, t, bp, dp, fp) \ (*(c)->pc_decompose_tag)((c)->_cookie, (t), (bp), (dp), (fp)) +#define pci_conf_size(c, t) \ + (*(c)->pc_conf_size)((c)->_cookie, (t)) #define pci_conf_read(c, t, r) \ (*(c)->pc_conf_read)((c)->_cookie, (t), (r)) #define pci_conf_write(c, t, r, v) \ -- cgit v1.2.3