@@ -7,6 +7,7 @@
*/
#define RES_NUM 16
struct pci_root_info {
+ struct pci_dev *dev;
char name[12];
unsigned int res_num;
struct resource res[RES_NUM];
@@ -12,23 +12,22 @@
static inline void print_ioh_resources(struct pci_root_info *info)
{
+ struct pci_dev *dev = info->dev;
int res_num;
int busnum;
int i;
- printk(KERN_DEBUG "IOH bus: [%02x, %02x]\n",
- info->bus_min, info->bus_max);
+ dev_info(&dev->dev, "Intel IOH host bridge to [bus %02x-%02x]\n",
+ info->bus_min, info->bus_max);
res_num = info->res_num;
busnum = info->bus_min;
for (i = 0; i < res_num; i++) {
struct resource *res;
res = &info->res[i];
- printk(KERN_DEBUG "IOH bus: %02x index %x %s: [%llx, %llx]\n",
- busnum, i,
- (res->flags & IORESOURCE_IO) ? "io port" :
- "mmio",
- res->start, res->end);
+ dev_printk(KERN_DEBUG, &dev->dev,
+ "host bridge window %pR to [bus %02x-%02x]\n", res,
+ info->bus_min, info->bus_max);
}
}
@@ -50,13 +49,15 @@ static void __devinit pci_root_bus_res(struct pci_dev *dev)
int bus_base, bus_end;
if (pci_root_num >= PCI_ROOT_NR) {
- printk(KERN_DEBUG "intel_bus.c: PCI_ROOT_NR is too small\n");
+ dev_warn(&dev->dev, "intel_bus.c: PCI_ROOT_NR is too small\n");
return;
}
info = &pci_root_info[pci_root_num];
pci_root_num++;
+ info->dev = dev;
+
pci_read_config_word(dev, IOH_LCFGBUS, &word);
bus_base = (word & 0xff);
bus_end = (word & 0xff00) >> 8;