linux-mips
[Top] [All Lists]

Re: [PATCH 3/4] MIPS: pci-ar724x: remove static PCI IO/MEM resources

To: Sergei Shtylyov <sshtylyov@mvista.com>
Subject: Re: [PATCH 3/4] MIPS: pci-ar724x: remove static PCI IO/MEM resources
From: Gabor Juhos <juhosg@openwrt.org>
Date: Sun, 03 Feb 2013 13:31:49 +0100
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips <linux-mips@linux-mips.org>, John Crispin <blogic@openwrt.org>
In-reply-to: <510E479C.4020305@mvista.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1359889120-15699-1-git-send-email-juhosg@openwrt.org> <1359889185-15779-1-git-send-email-juhosg@openwrt.org> <510E479C.4020305@mvista.com>
Sender: linux-mips-bounce@linux-mips.org
2013.02.03. 12:18 keltezéssel, Sergei Shtylyov írta:

>> @@ -160,6 +163,16 @@ ath79_register_pci_ar724x(int id,
>>       res[2].start = irq;
>>       res[2].end = irq;
>>
>> +    res[3].name = "mem_base";
>> +    res[3].flags = IORESOURCE_MEM;
>> +    res[3].start = mem_base;
>> +    res[3].end = mem_base + mem_size - 1;
>> +
>> +    res[4].name = "io_base";
>> +    res[4].flags = IORESOURCE_IO;
>> +    res[4].start = io_base;
>> +    res[4].end = io_base;
> 
>    One I/O port, hm? What is it good for?

Strictly speaking it is not good for anything. This is a PCIe controller and it
does not support IO requests at all. However the whole PCI code assumes that
each PCI controller have an IO resource and uses the hose->io_resource pointer
unconditionally.

Additionally, this matches with the removed static resource:

> -static struct resource ar724x_io_resource = {
> -     .name   = "PCI IO space",
> -     .start  = 0,
> -     .end    = 0,
> -     .flags  = IORESOURCE_IO,
> -};
> -

Thank you for the review.

-Gabor


<Prev in Thread] Current Thread [Next in Thread>