linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] Integrator/AP PCI DT support
@ 2013-06-03 11:09 Linus Walleij
  2013-06-03 13:06 ` Russell King - ARM Linux
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Linus Walleij @ 2013-06-03 11:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi ARM SoC folks,

here is a pull request for the Integrator/AP PCI DT support.

This is the final stepping stone making way for this development TODO:

- Preparing removal of the board files for the Integrators
- Multiplatform support
- Moving the PCIv3 driver to drivers/pci

The patches have been around on the lists for a long time now, only
waiting for the infrastructure recently added to the ARM SoC tree.

As you can see it is based on the of/pci-helpers branch in the ARM SoC
tree. I pulled this branch into my tree and rebased the patch set onto
this.

All is ACKed by Arnd except for the patch adding the function
pci_common_init_dev() to arch/arm/include/asm/mach/pci.h.
So this will be a good time for anyone who doesn't like that idea
to protest in the last minute.

Anyway: please pull it in.

Yours,
Linus Walleij


The following changes since commit 4e23d3f505e8acfeac7cc33d4113fbb5a25c3090:

  of/pci: Add of_pci_parse_bus_range() function (2013-05-19 20:30:10 +0000)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
tags/integrator-pci-for-arm-soc

for you to fetch changes up to 81719809c6fa914e48c4d4e739eb643a40e87034:

  ARM: integrator: get PCI device IRQs from device tree (2013-06-03
10:00:40 +0200)

----------------------------------------------------------------
This is a patch series that:
- Pulls the Integrator/AP PCI bridge driver into one file
- Adds full device tree support for it

----------------------------------------------------------------
Linus Walleij (12):
      Documentation/devicetree: add a small note on PCI
      ARM: pci: create pci_common_init_dev()
      ARM: integrator: merge PCIv3 driver into one file
      ARM: integrator: convert PCIv3 bridge to platform device
      ARM: integrator: grab PCI error IRQ in probe()
      ARM: integrator: move PCI base address grab to probe
      ARM: integrator: move V3 register definitions into driver
      ARM: integrator: remap PCIv3 base dynamically
      ARM: integrator: move VGA base assignment
      ARM: integrator: move static ioremapping into PCIv3 driver
      ARM: integrator: basic PCIv3 device tree support
      ARM: integrator: get PCI device IRQs from device tree

 Documentation/devicetree/bindings/pci/pci.txt      |   9 +
 .../devicetree/bindings/pci/v3-v360epc-pci.txt     |  15 +
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/integratorap.dts                 |  41 ++
 arch/arm/include/asm/hardware/pci_v3.h             | 186 --------
 arch/arm/include/asm/mach/pci.h                    |  17 +-
 arch/arm/kernel/bios32.c                           |   9 +-
 arch/arm/mach-integrator/Makefile                  |   2 +-
 arch/arm/mach-integrator/include/mach/platform.h   |  23 -
 arch/arm/mach-integrator/integrator_ap.c           |  31 +-
 arch/arm/mach-integrator/pci.c                     | 113 -----
 arch/arm/mach-integrator/pci_v3.c                  | 520 +++++++++++++++++++--
 arch/arm/mach-integrator/pci_v3.h                  |   2 +
 13 files changed, 563 insertions(+), 406 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/pci.txt
 create mode 100644 Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt
 delete mode 100644 arch/arm/include/asm/hardware/pci_v3.h
 delete mode 100644 arch/arm/mach-integrator/pci.c
 create mode 100644 arch/arm/mach-integrator/pci_v3.h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [GIT PULL] Integrator/AP PCI DT support
  2013-06-03 11:09 [GIT PULL] Integrator/AP PCI DT support Linus Walleij
@ 2013-06-03 13:06 ` Russell King - ARM Linux
  2013-06-03 23:18   ` Linus Walleij
  2013-06-12  8:53 ` Linus Walleij
  2013-06-14 23:08 ` Olof Johansson
  2 siblings, 1 reply; 10+ messages in thread
From: Russell King - ARM Linux @ 2013-06-03 13:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 03, 2013 at 01:09:17PM +0200, Linus Walleij wrote:
> - Moving the PCIv3 driver to drivers/pci

It doesn't do this, or your diffstat is wrong.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [GIT PULL] Integrator/AP PCI DT support
  2013-06-03 13:06 ` Russell King - ARM Linux
@ 2013-06-03 23:18   ` Linus Walleij
  0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2013-06-03 23:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 3, 2013 at 3:06 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Mon, Jun 03, 2013 at 01:09:17PM +0200, Linus Walleij wrote:
>> - Moving the PCIv3 driver to drivers/pci
>
> It doesn't do this, or your diffstat is wrong.

Oh no it doesn't for sure, I wouldn't try it now anyway.
That was on the list of "future plans" sorry if it was unclear.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [GIT PULL] Integrator/AP PCI DT support
  2013-06-03 11:09 [GIT PULL] Integrator/AP PCI DT support Linus Walleij
  2013-06-03 13:06 ` Russell King - ARM Linux
@ 2013-06-12  8:53 ` Linus Walleij
  2013-06-14 23:08 ` Olof Johansson
  2 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2013-06-12  8:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 3, 2013 at 1:09 PM, Linus Walleij <linus.walleij@linaro.org> wrote:

> Hi ARM SoC folks,
>
> here is a pull request for the Integrator/AP PCI DT support.

Ping on this. Should be no different from the MVEBU stuff already
pulled in...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [GIT PULL] Integrator/AP PCI DT support
  2013-06-03 11:09 [GIT PULL] Integrator/AP PCI DT support Linus Walleij
  2013-06-03 13:06 ` Russell King - ARM Linux
  2013-06-12  8:53 ` Linus Walleij
@ 2013-06-14 23:08 ` Olof Johansson
  2013-06-15  0:09   ` Olof Johansson
  2 siblings, 1 reply; 10+ messages in thread
From: Olof Johansson @ 2013-06-14 23:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 03, 2013 at 01:09:17PM +0200, Linus Walleij wrote:
> Hi ARM SoC folks,
> 
> here is a pull request for the Integrator/AP PCI DT support.
> 
> This is the final stepping stone making way for this development TODO:
> 
> - Preparing removal of the board files for the Integrators
> - Multiplatform support
> - Moving the PCIv3 driver to drivers/pci
> 
> The patches have been around on the lists for a long time now, only
> waiting for the infrastructure recently added to the ARM SoC tree.
> 
> As you can see it is based on the of/pci-helpers branch in the ARM SoC
> tree. I pulled this branch into my tree and rebased the patch set onto
> this.
> 
> All is ACKed by Arnd except for the patch adding the function
> pci_common_init_dev() to arch/arm/include/asm/mach/pci.h.
> So this will be a good time for anyone who doesn't like that idea
> to protest in the last minute.
> 
> Anyway: please pull it in.
> 
> Yours,
> Linus Walleij
> 
> 
> The following changes since commit 4e23d3f505e8acfeac7cc33d4113fbb5a25c3090:
> 
>   of/pci: Add of_pci_parse_bus_range() function (2013-05-19 20:30:10 +0000)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
> tags/integrator-pci-for-arm-soc

Pulled, apologies for the delay on this one, fell of my list of
branches-to-pull somehow.


-Olof

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [GIT PULL] Integrator/AP PCI DT support
  2013-06-14 23:08 ` Olof Johansson
@ 2013-06-15  0:09   ` Olof Johansson
  2013-06-15 20:32     ` Linus Walleij
  0 siblings, 1 reply; 10+ messages in thread
From: Olof Johansson @ 2013-06-15  0:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jun 14, 2013 at 04:08:38PM -0700, Olof Johansson wrote:
> On Mon, Jun 03, 2013 at 01:09:17PM +0200, Linus Walleij wrote:
> > Hi ARM SoC folks,
> > 
> > here is a pull request for the Integrator/AP PCI DT support.
> > 
> > This is the final stepping stone making way for this development TODO:
> > 
> > - Preparing removal of the board files for the Integrators
> > - Multiplatform support
> > - Moving the PCIv3 driver to drivers/pci
> > 
> > The patches have been around on the lists for a long time now, only
> > waiting for the infrastructure recently added to the ARM SoC tree.
> > 
> > As you can see it is based on the of/pci-helpers branch in the ARM SoC
> > tree. I pulled this branch into my tree and rebased the patch set onto
> > this.
> > 
> > All is ACKed by Arnd except for the patch adding the function
> > pci_common_init_dev() to arch/arm/include/asm/mach/pci.h.
> > So this will be a good time for anyone who doesn't like that idea
> > to protest in the last minute.
> > 
> > Anyway: please pull it in.
> > 
> > Yours,
> > Linus Walleij
> > 
> > 
> > The following changes since commit 4e23d3f505e8acfeac7cc33d4113fbb5a25c3090:
> > 
> >   of/pci: Add of_pci_parse_bus_range() function (2013-05-19 20:30:10 +0000)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
> > tags/integrator-pci-for-arm-soc
> 
> Pulled, apologies for the delay on this one, fell of my list of
> branches-to-pull somehow.

Hmm. integrator_defconfig no longer builds:

arch/arm/mach-integrator/pci_v3.c: In function 'pci_v3_map_irq_dt':
arch/arm/mach-integrator/pci_v3.c:835:16: error: storage size of 'oirq' isn't known
arch/arm/mach-integrator/pci_v3.c:845:2: error: implicit declaration of function 'irq_create_of_mapping'

linux/of_irq.h is already included, but it seems that CONFIG_USE_OF is off in
integrator defconfig.

What's the plan here? Making DT mandatory? Or making PCI depend on DT for this
platform?

I've dropped the branch again until resolved.


-Olof

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [GIT PULL] Integrator/AP PCI DT support
  2013-06-15  0:09   ` Olof Johansson
@ 2013-06-15 20:32     ` Linus Walleij
  2013-06-19 12:05       ` Linus Walleij
  2013-06-19 23:33       ` Arnd Bergmann
  0 siblings, 2 replies; 10+ messages in thread
From: Linus Walleij @ 2013-06-15 20:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jun 15, 2013 at 2:09 AM, Olof Johansson <olof@lixom.net> wrote:
> On Fri, Jun 14, 2013 at 04:08:38PM -0700, Olof Johansson wrote:
>> On Mon, Jun 03, 2013 at 01:09:17PM +0200, Linus Walleij wrote:

>> > The following changes since commit 4e23d3f505e8acfeac7cc33d4113fbb5a25c3090:
>> >
>> >   of/pci: Add of_pci_parse_bus_range() function (2013-05-19 20:30:10 +0000)
>> >
>> > are available in the git repository at:
>> >
>> >   git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
>> > tags/integrator-pci-for-arm-soc
>>
>> Pulled, apologies for the delay on this one, fell of my list of
>> branches-to-pull somehow.
>
> Hmm. integrator_defconfig no longer builds:
>
> arch/arm/mach-integrator/pci_v3.c: In function 'pci_v3_map_irq_dt':
> arch/arm/mach-integrator/pci_v3.c:835:16: error: storage size of 'oirq' isn't known
> arch/arm/mach-integrator/pci_v3.c:845:2: error: implicit declaration of function 'irq_create_of_mapping'
>
> linux/of_irq.h is already included, but it seems that CONFIG_USE_OF is off in
> integrator defconfig.

Grrr what is wrong with me.

OK I sent out a revised version of the DT enablement patch that adds some
#ifdef. I also squashed the IRQ enablement into the main DT enablement
patch.

It now compiles nicely with and without ATAGs.

> What's the plan here? Making DT mandatory? Or making PCI depend on DT for this
> platform?

I have a branch that selects USE_OF for the integrator and *deletes*
the ATAG boot path. I will rebase that on top of this and send out ASAP,
maybe you can even get those quite nice yet simple cleanups in for this
merge window then, as a stepping stone to multiplatform.

> I've dropped the branch again until resolved.

OK here is the fixed branch, using the v3 patch of DT enablement just
posted to the list, please pull this instead (still the same base):


The following changes since commit 4e23d3f505e8acfeac7cc33d4113fbb5a25c3090:

  of/pci: Add of_pci_parse_bus_range() function (2013-05-19 20:30:10 +0000)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
tags/integrator-pci-for-arm-soc

for you to fetch changes up to f55b2b56cd37fa8bcfcb75248c27094eaf09e04c:

  ARM: integrator: basic PCIv3 device tree support (2013-06-15 22:18:39 +0200)

----------------------------------------------------------------
This is a patch series that:
- Pulls the Integrator/AP PCI bridge driver into one file
- Adds full device tree support for it
- Keeps ATAG support around for the time being

----------------------------------------------------------------
Linus Walleij (11):
      Documentation/devicetree: add a small note on PCI
      ARM: pci: create pci_common_init_dev()
      ARM: integrator: merge PCIv3 driver into one file
      ARM: integrator: convert PCIv3 bridge to platform device
      ARM: integrator: grab PCI error IRQ in probe()
      ARM: integrator: move PCI base address grab to probe
      ARM: integrator: move V3 register definitions into driver
      ARM: integrator: remap PCIv3 base dynamically
      ARM: integrator: move VGA base assignment
      ARM: integrator: move static ioremapping into PCIv3 driver
      ARM: integrator: basic PCIv3 device tree support

 Documentation/devicetree/bindings/pci/pci.txt      |   9 +
 .../devicetree/bindings/pci/v3-v360epc-pci.txt     |  15 +
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/integratorap.dts                 |  41 ++
 arch/arm/include/asm/hardware/pci_v3.h             | 186 -------
 arch/arm/include/asm/mach/pci.h                    |  17 +-
 arch/arm/kernel/bios32.c                           |   9 +-
 arch/arm/mach-integrator/Makefile                  |   2 +-
 arch/arm/mach-integrator/include/mach/platform.h   |  23 -
 arch/arm/mach-integrator/integrator_ap.c           |  31 +-
 arch/arm/mach-integrator/pci.c                     | 113 -----
 arch/arm/mach-integrator/pci_v3.c                  | 532 +++++++++++++++++++--
 arch/arm/mach-integrator/pci_v3.h                  |   2 +
 13 files changed, 575 insertions(+), 406 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/pci.txt
 create mode 100644 Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt
 delete mode 100644 arch/arm/include/asm/hardware/pci_v3.h
 delete mode 100644 arch/arm/mach-integrator/pci.c
 create mode 100644 arch/arm/mach-integrator/pci_v3.h

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [GIT PULL] Integrator/AP PCI DT support
  2013-06-15 20:32     ` Linus Walleij
@ 2013-06-19 12:05       ` Linus Walleij
  2013-06-19 23:33       ` Arnd Bergmann
  1 sibling, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2013-06-19 12:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jun 15, 2013 at 10:32 PM, Linus Walleij
<linus.walleij@linaro.org> wrote:

> OK here is the fixed branch, using the v3 patch of DT enablement just
> posted to the list, please pull this instead (still the same base):
>
>
> The following changes since commit 4e23d3f505e8acfeac7cc33d4113fbb5a25c3090:
>
>   of/pci: Add of_pci_parse_bus_range() function (2013-05-19 20:30:10 +0000)
>
> are available in the git repository at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
> tags/integrator-pci-for-arm-soc
>
> for you to fetch changes up to f55b2b56cd37fa8bcfcb75248c27094eaf09e04c:
>
>   ARM: integrator: basic PCIv3 device tree support (2013-06-15 22:18:39 +0200)
>
> ----------------------------------------------------------------
> This is a patch series that:
> - Pulls the Integrator/AP PCI bridge driver into one file
> - Adds full device tree support for it
> - Keeps ATAG support around for the time being
>
> ----------------------------------------------------------------

Ping on this...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [GIT PULL] Integrator/AP PCI DT support
  2013-06-15 20:32     ` Linus Walleij
  2013-06-19 12:05       ` Linus Walleij
@ 2013-06-19 23:33       ` Arnd Bergmann
  2013-06-25 23:08         ` Linus Walleij
  1 sibling, 1 reply; 10+ messages in thread
From: Arnd Bergmann @ 2013-06-19 23:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 15 June 2013, Linus Walleij wrote:
> The following changes since commit 4e23d3f505e8acfeac7cc33d4113fbb5a25c3090:
> 
>   of/pci: Add of_pci_parse_bus_range() function (2013-05-19 20:30:10 +0000)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
> tags/integrator-pci-for-arm-soc
> 
> for you to fetch changes up to f55b2b56cd37fa8bcfcb75248c27094eaf09e04c:
> 
>   ARM: integrator: basic PCIv3 device tree support (2013-06-15 22:18:39 +0200)
> 

Pulled into next/soc. Sorry for the delay doing the handover, I just started
with this, and have a huge backlog.

Please send a follow-on patch to fix the spaces window in the ranges
property:

+               ranges = <0x00000000 0 0x61000000 /* config space */
+                       0x61000000 0 0x00100000 /* 16 MiB @ 61000000 */
+                       0x01000000 0 0x60000000 /* I/O space */
+                       0x60000000 0 0x00100000 /* 16 MiB @ 60000000 */
+                       0x02000000 0 0x40000000 /* non-prefectable memory */
+                       0x40000000 0 0x10000000 /* 256 MiB @ 40000000 */
+                       0x42000000 0 0x50000000 /* prefetchable memory */
+                       0x50000000 0 0x10000000>; /* 256 MiB @ 50000000 */

This would not work, you need 0 as the local side address for I/O space
(unlike memory space) instead of 0x60000000. Your code ignores the
I/O space at the moment, but the ranges should be set up to let us
handle it in the future.

For the memory space, you seem to ignore the bus address in the ranges
at the moment. Please fix that too, either by programming 0x40000000/
0x50000000 into V3_LB_MAP0/V3_LB_MAP1, or by changing the ranges
to have 0x00000000/0x10000000 as the local part for non-prefetch/prefetch
memory. Either way is possible, but please make the DT consistent with
the code, ideally by using the information from DT to set up the
windows.

Also, why not just map the I/O space by calling pci_ioremap_io?

	Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [GIT PULL] Integrator/AP PCI DT support
  2013-06-19 23:33       ` Arnd Bergmann
@ 2013-06-25 23:08         ` Linus Walleij
  0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2013-06-25 23:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 20, 2013 at 1:33 AM, Arnd Bergmann <arnd@arndb.de> wrote:

> +               ranges = <0x00000000 0 0x61000000 /* config space */
> +                       0x61000000 0 0x00100000 /* 16 MiB @ 61000000 */
> +                       0x01000000 0 0x60000000 /* I/O space */
> +                       0x60000000 0 0x00100000 /* 16 MiB @ 60000000 */
> +                       0x02000000 0 0x40000000 /* non-prefectable memory */
> +                       0x40000000 0 0x10000000 /* 256 MiB @ 40000000 */
> +                       0x42000000 0 0x50000000 /* prefetchable memory */
> +                       0x50000000 0 0x10000000>; /* 256 MiB @ 50000000 */
>
> This would not work, you need 0 as the local side address for I/O space
> (unlike memory space) instead of 0x60000000. Your code ignores the
> I/O space at the moment, but the ranges should be set up to let us
> handle it in the future.

Sorry for being totally blank on PCI, probably a copy/paste error.
Made a patch for this.

> For the memory space, you seem to ignore the bus address in the ranges
> at the moment. Please fix that too, either by programming 0x40000000/
> 0x50000000 into V3_LB_MAP0/V3_LB_MAP1,

That was never done before so wouldn't dare trying it...

> or by changing the ranges
> to have 0x00000000/0x10000000 as the local part for non-prefetch/prefetch
> memory.

This is probably preferrable.
Made a patch for this.

> Either way is possible, but please make the DT consistent with
> the code, ideally by using the information from DT to set up the
> windows.

Made a patch for this as well.

> Also, why not just map the I/O space by calling pci_ioremap_io?

Made a patch for this as well.

I don't know if you want to apply all of them directly or pick-and
choose, but sent them to arm at kernel.org directly so you can
decide. I guess they all need to hit the branch next/soc in that
case.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-06-25 23:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-03 11:09 [GIT PULL] Integrator/AP PCI DT support Linus Walleij
2013-06-03 13:06 ` Russell King - ARM Linux
2013-06-03 23:18   ` Linus Walleij
2013-06-12  8:53 ` Linus Walleij
2013-06-14 23:08 ` Olof Johansson
2013-06-15  0:09   ` Olof Johansson
2013-06-15 20:32     ` Linus Walleij
2013-06-19 12:05       ` Linus Walleij
2013-06-19 23:33       ` Arnd Bergmann
2013-06-25 23:08         ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).