aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parisc')
-rw-r--r--drivers/parisc/lba_pci.c56
1 files changed, 29 insertions, 27 deletions
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index eae0812f01a5..21c4c299b3d6 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -168,7 +168,8 @@ lba_dump_res(struct resource *r, int d)
168 168
169 printk(KERN_DEBUG "(%p)", r->parent); 169 printk(KERN_DEBUG "(%p)", r->parent);
170 for (i = d; i ; --i) printk(" "); 170 for (i = d; i ; --i) printk(" ");
171 printk(KERN_DEBUG "%p [%lx,%lx]/%lx\n", r, r->start, r->end, r->flags); 171 printk(KERN_DEBUG "%p [%lx,%lx]/%lx\n", r,
172 (long)r->start, (long)r->end, r->flags);
172 lba_dump_res(r->child, d+2); 173 lba_dump_res(r->child, d+2);
173 lba_dump_res(r->sibling, d); 174 lba_dump_res(r->sibling, d);
174} 175}
@@ -647,7 +648,7 @@ truncate_pat_collision(struct resource *root, struct resource *new)
647 printk(KERN_WARNING "LBA: Truncating lmmio_space [%lx/%lx] " 648 printk(KERN_WARNING "LBA: Truncating lmmio_space [%lx/%lx] "
648 "to [%lx,%lx]\n", 649 "to [%lx,%lx]\n",
649 start, end, 650 start, end,
650 new->start, new->end ); 651 (long)new->start, (long)new->end );
651 652
652 return 0; /* truncation successful */ 653 return 0; /* truncation successful */
653} 654}
@@ -715,8 +716,8 @@ lba_fixup_bus(struct pci_bus *bus)
715 716
716 printk("FAILED: lba_fixup_bus() request for " 717 printk("FAILED: lba_fixup_bus() request for "
717 "elmmio_space [%lx/%lx]\n", 718 "elmmio_space [%lx/%lx]\n",
718 ldev->hba.elmmio_space.start, 719 (long)ldev->hba.elmmio_space.start,
719 ldev->hba.elmmio_space.end); 720 (long)ldev->hba.elmmio_space.end);
720 721
721 /* lba_dump_res(&iomem_resource, 2); */ 722 /* lba_dump_res(&iomem_resource, 2); */
722 /* BUG(); */ 723 /* BUG(); */
@@ -738,15 +739,15 @@ lba_fixup_bus(struct pci_bus *bus)
738 &(ldev->hba.lmmio_space))) { 739 &(ldev->hba.lmmio_space))) {
739 740
740 printk(KERN_WARNING "LBA: lmmio_space [%lx/%lx] duplicate!\n", 741 printk(KERN_WARNING "LBA: lmmio_space [%lx/%lx] duplicate!\n",
741 ldev->hba.lmmio_space.start, 742 (long)ldev->hba.lmmio_space.start,
742 ldev->hba.lmmio_space.end); 743 (long)ldev->hba.lmmio_space.end);
743 } else { 744 } else {
744 err = request_resource(&iomem_resource, &(ldev->hba.lmmio_space)); 745 err = request_resource(&iomem_resource, &(ldev->hba.lmmio_space));
745 if (err < 0) { 746 if (err < 0) {
746 printk(KERN_ERR "FAILED: lba_fixup_bus() request for " 747 printk(KERN_ERR "FAILED: lba_fixup_bus() request for "
747 "lmmio_space [%lx/%lx]\n", 748 "lmmio_space [%lx/%lx]\n",
748 ldev->hba.lmmio_space.start, 749 (long)ldev->hba.lmmio_space.start,
749 ldev->hba.lmmio_space.end); 750 (long)ldev->hba.lmmio_space.end);
750 } else 751 } else
751 bus->resource[i++] = &(ldev->hba.lmmio_space); 752 bus->resource[i++] = &(ldev->hba.lmmio_space);
752 } 753 }
@@ -758,8 +759,8 @@ lba_fixup_bus(struct pci_bus *bus)
758 if (err < 0) { 759 if (err < 0) {
759 printk("FAILED: lba_fixup_bus() request for " 760 printk("FAILED: lba_fixup_bus() request for "
760 "gmmio_space [%lx/%lx]\n", 761 "gmmio_space [%lx/%lx]\n",
761 ldev->hba.gmmio_space.start, 762 (long)ldev->hba.gmmio_space.start,
762 ldev->hba.gmmio_space.end); 763 (long)ldev->hba.gmmio_space.end);
763 lba_dump_res(&iomem_resource, 2); 764 lba_dump_res(&iomem_resource, 2);
764 BUG(); 765 BUG();
765 } 766 }
@@ -1063,16 +1064,16 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
1063 /* used to fix up pre-initialized MEM BARs */ 1064 /* used to fix up pre-initialized MEM BARs */
1064 if (!lba_dev->hba.lmmio_space.start) { 1065 if (!lba_dev->hba.lmmio_space.start) {
1065 sprintf(lba_dev->hba.lmmio_name, 1066 sprintf(lba_dev->hba.lmmio_name,
1066 "PCI%02lx LMMIO", 1067 "PCI%02x LMMIO",
1067 lba_dev->hba.bus_num.start); 1068 (int)lba_dev->hba.bus_num.start);
1068 lba_dev->hba.lmmio_space_offset = p->start - 1069 lba_dev->hba.lmmio_space_offset = p->start -
1069 io->start; 1070 io->start;
1070 r = &lba_dev->hba.lmmio_space; 1071 r = &lba_dev->hba.lmmio_space;
1071 r->name = lba_dev->hba.lmmio_name; 1072 r->name = lba_dev->hba.lmmio_name;
1072 } else if (!lba_dev->hba.elmmio_space.start) { 1073 } else if (!lba_dev->hba.elmmio_space.start) {
1073 sprintf(lba_dev->hba.elmmio_name, 1074 sprintf(lba_dev->hba.elmmio_name,
1074 "PCI%02lx ELMMIO", 1075 "PCI%02x ELMMIO",
1075 lba_dev->hba.bus_num.start); 1076 (int)lba_dev->hba.bus_num.start);
1076 r = &lba_dev->hba.elmmio_space; 1077 r = &lba_dev->hba.elmmio_space;
1077 r->name = lba_dev->hba.elmmio_name; 1078 r->name = lba_dev->hba.elmmio_name;
1078 } else { 1079 } else {
@@ -1089,8 +1090,8 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
1089 1090
1090 case PAT_GMMIO: 1091 case PAT_GMMIO:
1091 /* MMIO space > 4GB phys addr; for 64-bit BAR */ 1092 /* MMIO space > 4GB phys addr; for 64-bit BAR */
1092 sprintf(lba_dev->hba.gmmio_name, "PCI%02lx GMMIO", 1093 sprintf(lba_dev->hba.gmmio_name, "PCI%02x GMMIO",
1093 lba_dev->hba.bus_num.start); 1094 (int)lba_dev->hba.bus_num.start);
1094 r = &lba_dev->hba.gmmio_space; 1095 r = &lba_dev->hba.gmmio_space;
1095 r->name = lba_dev->hba.gmmio_name; 1096 r->name = lba_dev->hba.gmmio_name;
1096 r->start = p->start; 1097 r->start = p->start;
@@ -1112,8 +1113,8 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
1112 */ 1113 */
1113 lba_dev->iop_base = ioremap_nocache(p->start, 64 * 1024 * 1024); 1114 lba_dev->iop_base = ioremap_nocache(p->start, 64 * 1024 * 1024);
1114 1115
1115 sprintf(lba_dev->hba.io_name, "PCI%02lx Ports", 1116 sprintf(lba_dev->hba.io_name, "PCI%02x Ports",
1116 lba_dev->hba.bus_num.start); 1117 (int)lba_dev->hba.bus_num.start);
1117 r = &lba_dev->hba.io_space; 1118 r = &lba_dev->hba.io_space;
1118 r->name = lba_dev->hba.io_name; 1119 r->name = lba_dev->hba.io_name;
1119 r->start = HBA_PORT_BASE(lba_dev->hba.hba_num); 1120 r->start = HBA_PORT_BASE(lba_dev->hba.hba_num);
@@ -1166,8 +1167,8 @@ lba_legacy_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
1166 ** Legacy boxes but it's nice to see in /proc/iomem. 1167 ** Legacy boxes but it's nice to see in /proc/iomem.
1167 */ 1168 */
1168 r = &(lba_dev->hba.lmmio_space); 1169 r = &(lba_dev->hba.lmmio_space);
1169 sprintf(lba_dev->hba.lmmio_name, "PCI%02lx LMMIO", 1170 sprintf(lba_dev->hba.lmmio_name, "PCI%02x LMMIO",
1170 lba_dev->hba.bus_num.start); 1171 (int)lba_dev->hba.bus_num.start);
1171 r->name = lba_dev->hba.lmmio_name; 1172 r->name = lba_dev->hba.lmmio_name;
1172 1173
1173#if 1 1174#if 1
@@ -1275,8 +1276,8 @@ lba_legacy_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
1275 ** an existing (but unused portion of) distributed range. 1276 ** an existing (but unused portion of) distributed range.
1276 */ 1277 */
1277 r = &(lba_dev->hba.elmmio_space); 1278 r = &(lba_dev->hba.elmmio_space);
1278 sprintf(lba_dev->hba.elmmio_name, "PCI%02lx ELMMIO", 1279 sprintf(lba_dev->hba.elmmio_name, "PCI%02x ELMMIO",
1279 lba_dev->hba.bus_num.start); 1280 (int)lba_dev->hba.bus_num.start);
1280 r->name = lba_dev->hba.elmmio_name; 1281 r->name = lba_dev->hba.elmmio_name;
1281 1282
1282#if 1 1283#if 1
@@ -1297,8 +1298,8 @@ lba_legacy_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
1297#endif 1298#endif
1298 1299
1299 r = &(lba_dev->hba.io_space); 1300 r = &(lba_dev->hba.io_space);
1300 sprintf(lba_dev->hba.io_name, "PCI%02lx Ports", 1301 sprintf(lba_dev->hba.io_name, "PCI%02x Ports",
1301 lba_dev->hba.bus_num.start); 1302 (int)lba_dev->hba.bus_num.start);
1302 r->name = lba_dev->hba.io_name; 1303 r->name = lba_dev->hba.io_name;
1303 r->flags = IORESOURCE_IO; 1304 r->flags = IORESOURCE_IO;
1304 r->start = READ_REG32(lba_dev->hba.base_addr + LBA_IOS_BASE) & ~1L; 1305 r->start = READ_REG32(lba_dev->hba.base_addr + LBA_IOS_BASE) & ~1L;
@@ -1447,7 +1448,7 @@ lba_driver_probe(struct parisc_device *dev)
1447 } 1448 }
1448 1449
1449 printk(KERN_INFO "Elroy version %s (0x%x) found at 0x%lx\n", 1450 printk(KERN_INFO "Elroy version %s (0x%x) found at 0x%lx\n",
1450 version, func_class & 0xf, dev->hpa.start); 1451 version, func_class & 0xf, (long)dev->hpa.start);
1451 1452
1452 if (func_class < 2) { 1453 if (func_class < 2) {
1453 printk(KERN_WARNING "Can't support LBA older than " 1454 printk(KERN_WARNING "Can't support LBA older than "
@@ -1477,11 +1478,12 @@ lba_driver_probe(struct parisc_device *dev)
1477 */ 1478 */
1478 printk(KERN_INFO "%s version TR%d.%d (0x%x) found at 0x%lx\n", 1479 printk(KERN_INFO "%s version TR%d.%d (0x%x) found at 0x%lx\n",
1479 IS_MERCURY(dev) ? "Mercury" : "Quicksilver", major, 1480 IS_MERCURY(dev) ? "Mercury" : "Quicksilver", major,
1480 minor, func_class, dev->hpa.start); 1481 minor, func_class, (long)dev->hpa.start);
1481 1482
1482 cfg_ops = &mercury_cfg_ops; 1483 cfg_ops = &mercury_cfg_ops;
1483 } else { 1484 } else {
1484 printk(KERN_ERR "Unknown LBA found at 0x%lx\n", dev->hpa.start); 1485 printk(KERN_ERR "Unknown LBA found at 0x%lx\n",
1486 (long)dev->hpa.start);
1485 return -ENODEV; 1487 return -ENODEV;
1486 } 1488 }
1487 1489