Commit Graph

15 Commits

Author SHA1 Message Date
Kumar Gala ff4e66e93c pci: Rename PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY for clarity
The PCI_REGION_MEMORY and PCI_REGION_MEM are a bit to similar and
can be confusing when reading the code.

Rename PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY to clarify its used
for system memory mapping purposes.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-02-07 23:50:04 +01:00
Peter Tyser 7a89795911 pci/fsl_pci_init: Enable inbound PCI config cycles
Add fsl_pci_config_unlock() function to enable a
PCI/PCIe interface configured in agent/endpoint mode to
respond to inbound PCI configuration cycles.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-12-19 18:10:45 -06:00
Kumar Gala 4c253fdb2a drivers/fsl_pci_init: Fix compile warning
fsl_pci_init.c: In function 'fsl_pci_setup_inbound_windows':
fsl_pci_init.c:122: warning: comparison is always true due to limited range of data type

The check only makes sense if we are CONFIG_PHYS_64BIT

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-12-09 21:15:03 +01:00
Becky Bruce 35db1c6d34 drivers/fsl_pci_init: Fix inbound window mapping bug
The current code will cause the creation of a 4GB window
starting at 0 if we have more than 4GB of RAM installed,
which overlaps with PCI_MEM space and causes pci_bus_to_phys()
to return erroneous information. Limit the size to 4GB - 1;
which causes the code to create one 2GB and one 1GB window
instead.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Andy Fleming <afleming@freescale.com>
2008-12-03 22:48:50 -06:00
Becky Bruce cd42516242 powerpc: fix pci window initialization to work with > 4GB DRAM
The existing code has a few errors that need to be fixed in
order to support large RAM sizes.  Fix those, and add a
comment to make it clearer.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-27 16:27:58 -05:00
Kumar Gala 219542a1a6 pci/fsl_pci_init: Removed a bunch pointless trailing backslashes.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-27 16:26:07 -05:00
Kumar Gala a2aab46072 pci/fsl_pci_init: Added fdt helper for setting up bus-ranges & dma-ranges
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
2008-10-24 17:35:08 -05:00
Kumar Gala b9a1fa9787 pci/fsl_pci_init: Add a common PCI inbound setup function
Add a common setup function that determines the pci_region(s) based
on how much memory we have in the system.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
2008-10-24 17:35:05 -05:00
Kumar Gala 612ea01018 pci/fsl_pci_init: Enable larger address and setting inbound windows properly
* PCI Inbound window was setup incorrectly.  The PCI address and system
  address were swapped.  The PCI address should be setting piwar/piwbear
  and the system address should be setting pitar.

* Removed masking of addresses to allow for system address to support
  system address & PCI address >32-bits

* Set PIWBEAR & POTEAR to allow for full 64-bit PCI addresses

* Respect the PCI_REGION_PREFETCH for inbound windows

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
2008-10-24 17:35:02 -05:00
Ed Swarthout 6df0efd5c8 fsl_pci_init do not scan bus when configured as an end-point
Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
2008-10-13 22:55:40 +02:00
Jean-Christophe PLAGNIOL-VILLARD ab6878c7bc drivers/pci: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-13 01:40:40 +02:00
Wolfgang Denk d0ff51ba5d Code cleanup: fix old style assignment ambiguities like "=-" etc.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-14 15:19:07 +02:00
Kumar Gala 876b8f9789 fsl_pci: Only modify registers if we have them
pme_msg_det exists only on PCIe controllers only set it if we are a "bridge".

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-24 14:20:12 +02:00
Kumar Gala 8ff3de61fc Handle MPC85xx PCIe reset errata (PCI-Ex 38)
On the MPC85xx boards that have PCIe enable the PCIe errata fix.
(MPC8544DS, MPC8548CDS, MPC8568MDS).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:20 -06:00
Jean-Christophe PLAGNIOL-VILLARD 93a686ee9c drivers/pci : move pci drivers to drivers/pci
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2007-11-24 20:35:55 +01:00