public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] ppc4xx: Allow overwriting pci target registers for all 4xx boards
@ 2009-09-07 15:00 Matthias Fuchs
  2009-09-07 15:00 ` [U-Boot] [PATCH 2/2] ppc4xx: Add CONFIG_PCI_4xx_PTM_OVERWRITE to some esd " Matthias Fuchs
  2009-09-08  9:02 ` [U-Boot] [PATCH 1/2] ppc4xx: Allow overwriting pci target registers for all " Stefan Roese
  0 siblings, 2 replies; 4+ messages in thread
From: Matthias Fuchs @ 2009-09-07 15:00 UTC (permalink / raw)
  To: u-boot

This patch adds the CONFIG_PCI_4xx_PTM_OVERWRITE option and replaces
the ugly 'if defined(BOARD1) || ... || defined(BOARDn)' construct
in 4xx pci code.

When CONFIG_PCI_4xx_PTM_OVERWRITE is defined the default ptm register
setup can be overwritten through environment variables ptm1la, ptm1ms,
ptm2la and ptm2ms to do application specific pci target BAR configuration.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
---
 cpu/ppc4xx/4xx_pci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpu/ppc4xx/4xx_pci.c b/cpu/ppc4xx/4xx_pci.c
index 5d7d59c..184cef5 100644
--- a/cpu/ppc4xx/4xx_pci.c
+++ b/cpu/ppc4xx/4xx_pci.c
@@ -138,7 +138,7 @@ void pci_405gp_init(struct pci_controller *hose)
 
 	unsigned short temp_short;
 	unsigned long ptmpcila[2] = {CONFIG_SYS_PCI_PTM1PCI, CONFIG_SYS_PCI_PTM2PCI};
-#if defined(CONFIG_CPCI405) || defined(CONFIG_PMC405)
+#if defined(CONFIG_PCI_4xx_PTM_OVERWRITE)
 	char *ptmla_str, *ptmms_str;
 #endif
 	unsigned long ptmla[2]    = {CONFIG_SYS_PCI_PTM1LA, CONFIG_SYS_PCI_PTM2LA};
@@ -160,7 +160,7 @@ void pci_405gp_init(struct pci_controller *hose)
 #endif
 #endif
 
-#if defined(CONFIG_CPCI405) || defined(CONFIG_PMC405)
+#if defined(CONFIG_PCI_4xx_PTM_OVERWRITE)
 	ptmla_str = getenv("ptm1la");
 	ptmms_str = getenv("ptm1ms");
 	if(NULL != ptmla_str && NULL != ptmms_str ) {
-- 
1.6.1

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

* [U-Boot] [PATCH 2/2] ppc4xx: Add CONFIG_PCI_4xx_PTM_OVERWRITE to some esd 4xx boards
  2009-09-07 15:00 [U-Boot] [PATCH 1/2] ppc4xx: Allow overwriting pci target registers for all 4xx boards Matthias Fuchs
@ 2009-09-07 15:00 ` Matthias Fuchs
  2009-09-08  9:02   ` Stefan Roese
  2009-09-08  9:02 ` [U-Boot] [PATCH 1/2] ppc4xx: Allow overwriting pci target registers for all " Stefan Roese
  1 sibling, 1 reply; 4+ messages in thread
From: Matthias Fuchs @ 2009-09-07 15:00 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
---
 include/configs/CPCI405.h   |    2 ++
 include/configs/CPCI4052.h  |    2 ++
 include/configs/CPCI405AB.h |    2 ++
 include/configs/CPCI405DT.h |    2 ++
 include/configs/PMC405.h    |    2 ++
 include/configs/PMC405DE.h  |    2 ++
 6 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/configs/CPCI405.h b/include/configs/CPCI405.h
index f032a8d..fca6de0 100644
--- a/include/configs/CPCI405.h
+++ b/include/configs/CPCI405.h
@@ -171,6 +171,8 @@
 #define CONFIG_SYS_PCI_PTM2MS  0xffc00001      /* 4MB, enable                  */
 #define CONFIG_SYS_PCI_PTM2PCI 0x04000000      /* Host: use this pci address   */
 
+#define CONFIG_PCI_4xx_PTM_OVERWRITE	1 /* overwrite PTMx settings by env */
+
 /*-----------------------------------------------------------------------
  * IDE/ATA stuff
  *-----------------------------------------------------------------------
diff --git a/include/configs/CPCI4052.h b/include/configs/CPCI4052.h
index daa3c19..fd04566 100644
--- a/include/configs/CPCI4052.h
+++ b/include/configs/CPCI4052.h
@@ -192,6 +192,8 @@
 #define CONFIG_SYS_PCI_PTM2MS  0xffc00001      /* 4MB, enable                  */
 #define CONFIG_SYS_PCI_PTM2PCI 0x04000000      /* Host: use this pci address   */
 
+#define CONFIG_PCI_4xx_PTM_OVERWRITE	1 /* overwrite PTMx settings by env */
+
 /*-----------------------------------------------------------------------
  * IDE/ATA stuff
  *-----------------------------------------------------------------------
diff --git a/include/configs/CPCI405AB.h b/include/configs/CPCI405AB.h
index 41795a7..d718ed4 100644
--- a/include/configs/CPCI405AB.h
+++ b/include/configs/CPCI405AB.h
@@ -189,6 +189,8 @@
 #define CONFIG_SYS_PCI_PTM2MS	0xffc00001	/* 4MB, enable			*/
 #define CONFIG_SYS_PCI_PTM2PCI 0x04000000	/* Host: use this pci address	*/
 
+#define CONFIG_PCI_4xx_PTM_OVERWRITE	1 /* overwrite PTMx settings by env */
+
 /*-----------------------------------------------------------------------
  * IDE/ATA stuff
  *-----------------------------------------------------------------------
diff --git a/include/configs/CPCI405DT.h b/include/configs/CPCI405DT.h
index 2333208..09df470 100644
--- a/include/configs/CPCI405DT.h
+++ b/include/configs/CPCI405DT.h
@@ -193,6 +193,8 @@
 #define CONFIG_SYS_PCI_PTM2MS  0xffc00001      /* 4MB, enable                  */
 #define CONFIG_SYS_PCI_PTM2PCI 0x04000000      /* Host: use this pci address   */
 
+#define CONFIG_PCI_4xx_PTM_OVERWRITE	1 /* overwrite PTMx settings by env */
+
 /*-----------------------------------------------------------------------
  * IDE/ATA stuff
  *-----------------------------------------------------------------------
diff --git a/include/configs/PMC405.h b/include/configs/PMC405.h
index a9e7134..87ea7b6 100644
--- a/include/configs/PMC405.h
+++ b/include/configs/PMC405.h
@@ -181,6 +181,8 @@
 #define CONFIG_SYS_PCI_PTM2MS  0xff000001	/* 16MB, enable */
 #define CONFIG_SYS_PCI_PTM2PCI 0x00000000	/* Host: use this pci address */
 
+#define CONFIG_PCI_4xx_PTM_OVERWRITE	1 /* overwrite PTMx settings by env */
+
 /*
  * Start addresses for the final memory configuration
  * (Set up by the startup code)
diff --git a/include/configs/PMC405DE.h b/include/configs/PMC405DE.h
index 5232745..7198632 100644
--- a/include/configs/PMC405DE.h
+++ b/include/configs/PMC405DE.h
@@ -164,6 +164,8 @@
 #define CONFIG_SYS_PCI_PTM2MS  0xff000001      /* 16MB, enable=1 */
 #define CONFIG_SYS_PCI_PTM2PCI 0x04000000      /* Host: use this pci address */
 
+#define CONFIG_PCI_4xx_PTM_OVERWRITE	1 /* overwrite PTMx settings by env */
+
 /*
  * For booting Linux, the board info and command line data
  * have to be in the first 8 MB of memory, since this is
-- 
1.6.1

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

* [U-Boot] [PATCH 1/2] ppc4xx: Allow overwriting pci target registers for all 4xx boards
  2009-09-07 15:00 [U-Boot] [PATCH 1/2] ppc4xx: Allow overwriting pci target registers for all 4xx boards Matthias Fuchs
  2009-09-07 15:00 ` [U-Boot] [PATCH 2/2] ppc4xx: Add CONFIG_PCI_4xx_PTM_OVERWRITE to some esd " Matthias Fuchs
@ 2009-09-08  9:02 ` Stefan Roese
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2009-09-08  9:02 UTC (permalink / raw)
  To: u-boot

On Monday 07 September 2009 17:00:40 Matthias Fuchs wrote:
> This patch adds the CONFIG_PCI_4xx_PTM_OVERWRITE option and replaces
> the ugly 'if defined(BOARD1) || ... || defined(BOARDn)' construct
> in 4xx pci code.
> 
> When CONFIG_PCI_4xx_PTM_OVERWRITE is defined the default ptm register
> setup can be overwritten through environment variables ptm1la, ptm1ms,
> ptm2la and ptm2ms to do application specific pci target BAR configuration.

Applied to ppc4xx. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

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

* [U-Boot] [PATCH 2/2] ppc4xx: Add CONFIG_PCI_4xx_PTM_OVERWRITE to some esd 4xx boards
  2009-09-07 15:00 ` [U-Boot] [PATCH 2/2] ppc4xx: Add CONFIG_PCI_4xx_PTM_OVERWRITE to some esd " Matthias Fuchs
@ 2009-09-08  9:02   ` Stefan Roese
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2009-09-08  9:02 UTC (permalink / raw)
  To: u-boot

On Monday 07 September 2009 17:00:41 Matthias Fuchs wrote:
> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>

Applied to ppc4xx. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

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

end of thread, other threads:[~2009-09-08  9:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-07 15:00 [U-Boot] [PATCH 1/2] ppc4xx: Allow overwriting pci target registers for all 4xx boards Matthias Fuchs
2009-09-07 15:00 ` [U-Boot] [PATCH 2/2] ppc4xx: Add CONFIG_PCI_4xx_PTM_OVERWRITE to some esd " Matthias Fuchs
2009-09-08  9:02   ` Stefan Roese
2009-09-08  9:02 ` [U-Boot] [PATCH 1/2] ppc4xx: Allow overwriting pci target registers for all " Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox