public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] One more patch for the sequoia --- This time to get a fater EBC on newer 666.66 MHz processors
@ 2007-05-08 16:57 Jeff Mann
  2007-05-08 18:56 ` Wolfgang Denk
  2007-05-09  5:40 ` Stefan Roese
  0 siblings, 2 replies; 5+ messages in thread
From: Jeff Mann @ 2007-05-08 16:57 UTC (permalink / raw)
  To: u-boot

[PATCH] Because the Sequoia board does not boot with an EBC faster than
66MHz, 
the clock divider are changed after the initial boot process. 
 
This allows for maximum clocking speeds  to be achieved on newer boards.
Sequoia boards with 666.66 MHz processors require that the EBC divider
be set 
to 3 in order to start the initial boot process at a slower EBC speed.
After 
the initial boot process, the divider can be set back to 2, which will
cause the
boards to run at 83.333MHz. This is backward compatible with boards with

533.33 MHz processors, as these boards will already be set with an EBC
divider 
of 2.
 
Signed-off-by: Jeffrey Mann <mannj@embeddedplanet.com>
---
Stefan: how's my formating this time?

 board/amcc/sequoia/sequoia.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
 
diff --git a/board/amcc/sequoia/sequoia.c b/board/amcc/sequoia/sequoia.c
index 930fa71..80f2498
--- a/board/amcc/sequoia/sequoia.c
+++ b/board/amcc/sequoia/sequoia.c
@@ -132,6 +132,12 @@ int board_early_init_f(void)
   (0x80000000 >> (28 + CFG_NAND_CS));
  mtsdr(SDR0_CUST0, sdr0_cust0);
 
+ /* Update EBC speed after booting from i2c bootstrap settings *
+  * on newer boards with 33.333 MHZ Clocks                     */
+ if (in8(CFG_BCSR_BASE + 3) & 0x80) {
+  mtdcr(0xc, 0xe0);
+  mtdcr(0xd, 0x02000000);
+ }
  return 0;
 }
 
-- 
1.4.1

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

* [U-Boot-Users] [PATCH] One more patch for the sequoia --- This time to get a fater EBC on newer 666.66 MHz processors
  2007-05-08 16:57 [U-Boot-Users] [PATCH] One more patch for the sequoia --- This time to get a fater EBC on newer 666.66 MHz processors Jeff Mann
@ 2007-05-08 18:56 ` Wolfgang Denk
  2007-05-09  5:40 ` Stefan Roese
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2007-05-08 18:56 UTC (permalink / raw)
  To: u-boot

Dear Jeff,

in message <1628E43D99629C46988BE46087A3FBB997B646@ep-01.EmbeddedPlanet.local> you wrote:
>
> Stefan: how's my formating this time?

Ba, as indentation has to be done by TAB characters (multiple of 8
columns):

> --- a/board/amcc/sequoia/sequoia.c
> +++ b/board/amcc/sequoia/sequoia.c
> @@ -132,6 +132,12 @@ int board_early_init_f(void)
>    (0x80000000 >> (28 + CFG_NAND_CS));
>   mtsdr(SDR0_CUST0, sdr0_cust0);
>  
> + /* Update EBC speed after booting from i2c bootstrap settings *
> +  * on newer boards with 33.333 MHZ Clocks                     */
> + if (in8(CFG_BCSR_BASE + 3) & 0x80) {
> +  mtdcr(0xc, 0xe0);
> +  mtdcr(0xd, 0x02000000);
> + }
>   return 0;

Seems your whole formatting has been corrupted; this patch  does  not
apply.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,    CEO: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is surely a great calamity for  a  human  being  to  have  no  ob-
sessions.                                                - Robert Bly

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

* [U-Boot-Users] [PATCH] One more patch for the sequoia --- This time to get a fater EBC on newer 666.66 MHz processors
  2007-05-08 16:57 [U-Boot-Users] [PATCH] One more patch for the sequoia --- This time to get a fater EBC on newer 666.66 MHz processors Jeff Mann
  2007-05-08 18:56 ` Wolfgang Denk
@ 2007-05-09  5:40 ` Stefan Roese
  2007-05-09 13:56   ` [U-Boot-Users] [PATCH] One more patch for the sequoia Jeff Mann
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Roese @ 2007-05-09  5:40 UTC (permalink / raw)
  To: u-boot

Hi Jeff,

On Tuesday 08 May 2007, Jeff Mann wrote:
> [PATCH] Because the Sequoia board does not boot with an EBC faster than
> 66MHz,
> the clock divider are changed after the initial boot process.
>
> This allows for maximum clocking speeds  to be achieved on newer boards.
> Sequoia boards with 666.66 MHz processors require that the EBC divider
> be set
> to 3 in order to start the initial boot process at a slower EBC speed.
> After
> the initial boot process, the divider can be set back to 2, which will
> cause the
> boards to run at 83.333MHz. This is backward compatible with boards with
>
> 533.33 MHz processors, as these boards will already be set with an EBC
> divider
> of 2.
>
> Signed-off-by: Jeffrey Mann <mannj@embeddedplanet.com>
> ---
> Stefan: how's my formating this time?

Additional to Wolfgang's comments:

- Your mailer has wrapped the commit text above. Please you shorter
  lines next time
- The subject line is still way too long. Please try to find a short
  one line subject for the patch like:
  "[PATCH] ppc4xx: Fix Sequoia EBC configuration for new board revision"

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
=====================================================================

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

* [U-Boot-Users] [PATCH] One more patch for the sequoia
  2007-05-09  5:40 ` Stefan Roese
@ 2007-05-09 13:56   ` Jeff Mann
  2007-05-11  8:35     ` Stefan Roese
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Mann @ 2007-05-09 13:56 UTC (permalink / raw)
  To: u-boot

I've tried again. (attched this time so that OUTLOOK does not mess up
the formating.)

Explanation of attached patch:

Because the Sequoia board does not boot with an EBC faster than 66MHz, 
the clock divider are changed after the initial boot process. 

This allows for maximum clocking speeds  to be achieved on newer boards.
Sequoia boards with 666.66 MHz processors require that the EBC divider 
be set to 3 in order to start the initial boot process at a slower EBC 
speed. After the initial boot process, the divider can be set back to 2,

which will cause the boards to run at 83.333MHz. This is backward 
compatible with boards with 533.33 MHz processors, as these boards will 
already be set with an EBC divider of 2.

-Jeffrey Mann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SequoiaEBC.patch
Type: application/octet-stream
Size: 1521 bytes
Desc: SequoiaEBC.patch
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070509/d08a3311/attachment.obj 

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

* [U-Boot-Users] [PATCH] One more patch for the sequoia
  2007-05-09 13:56   ` [U-Boot-Users] [PATCH] One more patch for the sequoia Jeff Mann
@ 2007-05-11  8:35     ` Stefan Roese
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Roese @ 2007-05-11  8:35 UTC (permalink / raw)
  To: u-boot

Hi Jeff,

On Wednesday 09 May 2007, Jeff Mann wrote:
> I've tried again. (attched this time so that OUTLOOK does not mess up
> the formating.)
>
> Explanation of attached patch:
>
> Because the Sequoia board does not boot with an EBC faster than 66MHz,
> the clock divider are changed after the initial boot process.
>
> This allows for maximum clocking speeds  to be achieved on newer boards.
> Sequoia boards with 666.66 MHz processors require that the EBC divider
> be set to 3 in order to start the initial boot process at a slower EBC
> speed. After the initial boot process, the divider can be set back to 2,
>
> which will cause the boards to run at 83.333MHz. This is backward
> compatible with boards with 533.33 MHz processors, as these boards will
> already be set with an EBC divider of 2.

I made small cosmetic changes. Please give the attached version a try and
let me know if it still works for you. Thanks.

diff --git a/board/amcc/sequoia/sequoia.c b/board/amcc/sequoia/sequoia.c
index 930fa71..8704014 100644
--- a/board/amcc/sequoia/sequoia.c
+++ b/board/amcc/sequoia/sequoia.c
@@ -132,6 +132,12 @@ int board_early_init_f(void)
 		(0x80000000 >> (28 + CFG_NAND_CS));
 	mtsdr(SDR0_CUST0, sdr0_cust0);
 
+	/* Update EBC speed after booting from i2c bootstrap settings
+	 * on newer boards with 33.333 MHZ Clocks
+	 */
+	if (in8(CFG_BCSR_BASE + 3) & 0x80)
+		mtcpr(0xe0, 0x02000000);
+
 	return 0;
 }
 
@@ -363,8 +369,8 @@ int checkboard(void)
 	printf("Board: Rainier - AMCC PPC440GRx Evaluation Board");
 #endif
 
-	rev = *(u8 *)(CFG_BCSR_BASE + 0);
-	val = *(u8 *)(CFG_BCSR_BASE + 5) & 0x01;
+	rev = in8(CFG_BCSR_BASE + 0);
+	val = in8(CFG_BCSR_BASE + 5) & 0x01;
 	printf(", Rev. %X, PCI=%d MHz", rev, val ? 66 : 33);
 
 	if (s != NULL) {
diff --git a/include/ppc440.h b/include/ppc440.h
index bc1d7aa..07f75de 100644
--- a/include/ppc440.h
+++ b/include/ppc440.h
@@ -1425,9 +1425,6 @@
 /*----------------------------------------------------------------------------+
 | Clock / Power-on-reset DCR's.
 +----------------------------------------------------------------------------*/
-#define CPR0_CFGADDR			0x00C
-#define CPR0_CFGDATA			0x00D
-
 #define CPR0_CLKUPD			0x20
 #define CPR0_CLKUPD_BSY_MASK		0x80000000
 #define CPR0_CLKUPD_BSY_COMPLETED	0x00000000
@@ -3314,6 +3311,23 @@
 #define mtsdr(reg, data)	do { mtdcr(sdrcfga,reg);mtdcr(sdrcfgd,data); } while (0)
 #define mfsdr(reg, data)	do { mtdcr(sdrcfga,reg);data = mfdcr(sdrcfgd); } while (0)
 
+/*
+ * All 44x except 440GP have CPR registers (indirect DCR)
+ */
+#if !defined(CONFIG_440GP)
+#define CPR0_CFGADDR		0x00C
+#define CPR0_CFGDATA		0x00D
+
+#define mtcpr(reg, data)	do { \
+		mtdcr(CPR0_CFGADDR, reg); \
+		mtdcr(CPR0_CFGDATA, data); \
+	} while (0)
+
+#define mfcpr(reg, data)	do { \
+		mtdcr(CPR0_CFGADDR, reg); \
+		data = mfdcr(CPR0_CFGDATA); \
+	} while (0)
+#endif
 
 #ifndef __ASSEMBLY__
 

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

end of thread, other threads:[~2007-05-11  8:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-08 16:57 [U-Boot-Users] [PATCH] One more patch for the sequoia --- This time to get a fater EBC on newer 666.66 MHz processors Jeff Mann
2007-05-08 18:56 ` Wolfgang Denk
2007-05-09  5:40 ` Stefan Roese
2007-05-09 13:56   ` [U-Boot-Users] [PATCH] One more patch for the sequoia Jeff Mann
2007-05-11  8:35     ` Stefan Roese

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