summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx/405gp_pci.c
diff options
context:
space:
mode:
authorstroese <stroese>2005-04-20 06:52:40 +0000
committerstroese <stroese>2005-04-20 06:52:40 +0000
commitfddae7b8117c06cbc52027f297f5a657a87c8279 (patch)
treeedae93d39d2565e155d2d8ccbf2003c7be7a0776 /cpu/ppc4xx/405gp_pci.c
parent5e5f9ed254e20b830fef5f42a52ac0bbdc92a57e (diff)
downloadu-boot-imx-fddae7b8117c06cbc52027f297f5a657a87c8279.zip
u-boot-imx-fddae7b8117c06cbc52027f297f5a657a87c8279.tar.gz
u-boot-imx-fddae7b8117c06cbc52027f297f5a657a87c8279.tar.bz2
* Patch by Matthias Fuchs, 18 Apr 2005:
Make PCI target address spaces on PMC405 and CPCI405 boards configurable via environment variables
Diffstat (limited to 'cpu/ppc4xx/405gp_pci.c')
-rw-r--r--cpu/ppc4xx/405gp_pci.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/cpu/ppc4xx/405gp_pci.c b/cpu/ppc4xx/405gp_pci.c
index e59a5af..4f1754a 100644
--- a/cpu/ppc4xx/405gp_pci.c
+++ b/cpu/ppc4xx/405gp_pci.c
@@ -98,6 +98,7 @@ void pci_405gp_init(struct pci_controller *hose)
#if defined(CONFIG_CPCI405) || defined(CONFIG_PMC405)
unsigned long ptmla[2] = {bd->bi_memstart, bd->bi_flashstart};
unsigned long ptmms[2] = {~(bd->bi_memsize - 1) | 1, ~(bd->bi_flashsize - 1) | 1};
+ char *ptmla_str, *ptmms_str;
#else
unsigned long ptmla[2] = {CFG_PCI_PTM1LA, CFG_PCI_PTM2LA};
unsigned long ptmms[2] = {CFG_PCI_PTM1MS, CFG_PCI_PTM2MS};
@@ -119,6 +120,22 @@ void pci_405gp_init(struct pci_controller *hose)
#endif
#endif
+#if defined(CONFIG_CPCI405) || defined(CONFIG_PMC405)
+ ptmla_str = getenv("ptm1la");
+ ptmms_str = getenv("ptm1ms");
+ if(NULL != ptmla_str && NULL != ptmms_str ) {
+ ptmla[0] = simple_strtoul (ptmla_str, NULL, 16);
+ ptmms[0] = simple_strtoul (ptmms_str, NULL, 16);
+ }
+
+ ptmla_str = getenv("ptm2la");
+ ptmms_str = getenv("ptm2ms");
+ if(NULL != ptmla_str && NULL != ptmms_str ) {
+ ptmla[1] = simple_strtoul (ptmla_str, NULL, 16);
+ ptmms[1] = simple_strtoul (ptmms_str, NULL, 16);
+ }
+#endif
+
/*
* Register the hose
*/