linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Assign all PCI busses on G3 Blue & White
@ 2007-02-04  8:16 Pavel Roskin
  2007-02-05  0:11 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Roskin @ 2007-02-04  8:16 UTC (permalink / raw)
  To: linuxppc-dev

From: Pavel Roskin <proski@gnu.org>

G3 Blue & White is misconfigured by default so that CardBus controllers
in PCI slots don't work.  The PCI bridge is programmed to only allow
access to bus 1 but not higher busses.

The patch forces the PCI busses to be reassigned if a Grackle controller
is found and the machine identifies itself as "PowerMac1,1"

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
My previous attempt to fix this bug can be found in this thread:
http://ozlabs.org/pipermail/linuxppc-dev/2004-May/thread.html#17056
The new patch relies on the existing common PCI code and doesn't poke
bridge registers itself.  It would even do the right thing if a PCI or
CardBus bridge is inserted into the upper slot reserved for video cards
and connected directly to bus 0.
---

 arch/powerpc/sysdev/grackle.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/sysdev/grackle.c b/arch/powerpc/sysdev/grackle.c
index b6ec793..4205362 100644
--- a/arch/powerpc/sysdev/grackle.c
+++ b/arch/powerpc/sysdev/grackle.c
@@ -56,6 +56,8 @@ static inline void grackle_set_loop_snoop(struct pci_controller *bp, int enable)
 void __init setup_grackle(struct pci_controller *hose)
 {
 	setup_indirect_pci(hose, 0xfec00000, 0xfee00000);
+	if (machine_is_compatible("PowerMac1,1"))
+		pci_assign_all_buses = 1;
 	if (machine_is_compatible("AAPL,PowerBook1998"))
 		grackle_set_loop_snoop(hose, 1);
 #if 0	/* Disabled for now, HW problems ??? */


-- 
Regards,
Pavel Roskin

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

* Re: [PATCH] Assign all PCI busses on G3 Blue & White
  2007-02-04  8:16 [PATCH] Assign all PCI busses on G3 Blue & White Pavel Roskin
@ 2007-02-05  0:11 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2007-02-05  0:11 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linuxppc-dev

On Sun, 2007-02-04 at 03:16 -0500, Pavel Roskin wrote:
> From: Pavel Roskin <proski@gnu.org>
> 
> G3 Blue & White is misconfigured by default so that CardBus controllers
> in PCI slots don't work.  The PCI bridge is programmed to only allow
> access to bus 1 but not higher busses.
> 
> The patch forces the PCI busses to be reassigned if a Grackle controller
> is found and the machine identifies itself as "PowerMac1,1"
> 
> Signed-off-by: Pavel Roskin <proski@gnu.org>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> ---
> My previous attempt to fix this bug can be found in this thread:
> http://ozlabs.org/pipermail/linuxppc-dev/2004-May/thread.html#17056
> The new patch relies on the existing common PCI code and doesn't poke
> bridge registers itself.  It would even do the right thing if a PCI or
> CardBus bridge is inserted into the upper slot reserved for video cards
> and connected directly to bus 0.
> ---
> 
>  arch/powerpc/sysdev/grackle.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/sysdev/grackle.c b/arch/powerpc/sysdev/grackle.c
> index b6ec793..4205362 100644
> --- a/arch/powerpc/sysdev/grackle.c
> +++ b/arch/powerpc/sysdev/grackle.c
> @@ -56,6 +56,8 @@ static inline void grackle_set_loop_snoop(struct pci_controller *bp, int enable)
>  void __init setup_grackle(struct pci_controller *hose)
>  {
>  	setup_indirect_pci(hose, 0xfec00000, 0xfee00000);
> +	if (machine_is_compatible("PowerMac1,1"))
> +		pci_assign_all_buses = 1;
>  	if (machine_is_compatible("AAPL,PowerBook1998"))
>  		grackle_set_loop_snoop(hose, 1);
>  #if 0	/* Disabled for now, HW problems ??? */
> 
> 

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

end of thread, other threads:[~2007-02-05  0:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-04  8:16 [PATCH] Assign all PCI busses on G3 Blue & White Pavel Roskin
2007-02-05  0:11 ` Benjamin Herrenschmidt

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).