[U-Boot] debugging u-boot relocating to ram

2008-08-28 Thread Vishwanath Patil
Hello,

I have a board with MPC852T, SDRAM and FLASH.
I have been successful to get the console up and debug the FLASH and SDRAM
connections.
Now the SDRAM passes all the memory tests in SLOW mode also.
The current problem I am facing is that relocate_code is being called from
the lib_ppc/board.c
and after that there a no messages. I want to debug the relocate code which
is written in assembly
language. Please help.
I want to write something on portA data register to monitor the progress, in
the assembly code.
I am looking for a small snippet of assembly code that can write to portA
register,
to be put in the assembly code of the relocate_code.
If someone could guide me to access the IMMR and the portA registers using
the assembly
language, it will be very helpful

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


[U-Boot] [PATCH] at91rm9200dk mach-type

2008-08-28 Thread Claudio Scordino

Hi all,

   I didn't receive any feedback about this, maybe because the 
PATCH name was missing from the subject...


In my opinion, it's quite strange that a file in 
board/atmel/at91rm9200dk sets gd-bd-bi_arch_number to

MACH_TYPE_AT91RM9200 instead of MACH_TYPE_AT91RM9200DK.

And, in fact, on my at91rm9200dk board U-Boot cannot boot newer 
versions of Linux, where the default mach type for at91rm9200 boards 
has been removed (see commit number 
87fee013a23ad02821699aef5b76891b42959182 on Linux).


The patch in attachment makes U-Boot do its job, so it should be the 
right fix.


But I wouldn't be surprised if I made a mistake, so please, tell me if
this patch is the right fix to the problem.

If so, please commit it to the U-Boot git repository (it's already in
git format).

Many thanks,

Claudio

--
Ing. Claudio Scordino   
Software Engineer, PhD
Tel. +39-050-5492050
http://retis.sssup.it/~scordino/

Evidence Srl
Embedded Real-Time Solutions
http://www.evidence.eu.com


From 1a828b63fea0755df232eb27993bf69370674473 Mon Sep 17 00:00:00 2001
From: Claudio Scordino [EMAIL PROTECTED]
Date: Wed, 27 Aug 2008 12:04:44 +0200
Subject: [PATCH 1/1] Fix MACH_TYPE for the AT91RM9200DK board.


Signed-off-by: Claudio Scordino [EMAIL PROTECTED]
---
 board/atmel/at91rm9200dk/at91rm9200dk.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/board/atmel/at91rm9200dk/at91rm9200dk.c b/board/atmel/at91rm9200dk/at91rm9200dk.c
index c564f73..b89a3fd 100644
--- a/board/atmel/at91rm9200dk/at91rm9200dk.c
+++ b/board/atmel/at91rm9200dk/at91rm9200dk.c
@@ -47,7 +47,7 @@ int board_init (void)
 	/* so we do _nothing_ here */
 
 	/* arch number of AT91RM9200DK-Board */
-	gd-bd-bi_arch_number = MACH_TYPE_AT91RM9200;
+	gd-bd-bi_arch_number = MACH_TYPE_AT91RM9200DK;
 	/* adress of boot parameters */
 	gd-bd-bi_boot_params = PHYS_SDRAM + 0x100;
 
-- 
1.5.4.3



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


Re: [U-Boot] [PATCH v2 0/6] i.MX31: Add NAND support and new PDK board.

2008-08-28 Thread Magnus Lilja
Hi

2008/8/28 Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]:
 On 11:30 Mon 18 Aug , Magnus Lilja wrote:
 Hi again

 This series of patches adds support for the NAND flash controller in the
 i.MX31 device and also introduces the Freescale i.MX31 PDK board.

 Changes since v1:


 Do you have any plans to send a V3 before the end of the merge window?

Yes, I have implemented all comments that aren't related to the NAND
driver. I also re-ordered the patch series so all NAND and PDK related
patches are placed first in the series and those can be merged into
the ARM-tree without adding the NAND driver. This way other i.MX31
related patches that people have made on top of mine can be merged as
well, I seem to recall that someone fixed the CFG_HZ issue for i.MX31.

Regarding the NAND driver, I have implemented most of the coding style
related comments and removed un-unused functions, but some of Scott's
more detailed NAND driver issues have not been sorted out yet so I
don't know if the NAND driver will be ready before the merge window
closes. Since the PDK only has NAND flash I'm not sure if it is
meaningful to add the board without the NAND enabled.

I was planning to send V3 today but I won't be able to do that since I
wanted to at least make a quick test on hardware before submitting but
I hope to do that tomorrow.

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


[U-Boot] [PATCH] S3C64XX: remove broken HWFLOW support from the serial driver

2008-08-28 Thread Guennadi Liakhovetski
As noted by Harald Welte, HWFLOW support in the S3C64XX serial driver is 
broken and currently unused. Remove it.

Signed-off-by: Guennadi Liakhovetski [EMAIL PROTECTED]
---
As well as the previous patch, please, apply after the s3c64xx / smdk6400 
support is merged in.

diff --git a/drivers/serial/s3c64xx.c b/drivers/serial/s3c64xx.c
index ea6eb4b..9d8fcb9 100644
--- a/drivers/serial/s3c64xx.c
+++ b/drivers/serial/s3c64xx.c
@@ -119,22 +119,6 @@ int serial_getc(void)
return uart-URXH  0xff;
 }
 
-#ifdef CONFIG_HWFLOW
-static int hwflow; /* turned off by default */
-int hwflow_onoff(int on)
-{
-   switch (on) {
-   case 1:
-   hwflow = 1; /* turn on */
-   break;
-   case -1:
-   hwflow = 0; /* turn off */
-   break;
-   }
-   return hwflow;
-}
-#endif
-
 #ifdef CONFIG_MODEM_SUPPORT
 static int be_quiet;
 void disable_putc(void)
@@ -164,11 +148,6 @@ void serial_putc(const char c)
/* wait for room in the tx FIFO */
while (!(uart-UTRSTAT  0x2));
 
-#ifdef CONFIG_HWFLOW
-   /* Wait for CTS up */
-   while (hwflow  !(uart-UMSTAT  0x1));
-#endif
-
uart-UTXH = c;
 
/* If \n, also do \r */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] i.MX31: document timer precision option

2008-08-28 Thread Guennadi Liakhovetski
Signed-off-by: Guennadi Liakhovetski [EMAIL PROTECTED]
---

diff -u /dev/null doc/README.imx31
--- /dev/null   2008-08-28 10:21:05.503011301 +0200
+++ doc/README.imx312008-08-28 12:15:21.0 +0200
@@ -0,0 +1,13 @@
+i.MX31 specific Configuration Options:
+--
+
+- Timer precision:
+   CONFIG_MX31_TIMER_HIGH_PRECISION
+
+   Enable higher precision timer. The low-precision timer
+   (default) provides approximately 4% error, whereas the
+   high-precision timer is about 0.4% accurate. The extra
+   accuracy is achieved at the cost of higher computational
+   overhead, which, in places where time is measured, should
+   not be critical, so, it should be safe to enable this
+   option.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] integratorcp board - multiple definition of `__udivsi3' undefined reference to `raise' Error

2008-08-28 Thread Gururaja Hebbar K R
Hi,

I am using CodeSourcery Arm Toolchain to compile U-boot-1.3.3 for integrator cp 
board. 

1. I set the proper environment variables (BUILD_DIR, PATH, CROSS_COMPILE) 

export PATH=/home/user/project/arm-2007q1/bin:$PATH
export CROSS_COMPILE=arm-none-linux-gnueabi-
export BUILD_DIR=/home/user/project/u_boot/Ubuild_all

2. Then i give 
make clean
make distclean
make cp926ejs_config
make

At the end of the compile i get 

..snip..
..snip..
/opt/toolchain/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/libgcc.a(_udivsi3.o):
 In function `__aeabi_uidiv':
(.text+0x0): multiple definition of `__udivsi3'
lib_arm/libarm.a(_udivsi3.o):/home/user/project/u_boot/u-boot-1.3.3/lib_arm/_udivsi3.S:17:
 first defined here
arm-none-linux-gnueabi-ld: ERROR: Source object 
/opt/toolchain/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/libgcc.a(_udivdi3.o)
 has EABI version 5, but target u-boot has EABI version 0
arm-none-linux-gnueabi-ld: failed to merge target specific data of file 
/opt/toolchain/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/libgcc.a(_udivdi3.o)
arm-none-linux-gnueabi-ld: ERROR: Source object 
/opt/toolchain/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/libgcc.a(_udivsi3.o)
 has EABI version 5, but target u-boot has EABI version 0
arm-none-linux-gnueabi-ld: failed to merge target specific data of file 
/opt/toolchain/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/libgcc.a(_udivsi3.o)
arm-none-linux-gnueabi-ld: ERROR: Source object 
/opt/toolchain/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/libgcc.a(_dvmd_lnx.o)
 has EABI version 5, but target u-boot has EABI version 0
arm-none-linux-gnueabi-ld: failed to merge target specific data of file 
/opt/toolchain/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/libgcc.a(_dvmd_lnx.o)
arm-none-linux-gnueabi-ld: ERROR: Source object 
/opt/toolchain/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/libgcc.a(_clz.o)
 has EABI version 5, but target u-boot has EABI version 0
arm-none-linux-gnueabi-ld: failed to merge target specific data of file 
/opt/toolchain/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/libgcc.a(_clz.o)
/opt/toolchain/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/libgcc.a(_dvmd_lnx.o):
 In function `__aeabi_ldiv0':
(.text+0x8): undefined reference to `raise'
make: *** [/home/user/project/u_boot/Ubuild_all/u-boot] Error 1

When i searched for the place of error, i found that in 
uboot-1.3.3/board/integratorcp/integratorcp.c 

@line 235, in function 
ulong get_timer_masked (void)
{
..snip..
..snip..

lastdec   = now;
timestamp = (ulong)(total_count/div_timer);

return timestamp;
}

I think we need to change it to use do_div function as below.

ulong get_timer_masked (void)
{
unsigned long long n;

..snip..
..snip..
lastdec = now;

n = total_count;
do_div(n, div_timer);
timestamp = (ulong)n;

return timestamp;
}

Also include div64.h

If this correct, then i can send a patch for integrator[ap/cp] board. Since 
both has same c code for this function.

Correct me if i am wrong

Thanks in advance

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


Re: [U-Boot] Need Info regarding global label memsetup file memsetup.s

2008-08-28 Thread Peter Pearse
 

 -Original Message-
 From: Gururaja Hebbar K R [mailto:[EMAIL PROTECTED] 
 Sent: 28 August 2008 06:41
 To: u-boot@lists.denx.de
 Cc: [EMAIL PROTECTED]; Jean-Christophe PLAGNIOL-VILLARD; Peter Pearse
 Subject: Need Info regarding global label memsetup  file memsetup.s
 
 Hi,
 
 I was going through ARM integrator[cp/ap] (u-boot-1.3.3) 
 board files  found occurrences of memsetup global variables 
  file memsetup.s
 Once 1 step is done, this entry becomes invalid. So it needs 
 to be removed.

---snip--- 
 
 
 If i am correct, i can send a patch for the same. 
 
 Please correct me if i am wrong.
 

Fine by me

Regards

Peter



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


Re: [U-Boot] integratorcp board - multiple definition of `__udivsi3' undefined reference to `raise' Error

2008-08-28 Thread Peter Pearse
 

 -Original Message-
 From: Gururaja Hebbar K R [mailto:[EMAIL PROTECTED] 
 Sent: 28 August 2008 11:47
 To: u-boot@lists.denx.de
 Cc: [EMAIL PROTECTED]; Jean-Christophe PLAGNIOL-VILLARD; Peter Pearse
 Subject: integratorcp board - multiple definition of 
 `__udivsi3'  undefined reference to `raise' Error
 
 Hi,
 
 I am using CodeSourcery Arm Toolchain to compile U-boot-1.3.3 
 for integrator cp board. 

---snip---

 
 I think we need to change it to use do_div function as below
---snip---
 
 If this correct, then i can send a patch for 
 integrator[ap/cp] board. Since both has same c code for this function.
 
 Correct me if i am wrong
 
 Thanks in advance
 
 Regards
 Gururaja
 

Fine by me (it's in my list of patches to submit.)

Regards

Peter


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


[U-Boot] [PATCH] ARM - Integrator[AP/CP] - Remove unused file memsetup.S

2008-08-28 Thread Gururaja Hebbar K R
Hi,

- memsetup.s is changed/merged to lowlevel_init.S
  memsetup.S has a global label memsetup that just returns back to caller
- memsetup global label is changed/merged to lowlevel_init
  This label is not called from anywhere.


Signed-off-by: Gururaja Hebbar [EMAIL PROTECTED]
---
 board/integratorap/Makefile   |2 +-
 board/integratorap/memsetup.S |   29 -
 board/integratorcp/Makefile   |2 +-
 board/integratorcp/memsetup.S |   29 -
 4 files changed, 2 insertions(+), 60 deletions(-)
 delete mode 100755 board/integratorap/memsetup.S
 delete mode 100755 board/integratorcp/memsetup.S

diff --git a/board/integratorap/Makefile b/board/integratorap/Makefile
index f78de3a..79f501a 100755
--- a/board/integratorap/Makefile
+++ b/board/integratorap/Makefile
@@ -30,7 +30,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(BOARD).a
 
 COBJS  := integratorap.o flash.o
-SOBJS  := lowlevel_init.o memsetup.o
+SOBJS  := lowlevel_init.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
diff --git a/board/integratorap/memsetup.S b/board/integratorap/memsetup.S
deleted file mode 100755
index da43cb6..000
--- a/board/integratorap/memsetup.S
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Memory setup for integratorAP
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-/*
- * Memory setup
- *  - the reset defaults are assumed sufficient
- */
-
-.globl memsetup
-memsetup:
-   mov pc,lr
diff --git a/board/integratorcp/Makefile b/board/integratorcp/Makefile
index 9201acc..92a1a07 100755
--- a/board/integratorcp/Makefile
+++ b/board/integratorcp/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(BOARD).a
 
 COBJS  := integratorcp.o flash.o
-SOBJS  := lowlevel_init.o memsetup.o
+SOBJS  := lowlevel_init.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
diff --git a/board/integratorcp/memsetup.S b/board/integratorcp/memsetup.S
deleted file mode 100755
index da43cb6..000
--- a/board/integratorcp/memsetup.S
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Memory setup for integratorAP
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-/*
- * Memory setup
- *  - the reset defaults are assumed sufficient
- */
-
-.globl memsetup
-memsetup:
-   mov pc,lr
-- 
1.5.6.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3] [POWERPC] TQM8272: Fix compiling error for the TQM8272 board.

2008-08-28 Thread Heiko Schocher
Hello,

[POWERPC] TQM8272: Fix compiling error for the TQM8272 board.

tqm8272.c: In function 'upmnand_hwcontrol':
tqm8272.c:1086: warning: implicit declaration of function 'writeb'
tqm8272.c: In function 'board_nand_init':
tqm8272.c:1193: error: 'struct nand_chip' has no member named 'write_byte'
make[1]: *** [tqm8272.o] Error 1
make[1]: *** Waiting for unfinished jobs
make: *** [board/tqc/tqm8272/libtqm8272.a] Error 2

introduced from commit:

Update MTD to that of Linux 2.6.22.1

author  William Juul [EMAIL PROTECTED]
 Wed, 31 Oct 2007 12:53:06 + (13:53 +0100)
committer   Scott Wood [EMAIL PROTECTED]
 Tue, 12 Aug 2008 16:31:15 + (11:31 -0500)
commit  cfa460adfdefcc30d104e1a9ee44994ee349bb7b

Signed-off-by: Heiko Schocher [EMAIL PROTECTED]
---
 board/tqc/tqm8272/tqm8272.c |   33 +++--
 1 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/board/tqc/tqm8272/tqm8272.c b/board/tqc/tqm8272/tqm8272.c
index a0ec254..a3d37f6 100644
--- a/board/tqc/tqm8272/tqm8272.c
+++ b/board/tqc/tqm8272/tqm8272.c
@@ -1068,10 +1068,22 @@ int update_flash_size (int flash_size)

 static u8 hwctl = 0;

-static void upmnand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
+static void upmnand_write_byte(struct mtd_info *mtdinfo, u_char byte)
 {
-   struct nand_chip *this = mtd-priv;
+   struct nand_chip *this = mtdinfo-priv;
+   ulong base = (ulong) (this-IO_ADDR_W + chipsel * CFG_NAND_CS_DIST);

+   if (hwctl  0x1) {
+   WRITE_NAND_UPM(byte, base, CFG_NAND_UPM_WRITE_CMD_OFS);
+   } else if (hwctl  0x2) {
+   WRITE_NAND_UPM(byte, base, CFG_NAND_UPM_WRITE_ADDR_OFS);
+   } else {
+   WRITE_NAND(byte, base);
+   }
+}
+
+static void upmnand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
+{
if (ctrl  NAND_CTRL_CHANGE) {
if ( ctrl  NAND_CLE )
hwctl |= 0x1;
@@ -1083,21 +1095,7 @@ static void upmnand_hwcontrol(struct mtd_info *mtd, int 
cmd, unsigned int ctrl)
hwctl = ~0x2;
}
if (cmd != NAND_CMD_NONE)
-   writeb(cmd, this-IO_ADDR_W);
-}
-
-static void upmnand_write_byte(struct mtd_info *mtdinfo, u_char byte)
-{
-   struct nand_chip *this = mtdinfo-priv;
-   ulong base = (ulong) (this-IO_ADDR_W + chipsel * CFG_NAND_CS_DIST);
-
-   if (hwctl  0x1) {
-   WRITE_NAND_UPM(byte, base, CFG_NAND_UPM_WRITE_CMD_OFS);
-   } else if (hwctl  0x2) {
-   WRITE_NAND_UPM(byte, base, CFG_NAND_UPM_WRITE_ADDR_OFS);
-   } else {
-   WRITE_NAND(byte, base);
-   }
+   upmnand_write_byte (mtd, cmd);
 }

 static u_char upmnand_read_byte(struct mtd_info *mtdinfo)
@@ -1190,7 +1188,6 @@ int board_nand_init(struct nand_chip *nand)

nand-cmd_ctrl   = upmnand_hwcontrol;
nand-read_byte  = upmnand_read_byte;
-   nand-write_byte = upmnand_write_byte;
nand-dev_ready  = tqm8272_dev_ready;

 #ifndef CONFIG_NAND_SPL
-- 
1.5.6.1


-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ARM - Integrator[AP/CP] - - Correct Improper ulong division

2008-08-28 Thread Gururaja Hebbar K R
Hi,

- Correct Improper ulong division. This patch take care of
   multiple definition of `__udivsi3'  undefined reference to `raise' Error
   when compiling [ap/cp]926ejs_config with CodeSourcery arm toolchain


Signed-off-by: Gururaja Hebbar [EMAIL PROTECTED]
---
 board/integratorap/integratorap.c |7 +--
 board/integratorcp/integratorcp.c |7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/board/integratorap/integratorap.c 
b/board/integratorap/integratorap.c
index e659907..421cdbb 100755
--- a/board/integratorap/integratorap.c
+++ b/board/integratorap/integratorap.c
@@ -611,6 +611,7 @@ void reset_timer_masked (void)
 ulong get_timer_masked (void)
 {
ulong now = READ_TIMER; /* current count */
+   unsigned long long n;
 
if (now  lastdec) {
/* Must have wrapped */
@@ -618,8 +619,10 @@ ulong get_timer_masked (void)
} else {
total_count += lastdec - now;
}
-   lastdec   = now;
-   timestamp = total_count/div_timer;
+   lastdec = now;
+   n = total_count;
+   do_div(n, div_timer);
+   timestamp = (ulong)n;
 
return timestamp;
 }
diff --git a/board/integratorcp/integratorcp.c 
b/board/integratorcp/integratorcp.c
index d6d6e13..8d85238 100755
--- a/board/integratorcp/integratorcp.c
+++ b/board/integratorcp/integratorcp.c
@@ -236,6 +236,7 @@ ulong get_timer_masked (void)
 {
/* get current count */
unsigned long long now = (unsigned long long)READ_TIMER;
+   unsigned long long n;
 
if(now  lastdec) {
/* Must have wrapped */
@@ -243,8 +244,10 @@ ulong get_timer_masked (void)
} else {
total_count += lastdec - now;
}
-   lastdec   = now;
-   timestamp = (ulong)(total_count/div_timer);
+   lastdec = now;
+   n = total_count;
+   do_div(n, div_timer);
+   timestamp = (ulong)n;
 
return timestamp;
 }
-- 
1.5.6.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] 86xx: remove redudant code with lib_ppc/interrupts.c

2008-08-28 Thread Kumar Gala

On Aug 19, 2008, at 3:05 PM, Kumar Gala wrote:

 For some reason we duplicated the majority of code in lib_ppc/ 
 interrupts.c
 not show how that happened, but there is no good reason for it.

 Use the interrupt_init_cpu() and timer_interrupt_cpu() since its why
 they exist.

 Signed-off-by: Kumar Gala [EMAIL PROTECTED]
 ---
 cpu/mpc86xx/interrupts.c |  131 ++ 
 +---
 1 files changed, 7 insertions(+), 124 deletions(-)

Jon, can you ack or pick up this patch.

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


Re: [U-Boot] [PATCH] mtd: SPI Flash: Support the STMicro Flash

2008-08-28 Thread Haavard Skinnemoen
Tsi-Chung Liew [EMAIL PROTECTED] wrote:
 From: TsiChung Liew [EMAIL PROTECTED]
 
 Add MTD SPI Flash support for M25P16, M25P20, M25P32,
 M25P40, M25P64, M25P80, M25P128.
 
 Signed-off-by: Jason McMullan [EMAIL PROTECTED]
 Signed-off-by: TsiChung Liew [EMAIL PROTECTED]

Looks good to me, except...

 +static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = {
 + {
 +  .idcode1 = STM_ID_M25P16,
 +  .page_size = 256,
 +  .pages_per_sector = 256,
 +  .nr_sectors = 32,
 +  .name = M25P16,
 +  },
 + {
 +  .idcode1 = STM_ID_M25P20,
 +  .page_size = 256,
 +  .pages_per_sector = 256,
 +  .nr_sectors = 4,
 +  .name = M25P20,
 +  },
 + {
 +  .idcode1 = STM_ID_M25P32,
 +  .page_size = 256,
 +  .pages_per_sector = 256,
 +  .nr_sectors = 64,
 +  .name = M25P32,
 +  },
 + {
 +  .idcode1 = STM_ID_M25P40,
 +  .page_size = 256,
 +  .pages_per_sector = 256,
 +  .nr_sectors = 8,
 +  .name = M25P40,
 +  },
 + {
 +  .idcode1 = STM_ID_M25P64,
 +  .page_size = 256,
 +  .pages_per_sector = 256,
 +  .nr_sectors = 128,
 +  .name = M25P64,
 +  },
 + {
 +  .idcode1 = STM_ID_M25P80,
 +  .page_size = 256,
 +  .pages_per_sector = 256,
 +  .nr_sectors = 16,
 +  .name = M25P80,
 +  },
 + {
 +  .idcode1 = STM_ID_M25P128,
 +  .page_size = 256,
 +  .pages_per_sector = 1024,
 +  .nr_sectors = 64,
 +  .name = M25P128,
 +  },
 +};

The indentation is a bit weird here. Please use tabs only.

Who will apply this, btw?

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


Re: [U-Boot] [RFC] ARM: Toolchain configuration for Cortex A8 based OMAP3?

2008-08-28 Thread Dirk Behme
Jean-Christophe PLAGNIOL-VILLARD wrote:
 On 08:39 Sat 23 Aug , Dirk Behme wrote:
 
While preparing U-Boot patches for ARM Cortex A8 based OMAP3 [1], we 
found that we use CodeSourcery ARM toolchain [2], and the way we 
locally modified main Makefile to use this toolchain is most probably 
incompatible with mainline.

Please find below some diffs what we did locally.

We now like to discuss/ask what's the best way to align this with 
mainline to be able to submit OMAP3 patches?

Any hints or proposals?

Many thanks,

Dirk

[1] 
http://www.sakoman.net/cgi-bin/gitweb.cgi?p=u-boot-omap3.git;a=summary 
('common' branch)

[2] http://www.codesourcery.com/gnu_toolchains/arm/portal/release313

Relevant parts of OMAP3 patch we talk about here (most probably 
reformated cause of copy  paste to mailtool, so just for discussion. 
Final patches will be sent by git-send-mail). Note the -lgcc_eh which 
seems to be CodeSourcery specific, and the -march=armv7a in config.mk.

diff -uprN uboot_clean/Makefile uboot_beagle/Makefile
--- uboot_clean/Makefile  2008-08-22 19:57:05.0 +0200
+++ uboot_beagle/Makefile 2008-08-22 19:53:52.0 +0200
@@ -141,7 +141,7 @@ ifeq ($(ARCH),ppc)
  CROSS_COMPILE = ppc_8xx-
  endif
  ifeq ($(ARCH),arm)
-CROSS_COMPILE = arm-linux-
+CROSS_COMPILE = arm-none-linux-gnueabi-
 
 
 please do not change it
 
 you specify it at runtime

Yes, as recommended by Wolfgang and ksi, too, we will do this. Thanks 
to all proposing this!

 btw: you can use arm-elf- toolchains and others to compile u-boot so why do
 you want to modify the default one?

The original source code from TI we used to start for OMAP3 patch just 
used it (most probably to have armv7a support). We will change this.

  endif
  ifeq ($(ARCH),i386)
  CROSS_COMPILE = i386-linux-
@@ -253,7 +253,7 @@ LIBBOARD = board/$(BOARDDIR)/lib$(BOARD)
  LIBBOARD := $(addprefix $(obj),$(LIBBOARD))

  # Add GCC lib
-PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) 
-print-libgcc-file-name`) -lgcc
+PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) 
-print-libgcc-file-name`) -lgcc -lgcc_eh

 
 please do it in a fix commit

Yes, we already fixed this in the OMAP3 preparation git.

  # The tools are needed early, so put this first
  # Don't include stuff already done in $(LIBS)
@@ -2641,6 +2641,18 @@ SMN42_config   :   unconfig
  @$(MKCONFIG) $(@:_config=) arm arm720t SMN42 siemens lpc2292

 
#
+## ARM CORTEX Systems
+#
+omap3_beagle_config :unconfig
+ @$(MKCONFIG) $(@:_config=) arm omap3 beagle omap3
+
 
 add it when you add each board (1 board = 1 patch)

Yes, okay.

+omap3_overo_config : unconfig
+ @$(MKCONFIG) $(@:_config=) arm omap3 overo omap3
+
+omap3_evm_config :   unconfig
+ @$(MKCONFIG) $(@:_config=) arm omap3 evm omap3
+
+#
  ## XScale Systems
 
#

diff -uprN uboot_clean/cpu/omap3/config.mk 
uboot_beagle/cpu/omap3/config.mk
--- uboot_clean/cpu/omap3/config.mk   1970-01-01 01:00:00.0 +0100
+++ uboot_beagle/cpu/omap3/config.mk  2008-08-22 19:52:20.0 +0200
@@ -0,0 +1,34 @@
+#
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, [EMAIL PROTECTED]
+#
cut GPL
+#
+PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno-common -ffixed-r8 \
+ -msoft-float
+
+PLATFORM_CPPFLAGS += -march=armv7a
 
 
 Do you really need armv7a march?

We have to rewrite at least start,S, but yes, we will to this. So we 
don't really need this.

 Could you explain why?

The U-Boot code we got from TI for OMAP3 uses arm-none-linux-gnueabi- 
  -march=armv7a. While cleaning this code for upstream submission, we 
found this and now get the answer from you, Wolfgang and ksi how to 
handle this properly.

Many thanks for your help

Dirk

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


Re: [U-Boot] [PATCH] mtd: SPI Flash: Support the STMicro Flash

2008-08-28 Thread Liew Tsi Chung-R5AAHP
Haavard,

 Looks good to me, except...

 +static const struct stmicro_spi_flash_params
stmicro_spi_flash_table[] = {
 +{
 + .idcode1 = STM_ID_M25P16,
 + .page_size = 256,
 + .pages_per_sector = 256,
 + .nr_sectors = 32,
 + .name = M25P16,
 + },
 +{
 + .idcode1 = STM_ID_M25P20,
 + .page_size = 256,
 + .pages_per_sector = 256,
 + .nr_sectors = 4,
 + .name = M25P20,
 + },
 +{
 + .idcode1 = STM_ID_M25P32,
 + .page_size = 256,
 + .pages_per_sector = 256,
 + .nr_sectors = 64,
 + .name = M25P32,
 + },
 +{
 + .idcode1 = STM_ID_M25P40,
 + .page_size = 256,
 + .pages_per_sector = 256,
 + .nr_sectors = 8,
 + .name = M25P40,
 + },
 +{
 + .idcode1 = STM_ID_M25P64,
 + .page_size = 256,
 + .pages_per_sector = 256,
 + .nr_sectors = 128,
 + .name = M25P64,
 + },
 +{
 + .idcode1 = STM_ID_M25P80,
 + .page_size = 256,
 + .pages_per_sector = 256,
 + .nr_sectors = 16,
 + .name = M25P80,
 + },
 +{
 + .idcode1 = STM_ID_M25P128,
 + .page_size = 256,
 + .pages_per_sector = 1024,
 + .nr_sectors = 64,
 + .name = M25P128,
 + },
 +};

 The indentation is a bit weird here. Please use tabs only.
The indentation is generated by indent -npro -kr -ts8 -sob -l80 -ss
-ncs $@.

 Who will apply this, btw?
I will apply this, if no one else do it.

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


[U-Boot] Makefile cleanup and u-boot size reduction

2008-08-28 Thread Jean-Christophe PLAGNIOL-VILLARD
Hi,

1) The Following patchset continue the work of moving conditional 
compile
to Makefile and do a few clean up on file place

2) It will merge currents list implementation for devices  co to
linux list.h in order to reduce the size of u-boot by 1KB at min

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


[U-Boot] Makeflie cleanup and u-boot size reduction

2008-08-28 Thread Jean-Christophe PLAGNIOL-VILLARD
Hi,

1)The following patchset will continue the move of conditional compile 
to
Makefile and do some file location move

2) It will merge the current list implementation for common/device 
co to linux list.h in order to reduce u-boot size. During test It did
show the the patch will reduce u-boot size by 1KB min.

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


[U-Boot] [PATCH 02/12] soft_i2c: move to drivers/i2c

2008-08-28 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 common/Makefile|1 -
 drivers/i2c/Makefile   |1 +
 {common = drivers/i2c}/soft_i2c.c |0 
 3 files changed, 1 insertions(+), 1 deletions(-)
 rename {common = drivers/i2c}/soft_i2c.c (100%)

diff --git a/common/Makefile b/common/Makefile
index d974823..faeac86 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -137,7 +137,6 @@ COBJS-$(CONFIG_BITBANGMII) += miiphybb.o
 COBJS-y += miiphyutil.o
 COBJS-y += s_record.o
 COBJS-y += serial.o
-COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
 COBJS-$(CONFIG_SOFT_SPI) += soft_spi.o
 ifdef CONFIG_CMD_USB
 COBJS-y += usb.o
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 1f25afb..6079c05 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -29,6 +29,7 @@ COBJS-$(CONFIG_FSL_I2C) += fsl_i2c.o
 COBJS-$(CONFIG_I2C_MXC) += mxc_i2c.o
 COBJS-$(CONFIG_DRIVER_OMAP1510_I2C) += omap1510_i2c.o
 COBJS-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o
+COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
 COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o
 
 COBJS  := $(COBJS-y)
diff --git a/common/soft_i2c.c b/drivers/i2c/soft_i2c.c
similarity index 100%
rename from common/soft_i2c.c
rename to drivers/i2c/soft_i2c.c
-- 
1.5.6.3

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


[U-Boot] [PATCH 05/12] crc16: move to lib_generic

2008-08-28 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 common/Makefile |1 -
 lib_generic/Makefile|1 +
 {common = lib_generic}/crc16.c |0 
 3 files changed, 1 insertions(+), 1 deletions(-)
 rename {common = lib_generic}/crc16.c (100%)

diff --git a/common/Makefile b/common/Makefile
index ff2e6c6..0c8ef5b 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -141,7 +141,6 @@ COBJS-y += usb.o
 COBJS-$(CONFIG_USB_STORAGE) += usb_storage.o
 endif
 COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
-COBJS-y += crc16.o
 COBJS-y += xyzModem.o
 COBJS-y += cmd_mac.o
 COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
diff --git a/lib_generic/Makefile b/lib_generic/Makefile
index a820f97..7df5a2c 100644
--- a/lib_generic/Makefile
+++ b/lib_generic/Makefile
@@ -30,6 +30,7 @@ COBJS-y += bzlib_crctable.o
 COBJS-y += bzlib_decompress.o
 COBJS-y += bzlib_randtable.o
 COBJS-y += bzlib_huffman.o
+COBJS-y += crc16.o
 COBJS-y += crc32.o
 COBJS-y += ctype.o
 COBJS-y += display_options.o
diff --git a/common/crc16.c b/lib_generic/crc16.c
similarity index 100%
rename from common/crc16.c
rename to lib_generic/crc16.c
-- 
1.5.6.3

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


[U-Boot] [PATCH 06/12] autoscript: Move conditional compilation to Makefile

2008-08-28 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 common/Makefile   |3 +-
 common/{cmd_autoscript.c = autoscript.c} |   44 
 common/cmd_autoscript.c   |  158 -
 3 files changed, 2 insertions(+), 203 deletions(-)
 copy common/{cmd_autoscript.c = autoscript.c} (79%)

diff --git a/common/Makefile b/common/Makefile
index 0c8ef5b..92d7a9e 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -31,7 +31,8 @@ COBJS-y += main.o
 COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o
 COBJS-y += circbuf.o
 COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
-COBJS-y += cmd_autoscript.o
+COBJS-$(CONFIG_AUTOSCRIPT)$(CONFIG_CMD_AUTOSCRIPT) += autoscript.o
+COBJS-$(CONFIG_CMD_AUTOSCRIPT) += cmd_autoscript.o
 COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
 COBJS-$(CONFIG_CMD_BEDBUG) += cmd_bedbug.o
 COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
diff --git a/common/cmd_autoscript.c b/common/autoscript.c
similarity index 79%
copy from common/cmd_autoscript.c
copy to common/autoscript.c
index 13af93e..e1d4103 100644
--- a/common/cmd_autoscript.c
+++ b/common/autoscript.c
@@ -47,8 +47,6 @@
 #include hush.h
 #endif
 
-#if defined(CONFIG_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)
-
 int
 autoscript (ulong addr, const char *fit_uname)
 {
@@ -199,45 +197,3 @@ autoscript (ulong addr, const char *fit_uname)
free (cmd);
return rcode;
 }
-
-#endif
-
-/**/
-#if defined(CONFIG_CMD_AUTOSCRIPT)
-int
-do_autoscript (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-   ulong addr;
-   int rcode;
-   const char *fit_uname = NULL;
-
-   /* Find script image */
-   if (argc  2) {
-   addr = CFG_LOAD_ADDR;
-   debug (*  autoscr: default load address = 0x%08lx\n, addr);
-#if defined(CONFIG_FIT)
-   } else if (fit_parse_subimage (argv[1], load_addr, addr, fit_uname)) {
-   debug (*  autoscr: subimage '%s' from FIT image at 0x%08lx\n,
-   fit_uname, addr);
-#endif
-   } else {
-   addr = simple_strtoul(argv[1], NULL, 16);
-   debug (*  autoscr: cmdline image address = 0x%08lx\n, addr);
-   }
-
-   printf (## Executing script at %08lx\n, addr);
-   rcode = autoscript (addr, fit_uname);
-   return rcode;
-}
-
-U_BOOT_CMD(
-   autoscr, 2, 0,  do_autoscript,
-   autoscr - run script from memory\n,
-   [addr] - run script starting at addr
-- A valid autoscr header must be present\n
-#if defined(CONFIG_FIT)
-   For FIT format uImage addr must include subimage\n
-   unit name in the form of addr:subimg_uname\n
-#endif
-);
-#endif
diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c
index 13af93e..2b6a525 100644
--- a/common/cmd_autoscript.c
+++ b/common/cmd_autoscript.c
@@ -47,163 +47,6 @@
 #include hush.h
 #endif
 
-#if defined(CONFIG_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)
-
-int
-autoscript (ulong addr, const char *fit_uname)
-{
-   ulong   len;
-   image_header_t  *hdr;
-   ulong   *data;
-   char*cmd;
-   int rcode = 0;
-   int verify;
-#if defined(CONFIG_FIT)
-   const void* fit_hdr;
-   int noffset;
-   const void  *fit_data;
-   size_t  fit_len;
-#endif
-
-   verify = getenv_yesno (verify);
-
-   switch (genimg_get_format ((void *)addr)) {
-   case IMAGE_FORMAT_LEGACY:
-   hdr = (image_header_t *)addr;
-
-   if (!image_check_magic (hdr)) {
-   puts (Bad magic number\n);
-   return 1;
-   }
-
-   if (!image_check_hcrc (hdr)) {
-   puts (Bad header crc\n);
-   return 1;
-   }
-
-   if (verify) {
-   if (!image_check_dcrc (hdr)) {
-   puts (Bad data crc\n);
-   return 1;
-   }
-   }
-
-   if (!image_check_type (hdr, IH_TYPE_SCRIPT)) {
-   puts (Bad image type\n);
-   return 1;
-   }
-
-   /* get length of script */
-   data = (ulong *)image_get_data (hdr);
-
-   if ((len = uimage_to_cpu (*data)) == 0) {
-   puts (Empty Script\n);
-   return 1;
-   }
-
-   /*
-* scripts are just multi-image files with one component, seek
-* past the zero-terminated sequence of image lengths to get
-* to the actual image data
-*/
-   while (*data++);
-   break;
-#if defined(CONFIG_FIT)
-   case IMAGE_FORMAT_FIT:
-   if (fit_uname == NULL) {
-   puts (No FIT subimage unit name\n);
-   

[U-Boot] [PATCH 08/12] common/Makefile: order by functionality

2008-08-28 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 common/Makefile |   71 +-
 1 files changed, 38 insertions(+), 33 deletions(-)

diff --git a/common/Makefile b/common/Makefile
index 7db70f5..99781fe 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -27,16 +27,41 @@ LIB = $(obj)libcommon.a
 
 AOBJS  =
 
+# core
 COBJS-y += main.o
-COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o
 COBJS-y += circbuf.o
+COBJS-y += console.o
+COBJS-y += command.o
+COBJS-y += devices.o
+COBJS-y += dlmalloc.o
+COBJS-y += exports.o
+COBJS-y += hush.o
+COBJS-y += image.o
+COBJS-y += lists.o
+COBJS-y += memsize.o
+COBJS-y += s_record.o
+COBJS-y += serial.o
+COBJS-y += xyzModem.o
+
+# environment
+COBJS-y += environment.o
+COBJS-y += env_common.o
+COBJS-y += env_dataflash.o
+COBJS-y += env_eeprom.o
+COBJS-y += env_flash.o
+COBJS-y += env_nand.o
+COBJS-y += env_nvram.o
+COBJS-y += env_onenand.o
+COBJS-y += env_sf.o
+COBJS-y += env_nowhere.o
+
+# command
 COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
 COBJS-$(CONFIG_AUTOSCRIPT)$(CONFIG_CMD_AUTOSCRIPT) += autoscript.o
 COBJS-$(CONFIG_CMD_AUTOSCRIPT) += cmd_autoscript.o
 COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
-COBJS-$(CONFIG_CMD_BEDBUG) += cmd_bedbug.o
+COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o
 COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
-COBJS-y += image.o
 COBJS-y += cmd_boot.o
 COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
 COBJS-y += cmd_bootm.o
@@ -84,11 +109,14 @@ COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
 COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o
 COBJS-y += cmd_load.o
 COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
+COBJS-y += cmd_mac.o
 COBJS-y += cmd_mem.o
+COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
 COBJS-$(CONFIG_MII)$(CONFIG_CMD_MII) += miiphyutil.o
 COBJS-$(CONFIG_CMD_MII) += cmd_mii.o
 COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o
 COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o
+COBJS-$(CONFIG_MP) += cmd_mp.o
 COBJS-y += cmd_nand.o
 COBJS-$(CONFIG_CMD_NET) += cmd_net.o
 COBJS-y += cmd_nvedit.o
@@ -102,53 +130,30 @@ COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o
 COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
 COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o
 COBJS-$(CONFIG_CMD_SATA) += cmd_sata.o
+COBJS-$(CONFIG_CMD_SF) += cmd_sf.o
 COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o
 COBJS-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o
 COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o
 COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o
 COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o
 COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o
-COBJS-$(CONFIG_CMD_USB) += cmd_usb.o
+ifdef CONFIG_CMD_USB
+COBJS-y += cmd_usb.o
+COBJS-y += usb.o
+COBJS-$(CONFIG_USB_STORAGE) += usb_storage.o
+endif
 COBJS-$(CONFIG_CMD_XIMG) += cmd_ximg.o
 COBJS-$(CONFIG_YAFFS2) += cmd_yaffs2.o
 COBJS-y += cmd_vfd.o
-COBJS-y += command.o
-COBJS-y += console.o
-COBJS-y += devices.o
-COBJS-y += dlmalloc.o
 COBJS-$(CONFIG_CMD_DOC) += docecc.o
-COBJS-y += environment.o
-COBJS-y += env_common.o
-COBJS-y += env_nand.o
-COBJS-y += env_dataflash.o
-COBJS-y += env_flash.o
-COBJS-y += env_eeprom.o
-COBJS-y += env_onenand.o
-COBJS-y += env_sf.o
-COBJS-y += env_nvram.o
-COBJS-y += env_nowhere.o
-COBJS-y += exports.o
 COBJS-y += flash.o
-COBJS-y += hush.o
 COBJS-y += kgdb.o
 COBJS-$(CONFIG_LCD) += lcd.o
-COBJS-y += lists.o
 COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o
-COBJS-y += memsize.o
-COBJS-y += s_record.o
-COBJS-y += serial.o
-ifdef CONFIG_CMD_USB
-COBJS-y += usb.o
-COBJS-$(CONFIG_USB_STORAGE) += usb_storage.o
-endif
 COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
-COBJS-y += xyzModem.o
-COBJS-y += cmd_mac.o
-COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
-COBJS-$(CONFIG_MP) += cmd_mp.o
-COBJS-$(CONFIG_CMD_SF) += cmd_sf.o
 COBJS-$(CONFIG_DDR_SPD) += ddr_spd.o
 
+COBJS-y+= $(COBJS-yy)
 COBJS  := $(COBJS-y)
 SRCS   := $(AOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(AOBJS) $(COBJS))
-- 
1.5.6.3

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


[U-Boot] [PATCH 11/12] devices: merge to list_head

2008-08-28 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 common/Makefile   |1 -
 common/cmd_console.c  |9 +-
 common/cmd_terminal.c |   10 +-
 common/console.c  |   62 ++---
 common/devices.c  |   79 +++---
 common/lists.c|  734 -
 common/usb_kbd.c  |   14 +-
 include/devices.h |8 +-
 include/lists.h   |   77 -
 9 files changed, 87 insertions(+), 907 deletions(-)
 delete mode 100644 common/lists.c
 delete mode 100644 include/lists.h

diff --git a/common/Makefile b/common/Makefile
index 99781fe..102259d 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -37,7 +37,6 @@ COBJS-y += dlmalloc.o
 COBJS-y += exports.o
 COBJS-y += hush.o
 COBJS-y += image.o
-COBJS-y += lists.o
 COBJS-y += memsize.o
 COBJS-y += s_record.o
 COBJS-y += serial.o
diff --git a/common/cmd_console.c b/common/cmd_console.c
index 50ddb01..e2bc2a3 100644
--- a/common/cmd_console.c
+++ b/common/cmd_console.c
@@ -31,14 +31,17 @@
 extern void _do_coninfo (void);
 int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char *argv[])
 {
-   int i, l;
+   int l;
+   struct list_head *list = device_get_list();
+   struct list_head *pos;
+   device_t *dev;
 
/* Scan for valid output and input devices */
 
puts (List of available devices:\n);
 
-   for (i = 1; i = ListNumItems (devlist); i++) {
-   device_t *dev = ListGetPtrToItem (devlist, i);
+   list_for_each(pos, list) {
+   dev = list_entry(pos, device_t, list);
 
printf (%-8s %08x %c%c%c ,
dev-name,
diff --git a/common/cmd_terminal.c b/common/cmd_terminal.c
index 57943c1..67a2546 100644
--- a/common/cmd_terminal.c
+++ b/common/cmd_terminal.c
@@ -27,10 +27,10 @@
 #include common.h
 #include command.h
 #include devices.h
+#include serial.h
 
 int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char *argv[])
 {
-   int i, l;
int last_tilde = 0;
device_t *dev = NULL;
 
@@ -38,13 +38,7 @@ int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char 
*argv[])
return -1;
 
/* Scan for selected output/input device */
-   for (i = 1; i = ListNumItems (devlist); i++) {
-   device_t *tmp = ListGetPtrToItem (devlist, i);
-   if (!strcmp(tmp-name, argv[1])) {
-   dev = tmp;
-   break;
-   }
-   }
+   dev = device_get_by_name(argv[1]);
if (!dev)
return -1;
 
diff --git a/common/console.c b/common/console.c
index 1b095b1..cfcaeb8 100644
--- a/common/console.c
+++ b/common/console.c
@@ -325,9 +325,22 @@ inline void dbg(const char *fmt, ...)
 
 /** U-Boot INIT FUNCTIONS */
 
+device_t *search_device (int flags, char *name)
+{
+   device_t *dev;
+
+   dev = device_get_by_name(name);
+
+   if(dev  (dev-flags  flags))
+   return dev;
+
+   return NULL;
+}
+
 int console_assign (int file, char *devname)
 {
-   int flag, i;
+   int flag;
+   device_t *dev;
 
/* Check for valid file */
switch (file) {
@@ -344,16 +357,10 @@ int console_assign (int file, char *devname)
 
/* Check for valid device name */
 
-   for (i = 1; i = ListNumItems (devlist); i++) {
-   device_t *dev = ListGetPtrToItem (devlist, i);
-
-   if (strcmp (devname, dev-name) == 0) {
-   if (dev-flags  flag)
-   return console_setfile (file, dev);
+   dev = search_device(flag, devname);
 
-   return -1;
-   }
-   }
+   if(dev)
+   return console_setfile (file, dev);
 
return -1;
 }
@@ -371,27 +378,6 @@ int console_init_f (void)
return (0);
 }
 
-#if defined(CFG_CONSOLE_IS_IN_ENV) || defined(CONFIG_SPLASH_SCREEN) || 
defined(CONFIG_SILENT_CONSOLE)
-/* search a device */
-device_t *search_device (int flags, char *name)
-{
-   int i, items;
-   device_t *dev = NULL;
-
-   items = ListNumItems (devlist);
-   if (name == NULL)
-   return dev;
-
-   for (i = 1; i = items; i++) {
-   dev = ListGetPtrToItem (devlist, i);
-   if ((dev-flags  flags)  (strcmp (name, dev-name) == 0)) {
-   break;
-   }
-   }
-   return dev;
-}
-#endif /* CFG_CONSOLE_IS_IN_ENV || CONFIG_SPLASH_SCREEN */
-
 #ifdef CFG_CONSOLE_IS_IN_ENV
 /* Called after the relocation - use desired console functions */
 int console_init_r (void)
@@ -488,7 +474,10 @@ int console_init_r (void)
 int console_init_r (void)
 {
device_t *inputdev = NULL, *outputdev = NULL;
-   int i, items = ListNumItems (devlist);
+   int i;
+   struct list_head *list = device_get_list();
+   struct list_head *pos;
+   device_t *dev;
 
 #ifdef CONFIG_SPLASH_SCREEN
/* 

Re: [U-Boot] Makefile cleanup and u-boot size reduction

2008-08-28 Thread Jean-Christophe PLAGNIOL-VILLARD
On 12:26 Thu 28 Aug , Jean-Christophe PLAGNIOL-VILLARD wrote:
 Hi,
 
   1)The following patchset will continue the move of conditional compile 
 to
   Makefile and do some file location move
 
   2) It will merge the current list implementation for common/device 
   co to linux list.h in order to reduce u-boot size. During test It did
   show the the patch will reduce u-boot size by 1KB min.
 
It's available on
git://git.denx.de/u-boot-arm.git branch Makefile

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


Re: [U-Boot] [PATCH 06/12] autoscript: Move conditional compilation to Makefile

2008-08-28 Thread Peter Tyser
Hi Jean-Chritophe,

On Thu, 2008-08-28 at 12:27 +0200, Jean-Christophe PLAGNIOL-VILLARD
wrote:
 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
 ---
  common/Makefile   |3 +-
  common/{cmd_autoscript.c = autoscript.c} |   44 
  common/cmd_autoscript.c   |  158 
 -
  3 files changed, 2 insertions(+), 203 deletions(-)
  copy common/{cmd_autoscript.c = autoscript.c} (79%)
 
 diff --git a/common/Makefile b/common/Makefile
 index 0c8ef5b..92d7a9e 100644
 --- a/common/Makefile
 +++ b/common/Makefile
 @@ -31,7 +31,8 @@ COBJS-y += main.o
  COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o
  COBJS-y += circbuf.o
  COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
 -COBJS-y += cmd_autoscript.o
 +COBJS-$(CONFIG_AUTOSCRIPT)$(CONFIG_CMD_AUTOSCRIPT) += autoscript.o

Will we run into problems when both CONFIG_AUTOSCRIPT and
CONFIG_CMD_AUTOSCRIPT are defined?  Adding the following should account
for that situation:

COBJS-y += $(COBJS-yy)

 +COBJS-$(CONFIG_CMD_AUTOSCRIPT) += cmd_autoscript.o
  COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
  COBJS-$(CONFIG_CMD_BEDBUG) += cmd_bedbug.o
  COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o

Best,
Peter

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


[U-Boot] [U-boot-Users][GIT PULL] Please pull mpc5xxx tree

2008-08-28 Thread John Rigby
Wolfgang,

The following changes since commit 33aa4eac66b71c797bbc13b3afe432a2132947d4:
   Wolfgang Denk (1):
 Merge branch 'master' of /home/wd/git/u-boot/custodians

are available in the git repository at:

   git://git.denx.de/u-boot-coldfire.git master

TsiChung Liew (7):
   ColdFire: Fix board.c warning message
   ColdFire: Raise uart baudrate to 115200 bps
   ColdFire: Change the SDRAM BRD2WT timing from 3 to 7
   ColdFire: Multiple fixes for MCF5445x platforms
   ColdFire: Add CONFIG_MII_INIT for M5272C3
   ColdFire: I2C fix for multiple platforms
   Add I2C frequency dividers for ColdFire

  board/freescale/m54451evb/m54451evb.c |4 +-
  board/freescale/m54455evb/m54455evb.c |7 ++---
  board/freescale/m54455evb/mii.c   |4 +++
  cpu/mcf5227x/speed.c  |4 +++
  cpu/mcf523x/cpu_init.c|4 +-
  cpu/mcf523x/speed.c   |4 +++
  cpu/mcf52x2/cpu_init.c|   12 ++-
  cpu/mcf52x2/speed.c   |8 +++
  cpu/mcf532x/speed.c   |5 
  cpu/mcf5445x/speed.c  |4 +++
  cpu/mcf547x_8x/speed.c|5 
  drivers/i2c/fsl_i2c.c |   34 -
  include/asm-m68k/fsl_i2c.h|9 
  include/configs/M5235EVB.h|7 -
  include/configs/M5249EVB.h|4 +-
  include/configs/M5253DEMO.h   |   11 ++
  include/configs/M5271EVB.h|2 +-
  include/configs/M5272C3.h |5 ++-
  include/configs/M5275EVB.h|5 +++-
  include/configs/M5282EVB.h|4 +-
  include/configs/M54451EVB.h   |5 +--
  include/configs/M54455EVB.h   |5 +---
  include/configs/M5475EVB.h|2 +-
  include/configs/M5485EVB.h|2 +-
  lib_m68k/board.c  |2 +
  25 files changed, 120 insertions(+), 38 deletions(-)




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


Re: [U-Boot] [patch] i.MX use u-boot baud rate and don't assume UART master clock

2008-08-28 Thread Andrew Dyer
Andrew Dyer wrote:
 1) Change the i.MX serial driver to use the baud rate set in the
 u-boot environment
 
 2) don't assume a 16MHz value for PERCLK1 in baud rate calculations
 
 3) don't write a 1 to the RDR bit in the USR2 reg. (bit is not write
 one to clear like other status bits in the reg.)
 
 ---

fixes a whitespace error in the previous patch that slipped through

Signed-off-by: Andrew Dyer [EMAIL PROTECTED]
---
 cpu/arm920t/imx/serial.c |   56 +
 1 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/cpu/arm920t/imx/serial.c b/cpu/arm920t/imx/serial.c
index 6c56acb..d5d4507 100644
--- a/cpu/arm920t/imx/serial.c
+++ b/cpu/arm920t/imx/serial.c
@@ -52,6 +52,8 @@ struct imx_serial {
volatile uint32_t uts;
 };
 
+DECLARE_GLOBAL_DATA_PTR;
+
 void serial_setbrg (void)
 {
serial_init();
@@ -67,6 +69,9 @@ extern void imx_gpio_mode(int gpio_mode);
 int serial_init (void)
 {
volatile struct imx_serial* base = (struct imx_serial *)UART_BASE;
+   unsigned int ufcr_rfdiv;
+   unsigned int refclk;
+
 #ifdef CONFIG_IMX_SERIAL1
imx_gpio_mode(PC11_PF_UART1_TXD);
imx_gpio_mode(PC12_PF_UART1_RXD);
@@ -95,11 +100,33 @@ int serial_init (void)
/* Configure FIFOs */
base-ufcr = 0xa81;
 
+   /* set the baud rate.
+*
+* baud * 16   x
+* - = -
+*  refclk y
+*
+* x - 1 = UBIR
+* y - 1 = UBMR
+*
+* each register is 16 bits wide.  refclk max is 96 MHz
+*
+*/
+
+   ufcr_rfdiv = ((base-ufcr)  UFCR_RFDIV)  7;
+   if (ufcr_rfdiv == 6)
+   ufcr_rfdiv = 7;
+   else
+   ufcr_rfdiv = 6 - ufcr_rfdiv;
+
+   refclk = get_PERCLK1();
+   refclk /= ufcr_rfdiv;
+
/* Set the numerator value minus one of the BRM ratio */
-   base-ubir = (CONFIG_BAUDRATE / 100) - 1;
+   base-ubir = (gd-baudrate / 100) - 1;
 
/* Set the denominator value minus one of the BRM ratio */
-   base-ubmr = 1 - 1;
+   base-ubmr = (refclk/(16 * 100)) - 1;
 
/* Set to 8N1 */
base-ucr2 = ~UCR2_PREN;
@@ -117,22 +144,21 @@ int serial_init (void)
 
/* Clear status flags */
base-usr2 |= USR2_ADET  |
- USR2_DTRF  |
- USR2_IDLE  |
- USR2_IRINT |
- USR2_WAKE  |
- USR2_RTSF  |
- USR2_BRCD  |
- USR2_ORE   |
- USR2_RDR;
+ USR2_DTRF  |
+ USR2_IDLE  |
+ USR2_IRINT |
+ USR2_WAKE  |
+ USR2_RTSF  |
+ USR2_BRCD  |
+ USR2_ORE;
 
/* Clear status flags */
base-usr1 |= USR1_PARITYERR |
- USR1_RTSD  |
- USR1_ESCF  |
- USR1_FRAMERR   |
- USR1_AIRINT|
- USR1_AWAKE;
+ USR1_RTSD  |
+ USR1_ESCF  |
+ USR1_FRAMERR   |
+ USR1_AIRINT|
+ USR1_AWAKE;
return (0);
 }
 
-- 
1.5.4.3



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


Re: [U-Boot] [PATCH] mtd: SPI Flash: Support the STMicro Flash

2008-08-28 Thread Scott Wood
On Thu, Aug 28, 2008 at 06:44:56AM -0700, Liew Tsi Chung-R5AAHP wrote:
  +  {
  +   .idcode1 = STM_ID_M25P80,
  +   .page_size = 256,
  +   .pages_per_sector = 256,
  +   .nr_sectors = 16,
  +   .name = M25P80,
  +   },
  +  {
  +   .idcode1 = STM_ID_M25P128,
  +   .page_size = 256,
  +   .pages_per_sector = 1024,
  +   .nr_sectors = 64,
  +   .name = M25P128,
  +   },
  +};
 
  The indentation is a bit weird here. Please use tabs only.
 The indentation is generated by indent -npro -kr -ts8 -sob -l80 -ss
 -ncs $@.

Try adding -i8.  If it still spits out anything looking like the above
with the options you said you used, it's broken and you should do the
formatting by hand.

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


Re: [U-Boot] [PATCH 04/12] miiphybb: move to drivers/net

2008-08-28 Thread Ben Warren
Jean-Christophe PLAGNIOL-VILLARD wrote:
 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
 ---
  common/Makefile|1 -
  drivers/net/Makefile   |1 +
  {common = drivers/net}/miiphybb.c |0 
  3 files changed, 1 insertions(+), 1 deletions(-)
  rename {common = drivers/net}/miiphybb.c (100%)

 diff --git a/common/Makefile b/common/Makefile
 index 3e4829f..ff2e6c6 100644
 --- a/common/Makefile
 +++ b/common/Makefile
 @@ -133,7 +133,6 @@ COBJS-$(CONFIG_LCD) += lcd.o
  COBJS-y += lists.o
  COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o
  COBJS-y += memsize.o
 -COBJS-$(CONFIG_BITBANGMII) += miiphybb.o
  COBJS-y += miiphyutil.o
  COBJS-y += s_record.o
  COBJS-y += serial.o
 diff --git a/drivers/net/Makefile b/drivers/net/Makefile
 index bcf31cb..0e86b72 100644
 --- a/drivers/net/Makefile
 +++ b/drivers/net/Makefile
 @@ -41,6 +41,7 @@ COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o
  COBJS-$(CONFIG_DRIVER_LAN91C96) += lan91c96.o
  COBJS-$(CONFIG_MACB) += macb.o
  COBJS-$(CONFIG_MCFFEC) += mcffec.o
 +COBJS-$(CONFIG_BITBANGMII) += miiphybb.o
  COBJS-$(CONFIG_NATSEMI) += natsemi.o
  ifeq ($(CONFIG_DRIVER_NE2000),y)
  COBJS-y += ne2000.o
 diff --git a/common/miiphybb.c b/drivers/net/miiphybb.c
 similarity index 100%
 rename from common/miiphybb.c
 rename to drivers/net/miiphybb.c
   
I'd prefer for the PHY CONFIGs to be a separate list from the controller 
list.

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


[U-Boot] [PATCH] mtd: SPI Flash: Support the STMicro Flash

2008-08-28 Thread Tsi-Chung Liew
From: TsiChung Liew [EMAIL PROTECTED]

Add MTD SPI Flash support for M25P16, M25P20, M25P32,
M25P40, M25P64, M25P80, M25P128.

Signed-off-by: Jason McMullan [EMAIL PROTECTED]
Signed-off-by: TsiChung Liew [EMAIL PROTECTED]
---
 drivers/mtd/spi/Makefile |1 +
 drivers/mtd/spi/spi_flash.c  |5 +
 drivers/mtd/spi/spi_flash_internal.h |1 +
 drivers/mtd/spi/stmicro.c|  356 ++
 4 files changed, 363 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/spi/stmicro.c

diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile
index af6af97..3d4f892 100644
--- a/drivers/mtd/spi/Makefile
+++ b/drivers/mtd/spi/Makefile
@@ -27,6 +27,7 @@ LIB   := $(obj)libspi_flash.a
 
 COBJS-$(CONFIG_SPI_FLASH)  += spi_flash.o
 COBJS-$(CONFIG_SPI_FLASH_ATMEL)+= atmel.o
+COBJS-$(CONFIG_SPI_FLASH_STMICRO)  += stmicro.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index d581cb3..d1d81af 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -134,6 +134,11 @@ struct spi_flash *spi_flash_probe(unsigned int bus, 
unsigned int cs,
flash = spi_flash_probe_atmel(spi, idcode);
break;
 #endif
+#ifdef CONFIG_SPI_FLASH_STMICRO
+   case 0x20:
+   flash = spi_flash_probe_stmicro(spi, idcode);
+   break;
+#endif
default:
debug(SF: Unsupported manufacturer %02X\n, idcode[0]);
flash = NULL;
diff --git a/drivers/mtd/spi/spi_flash_internal.h 
b/drivers/mtd/spi/spi_flash_internal.h
index 1438050..e5f758e 100644
--- a/drivers/mtd/spi/spi_flash_internal.h
+++ b/drivers/mtd/spi/spi_flash_internal.h
@@ -43,3 +43,4 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 
*cmd,
 /* Manufacturer-specific probe functions */
 struct spi_flash *spi_flash_probe_spansion(struct spi_slave *spi, u8 *idcode);
 struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode);
+struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 *idcode);
diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c
new file mode 100644
index 000..c999b12
--- /dev/null
+++ b/drivers/mtd/spi/stmicro.c
@@ -0,0 +1,356 @@
+/*
+ * (C) Copyright 2000-2002
+ * Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+ *
+ * Copyright 2008, Network Appliance Inc.
+ * Jason McMullan [EMAIL PROTECTED]
+ *
+ * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
+ * TsiChung Liew ([EMAIL PROTECTED])
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include malloc.h
+#include spi_flash.h
+
+#include spi_flash_internal.h
+
+/* M25Pxx-specific commands */
+#define CMD_M25PXX_WREN0x06/* Write Enable */
+#define CMD_M25PXX_WRDI0x04/* Write Disable */
+#define CMD_M25PXX_RDSR0x05/* Read Status Register */
+#define CMD_M25PXX_WRSR0x01/* Write Status Register */
+#define CMD_M25PXX_READ0x03/* Read Data Bytes */
+#define CMD_M25PXX_FAST_READ   0x0b/* Read Data Bytes at Higher Speed */
+#define CMD_M25PXX_PP  0x02/* Page Program */
+#define CMD_M25PXX_SE  0xd8/* Sector Erase */
+#define CMD_M25PXX_BE  0xc7/* Bulk Erase */
+#define CMD_M25PXX_DP  0xb9/* Deep Power-down */
+#define CMD_M25PXX_RES 0xab/* Release from DP, and Read Signature 
*/
+
+#define STM_ID_M25P16  0x15
+#define STM_ID_M25P20  0x12
+#define STM_ID_M25P32  0x16
+#define STM_ID_M25P40  0x13
+#define STM_ID_M25P64  0x17
+#define STM_ID_M25P80  0x14
+#define STM_ID_M25P128 0x18
+
+#define STMICRO_SR_WIP (1  0)/* Write-in-Progress */
+
+struct stmicro_spi_flash_params {
+   u8 idcode1;
+   u16 page_size;
+   u16 pages_per_sector;
+   u16 nr_sectors;
+   const char *name;
+};
+
+struct stmicro_spi_flash {
+   const struct stmicro_spi_flash_params *params;
+   struct spi_flash flash;
+};
+
+static inline struct stmicro_spi_flash *to_stmicro_spi_flash(struct 

Re: [U-Boot] [U-Boot-Users] [PATCH 4/4] ARM DaVinci: Standardize names ofdirectories/files

2008-08-28 Thread Hugo Villeneuve
Jean-Christophe PLAGNIOL-VILLARD wrote:
 On 15:10 Fri 11 Jul , Hugo Villeneuve wrote:
 ARM DaVinci: Standardize names of directories/files.
 
 Signed-off-by: Hugo Villeneuve [EMAIL PROTECTED]
 
 ---
 
  Makefile   |2 +-
  board/davinci/{dv-evm = dvevm}/Makefile   |2 +-
  board/davinci/{dv-evm = dvevm}/board_init.S   |0
  board/davinci/{dv-evm = dvevm}/config.mk  |0
  board/davinci/{dv-evm/dv_board.c = dvevm/dvevm.c} |0
  board/davinci/{dv-evm = dvevm}/u-boot.lds |0
  board/davinci/schmoogie/Makefile   |2 +-
  .../davinci/schmoogie/{dv_board.c = schmoogie.c}  |0
  board/davinci/sonata/Makefile  |2 +-
  board/davinci/sonata/{dv_board.c = sonata.c}  |0
  10 files changed, 4 insertions(+), 4 deletions(-)
 
 Applied to u-boot-arm with merge
 please check

Everything seems OK.

Hugo V.

Hugo Villeneuve
Hardware developer | Concepteur matériel
Lyrtech
Phone/Tél. : (1) (418) 877-4644 #2395
Toll-free/Sans frais - Canada  USA : (1) (888) 922-4644 #2395
Fax/Téléc. : (1) (418) 877-7710
www.lyrtech.com
Infinite possibilities...TM
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mtd: SPI Flash: Support the STMicro Flash

2008-08-28 Thread John Rigby
Any problem with this going in via the coldfire tree?  Or does someone 
else want to pick it up?

Tsi-Chung Liew wrote:
 From: TsiChung Liew [EMAIL PROTECTED]

 Add MTD SPI Flash support for M25P16, M25P20, M25P32,
 M25P40, M25P64, M25P80, M25P128.

 Signed-off-by: Jason McMullan [EMAIL PROTECTED]
 Signed-off-by: TsiChung Liew [EMAIL PROTECTED]
 ---
  drivers/mtd/spi/Makefile |1 +
  drivers/mtd/spi/spi_flash.c  |5 +
  drivers/mtd/spi/spi_flash_internal.h |1 +
  drivers/mtd/spi/stmicro.c|  356 
 ++
  4 files changed, 363 insertions(+), 0 deletions(-)
  create mode 100644 drivers/mtd/spi/stmicro.c

 diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile
 index af6af97..3d4f892 100644
 --- a/drivers/mtd/spi/Makefile
 +++ b/drivers/mtd/spi/Makefile
 @@ -27,6 +27,7 @@ LIB := $(obj)libspi_flash.a
  
  COBJS-$(CONFIG_SPI_FLASH)+= spi_flash.o
  COBJS-$(CONFIG_SPI_FLASH_ATMEL)  += atmel.o
 +COBJS-$(CONFIG_SPI_FLASH_STMICRO)+= stmicro.o
  
  COBJS:= $(COBJS-y)
  SRCS := $(COBJS:.o=.c)
 diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
 index d581cb3..d1d81af 100644
 --- a/drivers/mtd/spi/spi_flash.c
 +++ b/drivers/mtd/spi/spi_flash.c
 @@ -134,6 +134,11 @@ struct spi_flash *spi_flash_probe(unsigned int bus, 
 unsigned int cs,
   flash = spi_flash_probe_atmel(spi, idcode);
   break;
  #endif
 +#ifdef CONFIG_SPI_FLASH_STMICRO
 + case 0x20:
 + flash = spi_flash_probe_stmicro(spi, idcode);
 + break;
 +#endif
   default:
   debug(SF: Unsupported manufacturer %02X\n, idcode[0]);
   flash = NULL;
 diff --git a/drivers/mtd/spi/spi_flash_internal.h 
 b/drivers/mtd/spi/spi_flash_internal.h
 index 1438050..e5f758e 100644
 --- a/drivers/mtd/spi/spi_flash_internal.h
 +++ b/drivers/mtd/spi/spi_flash_internal.h
 @@ -43,3 +43,4 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 
 *cmd,
  /* Manufacturer-specific probe functions */
  struct spi_flash *spi_flash_probe_spansion(struct spi_slave *spi, u8 
 *idcode);
  struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode);
 +struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 *idcode);
 diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c
 new file mode 100644
 index 000..c999b12
 --- /dev/null
 +++ b/drivers/mtd/spi/stmicro.c
 @@ -0,0 +1,356 @@
 +/*
 + * (C) Copyright 2000-2002
 + * Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
 + *
 + * Copyright 2008, Network Appliance Inc.
 + * Jason McMullan [EMAIL PROTECTED]
 + *
 + * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
 + * TsiChung Liew ([EMAIL PROTECTED])
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +#include common.h
 +#include malloc.h
 +#include spi_flash.h
 +
 +#include spi_flash_internal.h
 +
 +/* M25Pxx-specific commands */
 +#define CMD_M25PXX_WREN  0x06/* Write Enable */
 +#define CMD_M25PXX_WRDI  0x04/* Write Disable */
 +#define CMD_M25PXX_RDSR  0x05/* Read Status Register */
 +#define CMD_M25PXX_WRSR  0x01/* Write Status Register */
 +#define CMD_M25PXX_READ  0x03/* Read Data Bytes */
 +#define CMD_M25PXX_FAST_READ 0x0b/* Read Data Bytes at Higher Speed */
 +#define CMD_M25PXX_PP0x02/* Page Program */
 +#define CMD_M25PXX_SE0xd8/* Sector Erase */
 +#define CMD_M25PXX_BE0xc7/* Bulk Erase */
 +#define CMD_M25PXX_DP0xb9/* Deep Power-down */
 +#define CMD_M25PXX_RES   0xab/* Release from DP, and Read 
 Signature */
 +
 +#define STM_ID_M25P160x15
 +#define STM_ID_M25P200x12
 +#define STM_ID_M25P320x16
 +#define STM_ID_M25P400x13
 +#define STM_ID_M25P640x17
 +#define STM_ID_M25P800x14
 +#define STM_ID_M25P128   0x18
 +
 +#define STMICRO_SR_WIP   (1  0)/* Write-in-Progress */
 +
 +struct stmicro_spi_flash_params {
 + u8 idcode1;
 + u16 

[U-Boot] [PATCH rev2] ADS5121: Fix NOR and CPLD ALE timing for rev 2 silicon

2008-08-28 Thread John Rigby
MPC5121 rev 2 silicon has a new register for controlling how long
CS is asserted after deassertion of ALE in multiplexed mode.

The default is to assert CS together with ALE.  The alternative
is to assert CS (ALEN+1)*LPC_CLK clocks after deassertion of ALE.

The default is wrong for the NOR flash and CPLD on the ADS5121.

This patch turns on the alternative for CS0 (NOR) and CS2 (CPLD)
it does so conditionally based on silicon rev 2.0 or greater.

Signed-off-by: Martha J Marx [EMAIL PROTECTED]
Signed-off-by: John Rigby [EMAIL PROTECTED]
---
 board/ads5121/ads5121.c   |4 
 include/configs/ads5121.h |1 +
 include/mpc512x.h |1 +
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/board/ads5121/ads5121.c b/board/ads5121/ads5121.c
index ba3d7d2..deaa292 100644
--- a/board/ads5121/ads5121.c
+++ b/board/ads5121/ads5121.c
@@ -25,6 +25,7 @@
 #include mpc512x.h
 #include asm/bitops.h
 #include command.h
+#include asm/processor.h
 #include fdt_support.h
 #ifdef CONFIG_MISC_INIT_R
 #include i2c.h
@@ -92,6 +93,9 @@ int board_early_init_f (void)
 * Configure Flash Speed
 */
*((volatile u32 *)(CFG_IMMR + LPC_OFFSET + CS0_CONFIG)) = CFG_CS0_CFG;
+   if (SVR_MJREV (im-sysconf.spridr) = 2) {
+   *((volatile u32 *)(CFG_IMMR + LPC_OFFSET + 
CS_ALE_TIMING_CONFIG)) = CFG_CS_ALETIMING;
+   }
/*
 * Enable clocks
 */
diff --git a/include/configs/ads5121.h b/include/configs/ads5121.h
index 5f74afb..f516c46 100644
--- a/include/configs/ads5121.h
+++ b/include/configs/ads5121.h
@@ -210,6 +210,7 @@
 
 #define CFG_CS0_CFG0x05059310  /* ALE active low, data size 
4bytes */
 #define CFG_CS2_CFG0x05059010  /* ALE active low, data size 
1byte */
+#define CFG_CS_ALETIMING   0x0005  /* Use alternative CS timing 
for CS0 and CS2 */
 
 /* Use SRAM for initial stack */
 #define CFG_INIT_RAM_ADDR  CFG_SRAM_BASE   /* Initial RAM address 
*/
diff --git a/include/mpc512x.h b/include/mpc512x.h
index a76b1ca..cb418d1 100644
--- a/include/mpc512x.h
+++ b/include/mpc512x.h
@@ -58,6 +58,7 @@
 #define CS5_CONFIG 0x00014
 #define CS6_CONFIG 0x00018
 #define CS7_CONFIG 0x0001C
+#define CS_ALE_TIMING_CONFIG   0x00034
 
 #define CS_CTRL0x00020
 #define CS_CTRL_ME 0x0100  /* CS Master Enable bit */
-- 
1.5.6.2.255.gbed62

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


Re: [U-Boot] [PATCH] mtd: SPI Flash: Support the STMicro Flash

2008-08-28 Thread Liew Tsi Chung-R5AAHP
Scott,

I do have -i8 included. So, which one I should edit by hand? The
 }, or  . =.

Regards,
TsiChung

-Original Message-
From: Wood Scott-B07421 
Sent: Thursday, August 28, 2008 12:01 PM
To: Liew Tsi Chung-R5AAHP
Cc: Haavard Skinnemoen; U-Boot; Rigby John-R61273; Jason McMullan
Subject: Re: [U-Boot] [PATCH] mtd: SPI Flash: Support the STMicro Flash

On Thu, Aug 28, 2008 at 06:44:56AM -0700, Liew Tsi Chung-R5AAHP wrote:
  +  {
  +   .idcode1 = STM_ID_M25P80,
  +   .page_size = 256,
  +   .pages_per_sector = 256,
  +   .nr_sectors = 16,
  +   .name = M25P80,
  +   },
  +  {
  +   .idcode1 = STM_ID_M25P128,
  +   .page_size = 256,
  +   .pages_per_sector = 1024,
  +   .nr_sectors = 64,
  +   .name = M25P128,
  +   },
  +};
 
  The indentation is a bit weird here. Please use tabs only.
 The indentation is generated by indent -npro -kr -ts8 -sob -l80 -ss 
 -ncs $@.

Try adding -i8.  If it still spits out anything looking like the above
with the options you said you used, it's broken and you should do the
formatting by hand.

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


[U-Boot] [PATCH] ADS5121: Fix NOR and CPLD ALE timing for rev 2 silicon

2008-08-28 Thread John Rigby
MPC5121 rev 2 silicon has a new register for controlling how long
CS is asserted after deassertion of ALE in multiplexed mode.

The default is to assert CS together with ALE.  The alternative
is to assert CS (ALEN+1)*LPC_CLK clocks after deassertion of ALE.

The default is wrong for the NOR flash and CPLD on the ADS5121.

This patch turns on the alternative for CS0 (NOR) and CS2 (CPLD)
it does so conditionally based on silicon rev 2.0 or greater.

Signed-off-by: Martha J Marx [EMAIL PROTECTED]
Signed-off-by: John Rigby [EMAIL PROTECTED]
---
 board/ads5121/ads5121.c   |4 
 include/configs/ads5121.h |1 +
 include/mpc512x.h |1 +
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/board/ads5121/ads5121.c b/board/ads5121/ads5121.c
index ba3d7d2..9acf56b 100644
--- a/board/ads5121/ads5121.c
+++ b/board/ads5121/ads5121.c
@@ -25,6 +25,7 @@
 #include mpc512x.h
 #include asm/bitops.h
 #include command.h
+#include asm/processor.h
 #include fdt_support.h
 #ifdef CONFIG_MISC_INIT_R
 #include i2c.h
@@ -92,6 +93,9 @@ int board_early_init_f (void)
 * Configure Flash Speed
 */
*((volatile u32 *)(CFG_IMMR + LPC_OFFSET + CS0_CONFIG)) = CFG_CS0_CFG;
+   if (SVR_MJREV (im-sysconf.spridr)=2) {
+   *((volatile u32 *)(CFG_IMMR + LPC_OFFSET + 
CS_ALE_TIMING_CONFIG)) = CFG_CS_ALETIMING;
+   }
/*
 * Enable clocks
 */
diff --git a/include/configs/ads5121.h b/include/configs/ads5121.h
index 5f74afb..ee585da 100644
--- a/include/configs/ads5121.h
+++ b/include/configs/ads5121.h
@@ -210,6 +210,7 @@
 
 #define CFG_CS0_CFG0x05059310  /* ALE active low, data size 
4bytes */
 #define CFG_CS2_CFG0x05059010  /* ALE active low, data size 
1byte */
+#define CFG_CS_ALETIMING   0x0005  /* For rev 2 silicon CS assert 
after isolation */
 
 /* Use SRAM for initial stack */
 #define CFG_INIT_RAM_ADDR  CFG_SRAM_BASE   /* Initial RAM address 
*/
diff --git a/include/mpc512x.h b/include/mpc512x.h
index a76b1ca..cb418d1 100644
--- a/include/mpc512x.h
+++ b/include/mpc512x.h
@@ -58,6 +58,7 @@
 #define CS5_CONFIG 0x00014
 #define CS6_CONFIG 0x00018
 #define CS7_CONFIG 0x0001C
+#define CS_ALE_TIMING_CONFIG   0x00034
 
 #define CS_CTRL0x00020
 #define CS_CTRL_ME 0x0100  /* CS Master Enable bit */
-- 
1.5.6.2.255.gbed62

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


[U-Boot] [PATCH 1/1] ppc4xx: fix UIC hang if critical or non-critical interrupt is set at the same time as a normal interrupt is set on UIC0

2008-08-28 Thread vgallardo
From: Victor Gallardo [EMAIL PROTECTED]


Signed-off-by: Victor Gallardo [EMAIL PROTECTED]
---
 cpu/ppc4xx/uic.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpu/ppc4xx/uic.c b/cpu/ppc4xx/uic.c
index 7944c6c..a95d1cb 100644
--- a/cpu/ppc4xx/uic.c
+++ b/cpu/ppc4xx/uic.c
@@ -129,11 +129,11 @@ void external_interrupt(struct pt_regs *regs)
uic_interrupt(UIC3_DCR_BASE, 96);
 #endif
 
+   mtdcr(uic0sr, (uic_msr  UICB0_ALL));
+
if (uic_msr  ~(UICB0_ALL))
uic_interrupt(UIC0_DCR_BASE, 0);
 
-   mtdcr(uic0sr, uic_msr);
-
return;
 }
 
-- 
1.5.5

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


[U-Boot] [PATCH] mpc83xx: use r4 instead of r2 in lock_ram_in_cache and unlock_ram_in_cache

2008-08-28 Thread Nick Spence
This is needed in unlock_ram_in_cache() because it is called from C and
will corrupt the small data area anchor that is kept in R2.

lock_ram_in_cache() is modified similarly as good coding practice, but
is not called from C.

Signed-off-by: Nick Spence [EMAIL PROTECTED]
---
 cpu/mpc83xx/start.S |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/cpu/mpc83xx/start.S b/cpu/mpc83xx/start.S
index 16ed494..75ad36c 100644
--- a/cpu/mpc83xx/start.S
+++ b/cpu/mpc83xx/start.S
@@ -1060,9 +1060,9 @@ lock_ram_in_cache:
 */
lis r3, (CFG_INIT_RAM_ADDR  ~31)@h
ori r3, r3, (CFG_INIT_RAM_ADDR  ~31)@l
-   li  r2, ((CFG_INIT_RAM_END  ~31) + \
+   li  r4, ((CFG_INIT_RAM_END  ~31) + \
 (CFG_INIT_RAM_ADDR  31) + 31) / 32
-   mtctr   r2
+   mtctr   r4
 1:
dcbzr0, r3
addir3, r3, 32
@@ -1082,8 +1082,9 @@ unlock_ram_in_cache:
/* invalidate the INIT_RAM section */
lis r3, (CFG_INIT_RAM_ADDR  ~31)@h
ori r3, r3, (CFG_INIT_RAM_ADDR  ~31)@l
-   li  r2,512
-   mtctr   r2
+   li  r4, ((CFG_INIT_RAM_END  ~31) + \
+(CFG_INIT_RAM_ADDR  31) + 31) / 32
+   mtctr   r4
 1: icbir0, r3
dcbir0, r3
addir3, r3, 32
-- 
1.5.2.2

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


[U-Boot] [PATCH] mpc86xx: use r4 instead of r2 in lock_ram_in_cache and unlock_ram_in_cache

2008-08-28 Thread Nick Spence
This is needed in unlock_ram_in_cache() because it is called from C and
will corrupt the small data area anchor that is kept in R2.

lock_ram_in_cache() is modified similarly as good coding practice, but
is not called from C.

Signed-off-by: Nick Spence [EMAIL PROTECTED]
---
 cpu/mpc86xx/start.S |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cpu/mpc86xx/start.S b/cpu/mpc86xx/start.S
index 03f2128..90a1b83 100644
--- a/cpu/mpc86xx/start.S
+++ b/cpu/mpc86xx/start.S
@@ -895,9 +895,9 @@ lock_ram_in_cache:
 */
lis r3, (CFG_INIT_RAM_ADDR  ~31)@h
ori r3, r3, (CFG_INIT_RAM_ADDR  ~31)@l
-   li  r2, ((CFG_INIT_RAM_END  ~31) + \
+   li  r4, ((CFG_INIT_RAM_END  ~31) + \
 (CFG_INIT_RAM_ADDR  31) + 31) / 32
-   mtctr   r2
+   mtctr   r4
 1:
dcbzr0, r3
addir3, r3, 32
@@ -930,9 +930,9 @@ unlock_ram_in_cache:
/* invalidate the INIT_RAM section */
lis r3, (CFG_INIT_RAM_ADDR  ~31)@h
ori r3, r3, (CFG_INIT_RAM_ADDR  ~31)@l
-   li  r2, ((CFG_INIT_RAM_END  ~31) + \
+   li  r4, ((CFG_INIT_RAM_END  ~31) + \
 (CFG_INIT_RAM_ADDR  31) + 31) / 32
-   mtctr   r2
+   mtctr   r4
 1: icbir0, r3
addir3, r3, 32
bdnz1b
-- 
1.5.2.2

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


[U-Boot] [PATCH 1/1] CONFIG_MENUKEY: RFC: Is this how CONFIG_MENUKEY supposed to work?

2008-08-28 Thread richardretanubun
I noticed that CONFIG_MENUKEY aborts autoboot unconditionally
and executes the menucmd env.variable if it found a match later on. 
This seems odd.
It is possible that I misunderstood the intent of the logic. The only 
other user of it now is AmigaOneG3SE.

I made a patch to make the logic only aborts autoboot if there is a 
match detected.

If the person who wrote the logic is reading this, did I understood the 
logic correctly?
If so please Sign-off the patch to have it applied.

Signed-off-by: Richard Retanubun RichardRetanubun_at_ruggedcom.com


diff --git a/common/main.c b/common/main.c
index 187ef8a..5a4308d 100644
--- a/common/main.c
+++ b/common/main.c
@@ -238,14 +238,19 @@ static __inline__ int abortboot(int bootdelay)
/* delay 100 * 10ms */
for (i=0; !abort  i100; ++i) {
if (tstc()) {   /* we got a key press   */
-   abort  = 1; /* don't auto boot  */
-   bootdelay = 0;  /* no more delay*/
 # ifdef CONFIG_MENUKEY
menukey = getc();
+   if (menukey == CONFIG_MENUKEY) {/* we 
got a match */
+   abort  = 1; /* don't auto boot  
*/
+   bootdelay = 0;  /* no more delay
*/
+   break;
+   }
 # else
-   (void) getc();  /* consume input*/
-# endif
+   (void) getc();  /* consume input*/
+   abort  = 1; /* don't auto boot  */
+   bootdelay = 0;  /* no more delay*/
break;
+# endif
}
udelay(1);
}




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


Re: [U-Boot] [PATCH 1/1] ppc4xx: fix UIC hang if critical or non-critical interrupt is set at the same time as a normal interrupt is set on UIC0

2008-08-28 Thread Feng Kan
Hi Wolfgang:
  I send the patch out for Victor. In the original email the From 
field did indicate his name.
Am I missing something?

Thanks
Feng Kan
 Dear [EMAIL PROTECTED],

 Can you please provide a real name with your mail address when
 submitting patches?


   

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


Re: [U-Boot] U-Boot bootup process

2008-08-28 Thread Wolfgang Denk
Dear Ahmed,

In message [EMAIL PROTECTED] you wrote:
 
 Would anyone help me with U-Boot bootup process? On power up, where
 U-Boot starts executing from and what's the flow of it? What functions
 it calls? I need to understand the whole picture, like what gets
 initialized when!

It makes little sense to ask the very same question both through  our
commercial support system and here on the mailing list.

I will not answer this again.


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]
I can call spirits from the vasty deep.
Why so can I, or so can any man; but will they come when you do call
for them?  - Shakespeare, 1 King Henry IV, Act III, Scene I.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] ppc4xx: fix UIC hang if critical or non-critical interrupt is set at the same time as a normal interrupt is set on UIC0

2008-08-28 Thread Wolfgang Denk
Dear Feng Kan,

In message [EMAIL PROTECTED] you wrote:

   I send the patch out for Victor. In the original email the From 
 field did indicate his name.
 Am I missing something?

I don't know what you did, but there were actually two semi-identical
postings:

--
Subject: [U-Boot] [PATCH 1/1] ppc4xx: fix UIC hang if critical or
non-critical interrupt is set at the same time as a normal
interrupt is set on UIC0
From: [EMAIL PROTECTED]
Date: Thu, 28 Aug 2008 13:53:11 -0700 (22:53 MEST)
To: u-boot@lists.denx.de
Cc: [EMAIL PROTECTED]
--
Subject: [U-Boot] [PATCH 1/1] ppc4xx: fix UIC hang if critical or
non-critical interrupt is set at the same time as a normal
interrupt is set on UIC0
From: [EMAIL PROTECTED]
Date: Thu, 28 Aug 2008 13:55:14 -0700 (22:55 MEST)
To: u-boot@lists.denx.de
Cc: [EMAIL PROTECTED]
--

As you can see, both were sent about two minutes apart, and  none  of
them had a realname in the From: field.

See also
http://lists.denx.de/pipermail/u-boot/2008-August/039566.html and
http://lists.denx.de/pipermail/u-boot/2008-August/039567.html

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]
As long as we're going to reinvent the wheel again, we might as  well
try making it round this time.- Mike Dennison
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 04/12 V2] miiphybb: move to drivers/net/phy

2008-08-28 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 Makefile   |1 +
 common/Makefile|1 -
 drivers/net/phy/Makefile   |   46 
 {common = drivers/net/phy}/miiphybb.c |0 
 4 files changed, 47 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 89fea72..9129300 100644
--- a/Makefile
+++ b/Makefile
@@ -227,6 +227,7 @@ LIBS += drivers/mtd/nand_legacy/libnand_legacy.a
 LIBS += drivers/mtd/onenand/libonenand.a
 LIBS += drivers/mtd/spi/libspi_flash.a
 LIBS += drivers/net/libnet.a
+LIBS += drivers/net/phy/libphy.a
 LIBS += drivers/net/sk98lin/libsk98lin.a
 LIBS += drivers/pci/libpci.a
 LIBS += drivers/pcmcia/libpcmcia.a
diff --git a/common/Makefile b/common/Makefile
index 3e4829f..ff2e6c6 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -133,7 +133,6 @@ COBJS-$(CONFIG_LCD) += lcd.o
 COBJS-y += lists.o
 COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o
 COBJS-y += memsize.o
-COBJS-$(CONFIG_BITBANGMII) += miiphybb.o
 COBJS-y += miiphyutil.o
 COBJS-y += s_record.o
 COBJS-y += serial.o
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
new file mode 100644
index 000..10dc082
--- /dev/null
+++ b/drivers/net/phy/Makefile
@@ -0,0 +1,46 @@
+#
+# (C) Copyright 2006
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB:= $(obj)libphy.a
+
+COBJS-$(CONFIG_BITBANGMII) += miiphybb.o
+
+COBJS  := $(COBJS-y)
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+all:   $(LIB)
+
+$(LIB):$(obj).depend $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/common/miiphybb.c b/drivers/net/phy/miiphybb.c
similarity index 100%
rename from common/miiphybb.c
rename to drivers/net/phy/miiphybb.c
-- 
1.5.6.3

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


Re: [U-Boot] [PATCH 06/12] autoscript: Move conditional compilation to Makefile

2008-08-28 Thread Jean-Christophe PLAGNIOL-VILLARD
 
 Forget that last comment - it looks like you made the fix later in the
 patch series ([PATCH 08/12] common/Makefile: order by functionality).
 It might be good to move the addition of COBJS-y += $(COBJS-yy) to
 [PATCH 06/12] so that compiles don't break between those 2 commits when
 bisecting in the future.

Moved 

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