Re: [U-Boot] [U-Boot-Users] Compilation problem for TI3430 board.

2008-10-18 Thread Wolfgang Denk
Dear Radha Krishna,

In message [EMAIL PROTECTED] you wrote:
 
 As you suggested I have DOS to UNIX conversion. It worked. 
 I have another proble now.
 
 make: arm-none-linux-gnueabi-gcc: Command not found
...
 Could please somebody tell me the solution for this.

You must install the  arm-none-linux-gnueabitoolchain  on  your  host
system,  and  set up the PATH to include the directories wher eit was
installed.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: 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: [EMAIL PROTECTED]
Ahead warp factor 1  - Captain Kirk
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 09/10] AVR32: CPU support for AT32UC3A0xxx CPUs

2008-10-18 Thread Haavard Skinnemoen
On Thu, 16 Oct 2008 23:01:19 -0700
Ben Warren [EMAIL PROTECTED] wrote:

 Olav Morken wrote:
  This patch adds support for the AT32UC3A0xxx chips.
 
  Signed-off-by: Gunnar Rangoy [EMAIL PROTECTED]
  Signed-off-by: Paul Driveklepp [EMAIL PROTECTED]
  Signed-off-by: Olav Morken [EMAIL PROTECTED]
  ---
   cpu/at32uc/Makefile|   56 
   cpu/at32uc/at32uc3a0xxx/Makefile   |   43 +++
   cpu/at32uc/at32uc3a0xxx/clk.c  |   85 ++
   cpu/at32uc/at32uc3a0xxx/portmux.c  |  154 +++
   cpu/at32uc/at32uc3a0xxx/sm.h   |  272 
  
   cpu/at32uc/cache.c |   34 +++
   cpu/at32uc/config.mk   |   22 ++
   cpu/at32uc/cpu.c   |   79 ++
   cpu/at32uc/exception.c |  121 +
   cpu/at32uc/flashc.c|   80 ++
   cpu/at32uc/flashc.h|   67 +
   cpu/at32uc/interrupts.c|  150 +++
   cpu/at32uc/portmux-gpio.c  |  108 
   cpu/at32uc/sdramc.c|  120 +
   cpu/at32uc/sdramc.h|  137 ++
   cpu/at32uc/start.S |  265 
  +++
   include/asm-avr32/arch-at32uc3a0xxx/addrspace.h|   63 +
   include/asm-avr32/arch-at32uc3a0xxx/cacheflush.h   |   41 +++
   .../asm-avr32/arch-at32uc3a0xxx/chip-features.h|   30 +++
   include/asm-avr32/arch-at32uc3a0xxx/clk.h  |   86 ++
   include/asm-avr32/arch-at32uc3a0xxx/gpio.h |   44 
   include/asm-avr32/arch-at32uc3a0xxx/hmatrix.h  |   47 
   include/asm-avr32/arch-at32uc3a0xxx/memory-map.h   |   75 ++
   include/asm-avr32/arch-at32uc3a0xxx/portmux.h  |   80 ++
   24 files changed, 2259 insertions(+), 0 deletions(-)
   create mode 100644 cpu/at32uc/Makefile
   create mode 100644 cpu/at32uc/at32uc3a0xxx/Makefile
   create mode 100644 cpu/at32uc/at32uc3a0xxx/clk.c
   create mode 100644 cpu/at32uc/at32uc3a0xxx/portmux.c
   create mode 100644 cpu/at32uc/at32uc3a0xxx/sm.h
   create mode 100644 cpu/at32uc/cache.c
   create mode 100644 cpu/at32uc/config.mk
   create mode 100644 cpu/at32uc/cpu.c
   create mode 100644 cpu/at32uc/exception.c
   create mode 100644 cpu/at32uc/flashc.c
   create mode 100644 cpu/at32uc/flashc.h
   create mode 100644 cpu/at32uc/interrupts.c
   create mode 100644 cpu/at32uc/portmux-gpio.c
   create mode 100644 cpu/at32uc/sdramc.c
   create mode 100644 cpu/at32uc/sdramc.h
   create mode 100644 cpu/at32uc/start.S
   create mode 100644 include/asm-avr32/arch-at32uc3a0xxx/addrspace.h
   create mode 100644 include/asm-avr32/arch-at32uc3a0xxx/cacheflush.h
   create mode 100644 include/asm-avr32/arch-at32uc3a0xxx/chip-features.h
   create mode 100644 include/asm-avr32/arch-at32uc3a0xxx/clk.h
   create mode 100644 include/asm-avr32/arch-at32uc3a0xxx/gpio.h
   create mode 100644 include/asm-avr32/arch-at32uc3a0xxx/hmatrix.h
   create mode 100644 include/asm-avr32/arch-at32uc3a0xxx/memory-map.h
   create mode 100644 include/asm-avr32/arch-at32uc3a0xxx/portmux.h

[...]

 Applied to net/testing.

Oh. I was kind of planning to apply this to the avr32 tree after people
has had some time to look at it.

But thanks for taking the two net patches.

Haavard
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot-Users] Compilation problem for TI3430 board.

2008-10-18 Thread Nishanth Menon
Radha Krishna said the following on 10/17/2008 07:53 PM:
 I am doing U-boot for TI3430 boad.

 Step 0: make distclean   //worked fine
 Step 1: make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430sdp_config 
 //worked fine
 Step 2: make CROSS_COMPILE=arm-none-linux-gnueabi-   //Error

 [SNIP]
 $ make CROSS_COMPILE=arm-none-linux-gnueabi-
 make: arm-none-linux-gnueabi-gcc: Command not found
 make[1]: arm-none-linux-gnueabi-gcc: Command not found
 make[1]: Entering directory `/cygdrive/c/u-boot/tools'
 make[1]: Entering directory `/cygdrive/c/u-boot/tools'
Step using windows and try using a *real* Linux environment such as a
vmware[4] or an Linux PC to build. I suspect you are taking code from
[1]. in which case code sourcery gcc [2] will be good. Further, you need
to say ARCH=ARM as part of your compilation command.

By the way, there are many TI3430 boards. from your defconfig I
understand it is for SDP3430[3]. I had written a small quick start doc
for 2430 - many of whose comments are still valid for 2430.
Regards,
Nishanth Menon
[1] http://linux.omap.com/pub/bootloader/3430sdp/  or
https://omapzoom.org/gf/
[2]
http://www.codesourcery.com/gnu_toolchains/arm/portal/[EMAIL PROTECTED]
[3] http://www.ti.com/omap3430_devplatform
[4] http://www.vmware.com/download/player/ and as an example:
http://search-www.vmware.com/socialsearch/query?cn=vmwarecc=wwwie=UTF-8oe=UTF-8q=ubuntu+8.04x=0y=0
choose the appliance you like, download the image and run it..
[5]
http://www.geocities.com/crecmca98/Linux/omap2430_From_almost_scratch.pdf

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] 85xx: properly document MPC85xx_PORDEVSR2_SEC_CFG

2008-10-18 Thread Timur Tabi
On Fri, Oct 17, 2008 at 4:11 PM, Wolfgang Denk [EMAIL PROTECTED] wrote:

 +/* The 8544 RM says this is bit 26, but it's really bit 28 */
  #define MPC85xx_PORDEVSR2_SEC_CFG0x0080

 But 0x0080 is bit 24; bit 28 would be 0x0008 - or not?

I just based my comment on the changelog of the previous patch, so
that means that either the git changelog or the code for that patch is
wrong.  I guess that's a good reason not to use git changelogs as a
substitute for code comments.  Changelogs can't be edited.

The previous patch had this:

The MPC8544 RM incorrect shows the SEC_CFG bit in PORDEVSR2 as being
bit 26, instead it should be bit 28.
...
-#define MPC85xx_PORDEVSR2_SEC_CFG  0x0020
+#define MPC85xx_PORDEVSR2_SEC_CFG  0x0080

x80 is definitely bit 24.  So the question for Kumar is: which is the
right value for MPC85xx_PORDEVSR2_SEC_CFG: 0x80 (bit 24) or 0x08 (bit
28)?

-- 
Timur Tabi
Linux kernel developer at Freescale
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 19/24] FSL DDR: Convert STXSSA to new DDR code.

2008-10-18 Thread Wolfgang Denk
Dear Kumar,

In message [EMAIL PROTECTED] you wrote:
 Signed-off-by: Kumar Gala [EMAIL PROTECTED]
 ---
  board/stxssa/Makefile|9 --
  board/stxssa/ddr.c   |   70 
 ++
  board/stxssa/stxssa.c|6 +++-
  board/stxssa/u-boot.lds  |1 -
  include/configs/stxssa.h |   30 +++
  5 files changed, 98 insertions(+), 18 deletions(-)
  create mode 100644 board/stxssa/ddr.c

How much of flexibility can be expected from the new DDR  code?  When
you  submitted  this  patch, I verified that it works in the standard
configuration (with a 256 MB RAM module). Should it  also  work  with
other configurations, say, with a 512 MB or a 1 GB module?

If I try it out, booting hangs here:

U-Boot 2008.10-rc3-9-gf7a35a6 (Oct 18 2008 - 18:21:52)

CPU:   8541E, Version: 1.1, (0x807a0011)
Core:  E500, Version: 2.0, (0x80200020)
Clock Configuration:
   CPU: 660 MHz, CCB: 264 MHz,
   DDR: 132 MHz (264 MT/s data rate), LBC:  66 MHz
CPM:   264 Mhz
L1:D-cache 32 kB enabled
   I-cache 32 kB enabled
Board: Silicon Tx GPPP SSA Board
I2C:   ready
DRAM:  512 MB

or:

U-Boot 2008.10-rc3-9-gf7a35a6 (Oct 18 2008 - 18:21:52)

CPU:   8541E, Version: 1.1, (0x807a0011)
Core:  E500, Version: 2.0, (0x80200020)
Clock Configuration:
   CPU: 660 MHz, CCB: 264 MHz,
   DDR: 132 MHz (264 MT/s data rate), LBC:  66 MHz
CPM:   264 Mhz
L1:D-cache 32 kB enabled
   I-cache 32 kB enabled
Board: Silicon Tx GPPP SSA Board
I2C:   ready
DRAM:   1 GB

I.e., the size gets detected correctly, but then it hangs.

I know that the old code did not support other memory  configurations;
should these work now with the new DDR code?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: 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: [EMAIL PROTECTED]
Everyone who comes in here wants three things:
1. They want it quick.
2. They want it good.
3. They want it cheap.
I tell 'em to pick two and call me back.
- sign on the back wall of a small printing company in Delaware
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/3] Cleanup: fix MHz spelling

2008-10-18 Thread Wolfgang Denk
Signed-off-by: Wolfgang Denk [EMAIL PROTECTED]
---
 board/Marvell/db64360/pci.c |6 +++---
 board/Marvell/db64460/pci.c |6 +++---
 board/amcc/katmai/cmd_katmai.c  |   18 +-
 board/amcc/yucca/cmd_yucca.c|   22 +++---
 board/bf537-stamp/post-memory.c |   24 
 board/cray/L1/L1.c  |8 
 board/eltec/bab7xx/misc.c   |2 +-
 board/esd/cpci750/pci.c |6 +++---
 board/esd/pci405/pci405.c   |2 +-
 board/fads/fads.c   |   10 +-
 board/freescale/mpc8540ads/mpc8540ads.c |4 ++--
 board/freescale/mpc8541cds/mpc8541cds.c |4 ++--
 board/freescale/mpc8555cds/mpc8555cds.c |4 ++--
 board/freescale/mpc8560ads/mpc8560ads.c |4 ++--
 board/gen860t/beeper.c  |2 +-
 board/idmr/idmr.c   |2 +-
 board/motionpro/motionpro.c |2 +-
 board/mpc8540eval/mpc8540eval.c |2 +-
 board/mpl/pip405/pip405.c   |2 +-
 board/pm854/pm854.c |4 ++--
 board/pm856/pm856.c |4 ++--
 board/prodrive/p3mx/pci.c   |6 +++---
 board/sbc8560/sbc8560.c |2 +-
 board/siemens/IAD210/IAD210.c   |2 +-
 board/siemens/IAD210/atm.c  |2 +-
 board/tqc/tqm85xx/tqm85xx.c |4 ++--
 cpu/ixp/npe/miiphy.c|2 +-
 cpu/mips/incaip_clock.c |4 ++--
 cpu/mpc8220/i2cCore.c   |2 +-
 cpu/mpc83xx/spd_sdram.c |4 ++--
 cpu/mpc8xx/fec.c|2 +-
 cpu/mpc8xx/serial.c |2 +-
 cpu/ppc4xx/4xx_pci.c|2 +-
 cpu/ppc4xx/miiphy.c |2 +-
 cpu/ppc4xx/speed.c  |2 +-
 cpu/s3c44b0/cpu.c   |2 +-
 drivers/block/sym53c8xx.c   |4 ++--
 drivers/i2c/omap1510_i2c.c  |2 +-
 drivers/i2c/omap24xx_i2c.c  |2 +-
 drivers/net/natsemi.c   |2 +-
 drivers/net/ns8382x.c   |2 +-
 drivers/net/rtl8139.c   |2 +-
 drivers/net/tigon3.c|2 +-
 drivers/usb/usbdcore_mpc8xx.c   |2 +-
 44 files changed, 98 insertions(+), 98 deletions(-)

diff --git a/board/Marvell/db64360/pci.c b/board/Marvell/db64360/pci.c
index a7e3c95..4998095 100644
--- a/board/Marvell/db64360/pci.c
+++ b/board/Marvell/db64360/pci.c
@@ -52,13 +52,13 @@ static void gt_pci_bus_mode_display (PCI_HOST host)
printf (PCI %d bus mode: Conventional PCI\n, host);
break;
case 1:
-   printf (PCI %d bus mode: 66 Mhz PCIX\n, host);
+   printf (PCI %d bus mode: 66 MHz PCIX\n, host);
break;
case 2:
-   printf (PCI %d bus mode: 100 Mhz PCIX\n, host);
+   printf (PCI %d bus mode: 100 MHz PCIX\n, host);
break;
case 3:
-   printf (PCI %d bus mode: 133 Mhz PCIX\n, host);
+   printf (PCI %d bus mode: 133 MHz PCIX\n, host);
break;
default:
printf (Unknown BUS %d\n, mode);
diff --git a/board/Marvell/db64460/pci.c b/board/Marvell/db64460/pci.c
index a7e3c95..4998095 100644
--- a/board/Marvell/db64460/pci.c
+++ b/board/Marvell/db64460/pci.c
@@ -52,13 +52,13 @@ static void gt_pci_bus_mode_display (PCI_HOST host)
printf (PCI %d bus mode: Conventional PCI\n, host);
break;
case 1:
-   printf (PCI %d bus mode: 66 Mhz PCIX\n, host);
+   printf (PCI %d bus mode: 66 MHz PCIX\n, host);
break;
case 2:
-   printf (PCI %d bus mode: 100 Mhz PCIX\n, host);
+   printf (PCI %d bus mode: 100 MHz PCIX\n, host);
break;
case 3:
-   printf (PCI %d bus mode: 133 Mhz PCIX\n, host);
+   printf (PCI %d bus mode: 133 MHz PCIX\n, host);
break;
default:
printf (Unknown BUS %d\n, mode);
diff --git a/board/amcc/katmai/cmd_katmai.c b/board/amcc/katmai/cmd_katmai.c
index 703d225..ba71bd5 100644
--- a/board/amcc/katmai/cmd_katmai.c
+++ b/board/amcc/katmai/cmd_katmai.c
@@ -57,9 +57,9 @@ static int do_bootstrap(cmd_tbl_t *cmdtp, int flag, int argc, 
char *argv[])
 
do {
 #ifdef CONFIG_STRESS
-   printf(enter cpu clock frequency 400, 500, 533, 667 Mhz or 
quit to abort\n);
+   printf(enter cpu clock frequency 400, 500, 533, 667 MHz or 
quit to abort\n);
 #else
-   printf(enter cpu clock frequency 400, 500, 533 Mhz or quit to 
abort\n);
+   printf(enter cpu clock frequency 400, 500, 533 MHz or quit to 
abort\n);
 #endif
nbytes = readline ( ? );
 
@@ -87,11 

[U-Boot] [PATCH 1/3] strmhz(): Round numbers when printing clock frequencies

2008-10-18 Thread Wolfgang Denk
Round clock frequencies for printing.

Many boards printed off clock frequencies like 399 MHz instead of the
exact 400 MHz because numberes were not rounded. This is fixed now.

Signed-off-by: Wolfgang Denk [EMAIL PROTECTED]
---
 include/common.h |5 +++--
 lib_generic/strmhz.c |6 --
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/common.h b/include/common.h
index e659044..b8a654a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -692,8 +692,9 @@ void __attribute__((weak)) show_boot_progress (int val);
 
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
-#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
-#define roundup(x, y) x) + ((y) - 1)) / (y)) * (y))
+#define DIV_ROUND(n,d) (((n) + ((d)/2)) / (d))
+#define DIV_ROUND_UP(n,d)  (((n) + (d) - 1) / (d))
+#define roundup(x, y)  x) + ((y) - 1)) / (y)) * (y))
 
 #define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1)
 #define __ALIGN_MASK(x,mask)   (((x)+(mask))~(mask))
diff --git a/lib_generic/strmhz.c b/lib_generic/strmhz.c
index d0b6bc6..342cf2b 100644
--- a/lib_generic/strmhz.c
+++ b/lib_generic/strmhz.c
@@ -27,9 +27,11 @@ char *strmhz (char *buf, long hz)
long l, n;
long m;
 
-   n = hz / 100L;
+   n = DIV_ROUND(hz, 100L);
l = sprintf (buf, %ld, n);
-   m = (hz % 100L) / 1000L;
+
+   hz -= n * 100L;
+   m = DIV_ROUND(hz, 1000L);
if (m != 0)
sprintf (buf + l, .%03ld, m);
return (buf);
-- 
1.5.5.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/3] Use strmhz() to format clock frequencies

2008-10-18 Thread Wolfgang Denk
Signed-off-by: Wolfgang Denk [EMAIL PROTECTED]
---
 board/mpl/common/common_util.c |   11 +
 board/sbc8560/sbc8560.c|   12 ++
 cpu/mcf5227x/cpu.c |   16 --
 cpu/mcf523x/cpu.c  |8 --
 cpu/mcf532x/cpu.c  |8 --
 cpu/mcf5445x/cpu.c |   24 --
 cpu/mcf547x_8x/cpu.c   |8 --
 cpu/mpc512x/cpu.c  |7 +++--
 cpu/mpc512x/speed.c|   12 ++
 cpu/mpc5xxx/speed.c|9 +--
 cpu/mpc8220/speed.c|   12 +++---
 cpu/mpc83xx/speed.c|   42 ---
 cpu/mpc85xx/cpu.c  |   26 ++--
 13 files changed, 112 insertions(+), 83 deletions(-)

diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index 8990fc6..877a2d0 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -591,7 +591,7 @@ void video_get_info_str (int line_number, char *info)
int i,boot;
unsigned long pvr;
char buf[64];
-   char tmp[16];
+   char buf1[32], buf2[32], buf3[32], buf4[32];
char cpustr[16];
char *s, *e, bc;
switch (line_number)
@@ -644,11 +644,12 @@ void video_get_info_str (int line_number, char *info)
}
buf[i++]=0;
}
-   sprintf (info, %s %s %s MHz (%lu/%lu/%lu MHz),
+   sprintf (info, %s %s %s MHz (%s/%s/%s MHz),
buf, cpustr,
-   strmhz (tmp, gd-cpu_clk), sys_info.freqPLB / 100,
-   sys_info.freqPLB / sys_info.pllOpbDiv / 100,
-   sys_info.freqPLB / sys_info.pllExtBusDiv / 100);
+   strmhz (buf1, gd-cpu_clk),
+   strmhz (buf2, sys_info.freqPLB),
+   strmhz (buf3, sys_info.freqPLB / sys_info.pllOpbDiv),
+   strmhz (buf4, sys_info.freqPLB / 
sys_info.pllExtBusDiv));
return;
case 3:
/* Memory Info */
diff --git a/board/sbc8560/sbc8560.c b/board/sbc8560/sbc8560.c
index 413926d..f01f87e 100644
--- a/board/sbc8560/sbc8560.c
+++ b/board/sbc8560/sbc8560.c
@@ -238,6 +238,7 @@ void reset_phy (void)
 int checkboard (void)
 {
sys_info_t sysinfo;
+   char buf[32];
 
get_sys_info (sysinfo);
 
@@ -246,16 +247,17 @@ int checkboard (void)
 #else
printf (Board: Wind River SBC8540 Board\n);
 #endif
-   printf (\tCPU: %lu MHz\n, sysinfo.freqProcessor / 100);
-   printf (\tCCB: %lu MHz\n, sysinfo.freqSystemBus / 100);
-   printf (\tDDR: %lu MHz\n, sysinfo.freqSystemBus / 200);
+   printf (\tCPU: %s MHz\n, strmhz(buf, sysinfo.freqProcessor));
+   printf (\tCCB: %s MHz\n, strmhz(buf, sysinfo.freqSystemBus));
+   printf (\tDDR: %s MHz\n, strmhz(buf, sysinfo.freqSystemBus/2));
if((CONFIG_SYS_LBC_LCRR  0x0f) == 2 || (CONFIG_SYS_LBC_LCRR  0x0f) == 
4 \
|| (CONFIG_SYS_LBC_LCRR  0x0f) == 8) {
-   printf (\tLBC: %lu MHz\n, sysinfo.freqSystemBus / 100 
/(CONFIG_SYS_LBC_LCRR  0x0f));
+   printf (\tLBC: %s MHz\n,
+   strmhz(buf, sysinfo.freqSystemBus/(CONFIG_SYS_LBC_LCRR 
 0x0f)));
} else {
printf(\tLBC: unknown\n);
}
-   printf(\tCPM: %lu Mhz\n, sysinfo.freqSystemBus / 100);
+   printf(\tCPM: %s MHz\n, strmhz(buf, sysinfo.freqSystemBus));
printf(L1 D-cache 32KB, L1 I-cache 32KB enabled.\n);
return (0);
 }
diff --git a/cpu/mcf5227x/cpu.c b/cpu/mcf5227x/cpu.c
index 5792a1c..765aec6 100644
--- a/cpu/mcf5227x/cpu.c
+++ b/cpu/mcf5227x/cpu.c
@@ -60,15 +60,17 @@ int checkcpu(void)
}
 
if (id) {
+   char buf1[32], buf2[32], buf3[32];
+
printf(Freescale MCF%d (Mask:%01x Version:%x)\n, id, msk,
   ver);
-   printf(   CPU CLK %d Mhz BUS CLK %d Mhz FLB CLK %d Mhz\n,
-  (int)(gd-cpu_clk / 100),
-  (int)(gd-bus_clk / 100),
-  (int)(gd-flb_clk / 100));
-   printf(   INP CLK %d Mhz VCO CLK %d Mhz\n,
-  (int)(gd-inp_clk / 100),
-  (int)(gd-vco_clk / 100));
+   printf(   CPU CLK %s MHz BUS CLK %s MHz FLB CLK %s MHz\n,
+  strmhz(buf1, gd-cpu_clk)),
+  strmhz(buf2, gd-bus_clk)),
+  strmhz(buf3, gd-flb_clk)));
+   printf(   INP CLK %s MHz VCO CLK %s MHz\n,
+  strmhz(buf1, gd-inp_clk)),
+  strmhz(buf2, gd-vco_clk)));
}
 
return 0;
diff --git a/cpu/mcf523x/cpu.c b/cpu/mcf523x/cpu.c
index 1ce90fd..b9e48aa 100644
--- a/cpu/mcf523x/cpu.c
+++ b/cpu/mcf523x/cpu.c
@@ -60,11 +60,13 @@ int 

Re: [U-Boot] net: Move initialization of Au1x00 SoC ethernet MAC to cpu_eth_init

2008-10-18 Thread Ben Warren
Hi Shinya,

On Sat, Oct 18, 2008 at 7:31 PM, Shinya Kuribayashi [EMAIL PROTECTED]
 wrote:

 This patch will move au1x00_eth_initialize from net/eth.c to cpu_eth_init
 as a part of ongoing eth_initialize cleanup work.  The function ret value
 is also fixed as it should be negative on fail.

 Signed-off-by: Shinya Kuribayashi [EMAIL PROTECTED]
 ---
 Hi Ben,

 build tested. Please review.

thanks for doing this and saving me some work!


  Shinya


 cpu/mips/au1x00_eth.c |2 +-
 cpu/mips/cpu.c|7 +++
 include/netdev.h  |1 +
 net/eth.c |4 
 4 files changed, 9 insertions(+), 5 deletions(-)

 diff --git a/cpu/mips/au1x00_eth.c b/cpu/mips/au1x00_eth.c
 index 8ddc06a..6272a3a 100644
 --- a/cpu/mips/au1x00_eth.c
 +++ b/cpu/mips/au1x00_eth.c
 @@ -283,7 +283,7 @@ int au1x00_enet_initialize(bd_t *bis){

if ((dev = (struct eth_device*)malloc(sizeof *dev)) == NULL) {
puts (malloc failed\n);
 -   return 0;
 +   return -1;
}

memset(dev, 0, sizeof *dev);
 diff --git a/cpu/mips/cpu.c b/cpu/mips/cpu.c
 index 38d8697..c70cf0b 100644
 --- a/cpu/mips/cpu.c
 +++ b/cpu/mips/cpu.c


Please add #include netdev.h to top of this file.


 @@ -73,3 +73,10 @@ void write_one_tlb(int index, u32 pagemask, u32 hi, u32
 low0, u32 low1)
write_c0_index(index);
tlb_write_indexed();
 }
 +
 +int cpu_eth_init(bd_t *bis)
 +{
 +#ifdef CONFIG_SOC_AU1X00
 +   return au1x00_enet_initialize(bis);
 +#endif
 +}

This will warn/error if CONFIG_SOC_AU1X00 isn't defined.  I recommend
something like:

int cpu_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SCO_AU1X00
rc = au1x00_enet_initialize(bis);
#endif
return rc;
}


 diff --git a/include/netdev.h b/include/netdev.h
 index 87d578c..b0d5c63 100644
 --- a/include/netdev.h
 +++ b/include/netdev.h
 @@ -41,6 +41,7 @@ int board_eth_init(bd_t *bis);
 int cpu_eth_init(bd_t *bis);

 /* Driver initialization prototypes */
 +int au1x00_enet_initialize(bd_t*);
 int bfin_EMAC_initialize(bd_t *bis);
 int dc21x4x_initialize(bd_t *bis);
 int e1000_initialize(bd_t *bis);
 diff --git a/net/eth.c b/net/eth.c
 index ccd871a..9f121c2 100644
 --- a/net/eth.c
 +++ b/net/eth.c
 @@ -39,7 +39,6 @@ static int __def_eth_init(bd_t *bis)
 int cpu_eth_init(bd_t *bis) __attribute((weak, alias(__def_eth_init)));
 int board_eth_init(bd_t *bis) __attribute((weak, alias(__def_eth_init)));

 -extern int au1x00_enet_initialize(bd_t*);
 extern int fec_initialize(bd_t*);
 extern int mpc8220_fec_initialize(bd_t*);
 extern int mv6436x_eth_initialize(bd_t *);
 @@ -190,9 +189,6 @@ int eth_initialize(bd_t *bis)
 #if defined(FEC_ENET) || defined(CONFIG_ETHER_ON_FCC)
fec_initialize(bis);
 #endif
 -#if defined(CONFIG_AU1X00)
 -   au1x00_enet_initialize(bis);
 -#endif
 #if defined(CONFIG_IXP4XX_NPE)
npe_initialize(bis);
 #endif

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH rev2] net: Move initialization of Au1x00 SoC ethernet MAC to cpu_eth_init

2008-10-18 Thread Shinya Kuribayashi
This patch will move au1x00_eth_initialize from net/eth.c to cpu_eth_init
as a part of ongoing eth_initialize cleanup work.  The function ret value
is also fixed as it should be negative on fail.

Signed-off-by: Shinya Kuribayashi [EMAIL PROTECTED]
---

Changes in rev2:
* cpu/mips/cpu.c: Include netdev.h
* cpu/mips/cpu.c: cpu_eth_init: Always return 0 regardless of
  au1x00_eth_initialize ret value.  We'll ignore it for now since it's
  not used anywhere.

 cpu/mips/au1x00_eth.c |2 +-
 cpu/mips/cpu.c|9 +
 include/netdev.h  |1 +
 net/eth.c |4 
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/cpu/mips/au1x00_eth.c b/cpu/mips/au1x00_eth.c
index 8ddc06a..6272a3a 100644
--- a/cpu/mips/au1x00_eth.c
+++ b/cpu/mips/au1x00_eth.c
@@ -283,7 +283,7 @@ int au1x00_enet_initialize(bd_t *bis){
 
if ((dev = (struct eth_device*)malloc(sizeof *dev)) == NULL) {
puts (malloc failed\n);
-   return 0;
+   return -1;
}
 
memset(dev, 0, sizeof *dev);
diff --git a/cpu/mips/cpu.c b/cpu/mips/cpu.c
index 38d8697..b7180b0 100644
--- a/cpu/mips/cpu.c
+++ b/cpu/mips/cpu.c
@@ -23,6 +23,7 @@
 
 #include common.h
 #include command.h
+#include netdev.h
 #include asm/mipsregs.h
 #include asm/cacheops.h
 #include asm/reboot.h
@@ -73,3 +74,11 @@ void write_one_tlb(int index, u32 pagemask, u32 hi, u32 
low0, u32 low1)
write_c0_index(index);
tlb_write_indexed();
 }
+
+int cpu_eth_init(bd_t *bis)
+{
+#ifdef CONFIG_SOC_AU1X00
+   au1x00_enet_initialize(bis);
+#endif
+   return 0;
+}
diff --git a/include/netdev.h b/include/netdev.h
index 87d578c..b0d5c63 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -41,6 +41,7 @@ int board_eth_init(bd_t *bis);
 int cpu_eth_init(bd_t *bis);
 
 /* Driver initialization prototypes */
+int au1x00_enet_initialize(bd_t*);
 int bfin_EMAC_initialize(bd_t *bis);
 int dc21x4x_initialize(bd_t *bis);
 int e1000_initialize(bd_t *bis);
diff --git a/net/eth.c b/net/eth.c
index ccd871a..9f121c2 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -39,7 +39,6 @@ static int __def_eth_init(bd_t *bis)
 int cpu_eth_init(bd_t *bis) __attribute((weak, alias(__def_eth_init)));
 int board_eth_init(bd_t *bis) __attribute((weak, alias(__def_eth_init)));
 
-extern int au1x00_enet_initialize(bd_t*);
 extern int fec_initialize(bd_t*);
 extern int mpc8220_fec_initialize(bd_t*);
 extern int mv6436x_eth_initialize(bd_t *);
@@ -190,9 +189,6 @@ int eth_initialize(bd_t *bis)
 #if defined(FEC_ENET) || defined(CONFIG_ETHER_ON_FCC)
fec_initialize(bis);
 #endif
-#if defined(CONFIG_AU1X00)
-   au1x00_enet_initialize(bis);
-#endif
 #if defined(CONFIG_IXP4XX_NPE)
npe_initialize(bis);
 #endif
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot