From: "Bradley D. LaRonde" <brad@ltc.com>
To: "Brian Murphy" <brian@murphy.dk>, "linux-mips" <linux-mips@oss.sgi.com>
Subject: Re: ioremap?
Date: Wed, 29 May 2002 12:09:10 -0400 [thread overview]
Message-ID: <009701c2072b$2b1e2820$4c00a8c0@prefect> (raw)
In-Reply-To: 3CF4CA8C.9040802@murphy.dk
Looks like those are for io (inb, outb, etc.) not mem (readb, writeb, etc.).
io addresses shouldn't be ioremapped.
Regards,
Brad
----- Original Message -----
From: "Brian Murphy" <brian@murphy.dk>
To: "linux-mips" <linux-mips@oss.sgi.com>
Sent: Wednesday, May 29, 2002 8:33 AM
Subject: ioremap?
> In three files/drivers I have had problems with physical addresses not
> being ioremapped.
> I include my patch to fix things up and request comments. How come
> others don't have similar
> problems?
>
> /Brian
>
----------------------------------------------------------------------------
----
> --- drivers/ide/ide-dma.c 2001/10/19 01:24:24 1.9
> +++ drivers/ide/ide-dma.c 2002/05/29 11:49:14
> @@ -741,7 +741,8 @@
> if (hwif->mate && hwif->mate->dma_base) {
> dma_base = hwif->mate->dma_base - (hwif->channel ? 0 : 8);
> } else {
> - dma_base = pci_resource_start(dev, 4);
> + dma_base = ioremap(pci_resource_start(dev, 4),
> + pci_resource_len(dev, 4));
> if (!dma_base) {
> printk("%s: dma_base is invalid (0x%04lx)\n", name, dma_base);
> dma_base = 0;
> --- drivers/ide/ide-pci.c 2001/11/19 13:53:59 1.20
> +++ drivers/ide/ide-pci.c 2002/05/29 11:49:15
> @@ -716,8 +716,10 @@
> if (IDE_PCI_DEVID_EQ(d->devid, DEVID_HPT366) && (port) && (class_rev <
0x03))
> return;
> if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE || (dev->class & (port ?
4 : 1)) != 0) {
> - ctl = dev->resource[(2*port)+1].start;
> - base = dev->resource[2*port].start;
> + ctl = ioremap(pci_resource_start(dev, (2*port)+1),
> + pci_resource_len(dev, (2*port)+1));
> + base = ioremap(pci_resource_start(dev, 2*port),
> + pci_resource_len(dev, 2*port));
> if (!(ctl & PCI_BASE_ADDRESS_IO_MASK) ||
> !(base & PCI_BASE_ADDRESS_IO_MASK)) {
> printk("%s: IO baseregs (BIOS) are reported as MEM, report to
<andre@linux-ide.org>.\n", d->name);
> --- drivers/net/pcnet32.c 2002/02/26 05:59:35 1.33.2.1
> +++ drivers/net/pcnet32.c 2002/05/29 11:49:18
> @@ -494,7 +494,8 @@
> }
> pci_set_master(pdev);
>
> - ioaddr = pci_resource_start (pdev, 0);
> + ioaddr = ioremap(pci_resource_start (pdev, 0),
> + pci_resource_len (pdev, 0));
> printk(KERN_INFO " ioaddr=%#08lx resource_flags=%#08lx\n",
ioaddr, pci_resource_flags (pdev, 0));
> if (!ioaddr) {
> printk (KERN_ERR "no PCI IO resources, aborting\n");
>
>
next prev parent reply other threads:[~2002-05-29 16:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-29 12:33 ioremap? Brian Murphy
2002-05-29 16:09 ` Bradley D. LaRonde [this message]
2002-05-29 17:05 ` ioremap? Brian Murphy
2002-05-29 17:25 ` ioremap? Bradley D. LaRonde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='009701c2072b$2b1e2820$4c00a8c0@prefect' \
--to=brad@ltc.com \
--cc=brian@murphy.dk \
--cc=linux-mips@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.