public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ppc4xx: Support PPC460EX rev B on gdsys CompactCenter
@ 2009-07-30  6:46 Dirk Eibach
  2009-07-30  7:11 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Dirk Eibach @ 2009-07-30  6:46 UTC (permalink / raw)
  To: u-boot

This patch is based on a patch for canyonlands by Stefan Roese.

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
---
 board/gdsys/compactcenter/compactcenter.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/board/gdsys/compactcenter/compactcenter.c b/board/gdsys/compactcenter/compactcenter.c
index 477ef70..4861cc8 100644
--- a/board/gdsys/compactcenter/compactcenter.c
+++ b/board/gdsys/compactcenter/compactcenter.c
@@ -39,10 +39,19 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define CONFIG_SYS_BCSR3_PCIE		0x10
 
-int board_early_init_f(void)
+static int pvr_460ex(void)
 {
 	u32 pvr = get_pvr();
 
+	if ((pvr == PVR_460EX_RA) || (pvr == PVR_460EX_SE_RA) ||
+	    (pvr == PVR_460EX_RB))
+		return 1;
+
+	return 0;
+}
+
+int board_early_init_f(void)
+{
 	/*
 	 * Setup the interrupt controller polarities, triggers, etc.
 	 */
@@ -95,7 +104,7 @@ int board_early_init_f(void)
 	mtdcr(AHB_TOP, 0x8000004B);
 	mtdcr(AHB_BOT, 0x8000004B);
 
-	if ((pvr == PVR_460EX_RA) || (pvr == PVR_460EX_SE_RA)) {
+	if (pvr_460ex()) {
 		/*
 		 * Configure USB-STP pins as alternate and not GPIO
 		 * It seems to be neccessary to configure the STP pins as GPIO
@@ -250,7 +259,6 @@ int misc_init_r(void)
 {
 	u32 sdr0_srst1 = 0;
 	u32 eth_cfg;
-	u32 pvr = get_pvr();
 
 	/*
 	 * Set EMAC mode/configuration (GMII, SGMII, RGMII...).
@@ -264,7 +272,7 @@ int misc_init_r(void)
 	/* Set the for 2 RGMII mode */
 	/* GMC0 EMAC4_0, GMC0 EMAC4_1, RGMII Bridge 0 */
 	eth_cfg &= ~SDR0_ETH_CFG_GMC0_BRIDGE_SEL;
-	if ((pvr == PVR_460EX_RA) || (pvr == PVR_460EX_SE_RA))
+	if (pvr_460ex())
 		eth_cfg |= SDR0_ETH_CFG_GMC1_BRIDGE_SEL;
 	else
 		eth_cfg &= ~SDR0_ETH_CFG_GMC1_BRIDGE_SEL;
-- 
1.5.6.5

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

* [U-Boot] [PATCH] ppc4xx: Support PPC460EX rev B on gdsys CompactCenter
  2009-07-30  6:46 [U-Boot] [PATCH] ppc4xx: Support PPC460EX rev B on gdsys CompactCenter Dirk Eibach
@ 2009-07-30  7:11 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2009-07-30  7:11 UTC (permalink / raw)
  To: u-boot

Hi Dirk,

On Thursday 30 July 2009 08:46:16 Dirk Eibach wrote:
> This patch is based on a patch for canyonlands by Stefan Roese.
>
> Signed-off-by: Dirk Eibach <eibach@gdsys.de>
> ---
>  board/gdsys/compactcenter/compactcenter.c |   16 ++++++++++++----
>  1 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/board/gdsys/compactcenter/compactcenter.c
> b/board/gdsys/compactcenter/compactcenter.c index 477ef70..4861cc8 100644
> --- a/board/gdsys/compactcenter/compactcenter.c
> +++ b/board/gdsys/compactcenter/compactcenter.c
> @@ -39,10 +39,19 @@ DECLARE_GLOBAL_DATA_PTR;
>
>  #define CONFIG_SYS_BCSR3_PCIE		0x10
>
> -int board_early_init_f(void)
> +static int pvr_460ex(void)
>  {
>  	u32 pvr = get_pvr();
>
> +	if ((pvr == PVR_460EX_RA) || (pvr == PVR_460EX_SE_RA) ||
> +	    (pvr == PVR_460EX_RB))
> +		return 1;
> +
> +	return 0;
> +}

Do you really need this 460EX check at all on your boards? It's only needed on 
Canyonlands since this board port also support Glacier 460GT. From looking at 
your port, you don't need to support 460GT at all. So you could easily drop 
all these 460EX checks in your code.

Best regards,
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] 2+ messages in thread

end of thread, other threads:[~2009-07-30  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30  6:46 [U-Boot] [PATCH] ppc4xx: Support PPC460EX rev B on gdsys CompactCenter Dirk Eibach
2009-07-30  7:11 ` Stefan Roese

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