pci32: 4xx embedded platforms want to reassign all PCI resources
Subsystems (2)
PATCH 19/20 pci32: 4xx embedded platforms want to reassign all PCI resources
This makes 4xx embedded platforms re-assign all PCI resources as we pretty much never care about what the various firmwares have done on these, it's generally not compatible with the way the kernel will map the bridges.
We still need to also enable bus renumbering on some of them, but I will do that from a separate patch after I've fixed 4xx PCIe to handle all bus numbers.
---
arch/powerpc/platforms/40x/ep405.c | 2 ++ arch/powerpc/platforms/40x/kilauea.c | 3 +++ arch/powerpc/platforms/40x/walnut.c | 3 +++ arch/powerpc/platforms/44x/bamboo.c | 4 ++++ arch/powerpc/platforms/44x/ebony.c | 3 +++ arch/powerpc/platforms/44x/katmai.c | 3 +++ arch/powerpc/platforms/44x/sequoia.c | 5 ++++- arch/powerpc/platforms/44x/taishan.c | 2 ++ 8 files changed, 24 insertions(+), 1 deletion(-)
arch/powerpc/platforms/44x/bamboo.c +4 -0
@@ -21,6 +21,8 @@#include <asm/udbg.h> #include <asm/time.h> #include <asm/uic.h> +#include <asm/pci-bridge.h> +#include "44x.h" static struct of_device_id bamboo_of_bus[] = {
@@ -48,6 +50,8 @@ static int __init bamboo_probe(void)if (!of_flat_dt_is_compatible (root,"amcc,bamboo" ))return 0 ; + ppc_pci_flags =PPC_PCI_REASSIGN_ALL_RSRC ; +return 1 ; }
arch/powerpc/platforms/40x/ep405.c +2 -0
@@ -101,6 +101,8 @@ static void __init ep405_setup_arch(void {/* Find & init the BCSR CPLD */ ep405_init_bcsr (); + + ppc_pci_flags =PPC_PCI_REASSIGN_ALL_RSRC ; }static int __init ep405_probe (void )
arch/powerpc/platforms/40x/kilauea.c +3 -0
@@ -19,6 +19,7 @@#include <asm/udbg.h> #include <asm/time.h> #include <asm/uic.h> +#include <asm/pci-bridge.h> static struct of_device_id kilauea_of_bus[] = { { .compatible ="ibm,plb4" , },
@@ -45,6 +46,8 @@ static int __init kilauea_probe(void)if (!of_flat_dt_is_compatible (root,"amcc,kilauea" ))return 0 ; + ppc_pci_flags =PPC_PCI_REASSIGN_ALL_RSRC ; +return 1 ; }
arch/powerpc/platforms/40x/walnut.c +3 -0
@@ -24,6 +24,7 @@#include <asm/udbg.h> #include <asm/time.h> #include <asm/uic.h> +#include <asm/pci-bridge.h> static struct of_device_id walnut_of_bus[] = { { .compatible ="ibm,plb3" , },
@@ -51,6 +52,8 @@ static int __init walnut_probe(void)if (!of_flat_dt_is_compatible (root,"ibm,walnut" ))return 0 ; + ppc_pci_flags =PPC_PCI_REASSIGN_ALL_RSRC ; +return 1 ; }
arch/powerpc/platforms/44x/ebony.c +3 -0
@@ -24,6 +24,7 @@#include <asm/udbg.h> #include <asm/time.h> #include <asm/uic.h> +#include <asm/pci-bridge.h> #include "44x.h"
@@ -55,6 +56,8 @@ static int __init ebony_probe(void)if (!of_flat_dt_is_compatible (root,"ibm,ebony" ))return 0 ; + ppc_pci_flags =PPC_PCI_REASSIGN_ALL_RSRC ; +return 1 ; }
arch/powerpc/platforms/44x/katmai.c +3 -0
@@ -21,6 +21,7 @@#include <asm/udbg.h> #include <asm/time.h> #include <asm/uic.h> +#include <asm/pci-bridge.h> #include "44x.h"
@@ -49,6 +50,8 @@ static int __init katmai_probe(void)if (!of_flat_dt_is_compatible (root,"amcc,katmai" ))return 0 ; + ppc_pci_flags =PPC_PCI_REASSIGN_ALL_RSRC ; +return 1 ; }
arch/powerpc/platforms/44x/sequoia.c +4 -1
@@ -21,7 +21,8 @@#include <asm/udbg.h> #include <asm/time.h> #include <asm/uic.h> -#include "44x.h" +#include <asm/pci-bridge.h> +static struct of_device_id sequoia_of_bus[] = { { .compatible ="ibm,plb4" , },
@@ -48,6 +49,8 @@ static int __init sequoia_probe(void)if (!of_flat_dt_is_compatible (root,"amcc,sequoia" ))return 0 ; + ppc_pci_flags =PPC_PCI_REASSIGN_ALL_RSRC ; +return 1 ; }
arch/powerpc/platforms/44x/taishan.c +2 -0
@@ -60,6 +60,8 @@ static int __init taishan_probe(void)if (!of_flat_dt_is_compatible (root,"amcc,taishan" ))return 0 ; + ppc_pci_flags =PPC_PCI_REASSIGN_ALL_RSRC ; +return 1 ; }
Quoted 8 lines · Benjamin Herrenschmidt
This makes 4xx embedded platforms re-assign all PCI resources as we pretty much never care about what the various firmwares have done on these, it's generally not compatible with the way the kernel will map the bridges.
We still need to also enable bus renumbering on some of them, but I will do that from a separate patch after I've fixed 4xx PCIe to handle all bus numbers.
I just applied this series on top of Paulus's for-2.6.25 branch and I get the following error:
/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c: In function 'kilauea_probe':/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: 'ppc_pci_flags' undeclared (first use in this function) /home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: (Each undeclared identifier is reported only once /home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: for each function it appears in.) /home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: 'PPC_PCI_REASSIGN_ALL_RSRC' undeclared (first use in this function) make[3]: *** [arch/powerpc/platforms/40x/kilauea.o] Error 1
Seems like the patch:
powerpc: pci32: Add flags modifying the PCI code behaviour
This adds to the 32 bits PCI code some flags, replacing the old pci_assign_all_busses global, that allow to control various aspects of the PCI probing, such as whether to re-assign all resources or not, or to not try to assign anything at all.
This also adds the flag x86 already has to avoid ISA alignment on bridges that don't have ISA forwarding enabled (no legacy devices on the top level bus) and sets it for PowerMacs.
is missing.
Thanks.
Ciao,
Stefan
Quoted 13 lines · Stefan Roese
Quoted 8 lines · Benjamin Herrenschmidt
This makes 4xx embedded platforms re-assign all PCI resources as we pretty much never care about what the various firmwares have done on these, it's generally not compatible with the way the kernel will map the bridges.
We still need to also enable bus renumbering on some of them, but I will do that from a separate patch after I've fixed 4xx PCIe to handle all bus numbers.
I just applied this series on top of Paulus's for-2.6.25 branch and I get the following error:
Quoted 11 lines
/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c: In function 'kilauea_probe':/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: 'ppc_pci_flags' undeclared (first use in this function)/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: (Each undeclared identifier is reported only once/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: for each function it appears in.)/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: 'PPC_PCI_REASSIGN_ALL_RSRC' undeclared (first use in this function) make[3]: *** [arch/powerpc/platforms/40x/kilauea.o] Error 1
Sorry for the noise, but this was my problem. I didn't apply Ben's PCI patch series.
Ciao,
Stefan
Quoted 13 lines · Stefan Roese
Quoted 8 lines · Benjamin Herrenschmidt
This makes 4xx embedded platforms re-assign all PCI resources as we pretty much never care about what the various firmwares have done on these, it's generally not compatible with the way the kernel will map the bridges.
We still need to also enable bus renumbering on some of them, but I will do that from a separate patch after I've fixed 4xx PCIe to handle all bus numbers.
I just applied this series on top of Paulus's for-2.6.25 branch and I get the following error:
Quoted 6 lines
/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c: In function 'kilauea_probe':/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: 'ppc_pci_flags' undeclared (first use in this function)/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: (Each undeclared identifier is reported only once/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: for each function it appears in.)/home/stefan/git/linux-2.6/paulus-powerpc/arch/powerpc/platforms/40x/kilauea.c:49: error: 'PPC_PCI_REASSIGN_ALL_RSRC' undeclared (first use in this function) make[3]: *** [arch/powerpc/platforms/40x/kilauea.o] Error 1
As discussed on IRC, that's just because you are missing the PCI series of patches :-)
Cheers,
Ben.
Quoted 8 lines · On Thu, 13 Dec 2007 18:38:46 +1100 Benjamin Herrenschmidt…
This makes 4xx embedded platforms re-assign all PCI resources as we pretty much never care about what the various firmwares have done on these, it's generally not compatible with the way the kernel will map the bridges.
We still need to also enable bus renumbering on some of them, but I will do that from a separate patch after I've fixed 4xx PCIe to handle all bus numbers.
This one is slightly broken in my opinion. You've added the ppc_pci_flags to all of these platforms, which is fine for your intended goal. But now all of these platforms _have_ to compile with PCI enabled or they'll break with:
arch/powerpc/platforms/built-in.o: In function `walnut_probe':
walnut.c:(.init.text+0x9a): undefined reference to ppc_pci_flags' walnut.c:(.init.text+0xa6): undefined reference to ppc_pci_flags' make[1]: *** [.tmp_vmlinux1] Error 1
So to do it correctly we need to either select CONFIG_PCI for all of them, wrap the ppc_pci_flags assignment in #ifdef CONFIG_PCI, or move the ppc_pci_flags variable declaration into something that always gets compiled.
josh
Quoted 11 lines
This one is slightly broken in my opinion. You've added the
ppc_pci_flagsto all of these platforms, which is fine for your intended goal. But now all of these platforms _have_ to compile with PCI enabled or they'll break with:
arch/powerpc/platforms/built-in.o: In function `walnut_probe':
walnut.c:(.init.text+0x9a): undefined reference toppc_pci_flags' walnut.c:(.init.text+0xa6): undefined reference toppc_pci_flags' make[1]: *** [.tmp_vmlinux1] Error 1
Quoted 4 lines
So to do it correctly we need to either select
CONFIG_PCIfor all of them, wrap theppc_pci_flagsassignment in #ifdefCONFIG_PCI, or move theppc_pci_flagsvariable declaration into something that always gets compiled.
Hrm... PCI is user selectable ? Forgot about that ...
All those platforms have PCI slots, so we may as well select it in Kconfig... I'd rather avoid #ifdef's
Ben.
Quoted 16 lines · On Fri, 14 Dec 2007 07:37:23 +1100 Benjamin Herrenschmidt…
Quoted 11 lines
This one is slightly broken in my opinion. You've added the
ppc_pci_flagsto all of these platforms, which is fine for your intended goal. But now all of these platforms _have_ to compile with PCI enabled or they'll break with:
arch/powerpc/platforms/built-in.o: In function `walnut_probe':
walnut.c:(.init.text+0x9a): undefined reference toppc_pci_flags' walnut.c:(.init.text+0xa6): undefined reference toppc_pci_flags' make[1]: *** [.tmp_vmlinux1] Error 1Quoted 4 lines
So to do it correctly we need to either select
CONFIG_PCIfor all of them, wrap theppc_pci_flagsassignment in #ifdefCONFIG_PCI, or move theppc_pci_flagsvariable declaration into something that always gets compiled.
Quoted 4 lines
Hrm... PCI is user selectable ? Forgot about that ...
All those platforms have PCI slots, so we may as well select it in
Kconfig... I'd rather avoid #ifdef's
What about people that don't have PCI on their boards, or don't really care about it?
josh
Quoted 21 lines · Josh Boyer
Quoted 3 lines
Quoted 3 lines
This one is slightly broken in my opinion. You've added the
ppc_pci_flagsto all of these platforms, which is fine foryour
Quoted 1 line
Quoted 1 line
intended goal. But now all of these platforms _have_ to compile
with
Quoted 8 lines
Quoted 8 lines
PCI enabled or they'll break with:
arch/powerpc/platforms/built-in.o: In function `walnut_probe':
walnut.c:(.init.text+0x9a): undefined reference toppc_pci_flags' walnut.c:(.init.text+0xa6): undefined reference toppc_pci_flags' make[1]: *** [.tmp_vmlinux1] Error 1So to do it correctly we need to either select
CONFIG_PCIfor allof
Quoted 1 line
Quoted 1 line
them, wrap the
ppc_pci_flagsassignment in #ifdefCONFIG_PCI, ormove
Quoted 1 line
Quoted 1 line
the
ppc_pci_flagsvariable declaration into something that alwaysgets
Quoted 2 lines
Quoted 1 line
compiled.
Quoted 7 lines
Quoted 4 lines
Hrm... PCI is user selectable ? Forgot about that ...
All those platforms have PCI slots, so we may as well select it in
Kconfig... I'd rather avoid #ifdef'sWhat about people that don't have PCI on their boards, or don't really care about it?
Then those boards wouldn't be a walnut, ep405, ... right ?
That's why I put the flags in the BSP. If your board has no PCI, don't muck around with the PCI flags.
Ben.
Quoted 28 lines · On Fri, 14 Dec 2007 07:52:57 +1100 Benjamin Herrenschmidt…
Quoted 26 lines · Josh Boyer
Quoted 3 lines
Quoted 3 lines
This one is slightly broken in my opinion. You've added the
ppc_pci_flagsto all of these platforms, which is fine foryour
Quoted 1 line
Quoted 1 line
intended goal. But now all of these platforms _have_ to compile
with
Quoted 8 lines
Quoted 8 lines
PCI enabled or they'll break with:
arch/powerpc/platforms/built-in.o: In function `walnut_probe':
walnut.c:(.init.text+0x9a): undefined reference toppc_pci_flags' walnut.c:(.init.text+0xa6): undefined reference toppc_pci_flags' make[1]: *** [.tmp_vmlinux1] Error 1So to do it correctly we need to either select
CONFIG_PCIfor allof
Quoted 1 line
Quoted 1 line
them, wrap the
ppc_pci_flagsassignment in #ifdefCONFIG_PCI, ormove
Quoted 1 line
Quoted 1 line
the
ppc_pci_flagsvariable declaration into something that alwaysgets
Quoted 6 lines
Quoted 1 line
compiled.
Hrm... PCI is user selectable ? Forgot about that ...
All those platforms have PCI slots, so we may as well select it in
Kconfig... I'd rather avoid #ifdef's
Quoted 7 lines
Quoted 2 lines
What about people that don't have PCI on their boards, or don't really care about it?
Then those boards wouldn't be a walnut, ep405, ... right ?
That's why I put the flags in the BSP. If your board has no PCI, don't muck around with the PCI flags.
Well, there is physical PCI hardware on the boards, yes. But what if people have no intention of using it? E.g. they have no devices, etc. Now we're requiring PCI support to be built into the kernel.
I'm just being pedantic about keeping embedded tiny.
josh
Quoted 5 lines · Josh Boyer
Well, there is physical PCI hardware on the boards, yes. But what if people have no intention of using it? E.g. they have no devices, etc. Now we're requiring PCI support to be built into the kernel.
I'm just being pedantic about keeping embedded tiny.
Keeping your embedded design tiny (and thus your own BSP) is one thing, but adding ifdef's all over the place so that somebody can tinify an eval board, I'm less sure about this... but if you want, you can fixup my patches.
Ben.
Quoted 6 lines · On Fri, 14 Dec 2007 08:37:26 +1100 Benjamin Herrenschmidt…
Quoted 4 lines · Josh Boyer
Well, there is physical PCI hardware on the boards, yes. But what if people have no intention of using it? E.g. they have no devices, etc. Now we're requiring PCI support to be built into the kernel.
Quoted 6 lines
Quoted 1 line
I'm just being pedantic about keeping embedded tiny.
Keeping your embedded design tiny (and thus your own BSP) is one thing, but adding ifdef's all over the place so that somebody can tinify an eval board, I'm less sure about this... but if you want, you can fixup my patches.
I'm not really advocating for ifdefs. If it annoys me enough (which I doubt it will), then I'd try to come up with some way to avoid those too. For now, I think selecting PCI in Kconfig for those boards is OK.
josh
Quoted 8 lines · Josh Boyer
Quoted 4 lines
Keeping your embedded design tiny (and thus your own BSP) is one thing, but adding ifdef's all over the place so that somebody can tinify an eval board, I'm less sure about this... but if you want, you can fixup my patches.
I'm not really advocating for ifdefs. If it annoys me enough (which I doubt it will), then I'd try to come up with some way to avoid those too. For now, I think selecting PCI in
Kconfigfor those boards is OK.
Yes, I think it is OK to select it this way an those boards since they are evaluation boards with PCI slots.
Ciao,
Stefan
Quoted 10 lines · On Thu, 13 Dec 2007 18:38:46 +1100 Benjamin Herrenschmidt…
This makes 4xx embedded platforms re-assign all PCI resources as we pretty much never care about what the various firmwares have done on these, it's generally not compatible with the way the kernel will map the bridges.
We still need to also enable bus renumbering on some of them, but I will do that from a separate patch after I've fixed 4xx PCIe to handle all bus numbers.
Signed-off-by Benjamin Herrenschmidt <[email protected]>
[snip]
arch/powerpc/platforms/44x/sequoia.c line 25
Quoted 11 lines
Index:
linux-work/arch/powerpc/platforms/44x/sequoia.c
===================================================================arch/powerpc/platforms/44x/sequoia.c +2
-1@@ -21,7 +21,8 @@#include <asm/udbg.h> #include <asm/time.h> #include <asm/uic.h> -#include "44x.h" +#include <asm/pci-bridge.h> +
Oh, and you also broke the Sequoia build with this change because you removed the 44x.h include :).
josh
Quoted 16 lines · Josh Boyer
Quoted 10 lines · On Thu, 13 Dec 2007 18:38:46 +1100 Benjamin Herrenschmidt…
This makes 4xx embedded platforms re-assign all PCI resources as we pretty much never care about what the various firmwares have done on these, it's generally not compatible with the way the kernel will map the bridges.
We still need to also enable bus renumbering on some of them, but I will do that from a separate patch after I've fixed 4xx PCIe to handle all bus numbers.
Signed-off-by Benjamin Herrenschmidt <[email protected]>[snip]
Quoted 14 lines
arch/powerpc/platforms/44x/sequoia.c line 25
Quoted 11 lines
Index:
linux-work/arch/powerpc/platforms/44x/sequoia.c
===================================================================arch/powerpc/platforms/44x/sequoia.c +2
-1@@ -21,7 +21,8 @@#include <asm/udbg.h> #include <asm/time.h> #include <asm/uic.h> -#include "44x.h" +#include <asm/pci-bridge.h> +Oh, and you also broke the Sequoia build with this change because you removed the
44x.hinclude :).
Ok.
Ben.