[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    Re: ixdp2850 problems (pci bus scanning/enumeration, etc.)
From:       Lennert Buytenhek <buytenh () wantstofly ! org>
Date:       2005-04-28 10:27:45
Message-ID: 20050428102745.GE28878 () xi ! wantstofly ! org
[Download RAW message or body]

On Thu, Apr 07, 2005 at 03:31:23PM +0100, Russell King - ARM Linux wrote:

> > Other non-IXP issues:
> > - arch/arm/kernel/bios32.c assumes that if r->start == 0 and
> >   r->end != 0, that resource assignment failed due to collisions.
> >   But on the IXDP2850, the master NIC has its PCI I/O range
> >   located at 00..3f.  Is there another way we can signal failure
> >   to assign resources?  For example start=~0 and end=0 ?
> 
> The test in pdev_fixup_device_resources() should probably be testing
> r->flags rather than r->start for zero.
> 
> The problem with setting r->start=~0 and r->end=0 is that r->end -
> r->start tells us how large the allocation has to be, and we don't
> want to tell everyone that this is only one byte.

There's another way of solving this that doesn't involve digging
around in the PCI subsystem (which I'm kind of fed up with for now):
if we're going to redo the resource allocation on boot anyway, we
can just make the allocator start allocating I/O space addresses at
00010000 instead of 00000000 for the IXP2000 (thereby perpetuating
the falsehood that r->start=0 means 'unassigned' for now until we
feel like fixing it some other day), and make the 64k outbound I/O
window map to 0001xxxx instead of 0000xxxx by adjusting the upper
16 bits of the PCI_ADDR_EXT register.

Deepak, is such a change acceptable?  If yes, I'll submit a proper
patch+explanation to the patch tracker.


cheers,
Lennert


diff -urN linux-2.6.11.orig/arch/arm/mach-ixp2000/pci.c linux-2.6.11/arch/arm/mach-ixp2000/pci.c
--- linux-2.6.11.orig/arch/arm/mach-ixp2000/pci.c	2005-04-28 11:45:33.000000000 +0200
+++ linux-2.6.11/arch/arm/mach-ixp2000/pci.c	2005-04-28 12:07:58.000000000 +0200
@@ -215,7 +215,7 @@
 };

 static struct resource ixp2000_pci_io_space = {
-	.start	= 0x00000000,
+	.start	= 0x00010000,
 	.end	= 0xffffffff,
 	.flags	= IORESOURCE_IO,
 	.name	= "PCI I/O Space"



-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:       http://www.arm.linux.org.uk/armlinux/mlfaq.php
Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic