linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Large PCI region mapping 8272
@ 2004-11-18 20:05 Milligan, Keath
  2004-11-19 10:34 ` Marc Leeman
  0 siblings, 1 reply; 3+ messages in thread
From: Milligan, Keath @ 2004-11-18 20:05 UTC (permalink / raw)
  To: linuxppc-dev

Hello,

I am having trouble getting PCI devices mapped correctly under Linux 2.4.22
running on an MPC8272ADS evaluation board.

I have multiple PCI-attached devices with a total of 512MB of prefetchable
memory and about 200MB of non-prefetchable memory address spaces in various
block sizes. All of the devices are behind a PCI-to-PCI bridge that is
plugged into the ADS.

At this stage in my project, these devices are initializing themselves to
base addresses that need to be moved when Linux boots on the 8272. The
problem I am having is that Linux is trying to remap everything, but is
unable to allocate regions for everything, so I end up with most of the
devices mapped to the same (invalid) address.

I've tried hacking the kernel PCI initialization to manually set all the
base addresses, but it seems to be ignoring that for the most part.

Could someone point me in the right direction to getting everything
initialized and mapped correctly?

Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread
* RE: Large PCI region mapping 8272
@ 2004-11-22 16:15 Milligan, Keath
  0 siblings, 0 replies; 3+ messages in thread
From: Milligan, Keath @ 2004-11-22 16:15 UTC (permalink / raw)
  To: linuxppc-dev

Well, I've confirmed that I have the right platform files and I've =
enabled
debugging in most of the related files.

At this point, I am specifically concerned about code in
arch/ppc/kernel/mpc10x_common.c and m8260_setup.c.

In mpc10x_common.c there is a setup switch statement that has the =
following
case for the 8272ADS:

#if defined CONFIG_MPC8272ADS || defined CONFIG_ADS8266
		case MPC10X_MEM_MAP_826x:
			pci_init_resource(&hose->io_resource,
#if 0 /* zhx */
					0xe0000000,
					0xeeffffff,
#else
					0xa0000000,
					0xafffffff,
#endif
					IORESOURCE_IO,
					"PCI host bridge");

			pci_init_resource (&hose->mem_resources[0],
					0x80000000,
					0x9fffffff,
					IORESOURCE_MEM,
					"PCI host bridge");
			break;

This seems to be limiting resources to a0000000-afffffff and
80000000-9fffffff. Does anyone know where these hard-coded values come =
from?

Also in m8260_setup.c, more hard-coded ranges appear in m8260_map_io().

These would seem to suggest the 8272ADS is pretty limited on the amount =
of
PCI-mapped memory that it can handle.


-----Original Message-----
From: Marc Leeman [mailto:marc.leeman@gmail.com]=20
Sent: Friday, November 19, 2004 4:34 AM
To: Milligan, Keath
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Large PCI region mapping 8272

> Could someone point me in the right direction to getting everything
> initialized and mapped correctly?

I had the same impression (that the PCI initialisation) was not quite
right. After some investigation, it was me that used a wrong platform
file (overzealous deleting and copying to minimise custom code).

>From what I understand (after a brief look in the files), most of the
changes can be localised in that file.

You can enable debugging in  (IIRC) -#define DEBUG-
arch/ppc/kernel/pci.c
to have a more verbose look at what is happening.

The same goes for quircks.c and pci.c (in drivers/ somewhere).

In any case, the pci mapping calls your platform dependent fixes.=20

--=20
ash nazg durbatul=FBk, ash nazg gimbatul,
ash nazg thrakatul=FBk agh burzum-ishi krimpatul

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

end of thread, other threads:[~2004-11-22 16:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-18 20:05 Large PCI region mapping 8272 Milligan, Keath
2004-11-19 10:34 ` Marc Leeman
  -- strict thread matches above, loose matches on Subject: below --
2004-11-22 16:15 Milligan, Keath

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