Commit b0494bc8 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Paul Mackerras

powerpc/pci: Cleanup debug printk's

This removes the various DBG() macro from the powerpc PCI code and
makes it use the standard pr_debug instead.
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 25d6e2d7
...@@ -38,13 +38,6 @@ ...@@ -38,13 +38,6 @@
#include <asm/ppc-pci.h> #include <asm/ppc-pci.h>
#include <asm/firmware.h> #include <asm/firmware.h>
#ifdef DEBUG
#include <asm/udbg.h>
#define DBG(fmt...) printk(fmt)
#else
#define DBG(fmt...)
#endif
static DEFINE_SPINLOCK(hose_spinlock); static DEFINE_SPINLOCK(hose_spinlock);
/* XXX kill that some day ... */ /* XXX kill that some day ... */
...@@ -215,8 +208,8 @@ void __devinit pcibios_setup_new_device(struct pci_dev *dev) ...@@ -215,8 +208,8 @@ void __devinit pcibios_setup_new_device(struct pci_dev *dev)
sd->of_node = pci_device_to_OF_node(dev); sd->of_node = pci_device_to_OF_node(dev);
DBG("PCI: device %s OF node: %s\n", pci_name(dev), pr_debug("PCI: device %s OF node: %s\n", pci_name(dev),
sd->of_node ? sd->of_node->full_name : "<none>"); sd->of_node ? sd->of_node->full_name : "<none>");
sd->dma_ops = pci_dma_ops; sd->dma_ops = pci_dma_ops;
#ifdef CONFIG_PPC32 #ifdef CONFIG_PPC32
...@@ -253,7 +246,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev) ...@@ -253,7 +246,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
return -1; return -1;
#endif #endif
DBG("Try to map irq for %s...\n", pci_name(pci_dev)); pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev));
#ifdef DEBUG #ifdef DEBUG
memset(&oirq, 0xff, sizeof(oirq)); memset(&oirq, 0xff, sizeof(oirq));
...@@ -277,26 +270,26 @@ int pci_read_irq_line(struct pci_dev *pci_dev) ...@@ -277,26 +270,26 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
line == 0xff || line == 0) { line == 0xff || line == 0) {
return -1; return -1;
} }
DBG(" -> no map ! Using line %d (pin %d) from PCI config\n", pr_debug(" No map ! Using line %d (pin %d) from PCI config\n",
line, pin); line, pin);
virq = irq_create_mapping(NULL, line); virq = irq_create_mapping(NULL, line);
if (virq != NO_IRQ) if (virq != NO_IRQ)
set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
} else { } else {
DBG(" -> got one, spec %d cells (0x%08x 0x%08x...) on %s\n", pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
oirq.size, oirq.specifier[0], oirq.specifier[1], oirq.size, oirq.specifier[0], oirq.specifier[1],
oirq.controller->full_name); oirq.controller->full_name);
virq = irq_create_of_mapping(oirq.controller, oirq.specifier, virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
oirq.size); oirq.size);
} }
if(virq == NO_IRQ) { if(virq == NO_IRQ) {
DBG(" -> failed to map !\n"); pr_debug(" Failed to map !\n");
return -1; return -1;
} }
DBG(" -> mapped to linux irq %d\n", virq); pr_debug(" Mapped to linux irq %d\n", virq);
pci_dev->irq = virq; pci_dev->irq = virq;
...@@ -452,8 +445,8 @@ pgprot_t pci_phys_mem_access_prot(struct file *file, ...@@ -452,8 +445,8 @@ pgprot_t pci_phys_mem_access_prot(struct file *file,
pci_dev_put(pdev); pci_dev_put(pdev);
} }
DBG("non-PCI map for %llx, prot: %lx\n", pr_debug("PCI: Non-PCI map for %llx, prot: %lx\n",
(unsigned long long)offset, prot); (unsigned long long)offset, prot);
return __pgprot(prot); return __pgprot(prot);
} }
...@@ -1196,10 +1189,10 @@ static int __init reparent_resources(struct resource *parent, ...@@ -1196,10 +1189,10 @@ static int __init reparent_resources(struct resource *parent,
*pp = NULL; *pp = NULL;
for (p = res->child; p != NULL; p = p->sibling) { for (p = res->child; p != NULL; p = p->sibling) {
p->parent = res; p->parent = res;
DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n", pr_debug("PCI: Reparented %s [%llx..%llx] under %s\n",
p->name, p->name,
(unsigned long long)p->start, (unsigned long long)p->start,
(unsigned long long)p->end, res->name); (unsigned long long)p->end, res->name);
} }
return 0; return 0;
} }
...@@ -1269,14 +1262,14 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus) ...@@ -1269,14 +1262,14 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
} }
} }
DBG("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx " pr_debug("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
"[0x%x], parent %p (%s)\n", "[0x%x], parent %p (%s)\n",
bus->self ? pci_name(bus->self) : "PHB", bus->self ? pci_name(bus->self) : "PHB",
bus->number, i, bus->number, i,
(unsigned long long)res->start, (unsigned long long)res->start,
(unsigned long long)res->end, (unsigned long long)res->end,
(unsigned int)res->flags, (unsigned int)res->flags,
pr, (pr && pr->name) ? pr->name : "nil"); pr, (pr && pr->name) ? pr->name : "nil");
if (pr && !(pr->flags & IORESOURCE_UNSET)) { if (pr && !(pr->flags & IORESOURCE_UNSET)) {
if (request_resource(pr, res) == 0) if (request_resource(pr, res) == 0)
...@@ -1303,11 +1296,11 @@ static inline void __devinit alloc_resource(struct pci_dev *dev, int idx) ...@@ -1303,11 +1296,11 @@ static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
{ {
struct resource *pr, *r = &dev->resource[idx]; struct resource *pr, *r = &dev->resource[idx];
DBG("PCI: Allocating %s: Resource %d: %016llx..%016llx [%x]\n", pr_debug("PCI: Allocating %s: Resource %d: %016llx..%016llx [%x]\n",
pci_name(dev), idx, pci_name(dev), idx,
(unsigned long long)r->start, (unsigned long long)r->start,
(unsigned long long)r->end, (unsigned long long)r->end,
(unsigned int)r->flags); (unsigned int)r->flags);
pr = pci_find_parent_resource(dev, r); pr = pci_find_parent_resource(dev, r);
if (!pr || (pr->flags & IORESOURCE_UNSET) || if (!pr || (pr->flags & IORESOURCE_UNSET) ||
...@@ -1315,10 +1308,11 @@ static inline void __devinit alloc_resource(struct pci_dev *dev, int idx) ...@@ -1315,10 +1308,11 @@ static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
printk(KERN_WARNING "PCI: Cannot allocate resource region %d" printk(KERN_WARNING "PCI: Cannot allocate resource region %d"
" of device %s, will remap\n", idx, pci_name(dev)); " of device %s, will remap\n", idx, pci_name(dev));
if (pr) if (pr)
DBG("PCI: parent is %p: %016llx-%016llx [%x]\n", pr, pr_debug("PCI: parent is %p: %016llx-%016llx [%x]\n",
(unsigned long long)pr->start, pr,
(unsigned long long)pr->end, (unsigned long long)pr->start,
(unsigned int)pr->flags); (unsigned long long)pr->end,
(unsigned int)pr->flags);
/* We'll assign a new address later */ /* We'll assign a new address later */
r->flags |= IORESOURCE_UNSET; r->flags |= IORESOURCE_UNSET;
r->end -= r->start; r->end -= r->start;
...@@ -1356,7 +1350,8 @@ static void __init pcibios_allocate_resources(int pass) ...@@ -1356,7 +1350,8 @@ static void __init pcibios_allocate_resources(int pass)
* but keep it unregistered. * but keep it unregistered.
*/ */
u32 reg; u32 reg;
DBG("PCI: Switching off ROM of %s\n", pci_name(dev)); pr_debug("PCI: Switching off ROM of %s\n",
pci_name(dev));
r->flags &= ~IORESOURCE_ROM_ENABLE; r->flags &= ~IORESOURCE_ROM_ENABLE;
pci_read_config_dword(dev, dev->rom_base_reg, &reg); pci_read_config_dword(dev, dev->rom_base_reg, &reg);
pci_write_config_dword(dev, dev->rom_base_reg, pci_write_config_dword(dev, dev->rom_base_reg,
...@@ -1381,7 +1376,7 @@ void __init pcibios_resource_survey(void) ...@@ -1381,7 +1376,7 @@ void __init pcibios_resource_survey(void)
} }
if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) { if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) {
DBG("PCI: Assigning unassigned resouces...\n"); pr_debug("PCI: Assigning unassigned resouces...\n");
pci_assign_unassigned_resources(); pci_assign_unassigned_resources();
} }
......
...@@ -26,12 +26,6 @@ ...@@ -26,12 +26,6 @@
#undef DEBUG #undef DEBUG
#ifdef DEBUG
#define DBG(x...) printk(x)
#else
#define DBG(x...)
#endif
unsigned long isa_io_base = 0; unsigned long isa_io_base = 0;
unsigned long pci_dram_offset = 0; unsigned long pci_dram_offset = 0;
int pcibios_assign_bus_offset = 1; int pcibios_assign_bus_offset = 1;
...@@ -275,14 +269,14 @@ pci_busdev_to_OF_node(struct pci_bus *bus, int devfn) ...@@ -275,14 +269,14 @@ pci_busdev_to_OF_node(struct pci_bus *bus, int devfn)
if (!have_of) if (!have_of)
return NULL; return NULL;
DBG("pci_busdev_to_OF_node(%d,0x%x)\n", bus->number, devfn); pr_debug("pci_busdev_to_OF_node(%d,0x%x)\n", bus->number, devfn);
parent = scan_OF_for_pci_bus(bus); parent = scan_OF_for_pci_bus(bus);
if (parent == NULL) if (parent == NULL)
return NULL; return NULL;
DBG(" parent is %s\n", parent ? parent->full_name : "<NULL>"); pr_debug(" parent is %s\n", parent ? parent->full_name : "<NULL>");
np = scan_OF_for_pci_dev(parent, devfn); np = scan_OF_for_pci_dev(parent, devfn);
of_node_put(parent); of_node_put(parent);
DBG(" result is %s\n", np ? np->full_name : "<NULL>"); pr_debug(" result is %s\n", np ? np->full_name : "<NULL>");
/* XXX most callers don't release the returned node /* XXX most callers don't release the returned node
* mostly because ppc64 doesn't increase the refcount, * mostly because ppc64 doesn't increase the refcount,
......
...@@ -32,13 +32,6 @@ ...@@ -32,13 +32,6 @@
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/ppc-pci.h> #include <asm/ppc-pci.h>
#ifdef DEBUG
#include <asm/udbg.h>
#define DBG(fmt...) printk(fmt)
#else
#define DBG(fmt...)
#endif
unsigned long pci_probe_only = 1; unsigned long pci_probe_only = 1;
/* pci_io_base -- the base address from which io bars are offsets. /* pci_io_base -- the base address from which io bars are offsets.
...@@ -102,7 +95,7 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev) ...@@ -102,7 +95,7 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
addrs = of_get_property(node, "assigned-addresses", &proplen); addrs = of_get_property(node, "assigned-addresses", &proplen);
if (!addrs) if (!addrs)
return; return;
DBG(" parse addresses (%d bytes) @ %p\n", proplen, addrs); pr_debug(" parse addresses (%d bytes) @ %p\n", proplen, addrs);
for (; proplen >= 20; proplen -= 20, addrs += 5) { for (; proplen >= 20; proplen -= 20, addrs += 5) {
flags = pci_parse_of_flags(addrs[0]); flags = pci_parse_of_flags(addrs[0]);
if (!flags) if (!flags)
...@@ -112,8 +105,9 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev) ...@@ -112,8 +105,9 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
if (!size) if (!size)
continue; continue;
i = addrs[0] & 0xff; i = addrs[0] & 0xff;
DBG(" base: %llx, size: %llx, i: %x\n", pr_debug(" base: %llx, size: %llx, i: %x\n",
(unsigned long long)base, (unsigned long long)size, i); (unsigned long long)base,
(unsigned long long)size, i);
if (PCI_BASE_ADDRESS_0 <= i && i <= PCI_BASE_ADDRESS_5) { if (PCI_BASE_ADDRESS_0 <= i && i <= PCI_BASE_ADDRESS_5) {
res = &dev->resource[(i - PCI_BASE_ADDRESS_0) >> 2]; res = &dev->resource[(i - PCI_BASE_ADDRESS_0) >> 2];
...@@ -144,7 +138,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, ...@@ -144,7 +138,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
if (type == NULL) if (type == NULL)
type = ""; type = "";
DBG(" create device, devfn: %x, type: %s\n", devfn, type); pr_debug(" create device, devfn: %x, type: %s\n", devfn, type);
dev->bus = bus; dev->bus = bus;
dev->sysdata = node; dev->sysdata = node;
...@@ -165,8 +159,8 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, ...@@ -165,8 +159,8 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
dev->class = get_int_prop(node, "class-code", 0); dev->class = get_int_prop(node, "class-code", 0);
dev->revision = get_int_prop(node, "revision-id", 0); dev->revision = get_int_prop(node, "revision-id", 0);
DBG(" class: 0x%x\n", dev->class); pr_debug(" class: 0x%x\n", dev->class);
DBG(" revision: 0x%x\n", dev->revision); pr_debug(" revision: 0x%x\n", dev->revision);
dev->current_state = 4; /* unknown power state */ dev->current_state = 4; /* unknown power state */
dev->error_state = pci_channel_io_normal; dev->error_state = pci_channel_io_normal;
...@@ -187,7 +181,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, ...@@ -187,7 +181,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
pci_parse_of_addrs(node, dev); pci_parse_of_addrs(node, dev);
DBG(" adding to system ...\n"); pr_debug(" adding to system ...\n");
pci_device_add(dev, bus); pci_device_add(dev, bus);
...@@ -203,11 +197,12 @@ void __devinit of_scan_bus(struct device_node *node, ...@@ -203,11 +197,12 @@ void __devinit of_scan_bus(struct device_node *node,
int reglen, devfn; int reglen, devfn;
struct pci_dev *dev; struct pci_dev *dev;
DBG("of_scan_bus(%s) bus no %d... \n", node->full_name, bus->number); pr_debug("of_scan_bus(%s) bus no %d... \n",
node->full_name, bus->number);
/* Scan direct children */ /* Scan direct children */
for_each_child_of_node(node, child) { for_each_child_of_node(node, child) {
DBG(" * %s\n", child->full_name); pr_debug(" * %s\n", child->full_name);
reg = of_get_property(child, "reg", &reglen); reg = of_get_property(child, "reg", &reglen);
if (reg == NULL || reglen < 20) if (reg == NULL || reglen < 20)
continue; continue;
...@@ -217,7 +212,7 @@ void __devinit of_scan_bus(struct device_node *node, ...@@ -217,7 +212,7 @@ void __devinit of_scan_bus(struct device_node *node,
dev = of_create_pci_dev(child, bus, devfn); dev = of_create_pci_dev(child, bus, devfn);
if (!dev) if (!dev)
continue; continue;
DBG(" dev header type: %x\n", dev->hdr_type); pr_debug(" dev header type: %x\n", dev->hdr_type);
} }
/* Ally all fixups */ /* Ally all fixups */
...@@ -245,7 +240,7 @@ void __devinit of_scan_pci_bridge(struct device_node *node, ...@@ -245,7 +240,7 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
unsigned int flags; unsigned int flags;
u64 size; u64 size;
DBG("of_scan_pci_bridge(%s)\n", node->full_name); pr_debug("of_scan_pci_bridge(%s)\n", node->full_name);
/* parse bus-range property */ /* parse bus-range property */
busrange = of_get_property(node, "bus-range", &len); busrange = of_get_property(node, "bus-range", &len);
...@@ -309,12 +304,12 @@ void __devinit of_scan_pci_bridge(struct device_node *node, ...@@ -309,12 +304,12 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
} }
sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus),
bus->number); bus->number);
DBG(" bus name: %s\n", bus->name); pr_debug(" bus name: %s\n", bus->name);
mode = PCI_PROBE_NORMAL; mode = PCI_PROBE_NORMAL;
if (ppc_md.pci_probe_mode) if (ppc_md.pci_probe_mode)
mode = ppc_md.pci_probe_mode(bus); mode = ppc_md.pci_probe_mode(bus);
DBG(" probe mode: %d\n", mode); pr_debug(" probe mode: %d\n", mode);
if (mode == PCI_PROBE_DEVTREE) if (mode == PCI_PROBE_DEVTREE)
of_scan_bus(node, bus); of_scan_bus(node, bus);
...@@ -329,7 +324,8 @@ void __devinit scan_phb(struct pci_controller *hose) ...@@ -329,7 +324,8 @@ void __devinit scan_phb(struct pci_controller *hose)
struct device_node *node = hose->dn; struct device_node *node = hose->dn;
int i, mode; int i, mode;
DBG("PCI: Scanning PHB %s\n", node ? node->full_name : "<NO NAME>"); pr_debug("PCI: Scanning PHB %s\n",
node ? node->full_name : "<NO NAME>");
/* Create an empty bus for the toplevel */ /* Create an empty bus for the toplevel */
bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node); bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node);
...@@ -345,26 +341,26 @@ void __devinit scan_phb(struct pci_controller *hose) ...@@ -345,26 +341,26 @@ void __devinit scan_phb(struct pci_controller *hose)
pcibios_map_io_space(bus); pcibios_map_io_space(bus);
/* Wire up PHB bus resources */ /* Wire up PHB bus resources */
DBG("PCI: PHB IO resource = %016lx-%016lx [%lx]\n", pr_debug("PCI: PHB IO resource = %016lx-%016lx [%lx]\n",
hose->io_resource.start, hose->io_resource.end, hose->io_resource.start, hose->io_resource.end,
hose->io_resource.flags); hose->io_resource.flags);
bus->resource[0] = &hose->io_resource; bus->resource[0] = &hose->io_resource;
for (i = 0; i < 3; ++i) { for (i = 0; i < 3; ++i) {
DBG("PCI: PHB MEM resource %d = %016lx-%016lx [%lx]\n", i, pr_debug("PCI: PHB MEM resource %d = %016lx-%016lx [%lx]\n", i,
hose->mem_resources[i].start, hose->mem_resources[i].start,
hose->mem_resources[i].end, hose->mem_resources[i].end,
hose->mem_resources[i].flags); hose->mem_resources[i].flags);
bus->resource[i+1] = &hose->mem_resources[i]; bus->resource[i+1] = &hose->mem_resources[i];
} }
DBG("PCI: PHB MEM offset = %016lx\n", hose->pci_mem_offset); pr_debug("PCI: PHB MEM offset = %016lx\n", hose->pci_mem_offset);
DBG("PCI: PHB IO offset = %08lx\n", pr_debug("PCI: PHB IO offset = %08lx\n",
(unsigned long)hose->io_base_virt - _IO_BASE); (unsigned long)hose->io_base_virt - _IO_BASE);
/* Get probe mode and perform scan */ /* Get probe mode and perform scan */
mode = PCI_PROBE_NORMAL; mode = PCI_PROBE_NORMAL;
if (node && ppc_md.pci_probe_mode) if (node && ppc_md.pci_probe_mode)
mode = ppc_md.pci_probe_mode(bus); mode = ppc_md.pci_probe_mode(bus);
DBG(" probe mode: %d\n", mode); pr_debug(" probe mode: %d\n", mode);
if (mode == PCI_PROBE_DEVTREE) { if (mode == PCI_PROBE_DEVTREE) {
bus->subordinate = hose->last_busno; bus->subordinate = hose->last_busno;
of_scan_bus(node, bus); of_scan_bus(node, bus);
...@@ -427,8 +423,8 @@ int pcibios_unmap_io_space(struct pci_bus *bus) ...@@ -427,8 +423,8 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
if (bus->self) { if (bus->self) {
struct resource *res = bus->resource[0]; struct resource *res = bus->resource[0];
DBG("IO unmapping for PCI-PCI bridge %s\n", pr_debug("IO unmapping for PCI-PCI bridge %s\n",
pci_name(bus->self)); pci_name(bus->self));
__flush_hash_table_range(&init_mm, res->start + _IO_BASE, __flush_hash_table_range(&init_mm, res->start + _IO_BASE,
res->end + _IO_BASE + 1); res->end + _IO_BASE + 1);
...@@ -442,8 +438,8 @@ int pcibios_unmap_io_space(struct pci_bus *bus) ...@@ -442,8 +438,8 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
if (hose->io_base_alloc == 0) if (hose->io_base_alloc == 0)
return 0; return 0;
DBG("IO unmapping for PHB %s\n", hose->dn->full_name); pr_debug("IO unmapping for PHB %s\n", hose->dn->full_name);
DBG(" alloc=0x%p\n", hose->io_base_alloc); pr_debug(" alloc=0x%p\n", hose->io_base_alloc);
/* This is a PHB, we fully unmap the IO area */ /* This is a PHB, we fully unmap the IO area */
vunmap(hose->io_base_alloc); vunmap(hose->io_base_alloc);
...@@ -468,11 +464,11 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus) ...@@ -468,11 +464,11 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
* thus HPTEs will be faulted in when needed * thus HPTEs will be faulted in when needed
*/ */
if (bus->self) { if (bus->self) {
DBG("IO mapping for PCI-PCI bridge %s\n", pr_debug("IO mapping for PCI-PCI bridge %s\n",
pci_name(bus->self)); pci_name(bus->self));
DBG(" virt=0x%016lx...0x%016lx\n", pr_debug(" virt=0x%016lx...0x%016lx\n",
bus->resource[0]->start + _IO_BASE, bus->resource[0]->start + _IO_BASE,
bus->resource[0]->end + _IO_BASE); bus->resource[0]->end + _IO_BASE);
return 0; return 0;
} }
...@@ -501,11 +497,11 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus) ...@@ -501,11 +497,11 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
hose->io_base_virt = (void __iomem *)(area->addr + hose->io_base_virt = (void __iomem *)(area->addr +
hose->io_base_phys - phys_page); hose->io_base_phys - phys_page);
DBG("IO mapping for PHB %s\n", hose->dn->full_name); pr_debug("IO mapping for PHB %s\n", hose->dn->full_name);
DBG(" phys=0x%016lx, virt=0x%p (alloc=0x%p)\n", pr_debug(" phys=0x%016lx, virt=0x%p (alloc=0x%p)\n",
hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc); hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc);
DBG(" size=0x%016lx (alloc=0x%016lx)\n", pr_debug(" size=0x%016lx (alloc=0x%016lx)\n",
hose->pci_io_size, size_page); hose->pci_io_size, size_page);
/* Establish the mapping */ /* Establish the mapping */
if (__ioremap_at(phys_page, area->addr, size_page, if (__ioremap_at(phys_page, area->addr, size_page,
...@@ -517,8 +513,8 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus) ...@@ -517,8 +513,8 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
hose->io_resource.start += io_virt_offset; hose->io_resource.start += io_virt_offset;
hose->io_resource.end += io_virt_offset; hose->io_resource.end += io_virt_offset;
DBG(" hose->io_resource=0x%016lx...0x%016lx\n", pr_debug(" hose->io_resource=0x%016lx...0x%016lx\n",
hose->io_resource.start, hose->io_resource.end); hose->io_resource.start, hose->io_resource.end);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment