expand this a little further to include defines of:

OFW_PCI_PHYS_HI_DEVICE() - extract PCI device from phys_hi
	OFW_PCI_PHYS_HI_FUNCTION() - extract PCI function from phys_hi
and the definition of `struct ofw_pci_register'.
This commit is contained in:
mrg 2001-02-16 14:16:30 +00:00
parent ed219529f5
commit 2f85e9e153
1 changed files with 17 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ofw_pci.h,v 1.2 1999/05/05 08:09:34 tsubai Exp $ */
/* $NetBSD: ofw_pci.h,v 1.3 2001/02/16 14:16:30 mrg Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -87,4 +87,20 @@
#define OFW_PCI_PHYS_HI_SPACE_MEM32 0x02000000
#define OFW_PCI_PHYS_HI_SPACE_MEM64 0x03000000
#define OFW_PCI_PHYS_HI_DEVICE(hi) \
(((hi) & OFW_PCI_PHYS_HI_DEVICEMASK) >> OFW_PCI_PHYS_HI_DEVICESHIFT)
#define OFW_PCI_PHYS_HI_FUNCTION(hi) \
(((hi) & OFW_PCI_PHYS_HI_FUNCTIONMASK) >> OFW_PCI_PHYS_HI_FUNCTIONSHIFT)
/*
* This has the 3 32bit cell values, plus 2 more to make up a 64-bit size.
*/
struct ofw_pci_register {
u_int32_t phys_hi;
u_int32_t phys_mid;
u_int32_t phys_lo;
u_int32_t size_hi;
u_int32_t size_lo;
};
#endif /* _DEV_OFW_OFW_PCI_H_ */