[U-Boot-Users] From: Sergei Poselenov <sposelenov@emcraft.com>

Signed-off-by: Sergei Poselenov sposelenov@emcraft.com --- board/socrates/socrates.c | 13 +++++++++++-- include/configs/socrates.h | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index cb58994..15c6478 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -45,6 +45,9 @@ ulong flash_get_size (ulong base, int banknum);
int checkboard (void) { + volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR); + char *src; + int f; char *s = getenv("serial#");
puts("Board: Socrates"); @@ -55,8 +58,14 @@ int checkboard (void) putc('\n');
#ifdef CONFIG_PCI - printf ("PCI1: 32 bit, %d MHz (compiled)\n", - CONFIG_SYS_CLK_FREQ / 1000000); + if (gur->porpllsr & (1<<15)) { + src = "SYSCLK"; + f = CONFIG_SYS_CLK_FREQ; + } else { + src = "PCI_CLK"; + f = CONFIG_PCI_CLK_FREQ; + } + printf ("PCI1: 32 bit, %d MHz (%s)\n", f/1000000, src); #else printf ("PCI1: disabled\n"); #endif diff --git a/include/configs/socrates.h b/include/configs/socrates.h index 00c0dab..028a772 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -227,7 +227,8 @@ */ #define CFG_PCI_PHYS 0x80000000 /* 1G PCI TLB */
- +/* PCI is clocked by the external source at 33 MHz */ +#define CONFIG_PCI_CLK_FREQ 33000000 #define CFG_PCI1_MEM_BASE 0x80000000 #define CFG_PCI1_MEM_PHYS CFG_PCI1_MEM_BASE #define CFG_PCI1_MEM_SIZE 0x20000000 /* 512M */

Wolfgang Denk wrote:
Signed-off-by: Sergei Poselenov sposelenov@emcraft.com
board/socrates/socrates.c | 13 +++++++++++-- include/configs/socrates.h | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-)
Better subject line, please?
Thanks, gvb

In message 483BFE47.5050301@ge.com you wrote:
Wolfgang Denk wrote:
Signed-off-by: Sergei Poselenov sposelenov@emcraft.com
board/socrates/socrates.c | 13 +++++++++++-- include/configs/socrates.h | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-)
Better subject line, please?
Yes, of course. That was a problem with git-send-email, and I didn't try --dry-run first:
-> git-send-email --dry-run --from 'Wolfgang Denk wd@denx.de' -to u-boot-users@lists.sourceforge.net /tmp/patch /tmp/patch (non-mbox) Adding cc: >From ff94ec343d1259286d0ae49c71d19adb9c3c2ea2 Mon Sep 17 00:00:00 2001 from line '>From ff94ec343d1259286d0ae49c71d19adb9c3c2ea2 Mon Sep 17 00:00:00 2001' (sob) Adding cc: Sergei Poselenov sposelenov@emcraft.com from line 'Signed-off-by: Sergei Poselenov sposelenov@emcraft.com ' Use of uninitialized value in string eq at /usr/bin/git-send-email line 575. W: unable to extract a valid address from: >From ff94ec343d1259286d0ae49c71d19adb9c3c2ea2 Mon Sep 17 00:00:00 2001 W: unable to extract a valid address from: >From ff94ec343d1259286d0ae49c71d19adb9c3c2ea2 Mon Sep 17 00:00:00 2001 Dry-OK. Log says: Sendmail: /usr/sbin/sendmail -i u-boot-users@lists.sourceforge.net sposelenov@emcraft.com From: Wolfgang Denk wd@denx.de To: u-boot-users@lists.sourceforge.net Cc: Sergei Poselenov sposelenov@emcraft.com Subject: From: Sergei Poselenov sposelenov@emcraft.com ...
But to me the patch looks not too bad:
| >From ff94ec343d1259286d0ae49c71d19adb9c3c2ea2 Mon Sep 17 00:00:00 2001 | From: Sergei Poselenov sposelenov@emcraft.com | Date: Tue, 27 May 2008 13:47:00 +0200 | Subject: [PATCH] Socrates: Fix PCI bus frequency report | | Signed-off-by: Sergei Poselenov sposelenov@emcraft.com | ...
Seems git-send-email barfs on the ">From' line :-(
Best regards,
Wolfgang Denk

On Tuesday 27 May 2008, Wolfgang Denk wrote:
Signed-off-by: Sergei Poselenov sposelenov@emcraft.com
board/socrates/socrates.c | 13 +++++++++++-- include/configs/socrates.h | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index cb58994..15c6478 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -45,6 +45,9 @@ ulong flash_get_size (ulong base, int banknum);
int checkboard (void) {
volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR);
char *src;
int f; char *s = getenv("serial#");
puts("Board: Socrates");
@@ -55,8 +58,14 @@ int checkboard (void) putc('\n');
#ifdef CONFIG_PCI
- printf ("PCI1: 32 bit, %d MHz (compiled)\n",
CONFIG_SYS_CLK_FREQ / 1000000);
- if (gur->porpllsr & (1<<15)) {
Please don't use pointer access for such SoC registers. in_be32() is recommended here.
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@denx.de =====================================================================

Hello Stefan,
Stefan Roese wrote:
On Tuesday 27 May 2008, Wolfgang Denk wrote:
Signed-off-by: Sergei Poselenov sposelenov@emcraft.com
board/socrates/socrates.c | 13 +++++++++++-- include/configs/socrates.h | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index cb58994..15c6478 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -45,6 +45,9 @@ ulong flash_get_size (ulong base, int banknum);
int checkboard (void) {
volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR);
char *src;
int f; char *s = getenv("serial#");
puts("Board: Socrates");
@@ -55,8 +58,14 @@ int checkboard (void) putc('\n');
#ifdef CONFIG_PCI
- printf ("PCI1: 32 bit, %d MHz (compiled)\n",
CONFIG_SYS_CLK_FREQ / 1000000);
- if (gur->porpllsr & (1<<15)) {
Please don't use pointer access for such SoC registers. in_be32() is recommended here.
What is the reason for doing this? Compiler issues? I see the direct pointer addressing is used all over the 85xx code.
Regards, Sergei
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@denx.de =====================================================================

Hi Sergei,
On Wednesday 28 May 2008, Sergei Poselenov wrote:
- if (gur->porpllsr & (1<<15)) {
Please don't use pointer access for such SoC registers. in_be32() is recommended here.
What is the reason for doing this? Compiler issues? I see the direct pointer addressing is used all over the 85xx code.
Yes, I just noticed that these registers are accessed this way on (all?) MPC85xx boards. So it is perhaps not a problem with these registers. Not sure though, since I'm no MPC85xx expert. Perhaps somebody from FSL can comment here.
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@denx.de =====================================================================

On Wed, May 28, 2008 at 10:31:09AM +0200, Stefan Roese wrote:
On Wednesday 28 May 2008, Sergei Poselenov wrote:
What is the reason for doing this? Compiler issues? I see the direct pointer addressing is used all over the 85xx code.
Either the compiler or the hardware could reorder direct accesses.
Yes, I just noticed that these registers are accessed this way on (all?) MPC85xx boards. So it is perhaps not a problem with these registers. Not sure though, since I'm no MPC85xx expert. Perhaps somebody from FSL can comment here.
The accessors should be used; please don't copy bad examples. :-)
-Scott

In message 1211890770-20866-1-git-send-email-wd@denx.de you wrote:
Signed-off-by: Sergei Poselenov sposelenov@emcraft.com
board/socrates/socrates.c | 13 +++++++++++-- include/configs/socrates.h | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-)
Applied (wwith cleaned-up subject).
Best regards,
Wolfgang Denk
participants (5)
-
Jerry Van Baren
-
Scott Wood
-
Sergei Poselenov
-
Stefan Roese
-
Wolfgang Denk