From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] ARM: convert PCI defines to variables
Date: Sat, 02 Jul 2011 07:40:19 -0500 [thread overview]
Message-ID: <4E0F11B3.30803@gmail.com> (raw)
In-Reply-To: <201107021121.46701.arnd@arndb.de>
Arnd,
On 07/02/2011 04:21 AM, Arnd Bergmann wrote:
> Hi Rob,
>
> On Wednesday 29 June 2011 18:46:58 Rob Herring wrote:
>> From: Rob Herring <rob.herring@calxeda.com>
>>
>> Convert PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM to variables to allow
>> multi-platform builds. This also removes the requirement for a platform to
>> have a mach/hardware.h.
>
> Good idea.
>
>> @@ -24,6 +23,12 @@ EXPORT_SYMBOL(ioport_unmap);
>> #endif
>>
>> #ifdef CONFIG_PCI
>> +unsigned long pcibios_min_io;
>> +EXPORT_SYMBOL(pcibios_min_io);
>> +
>> +unsigned long pcibios_min_mem;
>> +EXPORT_SYMBOL(pcibios_min_mem);
>> +
>
> How about setting these to sensible defaults that will work on
> most platforms, so that the majority won't have to set them at
> all?
>
> Basically, the defaults should clearly be
>
> unsigned long pcibios_min_io = 0x1000;
> unsigned long pcibios_min_mem = 0x01000000;
>
> This just gets us out of the ISA bus range, so an ISA card behind
> a bridge can use all cards correctly. Most of the ones that
> currently set both to zero can probably just use those defaults
> as well, but some architectures have multiple buses or don't start
> the memory range at zero, so they might need higher values.
For many platforms, the defaults are 0 for both of these, so I went with
that. Do you think those are just wrong?
Rob
>
>> --- a/arch/arm/mach-versatile/include/mach/hardware.h
>> +++ b/arch/arm/mach-versatile/include/mach/hardware.h
>> @@ -30,10 +30,6 @@
>> #define VERSATILE_PCI_VIRT_BASE (void __iomem *)0xe8000000ul
>> #define VERSATILE_PCI_CFG_VIRT_BASE (void __iomem *)0xe9000000ul
>>
>> -/* CIK guesswork */
>> -#define PCIBIOS_MIN_IO 0x44000000
>> -#define PCIBIOS_MIN_MEM 0x50000000
>> -
>> /* macro to get at IO space when running virtually */
>> #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
>>
>
> This PCIBIOS_MIN_IO setting is wrong, and PIO doesn't work on versatile
> because of this. I have an older patch series that I should dig out again
> to fix them and make versatile use the defaults. Don't worry about this
> one.
>
> Arnd
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robherring2@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Michal Simek <monstr@monstr.eu>,
nico@fluxnic.net, Rob Herring <rob.herring@calxeda.com>
Subject: Re: [PATCH 5/6] ARM: convert PCI defines to variables
Date: Sat, 02 Jul 2011 07:40:19 -0500 [thread overview]
Message-ID: <4E0F11B3.30803@gmail.com> (raw)
In-Reply-To: <201107021121.46701.arnd@arndb.de>
Arnd,
On 07/02/2011 04:21 AM, Arnd Bergmann wrote:
> Hi Rob,
>
> On Wednesday 29 June 2011 18:46:58 Rob Herring wrote:
>> From: Rob Herring <rob.herring@calxeda.com>
>>
>> Convert PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM to variables to allow
>> multi-platform builds. This also removes the requirement for a platform to
>> have a mach/hardware.h.
>
> Good idea.
>
>> @@ -24,6 +23,12 @@ EXPORT_SYMBOL(ioport_unmap);
>> #endif
>>
>> #ifdef CONFIG_PCI
>> +unsigned long pcibios_min_io;
>> +EXPORT_SYMBOL(pcibios_min_io);
>> +
>> +unsigned long pcibios_min_mem;
>> +EXPORT_SYMBOL(pcibios_min_mem);
>> +
>
> How about setting these to sensible defaults that will work on
> most platforms, so that the majority won't have to set them at
> all?
>
> Basically, the defaults should clearly be
>
> unsigned long pcibios_min_io = 0x1000;
> unsigned long pcibios_min_mem = 0x01000000;
>
> This just gets us out of the ISA bus range, so an ISA card behind
> a bridge can use all cards correctly. Most of the ones that
> currently set both to zero can probably just use those defaults
> as well, but some architectures have multiple buses or don't start
> the memory range at zero, so they might need higher values.
For many platforms, the defaults are 0 for both of these, so I went with
that. Do you think those are just wrong?
Rob
>
>> --- a/arch/arm/mach-versatile/include/mach/hardware.h
>> +++ b/arch/arm/mach-versatile/include/mach/hardware.h
>> @@ -30,10 +30,6 @@
>> #define VERSATILE_PCI_VIRT_BASE (void __iomem *)0xe8000000ul
>> #define VERSATILE_PCI_CFG_VIRT_BASE (void __iomem *)0xe9000000ul
>>
>> -/* CIK guesswork */
>> -#define PCIBIOS_MIN_IO 0x44000000
>> -#define PCIBIOS_MIN_MEM 0x50000000
>> -
>> /* macro to get at IO space when running virtually */
>> #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
>>
>
> This PCIBIOS_MIN_IO setting is wrong, and PIO doesn't work on versatile
> because of this. I have an older patch series that I should dig out again
> to fix them and make versatile use the defaults. Don't worry about this
> one.
>
> Arnd
next prev parent reply other threads:[~2011-07-02 12:40 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-29 16:46 [PATCH v2 0/6] ARM: make mach/hardware.h optional Rob Herring
2011-06-29 16:46 ` Rob Herring
2011-06-29 16:46 ` [PATCH 1/6] microblaze: move pci flag functions into asm-generic Rob Herring
2011-06-29 16:46 ` Rob Herring
2011-06-29 16:54 ` Jesse Barnes
2011-06-29 16:54 ` Jesse Barnes
2011-07-25 19:17 ` Ram Pai
2011-07-25 19:17 ` Ram Pai
2011-07-05 10:36 ` Michal Simek
2011-07-05 10:36 ` Michal Simek
2011-06-29 16:46 ` [PATCH 2/6] ARM: move ARCH_HAS_DMA_SET_COHERENT_MASK into memory.h Rob Herring
2011-06-29 16:46 ` Rob Herring
2011-07-09 14:33 ` Rob Herring
2011-07-09 14:33 ` Rob Herring
2011-07-09 14:58 ` Russell King - ARM Linux
2011-07-09 14:58 ` Russell King - ARM Linux
2011-07-10 14:29 ` Rob Herring
2011-07-10 14:29 ` Rob Herring
2011-07-10 14:51 ` Russell King - ARM Linux
2011-07-10 14:51 ` Russell King - ARM Linux
2011-06-29 16:46 ` [PATCH 3/6] ARM: remove unnecessary mach/hardware.h includes Rob Herring
2011-06-29 16:46 ` Rob Herring
2011-06-29 16:46 ` [PATCH 4/6] ARM: pci: make pcibios_assign_all_busses use pci_has_flag Rob Herring
2011-06-29 16:46 ` Rob Herring
2011-06-29 16:46 ` [PATCH 5/6] ARM: convert PCI defines to variables Rob Herring
2011-06-29 16:46 ` Rob Herring
2011-07-02 9:21 ` Arnd Bergmann
2011-07-02 9:21 ` Arnd Bergmann
2011-07-02 12:40 ` Rob Herring [this message]
2011-07-02 12:40 ` Rob Herring
2011-07-02 19:41 ` Arnd Bergmann
2011-07-02 19:41 ` Arnd Bergmann
2011-06-29 16:46 ` [PATCH 6/6] ARM: set vga memory base at run-time Rob Herring
2011-06-29 16:46 ` Rob Herring
2011-07-02 9:24 ` [PATCH v2 0/6] ARM: make mach/hardware.h optional Arnd Bergmann
2011-07-02 9:24 ` Arnd Bergmann
2011-07-11 15:31 ` Rob Herring
2011-07-11 15:31 ` Rob Herring
2011-07-12 13:02 ` Arnd Bergmann
2011-07-12 13:02 ` Arnd Bergmann
2011-07-12 13:38 ` Michal Simek
2011-07-12 13:38 ` Michal Simek
-- strict thread matches above, loose matches on Subject: below --
2011-07-12 16:53 [PATCH v3 " Rob Herring
2011-07-12 16:53 ` [PATCH 5/6] ARM: convert PCI defines to variables Rob Herring
2011-07-12 16:53 ` Rob Herring
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=4E0F11B3.30803@gmail.com \
--to=robherring2@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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.