diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-04-28 16:34:07 -0600 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-29 03:22:21 -0400 |
commit | 72dcc883d8e5b59105e75ee5265442e458740575 (patch) | |
tree | abe950093416aba615a92c6653f2d32f37a58d45 /drivers/pnp/isapnp | |
parent | 4ab55d8d4f7b910c4c60e0f8ff70d0dfdd484f02 (diff) | |
download | blackbird-op-linux-72dcc883d8e5b59105e75ee5265442e458740575.tar.gz blackbird-op-linux-72dcc883d8e5b59105e75ee5265442e458740575.zip |
PNP: add debug output to encoders
Add debug output to encoders (enabled by CONFIG_PNP_DEBUG). This
uses dev_printk, so I had to add pnp_dev arguments at the same time.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-By: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/isapnp')
-rw-r--r-- | drivers/pnp/isapnp/core.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index b8e639f4f227..6740016437d9 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c @@ -980,6 +980,7 @@ static int isapnp_get_resources(struct pnp_dev *dev) { int ret; + dev_dbg(&dev->dev, "get resources\n"); pnp_init_resource_table(&dev->res); isapnp_cfg_begin(dev->card->number, dev->number); ret = isapnp_read_resources(dev); @@ -992,15 +993,19 @@ static int isapnp_set_resources(struct pnp_dev *dev) struct pnp_resource_table *res = &dev->res; int tmp; + dev_dbg(&dev->dev, "set resources\n"); isapnp_cfg_begin(dev->card->number, dev->number); dev->active = 1; for (tmp = 0; tmp < ISAPNP_MAX_PORT && (res->port_resource[tmp]. flags & (IORESOURCE_IO | IORESOURCE_UNSET)) == IORESOURCE_IO; - tmp++) + tmp++) { + dev_dbg(&dev->dev, " set io %d to %#llx\n", + tmp, (unsigned long long) res->port_resource[tmp].start); isapnp_write_word(ISAPNP_CFG_PORT + (tmp << 1), res->port_resource[tmp].start); + } for (tmp = 0; tmp < ISAPNP_MAX_IRQ && (res->irq_resource[tmp]. @@ -1009,22 +1014,29 @@ static int isapnp_set_resources(struct pnp_dev *dev) int irq = res->irq_resource[tmp].start; if (irq == 2) irq = 9; + dev_dbg(&dev->dev, " set irq %d to %d\n", tmp, irq); isapnp_write_byte(ISAPNP_CFG_IRQ + (tmp << 1), irq); } for (tmp = 0; tmp < ISAPNP_MAX_DMA && (res->dma_resource[tmp]. flags & (IORESOURCE_DMA | IORESOURCE_UNSET)) == IORESOURCE_DMA; - tmp++) + tmp++) { + dev_dbg(&dev->dev, " set dma %d to %lld\n", + tmp, (unsigned long long) res->dma_resource[tmp].start); isapnp_write_byte(ISAPNP_CFG_DMA + tmp, res->dma_resource[tmp].start); + } for (tmp = 0; tmp < ISAPNP_MAX_MEM && (res->mem_resource[tmp]. flags & (IORESOURCE_MEM | IORESOURCE_UNSET)) == IORESOURCE_MEM; - tmp++) + tmp++) { + dev_dbg(&dev->dev, " set mem %d to %#llx\n", + tmp, (unsigned long long) res->mem_resource[tmp].start); isapnp_write_word(ISAPNP_CFG_MEM + (tmp << 3), (res->mem_resource[tmp].start >> 8) & 0xffff); + } /* FIXME: We aren't handling 32bit mems properly here */ isapnp_activate(dev->number); isapnp_cfg_end(); |