@@ -29,27 +29,6 @@
static struct phb *phbs[MAX_PHB_ID];
int last_phb_id = 0;
-#define PCITRACE(_p, _bdfn, fmt, a...) \
- prlog(PR_TRACE, "PHB#%04x:%02x:%02x.%x " fmt, \
- (_p)->opal_id, \
- ((_bdfn) >> 8) & 0xff, \
- ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
-#define PCIDBG(_p, _bdfn, fmt, a...) \
- prlog(PR_DEBUG, "PHB#%04x:%02x:%02x.%x " fmt, \
- (_p)->opal_id, \
- ((_bdfn) >> 8) & 0xff, \
- ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
-#define PCINOTICE(_p, _bdfn, fmt, a...) \
- prlog(PR_NOTICE, "PHB#%04x:%02x:%02x.%x " fmt, \
- (_p)->opal_id, \
- ((_bdfn) >> 8) & 0xff, \
- ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
-#define PCIERR(_p, _bdfn, fmt, a...) \
- prlog(PR_ERR, "PHB#%04x:%02x:%02x.%x " fmt, \
- (_p)->opal_id, \
- ((_bdfn) >> 8) & 0xff, \
- ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
-
/*
* Generic PCI utilities
*/
@@ -23,6 +23,27 @@
#include <bitmap.h>
#include <ccan/list/list.h>
+#define PCITRACE(_p, _bdfn, fmt, a...) \
+ prlog(PR_TRACE, "PHB#%04x:%02x:%02x.%x " fmt, \
+ (_p)->opal_id, \
+ ((_bdfn) >> 8) & 0xff, \
+ ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
+#define PCIDBG(_p, _bdfn, fmt, a...) \
+ prlog(PR_DEBUG, "PHB#%04x:%02x:%02x.%x " fmt, \
+ (_p)->opal_id, \
+ ((_bdfn) >> 8) & 0xff, \
+ ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
+#define PCINOTICE(_p, _bdfn, fmt, a...) \
+ prlog(PR_NOTICE, "PHB#%04x:%02x:%02x.%x " fmt, \
+ (_p)->opal_id, \
+ ((_bdfn) >> 8) & 0xff, \
+ ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
+#define PCIERR(_p, _bdfn, fmt, a...) \
+ prlog(PR_ERR, "PHB#%04x:%02x:%02x.%x " fmt, \
+ (_p)->opal_id, \
+ ((_bdfn) >> 8) & 0xff, \
+ ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
+
struct pci_device;
struct pci_cfg_reg_filter;