From fddae7b8117c06cbc52027f297f5a657a87c8279 Mon Sep 17 00:00:00 2001 From: stroese Date: Wed, 20 Apr 2005 06:52:40 +0000 Subject: * Patch by Matthias Fuchs, 18 Apr 2005: Make PCI target address spaces on PMC405 and CPCI405 boards configurable via environment variables --- cpu/ppc4xx/405gp_pci.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'cpu') 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 */ -- cgit v1.1