Re: [U-Boot-Users] [PATCH RFC] ARM: Davinci: NAND fix for large page ECC and linux compatibility

2008-08-30 Thread Hugo Villeneuve
On Mon, 2008-06-30 at 10:26 -0500, Scott Wood wrote:
> > > We should probably default to doing it the right way, not the  
> > > broken-but-compatible way for large pages, though.
> > 
> > It depends if you put backwards compatibility over reliability
> > though.
> 
> In the long term, I value the latter -- compatibility should be possible,
> but it shouldn't cause new users to continue to generate bad ECC indefinetly
> (both causing them reliability problems and expanding the number of people
> that would be affected if the default were to change down the road).

I communicated with Bernard and he told me he moved to other things and
probably would not have time to upgrade his patch against the newest git
repository.

So I did it, and I inverted the meaning of the #define so that new users
will generate correct ECC without having to define anything. I also
named the #define CFG_DAVINCI_BROKEN_ECC since it is DaVinci specific.

The patch will follow after this email.

Hugo Villeneuve.


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [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

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] RFC: U-Boot version numbering

2008-08-01 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> Hello,
> 
> I would like to get your general opinion about  changing  the  U-Boot
> version numbering scheme.
> 
> To be honest, I never really understood myself how this  is  supposed
> to work and if the next version should be 1.3.4 or 1.4.0 or 2.0.0, i.
> e.  which  changes  / additions are important enough to increment the
> PATCHLEVEL or even VERSION number.
> 
> I therefor suggest to drop this style of version numbering and change
> to a timestamp based version  number  system  which  has  been  quite
> successfully  used  by  other  projects  (like  Ubuntu)  or  is under
> discussion (for Linux).

Hi,
IMHO I think it is best to stick with the same version numbering scheme that 
you started with, even if it is not perfect. The alternative timestamp  scheme 
is not perfect either. You can probably find as many advantages for one as for 
the other, and the same goes for the disadvantages.

Even when using timestamp schemes, people often attach numerical version 
numbers when refering to some releases. That would probably the case for the 
U-Boot V2 that is currently under developement. That just adds up to the 
confusion.

Then in some time, maybe someone will propose to switch to a name based version 
scheme, and so on, and so on... :)

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

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [patch 1/1] Set GD_FLG_RELOC for boardsskipping relocation to RAM

2008-07-23 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> when would you not want to relocate ?

Hi,
On some platforms U-Boot is loaded from flash to RAM memory by a ROM bootloader.

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

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] Round the serial port clock divisor value returned by calc_divisor()

2008-07-15 Thread Hugo Villeneuve
Round the serial port clock divisor value returned by
calc_divisor()

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>

---

 drivers/serial/serial.c |   12 +++-
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 4ccaee2..8bbfcf9 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -124,8 +124,6 @@ static NS16550_t serial_ports[4] = {
 
 static int calc_divisor (NS16550_t port)
 {
-   uint32_t clk_divisor;
-
 #ifdef CONFIG_OMAP1510
/* If can't cleanly clock 115200 set div to 1 */
if ((CFG_NS16550_CLK == 1200) && (gd->baudrate == 115200)) {
@@ -149,15 +147,11 @@ static int calc_divisor (NS16550_t port)
 
/* Compute divisor value. Normally, we should simply return:
 *   CFG_NS16550_CLK) / MODE_X_DIV / gd->baudrate
-* but we need to round that value by adding 0.5 (2/4).
+* but we need to round that value by adding 0.5.
 * Rounding is especially important at high baud rates.
 */
-   clk_divisor = (((4 * CFG_NS16550_CLK) /
-   (MODE_X_DIV * gd->baudrate)) + 2) / 4;
-
-   debug("NS16550 clock divisor = %d\n", clk_divisor);
-
-   return clk_divisor;
+   return (CFG_NS16550_CLK + (gd->baudrate * (MODE_X_DIV / 2))) /
+   (MODE_X_DIV * gd->baudrate);
 }
 
 #if !defined(CONFIG_SERIAL_MULTI)

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH v2] Round the serial port clock divisor valuereturned by calc_divisor()

2008-07-15 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> This formula is better at avoiding integer overflow.
> 
> Signed-off-by: Gerald Van Baren <[EMAIL PROTECTED]>
> ---
> 
> This is my latest entry in the baud rate rounding dual.  Since it
> doesn't multiply the master BRG clock but instead adds the baud rate
> scaled by 1/2 the clock multiplier, it should not overflow (for a
> master clock right at the edge of overflowing itself, it still will
> overflow, but that is pretty unlikely).
> 
> This compiles OK on the mpc7448hpc2.  I have only tested it on a
> calculator.  I have NOT tested it on real hardware.

I have tested it on my board and it works.

I also tested it on my board by using the clock value of the mpc7448hpc2 board, 
and printing the computed value which was correct.

>  drivers/serial/serial.c |   16 +---
>  1 files changed, 5 insertions(+), 11 deletions(-)
> ...
> - /* Compute divisor value. Normally, we should simply return:
> -  *   CFG_NS16550_CLK) / MODE_X_DIV / gd->baudrate
> -  * but we need to round that value by adding 0.5 (2/4).
> -  * Rounding is especially important at high baud rates.
> + /*
> +  * Compute divisor value, rounding it properly.  Rounding is
> +  * especially important at high baud rates.
>*/

Please keep the comments explaining the base formula: it is not easy to 
reverse-engineer an optimized formula to figure out what is the base formula.

I will resubmit a patch with your fix and my comments.

Hugo V.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Fix integer overflow warning in calc_divisor()

2008-07-14 Thread Hugo Villeneuve

On Sun, 2008-07-13 at 15:14 +0200, Wolfgang Denk wrote:
> In message <[EMAIL PROTECTED]> you wrote:
> > Fix the integer overflow warning when rounding the serial
> > port clock divisor value in calc_divisor().
> > 
> > Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
> > 
> > ---
> > 
> >  drivers/serial/serial.c |   11 +--
> >  1 files changed, 9 insertions(+), 2 deletions(-)
> 
> Applied, thanks, but I really wish you had kept the subject unchanged,
> and ideally even threading correct.

Hi Wolfgang,
since you already applied the first patch, I simply thought that the fix
for the first patch should have a different subject.

I will keep the same subject in the future

Hugo V.


-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 3/4] ARM DaVinci: Move common functions to board/davinci/common

2008-07-11 Thread Hugo Villeneuve
ARM DaVinci: Move common functions to board/davinci/common.

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>

---

 board/davinci/common/Makefile  |   53 
 board/davinci/common/misc.c|  126 
 board/davinci/common/misc.h|   32 +++
 board/davinci/common/psc.c |  117 ++
 board/davinci/common/psc.h |   28 +++
 board/davinci/dv-evm/dv_board.c|  129 --
 board/davinci/schmoogie/dv_board.c |  103 ++-
 board/davinci/sffsdr/sffsdr.c  |  158 
 board/davinci/sonata/dv_board.c|  122 +++-
 9 files changed, 404 insertions(+), 464 deletions(-)

diff --git a/board/davinci/common/Makefile b/board/davinci/common/Makefile
new file mode 100644
index 000..127bb6e
--- /dev/null
+++ b/board/davinci/common/Makefile
@@ -0,0 +1,53 @@
+#
+# (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
+
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)board/$(VENDOR)/common)
+endif
+
+LIB= $(obj)lib$(VENDOR).a
+
+COBJS  := psc.o misc.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/davinci/common/misc.c b/board/davinci/common/misc.c
new file mode 100644
index 000..71a3b87
--- /dev/null
+++ b/board/davinci/common/misc.c
@@ -0,0 +1,126 @@
+/*
+ * Miscelaneous DaVinci functions.
+ *
+ * Copyright (C) 2007 Sergey Kubushyn <[EMAIL PROTECTED]>
+ * Copyright (C) 2008 Lyrtech 
+ * Copyright (C) 2004 Texas Instruments.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init(void)
+{
+   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+   gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+
+   return(0);
+}
+
+static int dv_get_pllm_output(uint32_t pllm)
+{
+   return (pllm + 1) * (CFG_HZ_CLOCK / 100);
+}
+
+void dv_display_clk_infos(void)
+{
+   printf("ARM Clock: %dMHz\n", dv_get_pllm_output(REG(PLL1_PLLM)) / 2);
+   printf("DDR Clock: %dMHz\n", dv_get_pllm_output(REG(PLL2_PLLM)) /
+  ((REG(PLL2_DIV2) & 0x1f) + 1) / 2);
+}
+
+/* Read ethernet MAC address from EEPROM for DVEVM compatible boards.
+ * Returns 1 if found, 0 otherwise.
+ */
+int dvevm_read_mac_address(uint8_t *buf)
+{
+#ifdef CFG_I2C_EEPROM_ADDR
+   /* Read MAC address. */
+   if (i2c_read(CFG_I2C_EEPROM_ADDR, 0x7F00, CFG_I2C_EEPROM_ADDR_LEN,
+(uint8_t *) &buf[0], 6))
+   goto i2cerr;
+
+   /* Check that MAC address is not null. */
+   if (memcmp(buf, "\0\0\0\0\0\0", 6) == 0)
+   goto err;
+
+   return 1; /* Found */
+
+i2cerr:
+   printf("Read from EEPROM @ 0x%02x failed\n", CFG_I2C_

[U-Boot-Users] [PATCH 4/4] ARM DaVinci: Standardize names of directories/files

2008-07-11 Thread Hugo Villeneuve
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(-)

diff --git a/Makefile b/Makefile
index e557d0d..b15240a 100644
--- a/Makefile
+++ b/Makefile
@@ -2424,7 +2424,7 @@ omap5912osk_config :  unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs omap5912osk NULL omap
 
 davinci_dvevm_config : unconfig
-   @$(MKCONFIG) $(@:_config=) arm arm926ejs dv-evm davinci davinci
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs dvevm davinci davinci
 
 davinci_schmoogie_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
diff --git a/board/davinci/dv-evm/Makefile b/board/davinci/dvevm/Makefile
similarity index 98%
rename from board/davinci/dv-evm/Makefile
rename to board/davinci/dvevm/Makefile
index 579efe2..fb31ee4 100644
--- a/board/davinci/dv-evm/Makefile
+++ b/board/davinci/dvevm/Makefile
@@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).a
 
-COBJS  := dv_board.o
+COBJS  := $(BOARD).o
 SOBJS  := board_init.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/davinci/dv-evm/board_init.S 
b/board/davinci/dvevm/board_init.S
similarity index 100%
rename from board/davinci/dv-evm/board_init.S
rename to board/davinci/dvevm/board_init.S
diff --git a/board/davinci/dv-evm/config.mk b/board/davinci/dvevm/config.mk
similarity index 100%
rename from board/davinci/dv-evm/config.mk
rename to board/davinci/dvevm/config.mk
diff --git a/board/davinci/dv-evm/dv_board.c b/board/davinci/dvevm/dvevm.c
similarity index 100%
rename from board/davinci/dv-evm/dv_board.c
rename to board/davinci/dvevm/dvevm.c
diff --git a/board/davinci/dv-evm/u-boot.lds b/board/davinci/dvevm/u-boot.lds
similarity index 100%
rename from board/davinci/dv-evm/u-boot.lds
rename to board/davinci/dvevm/u-boot.lds
diff --git a/board/davinci/schmoogie/Makefile b/board/davinci/schmoogie/Makefile
index 579efe2..fb31ee4 100644
--- a/board/davinci/schmoogie/Makefile
+++ b/board/davinci/schmoogie/Makefile
@@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).a
 
-COBJS  := dv_board.o
+COBJS  := $(BOARD).o
 SOBJS  := board_init.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/davinci/schmoogie/dv_board.c 
b/board/davinci/schmoogie/schmoogie.c
similarity index 100%
rename from board/davinci/schmoogie/dv_board.c
rename to board/davinci/schmoogie/schmoogie.c
diff --git a/board/davinci/sonata/Makefile b/board/davinci/sonata/Makefile
index 579efe2..fb31ee4 100644
--- a/board/davinci/sonata/Makefile
+++ b/board/davinci/sonata/Makefile
@@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).a
 
-COBJS  := dv_board.o
+COBJS  := $(BOARD).o
 SOBJS  := board_init.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/davinci/sonata/dv_board.c b/board/davinci/sonata/sonata.c
similarity index 100%
rename from board/davinci/sonata/dv_board.c
rename to board/davinci/sonata/sonata.c

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 2/4] ARM DaVinci: Remove extern phy_t declaration by moving code to proper place

2008-07-11 Thread Hugo Villeneuve
ARM DaVinci: Remove extern phy_t declaration by moving
code to proper place.

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>

---

 board/davinci/dv-evm/dv_board.c|6 +-
 board/davinci/schmoogie/dv_board.c |6 +-
 board/davinci/sffsdr/sffsdr.c  |6 +-
 board/davinci/sonata/dv_board.c|6 +-
 cpu/arm926ejs/davinci/ether.c  |2 ++
 5 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/board/davinci/dv-evm/dv_board.c b/board/davinci/dv-evm/dv_board.c
index 454ac21..834eb68 100644
--- a/board/davinci/dv-evm/dv_board.c
+++ b/board/davinci/dv-evm/dv_board.c
@@ -33,7 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern voidtimer_init(void);
 extern int eth_hw_init(void);
-extern phy_t   phy;
 
 
 /* Works on Always On power domain only (no PD argument) */
@@ -184,11 +183,8 @@ int misc_init_r (void)
}
}
 
-   if (!eth_hw_init()) {
+   if (!eth_hw_init())
printf("ethernet init failed!\n");
-   } else {
-   printf("ETH PHY   : %s\n", phy.name);
-   }
 
i2c_read (0x39, 0x00, 1, (u_int8_t *)&i, 1);
 
diff --git a/board/davinci/schmoogie/dv_board.c 
b/board/davinci/schmoogie/dv_board.c
index 529a437..3017546 100644
--- a/board/davinci/schmoogie/dv_board.c
+++ b/board/davinci/schmoogie/dv_board.c
@@ -33,7 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern voidtimer_init(void);
 extern int eth_hw_init(void);
-extern phy_t   phy;
 
 
 /* Works on Always On power domain only (no PD argument) */
@@ -230,11 +229,8 @@ int misc_init_r (void)
forceenv("serial#", (char *)&tmp[0]);
}
 
-   if (!eth_hw_init()) {
+   if (!eth_hw_init())
printf("ethernet init failed!\n");
-   } else {
-   printf("ETH PHY   : %s\n", phy.name);
-   }
 
return(0);
 }
diff --git a/board/davinci/sffsdr/sffsdr.c b/board/davinci/sffsdr/sffsdr.c
index b73484a..f41081f 100644
--- a/board/davinci/sffsdr/sffsdr.c
+++ b/board/davinci/sffsdr/sffsdr.c
@@ -43,7 +43,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern void timer_init(void);
 extern int eth_hw_init(void);
-extern phy_t phy;
 
 
 /* Works on Always On power domain only (no PD argument) */
@@ -288,11 +287,8 @@ int misc_init_r(void)
}
}
 
-   if (!eth_hw_init()) {
+   if (!eth_hw_init())
printf("Ethernet init failed\n");
-   } else {
-   printf("ETH PHY: %s\n", phy.name);
-   }
 
/* On this platform, U-Boot is copied in RAM by the UBL,
 * so we are always in the relocated state. */
diff --git a/board/davinci/sonata/dv_board.c b/board/davinci/sonata/dv_board.c
index 2db40c8..a6f9bc7 100644
--- a/board/davinci/sonata/dv_board.c
+++ b/board/davinci/sonata/dv_board.c
@@ -33,7 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern voidtimer_init(void);
 extern int eth_hw_init(void);
-extern phy_t   phy;
 
 
 /* Works on Always On power domain only (no PD argument) */
@@ -185,11 +184,8 @@ int misc_init_r (void)
}
}
 
-   if (!eth_hw_init()) {
+   if (!eth_hw_init())
printf("ethernet init failed!\n");
-   } else {
-   printf("ETH PHY   : %s\n", phy.name);
-   }
 
return(0);
 }
diff --git a/cpu/arm926ejs/davinci/ether.c b/cpu/arm926ejs/davinci/ether.c
index d286ec0..5ae035b 100644
--- a/cpu/arm926ejs/davinci/ether.c
+++ b/cpu/arm926ejs/davinci/ether.c
@@ -357,6 +357,8 @@ static int dm644x_eth_hw_init(void)
phy.auto_negotiate = gen_auto_negotiate;
}
 
+   printf("Ethernet PHY: %s\n", phy.name);
+
return(1);
 }
 

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 1/4] ARM DaVinci: Remove duplicate definitions of MACH_TYPE and prototype of i2c_init()

2008-07-11 Thread Hugo Villeneuve
ARM DaVinci: Remove duplicate definitions of MACH_TYPE
and prototype of i2c_init().

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>

---

 board/davinci/dv-evm/dv_board.c|3 ---
 board/davinci/schmoogie/dv_board.c |3 ---
 board/davinci/sonata/dv_board.c|3 ---
 3 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/board/davinci/dv-evm/dv_board.c b/board/davinci/dv-evm/dv_board.c
index 88b1e57..454ac21 100644
--- a/board/davinci/dv-evm/dv_board.c
+++ b/board/davinci/dv-evm/dv_board.c
@@ -29,11 +29,8 @@
 #include 
 #include 
 
-#define MACH_TYPE_DAVINCI_EVM  901
-
 DECLARE_GLOBAL_DATA_PTR;
 
-extern voidi2c_init(int speed, int slaveaddr);
 extern voidtimer_init(void);
 extern int eth_hw_init(void);
 extern phy_t   phy;
diff --git a/board/davinci/schmoogie/dv_board.c 
b/board/davinci/schmoogie/dv_board.c
index 13d2195..529a437 100644
--- a/board/davinci/schmoogie/dv_board.c
+++ b/board/davinci/schmoogie/dv_board.c
@@ -29,11 +29,8 @@
 #include 
 #include 
 
-#define MACH_TYPE_SCHMOOGIE1255
-
 DECLARE_GLOBAL_DATA_PTR;
 
-extern voidi2c_init(int speed, int slaveaddr);
 extern voidtimer_init(void);
 extern int eth_hw_init(void);
 extern phy_t   phy;
diff --git a/board/davinci/sonata/dv_board.c b/board/davinci/sonata/dv_board.c
index e8665e5..2db40c8 100644
--- a/board/davinci/sonata/dv_board.c
+++ b/board/davinci/sonata/dv_board.c
@@ -29,11 +29,8 @@
 #include 
 #include 
 
-#define MACH_TYPE_SONATA   1254
-
 DECLARE_GLOBAL_DATA_PTR;
 
-extern voidi2c_init(int speed, int slaveaddr);
 extern voidtimer_init(void);
 extern int eth_hw_init(void);
 extern phy_t   phy;

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] Fix integer overflow warning in calc_divisor()

2008-07-11 Thread Hugo Villeneuve
Fix the integer overflow warning when rounding the serial
port clock divisor value in calc_divisor().

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>

---

 drivers/serial/serial.c |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 182ca2d..4ccaee2 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -124,6 +124,8 @@ static NS16550_t serial_ports[4] = {
 
 static int calc_divisor (NS16550_t port)
 {
+   uint32_t clk_divisor;
+
 #ifdef CONFIG_OMAP1510
/* If can't cleanly clock 115200 set div to 1 */
if ((CFG_NS16550_CLK == 1200) && (gd->baudrate == 115200)) {
@@ -147,10 +149,15 @@ static int calc_divisor (NS16550_t port)
 
/* Compute divisor value. Normally, we should simply return:
 *   CFG_NS16550_CLK) / MODE_X_DIV / gd->baudrate
-* but we need to round that value by adding 0.5 or 8/16.
+* but we need to round that value by adding 0.5 (2/4).
 * Rounding is especially important at high baud rates.
 */
-   return (((16 * CFG_NS16550_CLK) / MODE_X_DIV / gd->baudrate) + 8) / 16;
+   clk_divisor = (((4 * CFG_NS16550_CLK) /
+   (MODE_X_DIV * gd->baudrate)) + 2) / 4;
+
+   debug("NS16550 clock divisor = %d\n", clk_divisor);
+
+   return clk_divisor;
 }
 
 #if !defined(CONFIG_SERIAL_MULTI)

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Round the serial port clock divisor valuereturned by calc_divisor()

2008-07-11 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> This formula is better at avoiding integer overflow.

This patch doesn´t round the value correctly.

Wolfgang, I will resubmit a new patch shortly today to fix the problem.

Hugo V.

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] ARM: Fix for broken compilation when defining CONFIG_CMD_ELF

2008-07-10 Thread Hugo Villeneuve
ARM: Fix for broken compilation when defining
CONFIG_CMD_ELF caused by missing dcache
status/enable/disable functions.

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>

---

 cpu/arm926ejs/cpu.c  |   51 +-
 include/configs/davinci_sffsdr.h |1 +
 2 files changed, 40 insertions(+), 12 deletions(-)

diff --git a/cpu/arm926ejs/cpu.c b/cpu/arm926ejs/cpu.c
index 722732e..56c6289 100644
--- a/cpu/arm926ejs/cpu.c
+++ b/cpu/arm926ejs/cpu.c
@@ -134,25 +134,52 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
return (0);
 }
 
-void icache_enable (void)
+/* cache_bit must be either C1_IC or C1_DC */
+static void cache_enable(uint32_t cache_bit)
 {
-   ulong reg;
+   uint32_t reg;
 
-   reg = read_p15_c1 ();   /* get control reg. */
-   cp_delay ();
-   write_p15_c1 (reg | C1_IC);
+   reg = read_p15_c1();/* get control reg. */
+   cp_delay();
+   write_p15_c1(reg | cache_bit);
 }
 
-void icache_disable (void)
+/* cache_bit must be either C1_IC or C1_DC */
+static void cache_disable(uint32_t cache_bit)
 {
-   ulong reg;
+   uint32_t reg;
 
-   reg = read_p15_c1 ();
-   cp_delay ();
-   write_p15_c1 (reg & ~C1_IC);
+   reg = read_p15_c1();
+   cp_delay();
+   write_p15_c1(reg & ~cache_bit);
 }
 
-int icache_status (void)
+void icache_enable(void)
 {
-   return (read_p15_c1 () & C1_IC) != 0;
+   cache_enable(C1_IC);
+}
+
+void icache_disable(void)
+{
+   cache_disable(C1_IC);
+}
+
+int icache_status(void)
+{
+   return (read_p15_c1() & C1_IC) != 0;
+}
+
+void dcache_enable(void)
+{
+   cache_enable(C1_DC);
+}
+
+void dcache_disable(void)
+{
+   cache_disable(C1_DC);
+}
+
+int dcache_status(void)
+{
+   return (read_p15_c1() & C1_DC) != 0;
 }
diff --git a/include/configs/davinci_sffsdr.h b/include/configs/davinci_sffsdr.h
index 0e49e6c..7c860e5 100644
--- a/include/configs/davinci_sffsdr.h
+++ b/include/configs/davinci_sffsdr.h
@@ -137,6 +137,7 @@
 #define CONFIG_CMD_SAVES
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_ELF /* Needed to load Integrity kernel. */
 #undef CONFIG_CMD_BDI
 #undef CONFIG_CMD_FPGA
 #undef CONFIG_CMD_SETGETDCR

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH V2] Round the serial port clock divisor value returned by calc_divisor()

2008-07-08 Thread Hugo Villeneuve
Round the serial port clock divisor value returned by
calc_divisor().

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
Signed-off-by: John Roberts <[EMAIL PROTECTED]>

---

Rounding is important, especially when using high baud rates
values like 115200bps. When using the non-rounded value, some
boards will work and some won't.

 drivers/serial/serial.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 76425d8..1192f07 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -144,8 +144,12 @@ static int calc_divisor (NS16550_t port)
 #else
 #define MODE_X_DIV 16
 #endif
-   return (CFG_NS16550_CLK / MODE_X_DIV / gd->baudrate);
 
+   /* Compute divisor value. Normally, we should simply return:
+*   CFG_NS16550_CLK) / MODE_X_DIV / gd->baudrate
+* but we need to round that value by adding 0.5 or 8/16.
+* Rounding is especially important at high baud rates. */
+   return (((16 * CFG_NS16550_CLK) / MODE_X_DIV / gd->baudrate) + 8) / 16;
 }
 
 #if !defined(CONFIG_SERIAL_MULTI)

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Round the serial port clock divisor value returned by calc_divisor()

2008-07-08 Thread Hugo Villeneuve
Jerry Van Baren wrote:
> Hugo Villeneuve wrote:
>> Jerry Van Baren wrote:
>>> Hugo Villeneuve wrote:
>>>> Round the serial port clock divisor value returned by
>>>> calc_divisor(). 
>>>> 
>>>> Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
>>>> 
>>>> ---
>>>> 
>>>> Rounding is important, especially when using high baud rates
>>>> values like 115200bps. When using the non-rounded value, some
>>>> boards will work and some won't.
>>>> 
>>>>  drivers/serial/serial.c |7 ++-
>>>>  1 files changed, 6 insertions(+), 1 deletions(-)
>>>> 
>>>> diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
>>>> index 76425d8..7e315ad 100644 --- a/drivers/serial/serial.c +++
>>>> b/drivers/serial/serial.c @@ -124,6 +124,8 @@ static NS16550_t
>>>> serial_ports[4] = { 
>>>> 
>>>>  static int calc_divisor (NS16550_t port)
>>>>  {
>>>> +  u32 divisor_x10;
>>>> +
>>>>  #ifdef CONFIG_OMAP1510
>>>>/* If can't cleanly clock 115200 set div to 1 */
>>>>if ((CFG_NS16550_CLK == 1200) && (gd->baudrate == 115200)) {
>>>> @@ -144,8 +146,11 @@ static int calc_divisor (NS16550_t port) 
>>>>  #else  #define MODE_X_DIV 16 #endif
>>>> -  return (CFG_NS16550_CLK / MODE_X_DIV / gd->baudrate);
>>>> 
>>>> +  /* Compute divisor value with rounding by adding 0.5 */
>>>> +  divisor_x10 = (10 * CFG_NS16550_CLK) / MODE_X_DIV /
>>>> gd->baudrate; + +  return (divisor_x10 + 5) / 10;
>>>>  }
>>>> 
>>>>  #if !defined(CONFIG_SERIAL_MULTI)
>>> Hi Hugo,
>>> 
>>> Will a real rounding work?  Work better?  If I got my mental math
>>> and parenthesis right and the resulting math doesn't overflow your
>>> registers, the following will add 1/2 the baud rate scaled by the
>>> MODE_X_DIV and then perform the divide which will do full rounding.
>>> 
>>> return (((CFG_NS16550_CLK + ((gd->baudrate / 2)* MODE_X_DIV))
>  oops, I missed a space ^
>>> / MODE_X_DIV) / gd->baudrate);
>> I tested it and it works for me.
>> But maybe the code is less obvious that way?
> 
> Obviousness is relative.  :-)
> This will be more accurate, but accuracy is relative too.  :-/  It
> only has to be close.
> 
> Since CFG_NS16550_CLK is very likely a multiple of MODE_X_DIV or it
> doesn't matter if it isn't because it is much, much larger than
> MODE_X_DIV,  the formula could be simplified slightly without
> substantially hurting the accuracy...
> 
>   return (((CFG_NS16550_CLK + (gd->baudrate / 2))
>   / MODE_X_DIV) / gd->baudrate);
> 
> A slight bit of added perceived complexity may be coming from my
> addition of parenthesis to emphasize the evaluation order.  The
> following (should be) equivalent and reads better to my brain.
> 
>   return (CFG_NS16550_CLK + (gd->baudrate / 2)) /
>   (MODE_X_DIV * gd->baudrate);
> 
> 
>>> Alternately, I prefer to scale up by 16 and then divide by 8 since
>>> processors can do that very efficiently ( << 4 followed by >> 3).
>>> Right. 
>> 
>> I prefer the second solution for its simplicity, but the first one
>> also works. 
> 
> Bottom line: it's your call IMHO.

Ok then, let´s use the second solution, updated patch will follow.

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

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Round the serial port clock divisor value returned by calc_divisor()

2008-07-08 Thread Hugo Villeneuve
Jerry Van Baren wrote:
> Hugo Villeneuve wrote:
>> Round the serial port clock divisor value returned by calc_divisor().
>> 
>> Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
>> 
>> ---
>> 
>> Rounding is important, especially when using high baud rates
>> values like 115200bps. When using the non-rounded value, some
>> boards will work and some won't.
>> 
>>  drivers/serial/serial.c |7 ++-
>>  1 files changed, 6 insertions(+), 1 deletions(-)
>> 
>> diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index
>> 76425d8..7e315ad 100644 --- a/drivers/serial/serial.c
>> +++ b/drivers/serial/serial.c
>> @@ -124,6 +124,8 @@ static NS16550_t serial_ports[4] = {
>> 
>>  static int calc_divisor (NS16550_t port)
>>  {
>> +u32 divisor_x10;
>> +
>>  #ifdef CONFIG_OMAP1510
>>  /* If can't cleanly clock 115200 set div to 1 */
>>  if ((CFG_NS16550_CLK == 1200) && (gd->baudrate == 115200)) {
>> @@ -144,8 +146,11 @@ static int calc_divisor (NS16550_t port)  #else
>>  #define MODE_X_DIV 16
>>  #endif
>> -return (CFG_NS16550_CLK / MODE_X_DIV / gd->baudrate);
>> 
>> +/* Compute divisor value with rounding by adding 0.5 */
>> +divisor_x10 = (10 * CFG_NS16550_CLK) / MODE_X_DIV / gd->baudrate; +
>> +return (divisor_x10 + 5) / 10;
>>  }
>> 
>>  #if !defined(CONFIG_SERIAL_MULTI)
> 
> Hi Hugo,
> 
> Will a real rounding work?  Work better?  If I got my mental math and
> parenthesis right and the resulting math doesn't overflow your
> registers, the following will add 1/2 the baud rate scaled by the
> MODE_X_DIV and then perform the divide which will do full rounding.
> 
>   return (((CFG_NS16550_CLK + ((gd->baudrate / 2)* MODE_X_DIV))
>   / MODE_X_DIV) / gd->baudrate);
I tested it and it works for me.
But maybe the code is less obvious that way?
 
> Alternately, I prefer to scale up by 16 and then divide by 8 since
> processors can do that very efficiently ( << 4 followed by >> 3).
Right.

I prefer the second solution for its simplicity, but the first one also works.

Hugo.

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

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] Round the serial port clock divisor value returned by calc_divisor()

2008-07-08 Thread Hugo Villeneuve
Round the serial port clock divisor value returned by
calc_divisor().

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>

---

Rounding is important, especially when using high baud rates
values like 115200bps. When using the non-rounded value, some
boards will work and some won't.

 drivers/serial/serial.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 76425d8..7e315ad 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -124,6 +124,8 @@ static NS16550_t serial_ports[4] = {
 
 static int calc_divisor (NS16550_t port)
 {
+   u32 divisor_x10;
+
 #ifdef CONFIG_OMAP1510
/* If can't cleanly clock 115200 set div to 1 */
if ((CFG_NS16550_CLK == 1200) && (gd->baudrate == 115200)) {
@@ -144,8 +146,11 @@ static int calc_divisor (NS16550_t port)
 #else
 #define MODE_X_DIV 16
 #endif
-   return (CFG_NS16550_CLK / MODE_X_DIV / gd->baudrate);
 
+   /* Compute divisor value with rounding by adding 0.5 */
+   divisor_x10 = (10 * CFG_NS16550_CLK) / MODE_X_DIV / gd->baudrate;
+
+   return (divisor_x10 + 5) / 10;
 }
 
 #if !defined(CONFIG_SERIAL_MULTI)

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] ARM: Fix for wrong patch version applied for Lyrtech SFF-SDR board (ARM926EJS)

2008-07-08 Thread Hugo Villeneuve
ARM: Fix for incorrect version of patch applied when
adding support for the Lyrtech SFF-SDR board.

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
Signed-off-by: Philip Balister, OpenSDR <[EMAIL PROTECTED]>

---

 CREDITS  |5 +
 board/davinci/sffsdr/Makefile|2 +-
 board/davinci/sffsdr/config.mk   |   11 +-
 board/davinci/sffsdr/dv_board.c  |  212 --
 board/davinci/sffsdr/sffsdr.c|  310 ++
 include/configs/davinci_sffsdr.h |   69 +++--
 6 files changed, 342 insertions(+), 267 deletions(-)

diff --git a/CREDITS b/CREDITS
index aa57682..3b6e57d 100644
--- a/CREDITS
+++ b/CREDITS
@@ -537,3 +537,8 @@ N: Timo Tuunainen
 E: [EMAIL PROTECTED]
 D: Support for Artila M-501 starter kit
 W: http://www.sysart.fi/
+
+N: Philip Balister
+E: [EMAIL PROTECTED]
+D: Port to Lyrtech SFFSDR development board.
+W: www.opensdr.com
diff --git a/board/davinci/sffsdr/Makefile b/board/davinci/sffsdr/Makefile
index 579efe2..fb31ee4 100644
--- a/board/davinci/sffsdr/Makefile
+++ b/board/davinci/sffsdr/Makefile
@@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).a
 
-COBJS  := dv_board.o
+COBJS  := $(BOARD).o
 SOBJS  := board_init.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/davinci/sffsdr/config.mk b/board/davinci/sffsdr/config.mk
index e8a329c..f3b23d1 100644
--- a/board/davinci/sffsdr/config.mk
+++ b/board/davinci/sffsdr/config.mk
@@ -3,8 +3,10 @@
 # Gary Jennejohn, DENX Software Engineering, <[EMAIL PROTECTED]>
 # David Mueller, ELSOFT AG, <[EMAIL PROTECTED]>
 #
+# Copyright (C) 2008 Lyrtech 
+# Copyright (C) 2008 Philip Balister, OpenSDR <[EMAIL PROTECTED]>
+#
 # Lyrtech SFF SDR board (ARM926EJS) cpu
-# see http://www.lyrtech.com/ for more information on Lyrtech
 #
 # SFF SDR board has 1 bank of 128 MB DDR RAM
 # Physical Address:
@@ -16,9 +18,6 @@
 # Integrity kernel is expected to be at 8000', entry 8000'00D0,
 # up to 81FF' (uses up to 32 MB of memory for text, heap, etc).
 #
-# we load ourself to 8400'
-#
-#
-
-# Provide at least 32MB spacing between us and the Integrity kernel image
+# we load ourself to 8400' to provide at least 32MB spacing
+# between us and the Integrity kernel image
 TEXT_BASE = 0x8400
diff --git a/board/davinci/sffsdr/dv_board.c b/board/davinci/sffsdr/dv_board.c
deleted file mode 100644
index 0771b5b..000
--- a/board/davinci/sffsdr/dv_board.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (C) 2007 Sergey Kubushyn <[EMAIL PROTECTED]>
- *
- * Parts are shamelessly stolen from various TI sources, original copyright
- * follows:
- * -
- *
- * Copyright (C) 2004 Texas Instruments.
- *
- * 
- * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- * 
- */
-
-#include 
-#include 
-#include 
-#include 
-
-DECLARE_GLOBAL_DATA_PTR;
-
-extern voidtimer_init(void);
-extern int eth_hw_init(void);
-extern phy_t   phy;
-
-
-/* Works on Always On power domain only (no PD argument) */
-void lpsc_on(unsigned int id)
-{
-   dv_reg_pmdstat, mdctl;
-
-   if (id >= DAVINCI_LPSC_GEM)
-   return; /* Don't work on DSP Power Domain */
-
-   mdstat = REG_P(PSC_MDSTAT_BASE + (id * 4));
-   mdctl = REG_P(PSC_MDCTL_BASE + (id * 4));
-
-   while (REG(PSC_PTSTAT) & 0x01);
-
-   if ((*mdstat & 0x1f) == 0x03)
-   return; /* Already on and enabled */
-
-   *mdctl |= 0x03;
-
-   /* Special treatment for some modules as for sprue14 p.7.4.2 */
-   if ((id == DAVINCI_LPSC_VPSSSLV) ||
-   (id == DAVINCI_LPSC_EMAC) ||
-   (id == DAVINCI_LPSC_EMAC_WRAPPER) ||
-   (id == DAVINCI_LPSC_MDIO) ||
-   (id == DAVINCI_LPSC_USB) ||
-   (id == DAVINCI_LPSC_ATA) ||
-   (id == DAVINCI_LPSC_VLYNQ) ||
-   (id == DAVINCI_LPSC_UHPI) ||
-   (id == DAVINCI_LPSC_DDR_EMIF) ||
-   (id == DAVINCI_LPSC_AEMIF) ||
-   (id == DAVINCI_LPSC_MMC_SD) ||
-   (id == DAVINC

Re: [U-Boot-Users] [PATCH] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-07-08 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> In message <[EMAIL PROTECTED]> you wrote:
>> 
>> Wolfgang and/or Jean-Christophe,
>> I can see that you have applied V2 of my patch, but the latest patch
>>  that I sent with all the errors and the style issues fixed was V8.
>> I will re-send 
> 
> I dodn't find this in my list, then. Sorry.
> 
>>  the patch V8 in a few minutes so can you please use this latest
>> version in stead?
> 
> Please make sure to rebase  the  patch  so  it  applies  against  the
> *current*  version  in the git repository, i. e. just esending an old
> patch that is based on previous versions is not useful.

Understood, I´m rebasing right now :)

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

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-07-08 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> In message
> <[EMAIL PROTECTED]> you
> wrote:  
>> ARM: This patch adds support for the Lyrtech SFF-SDR
>> board, based on the TI DaVinci architecture (ARM926EJS).
>> 
>> Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
>> Signed-off-by: Philip Balister <[EMAIL PROTECTED]> ---
>> 
>>  MAKEALL   |1 +
>>  Makefile  |3 +
>>  board/davinci/sffsdr/Makefile |   52 +
>>  board/davinci/sffsdr/board_init.S |   29 +
>>  board/davinci/sffsdr/config.mk|   24 
>>  board/davinci/sffsdr/dv_board.c   |  212
>>  +
>>  board/davinci/sffsdr/u-boot.lds   |   52 +
>>  include/asm-arm/mach-types.h  |   13 +++
>>  include/configs/davinci_sffsdr.h  |  177
>> +++ 9 files changed, 563 insertions(+),
>> 0 deletions(-)  
> 
> Applied [with minor fix in the board Makefile], thanks.
> Wolfgang Denk

Wolfgang and/or Jean-Christophe,
I can see that you have applied V2 of my patch, but the latest patch that I 
sent with all the errors and the style issues fixed was V8. I will re-send the 
patch V8 in a few minutes so can you please use this latest version instead?

Thank-you, 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

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH V8] ARM: Add support for Lyrtech SFF-SDRboard (ARM926EJS)

2008-06-25 Thread Hugo Villeneuve
Hugo Villeneuve wrote:
> [EMAIL PROTECTED] wrote:
>> ARM: This patch adds support for the Lyrtech SFF-SDR
>> board, based on the TI DaVinci architecture (ARM926EJS).
> 
> I haven´t heard from anyone about my patch being accepted or not.
> It´s been almost five weeks since I submitted the first version, and
> I still cannot see it in the ARM tree or U-Boot master tree.  
> 
> Should I look into a specific tree to see if my patch has been
> accepted?

Still no answer, who is responsible for incorporating my patch in U-Boot?

Is anything missing or incorrect with the patch?

Thank-you, Hugo V.


>> Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
>> Signed-off-by: Philip Balister, OpenSDR <[EMAIL PROTECTED]>
>> 
>> ---
>> 
>>  CREDITS   |5 +
>>  MAKEALL   |1 +
>>  Makefile  |3 +
>>  board/davinci/sffsdr/Makefile |   51 ++
>>  board/davinci/sffsdr/board_init.S |   32 
>>  board/davinci/sffsdr/config.mk|   42 +
>>  board/davinci/sffsdr/sffsdr.c |  306
>>  +
>>  board/davinci/sffsdr/u-boot.lds   |   52 +++
>>  include/asm-arm/mach-types.h  |   13 ++
>>  include/configs/davinci_sffsdr.h  |  148 ++ 10 files
>> changed, 653 insertions(+), 0 deletions(-)
>> 
>> diff --git a/CREDITS b/CREDITS
>> index e84ef38..b855904 100644
>> --- a/CREDITS
>> +++ b/CREDITS
>> @@ -533,3 +533,8 @@ N: Timo Tuunainen
>>  E: [EMAIL PROTECTED]
>>  D: Support for Artila M-501 starter kit
>>  W: http://www.sysart.fi/
>> +
>> +N: Philip Balister
>> +E: [EMAIL PROTECTED]
>> +D: Port to Lyrtech SFFSDR development board.
>> +W: www.opensdr.com
>> diff --git a/MAKEALL b/MAKEALL
>> index 37b4334..f53ceec 100755
>> --- a/MAKEALL
>> +++ b/MAKEALL
>> @@ -496,6 +496,7 @@ LIST_ARM9="  \
>>  voiceblue   \
>>  davinci_dvevm   \
>>  davinci_schmoogie   \
>> +davinci_sffsdr  \
>>  davinci_sonata  \
>>  "
>> 
>> diff --git a/Makefile b/Makefile
>> index 6548f8e..05d90aa 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -2408,6 +2408,9 @@ davinci_dvevm_config : unconfig
>>  davinci_schmoogie_config :  unconfig
>>  @$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
>> 
>> +davinci_sffsdr_config : unconfig
>> +@$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci +
>>  davinci_sonata_config : unconfig
>>  @$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
>> 
>> diff --git a/board/davinci/sffsdr/Makefile
>> b/board/davinci/sffsdr/Makefile
>> new file mode 100644
>> index 000..4413b33
>> --- /dev/null
>> +++ b/board/davinci/sffsdr/Makefile
>> @@ -0,0 +1,51 @@
>> +#
>> +# (C) Copyright 2000, 2001, 2002
>> +# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED] +#
>> +# Copyright (C) 2007 Sergey Kubushyn <[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)lib$(BOARD).a
>> +
>> +COBJS   := $(BOARD).o
>> +SOBJS   := board_init.o
>> +
>> +SRCS:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
>> +OBJS:= $(addprefix $(obj),$(COBJS))
>> +SOBJS   := $(addprefix $(obj),$(SOBJS))
>> +
>> +$(LIB): $(obj).depend $(OBJS) $(SOBJS)
>> +$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
>> +
>> +clean:
>> +rm -f $(SOBJS) $(OBJS)
>> +
>> +distclean:  clean
>> +rm -f $(LIB) core *.bak *~ .depend
>> +
>> +#

[U-Boot-Users] [PATCH 2/2] Remove duplicate code in cpu/arm926ejs/davinci/lxt972.c.

2008-06-18 Thread Hugo Villeneuve
Remove duplicate code in cpu/arm926ejs/davinci/lxt972.c.

Remove duplicate code in a if/else block in
cpu/arm926ejs/davinci/lxt972.c.
Fixed style issues.

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>

---
 cpu/arm926ejs/davinci/lxt972.c |   39 ---
 1 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/cpu/arm926ejs/davinci/lxt972.c b/cpu/arm926ejs/davinci/lxt972.c
index 620e7bb..8130b48 100644
--- a/cpu/arm926ejs/davinci/lxt972.c
+++ b/cpu/arm926ejs/davinci/lxt972.c
@@ -37,7 +37,7 @@
 
 int lxt972_is_phy_connected(int phy_addr)
 {
-   u_int16_t   id1, id2;
+   u_int16_t id1, id2;
 
if (!dm644x_eth_phy_read(phy_addr, PHY_PHYIDR1, &id1))
return(0);
@@ -52,8 +52,8 @@ int lxt972_is_phy_connected(int phy_addr)
 
 int lxt972_get_link_speed(int phy_addr)
 {
-   u_int16_t   stat1, tmp;
-   volatile emac_regs* emac = (emac_regs *)EMAC_BASE_ADDR;
+   u_int16_t stat1, tmp;
+   volatile emac_regs *emac = (emac_regs *)EMAC_BASE_ADDR;
 
if (!dm644x_eth_phy_read(phy_addr, PHY_LXT971_STAT2, &stat1))
return(0);
@@ -71,37 +71,23 @@ int lxt972_get_link_speed(int phy_addr)
if (!dm644x_eth_phy_read(phy_addr, PHY_LXT971_DIG_CFG, &tmp))
return(0);
 
-
/* Speed doesn't matter, there is no setting for it in EMAC... */
-   if (stat1 & PHY_LXT971_STAT2_100BTX) {
-   if (stat1 & PHY_LXT971_STAT2_DUPLEX_MODE) {
-   /* set DM644x EMAC for Full Duplex  */
-   emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE | 
EMAC_MACCONTROL_FULLDUPLEX_ENABLE;
-   } else {
-   /*set DM644x EMAC for Half Duplex  */
-   emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE;
-   }
-
-   return(1);
+   if (stat1 & PHY_LXT971_STAT2_DUPLEX_MODE) {
+   /* set DM644x EMAC for Full Duplex  */
+   emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE |
+   EMAC_MACCONTROL_FULLDUPLEX_ENABLE;
} else {
-   if (stat1 & PHY_LXT971_STAT2_DUPLEX_MODE) {
-   /* set DM644x EMAC for Full Duplex  */
-   emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE | 
EMAC_MACCONTROL_FULLDUPLEX_ENABLE;
-   } else {
-   /*set DM644x EMAC for Half Duplex  */
-   emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE;
-   }
-
-   return(1);
+   /*set DM644x EMAC for Half Duplex  */
+   emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE;
}
 
-   return(0);
+   return(1);
 }
 
 
 int lxt972_init_phy(int phy_addr)
 {
-   int ret = 1;
+   int ret = 1;
 
if (!lxt972_get_link_speed(phy_addr)) {
/* Try another time */
@@ -117,8 +103,7 @@ int lxt972_init_phy(int phy_addr)
 
 int lxt972_auto_negotiate(int phy_addr)
 {
-   u_int16_t   tmp;
-
+   u_int16_t tmp;
 
if (!dm644x_eth_phy_read(phy_addr, PHY_BMCR, &tmp))
return(0);

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 1/2] Remove duplicate definitions in include/lxt971a.h.

2008-06-18 Thread Hugo Villeneuve
Remove duplicate definitions in include/lxt971a.h.

Remove duplicate registers and bits definitions in
include/lxt971a.h for standard MII registers, and
use values in include/miiphy.h instead.

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>

---
 cpu/arm920t/at91rm9200/lxt972.c |   15 +++---
 cpu/arm926ejs/davinci/lxt972.c  |   15 +++---
 drivers/net/ns7520_eth.c|   42 +++-
 drivers/net/ns9750_eth.c|   59 +++
 include/lxt971a.h   |  100 ---
 include/ns7520_eth.h|1 +
 include/ns9750_eth.h|1 +
 7 files changed, 65 insertions(+), 168 deletions(-)

diff --git a/cpu/arm920t/at91rm9200/lxt972.c b/cpu/arm920t/at91rm9200/lxt972.c
index 4edcc9a..260d393 100644
--- a/cpu/arm920t/at91rm9200/lxt972.c
+++ b/cpu/arm920t/at91rm9200/lxt972.c
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #ifdef CONFIG_DRIVER_ETHER
@@ -51,8 +52,8 @@ unsigned int lxt972_IsPhyConnected (AT91PS_EMAC p_mac)
unsigned short Id1, Id2;
 
at91rm9200_EmacEnableMDIO (p_mac);
-   at91rm9200_EmacReadPhy (p_mac, PHY_COMMON_ID1, &Id1);
-   at91rm9200_EmacReadPhy (p_mac, PHY_COMMON_ID2, &Id2);
+   at91rm9200_EmacReadPhy(p_mac, PHY_PHYIDR1, &Id1);
+   at91rm9200_EmacReadPhy(p_mac, PHY_PHYIDR2, &Id2);
at91rm9200_EmacDisableMDIO (p_mac);
 
if ((Id1 == (0x0013)) && ((Id2  & 0xFFF0) == 0x78E0))
@@ -169,18 +170,18 @@ UCHAR lxt972_AutoNegotiate (AT91PS_EMAC p_mac, int 
*status)
unsigned short value;
 
/* Set lxt972 control register */
-   if (!at91rm9200_EmacReadPhy (p_mac, PHY_COMMON_CTRL, &value))
+   if (!at91rm9200_EmacReadPhy (p_mac, PHY_BMCR, &value))
return FALSE;
 
/* Restart Auto_negotiation  */
-   value |= PHY_COMMON_CTRL_RES_AUTO;
-   if (!at91rm9200_EmacWritePhy (p_mac, PHY_COMMON_CTRL, &value))
+   value |= PHY_BMCR_RST_NEG;
+   if (!at91rm9200_EmacWritePhy (p_mac, PHY_BMCR, &value))
return FALSE;
 
/*check AutoNegotiate complete */
udelay (1);
-   at91rm9200_EmacReadPhy (p_mac, PHY_COMMON_STAT, &value);
-   if (!(value & PHY_COMMON_STAT_AN_COMP))
+   at91rm9200_EmacReadPhy(p_mac, PHY_BMSR, &value);
+   if (!(value & PHY_BMSR_AUTN_COMP))
return FALSE;
 
return (lxt972_GetLinkSpeed (p_mac));
diff --git a/cpu/arm926ejs/davinci/lxt972.c b/cpu/arm926ejs/davinci/lxt972.c
index 6eeb6e5..620e7bb 100644
--- a/cpu/arm926ejs/davinci/lxt972.c
+++ b/cpu/arm926ejs/davinci/lxt972.c
@@ -27,6 +27,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -38,9 +39,9 @@ int lxt972_is_phy_connected(int phy_addr)
 {
u_int16_t   id1, id2;
 
-   if (!dm644x_eth_phy_read(phy_addr, PHY_COMMON_ID1, &id1))
+   if (!dm644x_eth_phy_read(phy_addr, PHY_PHYIDR1, &id1))
return(0);
-   if (!dm644x_eth_phy_read(phy_addr, PHY_COMMON_ID2, &id2))
+   if (!dm644x_eth_phy_read(phy_addr, PHY_PHYIDR2, &id2))
return(0);
 
if ((id1 == (0x0013)) && ((id2  & 0xfff0) == 0x78e0))
@@ -119,19 +120,19 @@ int lxt972_auto_negotiate(int phy_addr)
u_int16_t   tmp;
 
 
-   if (!dm644x_eth_phy_read(phy_addr, PHY_COMMON_CTRL, &tmp))
+   if (!dm644x_eth_phy_read(phy_addr, PHY_BMCR, &tmp))
return(0);
 
/* Restart Auto_negotiation  */
-   tmp |= PHY_COMMON_CTRL_RES_AUTO;
-   dm644x_eth_phy_write(phy_addr, PHY_COMMON_CTRL, tmp);
+   tmp |= PHY_BMCR_RST_NEG;
+   dm644x_eth_phy_write(phy_addr, PHY_BMCR, tmp);
 
/*check AutoNegotiate complete */
udelay (1);
-   if (!dm644x_eth_phy_read(phy_addr, PHY_COMMON_STAT, &tmp))
+   if (!dm644x_eth_phy_read(phy_addr, PHY_BMSR, &tmp))
return(0);
 
-   if (!(tmp & PHY_COMMON_STAT_AN_COMP))
+   if (!(tmp & PHY_BMSR_AUTN_COMP))
return(0);
 
return (lxt972_get_link_speed(phy_addr));
diff --git a/drivers/net/ns7520_eth.c b/drivers/net/ns7520_eth.c
index 37411df..e19c223 100644
--- a/drivers/net/ns7520_eth.c
+++ b/drivers/net/ns7520_eth.c
@@ -387,8 +387,8 @@ static int ns7520_eth_reset(void)
ns7520_mii_get_clock_divisor(nPhyMaxMdioClock);
 
/* reset PHY */
-   ns7520_mii_write(PHY_COMMON_CTRL, PHY_COMMON_CTRL_RESET);
-   ns7520_mii_write(PHY_COMMON_CTRL, 0);
+   ns7520_mii_write(PHY_BMCR, PHY_BMCR_RESET);
+   ns7520_mii_write(PHY_BMCR, 0);
 
udelay(3000);   /* [2] p.70 says at least 300us reset recovery 
time. */
 
@@ -438,26 +438,23 @@ static void ns7520_link_auto_negotiate(void)
 
/* run auto-negotation */
/* define what we are capable of */
-   ns7520_mii_write(PHY_COMMON_AUTO_ADV,
-PHY_COMMON_AUTO_AD

Re: [U-Boot-Users] [PATCH V8] ARM: Add support for Lyrtech SFF-SDRboard (ARM926EJS)

2008-06-18 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> ARM: This patch adds support for the Lyrtech SFF-SDR
> board, based on the TI DaVinci architecture (ARM926EJS).

I haven´t heard from anyone about my patch being accepted or not. It´s been 
almost five weeks since I submitted the first version, and I still cannot see 
it in the ARM tree or U-Boot master tree.

Should I look into a specific tree to see if my patch has been accepted?

Thank-you, Hugo V.


> Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
> Signed-off-by: Philip Balister, OpenSDR <[EMAIL PROTECTED]>
> 
> ---
> 
>  CREDITS   |5 +
>  MAKEALL   |1 +
>  Makefile  |3 +
>  board/davinci/sffsdr/Makefile |   51 ++
>  board/davinci/sffsdr/board_init.S |   32 
>  board/davinci/sffsdr/config.mk|   42 +
>  board/davinci/sffsdr/sffsdr.c |  306
>  +
>  board/davinci/sffsdr/u-boot.lds   |   52 +++
>  include/asm-arm/mach-types.h  |   13 ++
>  include/configs/davinci_sffsdr.h  |  148 ++ 10 files
> changed, 653 insertions(+), 0 deletions(-) 
> 
> diff --git a/CREDITS b/CREDITS
> index e84ef38..b855904 100644
> --- a/CREDITS
> +++ b/CREDITS
> @@ -533,3 +533,8 @@ N: Timo Tuunainen
>  E: [EMAIL PROTECTED]
>  D: Support for Artila M-501 starter kit
>  W: http://www.sysart.fi/
> +
> +N: Philip Balister
> +E: [EMAIL PROTECTED]
> +D: Port to Lyrtech SFFSDR development board.
> +W: www.opensdr.com
> diff --git a/MAKEALL b/MAKEALL
> index 37b4334..f53ceec 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -496,6 +496,7 @@ LIST_ARM9="   \
>   voiceblue   \
>   davinci_dvevm   \
>   davinci_schmoogie   \
> + davinci_sffsdr  \
>   davinci_sonata  \
>  "
> 
> diff --git a/Makefile b/Makefile
> index 6548f8e..05d90aa 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2408,6 +2408,9 @@ davinci_dvevm_config :  unconfig
>  davinci_schmoogie_config :   unconfig
>   @$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
> 
> +davinci_sffsdr_config :  unconfig
> + @$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci
> +
>  davinci_sonata_config :  unconfig
>   @$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
> 
> diff --git a/board/davinci/sffsdr/Makefile
> b/board/davinci/sffsdr/Makefile 
> new file mode 100644
> index 000..4413b33
> --- /dev/null
> +++ b/board/davinci/sffsdr/Makefile
> @@ -0,0 +1,51 @@
> +#
> +# (C) Copyright 2000, 2001, 2002
> +# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
> +#
> +# Copyright (C) 2007 Sergey Kubushyn <[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)lib$(BOARD).a
> +
> +COBJS:= $(BOARD).o
> +SOBJS:= board_init.o
> +
> +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
> +OBJS := $(addprefix $(obj),$(COBJS))
> +SOBJS:= $(addprefix $(obj),$(SOBJS))
> +
> +$(LIB):  $(obj).depend $(OBJS) $(SOBJS)
> + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
> +
> +clean:
> + rm -f $(SOBJS) $(OBJS)
> +
> +distclean:   clean
> + rm -f $(LIB) core *.bak *~ .depend
> +
> +#
> +# This is for $(obj).depend target
> +include $(SRCTREE)/rules.mk
> +
> +sinclude $(obj).depend
> +
> +#
> diff --git a/board/davinci/sffsdr/board_init.S
> b/board/davinci/sffsdr/board_init.S new file mode 100644
> index 000..84ecd96
> --- /dev/null
> +++ b/board/davinci/sffsdr/board_init.S
> @@ -0,0 +1,32 @@
> +/*
> + * Board-specific low level initialization code. Called at the very
>

Re: [U-Boot-Users] [PATCH V2] ARM: Add support for LyrtechSFF-SDRboard (ARM926EJS)

2008-06-13 Thread Hugo Villeneuve
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 13:32 Thu 05 Jun , Hugo Villeneuve wrote:
>> Philip Balister wrote:
>>>>> Is everything fine with the patch now?
>>>> 
>>>> I did not see any negative reaction to your 5th version[1], so its
>>>> up to the custodian now.  What do you say Jean-Christophe?
>>>> 
>>>> Cheers
>>>>   Detlev
>>>> 
>>>> [1]
>>>> http://news.gmane.org/find-root.php?message_id=%3c1211486942%2d8348%2d1%2dgit%2dsend%2demail%2dhugo.villeneuve%40lyrtech.com%3e
>>> 
>>> Does anything need to happen for the Lyrech SFFSDR board patch to
>>> be added to u-boot? 
>>> 
>>> Philip
>> 
>> Since the patch doesn´t seem to be added at the moment, I will post
>> an updated version of the V5 patch which fixes a few issues I have
>> found since I submitted V5.  
> OK,
> I'll handle this patch this WE. If you can post your patch today or
> tomorow it will be nice.
> 
> Best Regards,
> J.

Hi Jean-Christophe,
how things are going with my patch? Is it accepted or not?

Thank-you, 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

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH V8] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-06-06 Thread Hugo Villeneuve
ARM: This patch adds support for the Lyrtech SFF-SDR
board, based on the TI DaVinci architecture (ARM926EJS).

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
Signed-off-by: Philip Balister, OpenSDR <[EMAIL PROTECTED]>

---

 CREDITS   |5 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/davinci/sffsdr/Makefile |   51 ++
 board/davinci/sffsdr/board_init.S |   32 
 board/davinci/sffsdr/config.mk|   42 +
 board/davinci/sffsdr/sffsdr.c |  306 +
 board/davinci/sffsdr/u-boot.lds   |   52 +++
 include/asm-arm/mach-types.h  |   13 ++
 include/configs/davinci_sffsdr.h  |  148 ++
 10 files changed, 653 insertions(+), 0 deletions(-)

diff --git a/CREDITS b/CREDITS
index e84ef38..b855904 100644
--- a/CREDITS
+++ b/CREDITS
@@ -533,3 +533,8 @@ N: Timo Tuunainen
 E: [EMAIL PROTECTED]
 D: Support for Artila M-501 starter kit
 W: http://www.sysart.fi/
+
+N: Philip Balister
+E: [EMAIL PROTECTED]
+D: Port to Lyrtech SFFSDR development board.
+W: www.opensdr.com
diff --git a/MAKEALL b/MAKEALL
index 37b4334..f53ceec 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -496,6 +496,7 @@ LIST_ARM9=" \
voiceblue   \
davinci_dvevm   \
davinci_schmoogie   \
+   davinci_sffsdr  \
davinci_sonata  \
 "
 
diff --git a/Makefile b/Makefile
index 6548f8e..05d90aa 100644
--- a/Makefile
+++ b/Makefile
@@ -2408,6 +2408,9 @@ davinci_dvevm_config :unconfig
 davinci_schmoogie_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
 
+davinci_sffsdr_config :unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci
+
 davinci_sonata_config :unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
 
diff --git a/board/davinci/sffsdr/Makefile b/board/davinci/sffsdr/Makefile
new file mode 100644
index 000..4413b33
--- /dev/null
+++ b/board/davinci/sffsdr/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# Copyright (C) 2007 Sergey Kubushyn <[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)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+SOBJS  := board_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak *~ .depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/davinci/sffsdr/board_init.S 
b/board/davinci/sffsdr/board_init.S
new file mode 100644
index 000..84ecd96
--- /dev/null
+++ b/board/davinci/sffsdr/board_init.S
@@ -0,0 +1,32 @@
+/*
+ * Board-specific low level initialization code. Called at the very end
+ * of cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no
+ * initialization required.
+ *
+ * Copyright (C) 2007 Sergey Kubushyn <[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 Templ

Re: [U-Boot-Users] [PATCH V7] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-06-06 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> In message
> <[EMAIL PROTECTED]> you
> wrote:  
>> ARM: This patch adds support for the Lyrtech SFF-SDR
>> board, based on the TI DaVinci architecture (ARM926EJS).
> ...
>> +int read_mac_address(uint8_t *buf)
>> +{
>> +u_int32_t value, mac[2], address;
>> +
>> +/* Read Integrity data structure checkword. */
>> +if (i2c_read(CFG_I2C_EEPROM_ADDR, INTEGRITY_CHECKWORD_OFFSET,
>> + CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) {
>> +printf("Read from EEPROM @ 0x%02x failed\n",
>> +   CFG_I2C_EEPROM_ADDR);
>> +return 1;
> 
> # 1
> # 2
> # 3
> # 4
> # 5
> Instead of repeating the same code 5 times, replace it by a "goto
> err;" 
> and add here:
> 
> err:
>   printf("Read from EEPROM @ 0x%02x failed\n", CFG_I2C_EEPROM_ADDR);
>   return 1;
Fixed.
 
>> +/* Configure I2C switch (PCA9543) to enable channel 0. */
>> +tmp[0] = CFG_I2C_PCA9543_ENABLE_CH0;
>> +if (i2c_write(CFG_I2C_PCA9543_ADDR, 0,
>> +  CFG_I2C_PCA9543_ADDR_LEN, tmp, 1))
>> +printf("Write to MUX @ 0x%02x failed\n", CFG_I2C_PCA9543_ADDR);
> 
> And this is not an error that needs to be handled?
Fixed.

>> +/* Set Ethernet MAC address from EEPROM if available. */
>> +if (read_mac_address(buf) == 0) {
>> +if ((buf[0] != 0xff) && (getenv("ethaddr") == NULL)) {
>> +sprintf((char *)&tmp[0], +  
>> "%02x:%02x:%02x:%02x:%02x:%02x",
>> +buf[0], buf[1], buf[2], buf[3],
>> +buf[4], buf[5]);
>> +setenv("ethaddr", (char *)&tmp[0]);
>> +}
>> +}
> 
> Hm. I always thought this was documented somewhere (probably it's in
> the 
> CHANGELOG ?), but I didn't find it right now. The intended "standard"
> behaviour should be:
>
> If there is a MAC address in  the  environment,  and  if  it  is  not
> identical  to  the  MAC  address  in the ROM, then a warning shall be
> printed, and the MAC address from the environment be used.
> 
> If there is no MAC address in  the  environment,  then  it  shall  be
> initialized (silently) from the value in the ROM.
> 
> See for example drivers/net/cs8900.c (which is the first driver where
> we implemented this, IIRC).
Fixed. I used the exact same code found in drivers/net/cs8900.c.

>> +/* For most DaVinci boards, U-Boot is copied in RAM by the UBL,
>> + * so we are always in the relocated state. This is
>> + * necessary for command history to work. */
>> +gd->flags |= GD_FLG_RELOC;
> 
> "most" != "all". What happens for the N (N = all - most) remaining
> boards?
Fixed.


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

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH V7] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-06-06 Thread Hugo Villeneuve
ARM: This patch adds support for the Lyrtech SFF-SDR
board, based on the TI DaVinci architecture (ARM926EJS).

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
Signed-off-by: Philip Balister, OpenSDR <[EMAIL PROTECTED]>

---

 CREDITS   |5 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/davinci/sffsdr/Makefile |   51 +++
 board/davinci/sffsdr/board_init.S |   32 
 board/davinci/sffsdr/config.mk|   42 ++
 board/davinci/sffsdr/sffsdr.c |  288 +
 board/davinci/sffsdr/u-boot.lds   |   52 +++
 include/asm-arm/mach-types.h  |   13 ++
 include/configs/davinci_sffsdr.h  |  148 +++
 10 files changed, 635 insertions(+), 0 deletions(-)

diff --git a/CREDITS b/CREDITS
index e84ef38..b855904 100644
--- a/CREDITS
+++ b/CREDITS
@@ -533,3 +533,8 @@ N: Timo Tuunainen
 E: [EMAIL PROTECTED]
 D: Support for Artila M-501 starter kit
 W: http://www.sysart.fi/
+
+N: Philip Balister
+E: [EMAIL PROTECTED]
+D: Port to Lyrtech SFFSDR development board.
+W: www.opensdr.com
diff --git a/MAKEALL b/MAKEALL
index 37b4334..f53ceec 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -496,6 +496,7 @@ LIST_ARM9=" \
voiceblue   \
davinci_dvevm   \
davinci_schmoogie   \
+   davinci_sffsdr  \
davinci_sonata  \
 "
 
diff --git a/Makefile b/Makefile
index 6548f8e..05d90aa 100644
--- a/Makefile
+++ b/Makefile
@@ -2408,6 +2408,9 @@ davinci_dvevm_config :unconfig
 davinci_schmoogie_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
 
+davinci_sffsdr_config :unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci
+
 davinci_sonata_config :unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
 
diff --git a/board/davinci/sffsdr/Makefile b/board/davinci/sffsdr/Makefile
new file mode 100644
index 000..4413b33
--- /dev/null
+++ b/board/davinci/sffsdr/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# Copyright (C) 2007 Sergey Kubushyn <[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)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+SOBJS  := board_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak *~ .depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/davinci/sffsdr/board_init.S 
b/board/davinci/sffsdr/board_init.S
new file mode 100644
index 000..84ecd96
--- /dev/null
+++ b/board/davinci/sffsdr/board_init.S
@@ -0,0 +1,32 @@
+/*
+ * Board-specific low level initialization code. Called at the very end
+ * of cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no
+ * initialization required.
+ *
+ * Copyright (C) 2007 Sergey Kubushyn <[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 Templ

Re: [U-Boot-Users] [PATCH V6] ARM: Add support for Lyrtech SFF-SDRboard (ARM926EJS)

2008-06-06 Thread Hugo Villeneuve
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 13:33 Thu 05 Jun , Hugo Villeneuve wrote:
>> ARM: This patch adds support for the Lyrtech SFF-SDR
>> board, based on the TI DaVinci architecture (ARM926EJS).
>> 
>> Changes between V5 and V6:
>>   -New email address for contributor.
>>   -Init of EMIF-A CS3 address space to load FPGA.
>>   -Dynamic parsing of MAC address in EEPROM.
>>   -Add boot delay of 5 sec.
>>   -Use NFS for Linux boot command.
>>   -Add relocate flag for command history.
>> 
>> Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
>> Signed-off-by: Philip Balister, OpenSDR <[EMAIL PROTECTED]>
>> 
>> ---
>> 
>>  CREDITS   |5 +
>> +/* Set the Bus Priority Register to appropriate value */
>> +REG(VBPR) = 0x20; +
>> +timer_init();
>> +
>> +return(0);
>> +}
>> +
> 
> Is it possible that you add a documentiation about the EEPROM content?

Hi Jean-Christophe,
unfortunately, I don´t have the data structure of the EEPROM, only the
algorithym to parse it to find the MAC address.

>> +
>> +/*===*/
>> +/* Board */
>> +/*===*/
> If Possible use this kind of comment style
> /*
>  *
>  */

Ok, I fixed it.

>> +#define LINUX_BOOT_PARAM_ADDR   0x8100
>> +#define CONFIG_CMDLINE_TAG
>> +#define CONFIG_SETUP_MEMORY_TAGS
>> +#define CONFIG_BOOTARGS \
>> +"mem=56M "  \
>> +"console=ttyS0,115200n8 "   \
>> +"root=/dev/nfs rw noinitrd ip=dhcp "\
>> +"nfsroot=${serverip}:/nfsroot/sffsdr "  \
>> +"nwhwconf=device:eth0,hwaddr:${ethaddr}"
>> +#define CONFIG_BOOTCOMMAND  \
>> +"nand read 87A0 100000 30;" \
>> +"bootelf 87A0"
> Could you align it or I will do it when I'll apply the patch,
> If it's ok with you.

Since I´m not sure how you want it to be aligned, please go ahead
and do it when you apply the patch as you suggested.

I¬m sending updated patch after this mail.

Thank-you, 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

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH V6] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-06-05 Thread Hugo Villeneuve
ARM: This patch adds support for the Lyrtech SFF-SDR
board, based on the TI DaVinci architecture (ARM926EJS).

Changes between V5 and V6:
  -New email address for contributor.
  -Init of EMIF-A CS3 address space to load FPGA.
  -Dynamic parsing of MAC address in EEPROM.
  -Add boot delay of 5 sec.
  -Use NFS for Linux boot command.
  -Add relocate flag for command history.

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
Signed-off-by: Philip Balister, OpenSDR <[EMAIL PROTECTED]>

---

 CREDITS   |5 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/davinci/sffsdr/Makefile |   51 +++
 board/davinci/sffsdr/board_init.S |   32 
 board/davinci/sffsdr/config.mk|   42 ++
 board/davinci/sffsdr/sffsdr.c |  288 +
 board/davinci/sffsdr/u-boot.lds   |   52 +++
 include/asm-arm/mach-types.h  |   13 ++
 include/configs/davinci_sffsdr.h  |  177 +++
 10 files changed, 664 insertions(+), 0 deletions(-)

diff --git a/CREDITS b/CREDITS
index e84ef38..b855904 100644
--- a/CREDITS
+++ b/CREDITS
@@ -533,3 +533,8 @@ N: Timo Tuunainen
 E: [EMAIL PROTECTED]
 D: Support for Artila M-501 starter kit
 W: http://www.sysart.fi/
+
+N: Philip Balister
+E: [EMAIL PROTECTED]
+D: Port to Lyrtech SFFSDR development board.
+W: www.opensdr.com
diff --git a/MAKEALL b/MAKEALL
index 37b4334..f53ceec 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -496,6 +496,7 @@ LIST_ARM9=" \
voiceblue   \
davinci_dvevm   \
davinci_schmoogie   \
+   davinci_sffsdr  \
davinci_sonata  \
 "
 
diff --git a/Makefile b/Makefile
index 6548f8e..05d90aa 100644
--- a/Makefile
+++ b/Makefile
@@ -2408,6 +2408,9 @@ davinci_dvevm_config :unconfig
 davinci_schmoogie_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
 
+davinci_sffsdr_config :unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci
+
 davinci_sonata_config :unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
 
diff --git a/board/davinci/sffsdr/Makefile b/board/davinci/sffsdr/Makefile
new file mode 100644
index 000..4413b33
--- /dev/null
+++ b/board/davinci/sffsdr/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# Copyright (C) 2007 Sergey Kubushyn <[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)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+SOBJS  := board_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak *~ .depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/davinci/sffsdr/board_init.S 
b/board/davinci/sffsdr/board_init.S
new file mode 100644
index 000..84ecd96
--- /dev/null
+++ b/board/davinci/sffsdr/board_init.S
@@ -0,0 +1,32 @@
+/*
+ * Board-specific low level initialization code. Called at the very end
+ * of cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no
+ * initialization required.
+ *
+ * Copyright (C) 2007 Sergey Kubushyn <[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
+ * MERCHANTA

Re: [U-Boot-Users] [PATCH V2] ARM: Add support for Lyrtech SFF-SDRboard (ARM926EJS)

2008-06-05 Thread Hugo Villeneuve
Philip Balister wrote:
>>> Is everything fine with the patch now?
>> 
>> I did not see any negative reaction to your 5th version[1], so its
>> up to 
>> the custodian now.  What do you say Jean-Christophe?
>> 
>> Cheers
>>   Detlev
>> 
>> [1]
>> http://news.gmane.org/find-root.php?message_id=%3c1211486942%2d8348%2d1%2dgit%2dsend%2demail%2dhugo.villeneuve%40lyrtech.com%3e
> 
> Does anything need to happen for the Lyrech SFFSDR board patch to be
> added to u-boot?
> 
> Philip

Since the patch doesn´t seem to be added at the moment, I will post an updated 
version of the V5 patch which fixes a few issues I have found since I submitted 
V5.

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

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] Remove duplicate code introduced by commit 597f6c26a18b389903a64692bacbf9a1ca69355b

2008-05-29 Thread Hugo Villeneuve
Remove duplicate code introduced by commit
597f6c26a18b389903a64692bacbf9a1ca69355b

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>

---

 common/main.c |6 --
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/common/main.c b/common/main.c
index a17b60b..046da6f 100644
--- a/common/main.c
+++ b/common/main.c
@@ -940,12 +940,6 @@ int readline_into_buffer (const char *const prompt, char * 
buffer)
int rc;
static int initted = 0;
 
-   if (!initted) {
-   hist_init();
-   initted = 1;
-   }
-
-
/*
 * History uses a global array which is not
 * writable until after relocation to RAM.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [Junk released by Allow List] Command historyno longer working

2008-05-29 Thread Hugo Villeneuve
Kenneth Johansson wrote:
> On Thu, 2008-05-29 at 15:41 -0400, Hugo Villeneuve wrote:
>> [EMAIL PROTECTED] wrote:
>>> Hi,
>>> I have observed that after this commit, the command history is no
>>> longer working: 
>>> 
>>> ---
>>> commit 597f6c26a18b389903a64692bacbf9a1ca69355b
>>> Author: James Yang <[EMAIL PROTECTED]>
>>> Date:   Mon May 5 10:22:53 2008 -0500
>>> 
>>> Fix readline_into_buffer() with CONFIG_CMDLINE_EDITING before
>>> relocating 
>>> 
>>> When CONFIG_CMDLINE_EDITING is enabled, readline_into_buffer()
>>> doesn't work before relocating to RAM because command history
>>> is written into a global array that is not writable before
>>> relocation.  This patch defers to the no-editing and no-history
>>> code in readline_into_buffer() if it is called before
>>> relocation. ---
>>> 
>>> Based on the comments, I dont understand why it ceases to work
>>> because, in my case, U-Boot runs entirely from RAM (it is copied
>>> from flash to RAM by a first stage bootloader).
>>> 
>>> I have CONFIG_CMDLINE_EDITING defined.
>> 
>> Well after reading through the code in common/main.c, I figured that
>> by setting GD_FLG_RELOC in my board init function:
>> 
>>   gd->flags |= GD_FLG_RELOC;
>> 
>> command history would be working again, and it did.
>> 
>> But is it the right thing to do?
> 
> Yes.
> 
>> I noticed that not a lot of platforms/boards set GD_FLG_RELOC so
>> command history will probably cease to work for these boards also?
> 
> Most boards do the relocation and then it gets set by the common
> board_init_r() function.

All right then, my board is based ont he ARM926, so I have added
the code to my misc_init_r() function.

While looking into this problem, I think I have found a small
glitch with the original patch for the commit
597f6c26a18b389903a64692bacbf9a1ca69355b. I´m sending a patch
in a few minutes to try to correct it.

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

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [Junk released by Allow List] Command history no longer working

2008-05-29 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> Hi,
> I have observed that after this commit, the command history is no
> longer working:
> 
> ---
> commit 597f6c26a18b389903a64692bacbf9a1ca69355b
> Author: James Yang <[EMAIL PROTECTED]>
> Date:   Mon May 5 10:22:53 2008 -0500
> 
> Fix readline_into_buffer() with CONFIG_CMDLINE_EDITING before
> relocating
> 
> When CONFIG_CMDLINE_EDITING is enabled, readline_into_buffer()
> doesn't
> work before relocating to RAM because command history is written
> into
> a global array that is not writable before relocation.  This patch
> defers to the no-editing and no-history code in
> readline_into_buffer()
> if it is called before relocation.
> ---
> 
> Based on the comments, I dont understand why it ceases to work
> because, in my case, U-Boot runs entirely from RAM (it is copied from
> flash to RAM by a first stage bootloader).
> 
> I have CONFIG_CMDLINE_EDITING defined.

Well after reading through the code in common/main.c, I figured that
by setting GD_FLG_RELOC in my board init function:

  gd->flags |= GD_FLG_RELOC;

command history would be working again, and it did.

But is it the right thing to do?

I noticed that not a lot of platforms/boards set GD_FLG_RELOC so
command history will probably cease to work for these boards also?

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
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] Command history no longer working

2008-05-29 Thread Hugo Villeneuve
Hi,
I have observed that after this commit, the command history is no longer
working:

---
commit 597f6c26a18b389903a64692bacbf9a1ca69355b
Author: James Yang <[EMAIL PROTECTED]>
Date:   Mon May 5 10:22:53 2008 -0500

Fix readline_into_buffer() with CONFIG_CMDLINE_EDITING before
relocating

When CONFIG_CMDLINE_EDITING is enabled, readline_into_buffer()
doesn't
work before relocating to RAM because command history is written
into
a global array that is not writable before relocation.  This patch
defers to the no-editing and no-history code in
readline_into_buffer()
if it is called before relocation.
---

Based on the comments, I dont understand why it ceases to work because,
in my case, U-Boot runs entirely from RAM (it is copied from flash to
RAM by a first stage bootloader).

I have CONFIG_CMDLINE_EDITING defined.

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
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH V2] ARM: Add support for Lyrtech SFF-SDRboard (ARM926EJS)

2008-05-27 Thread Hugo Villeneuve
Detlev Zundel wrote:
> Hi Wolfgang and Hugo,
> 
> while studying the mail footer of Hugo, I found a slightly
> problematic phrasing:
> 
>> THIS MESSAGE AND ALL...
> 
> So Hugo, please get rid of that message or I will advise Wolfgang to
> heed your footer...

I got rid of the message.

Is everything fine with the patch now?

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

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH V5] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-05-22 Thread Hugo Villeneuve
ARM: This patch adds support for the Lyrtech SFF-SDR
board, based on the TI DaVinci architecture (ARM926EJS).

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
Signed-off-by: Philip Balister <[EMAIL PROTECTED]>
---

 CREDITS   |4 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/davinci/sffsdr/Makefile |   51 +
 board/davinci/sffsdr/board_init.S |   32 ++
 board/davinci/sffsdr/config.mk|   42 +++
 board/davinci/sffsdr/sffsdr.c |  217 +
 board/davinci/sffsdr/u-boot.lds   |   52 +
 include/asm-arm/mach-types.h  |   13 +++
 include/configs/davinci_sffsdr.h  |  174 +
 10 files changed, 589 insertions(+), 0 deletions(-)

diff --git a/CREDITS b/CREDITS
index e84ef38..37f55fe 100644
--- a/CREDITS
+++ b/CREDITS
@@ -533,3 +533,7 @@ N: Timo Tuunainen
 E: [EMAIL PROTECTED]
 D: Support for Artila M-501 starter kit
 W: http://www.sysart.fi/
+
+N: Philip Balister
+E: [EMAIL PROTECTED]
+D: Port to Lyrtech SFFSDR development board.
diff --git a/MAKEALL b/MAKEALL
index 37b4334..f53ceec 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -496,6 +496,7 @@ LIST_ARM9=" \
voiceblue   \
davinci_dvevm   \
davinci_schmoogie   \
+   davinci_sffsdr  \
davinci_sonata  \
 "
 
diff --git a/Makefile b/Makefile
index 6548f8e..05d90aa 100644
--- a/Makefile
+++ b/Makefile
@@ -2408,6 +2408,9 @@ davinci_dvevm_config :unconfig
 davinci_schmoogie_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
 
+davinci_sffsdr_config :unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci
+
 davinci_sonata_config :unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
 
diff --git a/board/davinci/sffsdr/Makefile b/board/davinci/sffsdr/Makefile
new file mode 100644
index 000..4413b33
--- /dev/null
+++ b/board/davinci/sffsdr/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# Copyright (C) 2007 Sergey Kubushyn <[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)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+SOBJS  := board_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak *~ .depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/davinci/sffsdr/board_init.S 
b/board/davinci/sffsdr/board_init.S
new file mode 100644
index 000..84ecd96
--- /dev/null
+++ b/board/davinci/sffsdr/board_init.S
@@ -0,0 +1,32 @@
+/*
+ * Board-specific low level initialization code. Called at the very end
+ * of cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no
+ * initialization required.
+ *
+ * Copyright (C) 2007 Sergey Kubushyn <[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, Su

Re: [U-Boot-Users] [PATCH V2] ARM: Add support for Lyrtech SFF-SDRboard (ARM926EJS)

2008-05-22 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> In message <[EMAIL PROTECTED]> you wrote:
>> 
>>> There are a lot of new files, and you sign these off, but I don't
>>> see your copyright notice in either of these. How comes? Didn't you
>>> modify this code?
>> 
>> The modifications are not extensive. We are not certain when to add
>> a copyright statement. 
>> 
>> Is there any specific guidance on this?
> 
> As a rule of thumb I'd say if you added  or  modified  more  than  10
> lines  of  code,  and/or  if you implemented a significant conceptual
> change, you should add your own copyright notice.
> 
> Best regards,
> 
> Wolfgang Denk

Thanks for the advice, I have modified the copyright notices
accordingly.

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

THIS MESSAGE AND ALL ATTACHED DOCUMENTS ARE EXCLUSIVELY INTENDED
TO THE INDICATED RECIPIENTS AND ITS CONTENTS MAY BE CONFIDENTIAL.
IT IS STRICTLY FORBIDDEN TO ANYONE TO TAKE COGNIZANCE, USE, OR
DIVULGE THE INFORMATION CONTAINED HEREIN. IF YOU MISTAKENLY
RECEIVE THIS MESSAGE, IMMEDIATELY INFORM LYRTECH AND DESTROY THE
MESSAGE AND ATTACHMENTS FORTHWITH.THANK YOU.

LE PRESENT MESSAGE ET LES DOCUMENTS QUI Y SONT JOINTS S'ADRESSENT
EXCLUSIVEMENT AU(X)DESTINATAIRE(S) INDIQUE(S) ET LEUR TENEUR PEUT
ETRE CONFIDENTIELLE. IL EST STRICTEMENT INTERDIT A QUICONQUE D'EN
PRENDRE CONNAISSANCE, DE LES UTILISER OU DE LES DIVULGUER. SI
VOUS RECEVEZ LE PRESENT MESSAGE PAR ERREUR, VEUILLEZ EN AVISER
LYRTECH IMMEDIATEMENT ET DETRUIRE LE MESSAGE SEANCE TENANTE,
AINSI QUE LES DOCUMENTS QUI Y SONT JOINTS.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH V4] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-05-22 Thread Hugo Villeneuve
ARM: This patch adds support for the Lyrtech SFF-SDR
board, based on the TI DaVinci architecture (ARM926EJS).

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
Signed-off-by: Philip Balister <[EMAIL PROTECTED]>
---

 CREDITS   |4 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/davinci/sffsdr/Makefile |   54 +
 board/davinci/sffsdr/board_init.S |   35 ++
 board/davinci/sffsdr/config.mk|   42 +++
 board/davinci/sffsdr/sffsdr.c |  217 +
 board/davinci/sffsdr/u-boot.lds   |   55 ++
 include/asm-arm/mach-types.h  |   13 +++
 include/configs/davinci_sffsdr.h  |  174 +
 10 files changed, 598 insertions(+), 0 deletions(-)

diff --git a/CREDITS b/CREDITS
index e84ef38..37f55fe 100644
--- a/CREDITS
+++ b/CREDITS
@@ -533,3 +533,7 @@ N: Timo Tuunainen
 E: [EMAIL PROTECTED]
 D: Support for Artila M-501 starter kit
 W: http://www.sysart.fi/
+
+N: Philip Balister
+E: [EMAIL PROTECTED]
+D: Port to Lyrtech SFFSDR development board.
diff --git a/MAKEALL b/MAKEALL
index 37b4334..f53ceec 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -496,6 +496,7 @@ LIST_ARM9=" \
voiceblue   \
davinci_dvevm   \
davinci_schmoogie   \
+   davinci_sffsdr  \
davinci_sonata  \
 "
 
diff --git a/Makefile b/Makefile
index 6548f8e..05d90aa 100644
--- a/Makefile
+++ b/Makefile
@@ -2408,6 +2408,9 @@ davinci_dvevm_config :unconfig
 davinci_schmoogie_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
 
+davinci_sffsdr_config :unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci
+
 davinci_sonata_config :unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
 
diff --git a/board/davinci/sffsdr/Makefile b/board/davinci/sffsdr/Makefile
new file mode 100644
index 000..baa0a0e
--- /dev/null
+++ b/board/davinci/sffsdr/Makefile
@@ -0,0 +1,54 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# Copyright (C) 2007 Sergey Kubushyn <[EMAIL PROTECTED]>
+#
+# Copyright (C) 2008 Lyrtech 
+# Copyright (C) 2008 Philip Balister <[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)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+SOBJS  := board_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak *~ .depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/davinci/sffsdr/board_init.S 
b/board/davinci/sffsdr/board_init.S
new file mode 100644
index 000..26fedd9
--- /dev/null
+++ b/board/davinci/sffsdr/board_init.S
@@ -0,0 +1,35 @@
+/*
+ * Board-specific low level initialization code. Called at the very end
+ * of cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no
+ * initialization required.
+ *
+ * Copyright (C) 2007 Sergey Kubushyn <[EMAIL PROTECTED]>
+ *
+ * Copyright (C) 2008 Lyrtech 
+ * Copyright (C) 2008 Philip Balister <[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 Lic

Re: [U-Boot-Users] [PATCH V2] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-05-22 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> Wolfgang Denk wrote:
>> In message
>> <[EMAIL PROTECTED]> you
>> wrote:  
>>> ARM: This patch adds support for the Lyrtech SFF-SDR
>>> board, based on the TI DaVinci architecture (ARM926EJS).
>>> 
>>> Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
>>> Signed-off-by: Philip Balister <[EMAIL PROTECTED]>
>> 
>> There are a lot of new files, and you sign these off, but I don't see
>> your copyright notice in either of these. How comes? Didn't you
>> modify 
>> this code?
> 
> The modifications are not extensive. We are not certain when to add a
> copyright statement.
> 
> Is there any specific guidance on this?
> 
> Philip

I didn´t find anything on the subject. Although there was some information
with the GPL license basically saying that you need to put your own
copyright and then put a copy of the license.

In any way, I think that it passed the Wolfgang "filter", because he is
driving me crazy with something else :)

If we have some advice for the copyright after the patch is accepted, we
will adjust it then...

Bye, 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

THIS MESSAGE AND ALL ATTACHED DOCUMENTS ARE EXCLUSIVELY INTENDED
TO THE INDICATED RECIPIENTS AND ITS CONTENTS MAY BE CONFIDENTIAL.
IT IS STRICTLY FORBIDDEN TO ANYONE TO TAKE COGNIZANCE, USE, OR
DIVULGE THE INFORMATION CONTAINED HEREIN. IF YOU MISTAKENLY
RECEIVE THIS MESSAGE, IMMEDIATELY INFORM LYRTECH AND DESTROY THE
MESSAGE AND ATTACHMENTS FORTHWITH.THANK YOU.

LE PRESENT MESSAGE ET LES DOCUMENTS QUI Y SONT JOINTS S'ADRESSENT
EXCLUSIVEMENT AU(X)DESTINATAIRE(S) INDIQUE(S) ET LEUR TENEUR PEUT
ETRE CONFIDENTIELLE. IL EST STRICTEMENT INTERDIT A QUICONQUE D'EN
PRENDRE CONNAISSANCE, DE LES UTILISER OU DE LES DIVULGUER. SI
VOUS RECEVEZ LE PRESENT MESSAGE PAR ERREUR, VEUILLEZ EN AVISER
LYRTECH IMMEDIATEMENT ET DETRUIRE LE MESSAGE SEANCE TENANTE,
AINSI QUE LES DOCUMENTS QUI Y SONT JOINTS.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH V3] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-05-22 Thread Hugo Villeneuve
[EMAIL PROTECTED] wrote:
> In message
> <[EMAIL PROTECTED]> you
> wrote:  
>> ARM: This patch adds support for the Lyrtech SFF-SDR
>> board, based on the TI DaVinci architecture (ARM926EJS).
>> 
>> Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
>> Signed-off-by: Philip Balister <[EMAIL PROTECTED]> ...
>> +#define CONFIG_BOOTCOMMAND  "setenv setboot;run setboot"
> 
> That's even worse. The first part ("setenv setboot" will  delete  the
> "setboot"  variable,  so  the second part ("run setboot") will always
> just raise an error message.
> 
> Please review what exactly you are tyring to do here...

I´m trying to not do anything at all... I don´t need anything
special in CONFIG_BOOTCOMMAND.

I will resubmit with an empty CONFIG_BOOTCOMMAND like this:
#define CONFIG_BOOTCOMMAND  " "

unless, of course, it is not to your liking, in which case please
tell me how to do it.

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

THIS MESSAGE AND ALL ATTACHED DOCUMENTS ARE EXCLUSIVELY INTENDED
TO THE INDICATED RECIPIENTS AND ITS CONTENTS MAY BE CONFIDENTIAL.
IT IS STRICTLY FORBIDDEN TO ANYONE TO TAKE COGNIZANCE, USE, OR
DIVULGE THE INFORMATION CONTAINED HEREIN. IF YOU MISTAKENLY
RECEIVE THIS MESSAGE, IMMEDIATELY INFORM LYRTECH AND DESTROY THE
MESSAGE AND ATTACHMENTS FORTHWITH.THANK YOU.

LE PRESENT MESSAGE ET LES DOCUMENTS QUI Y SONT JOINTS S'ADRESSENT
EXCLUSIVEMENT AU(X)DESTINATAIRE(S) INDIQUE(S) ET LEUR TENEUR PEUT
ETRE CONFIDENTIELLE. IL EST STRICTEMENT INTERDIT A QUICONQUE D'EN
PRENDRE CONNAISSANCE, DE LES UTILISER OU DE LES DIVULGUER. SI
VOUS RECEVEZ LE PRESENT MESSAGE PAR ERREUR, VEUILLEZ EN AVISER
LYRTECH IMMEDIATEMENT ET DETRUIRE LE MESSAGE SEANCE TENANTE,
AINSI QUE LES DOCUMENTS QUI Y SONT JOINTS.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH V3] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-05-22 Thread Hugo Villeneuve
ARM: This patch adds support for the Lyrtech SFF-SDR
board, based on the TI DaVinci architecture (ARM926EJS).

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
Signed-off-by: Philip Balister <[EMAIL PROTECTED]>
---

 CREDITS   |4 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/davinci/sffsdr/Makefile |   54 +
 board/davinci/sffsdr/board_init.S |   35 ++
 board/davinci/sffsdr/config.mk|   42 +++
 board/davinci/sffsdr/sffsdr.c |  217 +
 board/davinci/sffsdr/u-boot.lds   |   55 ++
 include/asm-arm/mach-types.h  |   13 +++
 include/configs/davinci_sffsdr.h  |  175 ++
 10 files changed, 599 insertions(+), 0 deletions(-)

diff --git a/CREDITS b/CREDITS
index e84ef38..37f55fe 100644
--- a/CREDITS
+++ b/CREDITS
@@ -533,3 +533,7 @@ N: Timo Tuunainen
 E: [EMAIL PROTECTED]
 D: Support for Artila M-501 starter kit
 W: http://www.sysart.fi/
+
+N: Philip Balister
+E: [EMAIL PROTECTED]
+D: Port to Lyrtech SFFSDR development board.
diff --git a/MAKEALL b/MAKEALL
index 37b4334..f53ceec 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -496,6 +496,7 @@ LIST_ARM9=" \
voiceblue   \
davinci_dvevm   \
davinci_schmoogie   \
+   davinci_sffsdr  \
davinci_sonata  \
 "
 
diff --git a/Makefile b/Makefile
index 6548f8e..05d90aa 100644
--- a/Makefile
+++ b/Makefile
@@ -2408,6 +2408,9 @@ davinci_dvevm_config :unconfig
 davinci_schmoogie_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
 
+davinci_sffsdr_config :unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci
+
 davinci_sonata_config :unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
 
diff --git a/board/davinci/sffsdr/Makefile b/board/davinci/sffsdr/Makefile
new file mode 100644
index 000..baa0a0e
--- /dev/null
+++ b/board/davinci/sffsdr/Makefile
@@ -0,0 +1,54 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# Copyright (C) 2007 Sergey Kubushyn <[EMAIL PROTECTED]>
+#
+# Copyright (C) 2008 Lyrtech 
+# Copyright (C) 2008 Philip Balister <[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)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+SOBJS  := board_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak *~ .depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/davinci/sffsdr/board_init.S 
b/board/davinci/sffsdr/board_init.S
new file mode 100644
index 000..26fedd9
--- /dev/null
+++ b/board/davinci/sffsdr/board_init.S
@@ -0,0 +1,35 @@
+/*
+ * Board-specific low level initialization code. Called at the very end
+ * of cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no
+ * initialization required.
+ *
+ * Copyright (C) 2007 Sergey Kubushyn <[EMAIL PROTECTED]>
+ *
+ * Copyright (C) 2008 Lyrtech 
+ * Copyright (C) 2008 Philip Balister <[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 Lic

[U-Boot-Users] [PATCH V2] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-05-22 Thread Hugo Villeneuve
ARM: This patch adds support for the Lyrtech SFF-SDR
board, based on the TI DaVinci architecture (ARM926EJS).

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
Signed-off-by: Philip Balister <[EMAIL PROTECTED]>
---

 MAKEALL   |1 +
 Makefile  |3 +
 board/davinci/sffsdr/Makefile |   52 +
 board/davinci/sffsdr/board_init.S |   29 +
 board/davinci/sffsdr/config.mk|   24 
 board/davinci/sffsdr/sffsdr.c |  214 +
 board/davinci/sffsdr/u-boot.lds   |   52 +
 include/asm-arm/mach-types.h  |   13 +++
 include/configs/davinci_sffsdr.h  |  173 ++
 9 files changed, 561 insertions(+), 0 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 37b4334..f53ceec 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -496,6 +496,7 @@ LIST_ARM9=" \
voiceblue   \
davinci_dvevm   \
davinci_schmoogie   \
+   davinci_sffsdr  \
davinci_sonata  \
 "
 
diff --git a/Makefile b/Makefile
index 6548f8e..05d90aa 100644
--- a/Makefile
+++ b/Makefile
@@ -2408,6 +2408,9 @@ davinci_dvevm_config :unconfig
 davinci_schmoogie_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
 
+davinci_sffsdr_config :unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci
+
 davinci_sonata_config :unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
 
diff --git a/board/davinci/sffsdr/Makefile b/board/davinci/sffsdr/Makefile
new file mode 100644
index 000..8abee11
--- /dev/null
+++ b/board/davinci/sffsdr/Makefile
@@ -0,0 +1,52 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# Copyright (C) 2007 Sergey Kubushyn <[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)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+SOBJS  := board_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak *~ .depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/davinci/sffsdr/board_init.S 
b/board/davinci/sffsdr/board_init.S
new file mode 100644
index 000..22d8adc
--- /dev/null
+++ b/board/davinci/sffsdr/board_init.S
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2007 Sergey Kubushyn <[EMAIL PROTECTED]>
+ *
+ * Board-specific low level initialization code. Called at the very end
+ * of cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no
+ * initialization required.
+ *
+ * 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 
+
+.globl dv_board_init
+dv_board_init:
+
+   mov pc, lr
diff --git a/board/davinci/sffsdr/config.mk b/board/davinci/sffsdr/config.mk
new file mode 100644
index 000..e8a329c
--- /dev/null
+++ b/board/davinci/sffsdr/config.mk
@@ -0,0 +1,24 @@
+#
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, <[EMAIL PROTECTED]>
+# David Mueller, ELSOFT A

[U-Boot-Users] [PATCH] ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS)

2008-05-21 Thread Hugo Villeneuve
ARM: This patch adds support for the Lyrtech SFF-SDR
board, based on the TI DaVinci architecture (ARM926EJS).

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
Signed-off-by: Philip Balister <[EMAIL PROTECTED]>
---

 MAKEALL   |1 +
 Makefile  |3 +
 board/davinci/sffsdr/Makefile |   52 +
 board/davinci/sffsdr/board_init.S |   29 +
 board/davinci/sffsdr/config.mk|   24 
 board/davinci/sffsdr/dv_board.c   |  212 +
 board/davinci/sffsdr/u-boot.lds   |   52 +
 include/asm-arm/mach-types.h  |   13 +++
 include/configs/davinci_sffsdr.h  |  177 +++
 9 files changed, 563 insertions(+), 0 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 37b4334..f53ceec 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -496,6 +496,7 @@ LIST_ARM9=" \
voiceblue   \
davinci_dvevm   \
davinci_schmoogie   \
+   davinci_sffsdr  \
davinci_sonata  \
 "
 
diff --git a/Makefile b/Makefile
index 6548f8e..05d90aa 100644
--- a/Makefile
+++ b/Makefile
@@ -2408,6 +2408,9 @@ davinci_dvevm_config :unconfig
 davinci_schmoogie_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci
 
+davinci_sffsdr_config :unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci
+
 davinci_sonata_config :unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
 
diff --git a/board/davinci/sffsdr/Makefile b/board/davinci/sffsdr/Makefile
new file mode 100644
index 000..fa00138
--- /dev/null
+++ b/board/davinci/sffsdr/Makefile
@@ -0,0 +1,52 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# Copyright (C) 2007 Sergey Kubushyn <[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)lib$(BOARD).a
+
+COBJS  := dv_board.o
+SOBJS  := board_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak *~ .depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/davinci/sffsdr/board_init.S 
b/board/davinci/sffsdr/board_init.S
new file mode 100644
index 000..22d8adc
--- /dev/null
+++ b/board/davinci/sffsdr/board_init.S
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2007 Sergey Kubushyn <[EMAIL PROTECTED]>
+ *
+ * Board-specific low level initialization code. Called at the very end
+ * of cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no
+ * initialization required.
+ *
+ * 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 
+
+.globl dv_board_init
+dv_board_init:
+
+   mov pc, lr
diff --git a/board/davinci/sffsdr/config.mk b/board/davinci/sffsdr/config.mk
new file mode 100644
index 000..e8a329c
--- /dev/null
+++ b/board/davinci/sffsdr/config.mk
@@ -0,0 +1,24 @@
+#
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, <[EMAIL PROTECTED]>
+# David Mueller, ELSO

Re: [U-Boot-Users] [PATCH] Fix NAND erase progress error

2008-05-16 Thread Hugo Villeneuve
Scott Wood wrote:
> Hugo Villeneuve wrote:
>> Scott Wood wrote:
>>> Hugo Villeneuve wrote:
>>>> I would be perfectly happy if the mtd driver reported a warning
>>>> when the requested erase size is not an exact multiple of the
>>>> block size, and allow the whole block erase to proceed. Then my
>>>> patch would make sense.
>>> That's what the mtd-2.6.22.1 branch in the NAND repository does.  I
>>> think it should reject such requests, though.
>> 
>> I don´t like that behavior. Let´s say that I want to program a new
>> binary application of 2.8MB. I want to be able to simply erase 2.8MB,
>> without having to do fancy math computations on my calculator based
>> on the block size :)
> 
> Hmm... maybe a flag to request round-up?

Yes, maybe some kind of "-f" force flag to continue even if the
requested size is less than a block...

>  Or at the very least, have
> "help nand" mention the rounding-up behavior.

I agree.

Either way, I think my patch, or a variation of it, should need to be
applied to get rid of that ugly 6400%.

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

THIS MESSAGE AND ALL ATTACHED DOCUMENTS ARE EXCLUSIVELY INTENDED
TO THE INDICATED RECIPIENTS AND ITS CONTENTS MAY BE CONFIDENTIAL.
IT IS STRICTLY FORBIDDEN TO ANYONE TO TAKE COGNIZANCE, USE, OR
DIVULGE THE INFORMATION CONTAINED HEREIN. IF YOU MISTAKENLY
RECEIVE THIS MESSAGE, IMMEDIATELY INFORM LYRTECH AND DESTROY THE
MESSAGE AND ATTACHMENTS FORTHWITH.THANK YOU.

LE PRESENT MESSAGE ET LES DOCUMENTS QUI Y SONT JOINTS S'ADRESSENT
EXCLUSIVEMENT AU(X)DESTINATAIRE(S) INDIQUE(S) ET LEUR TENEUR PEUT
ETRE CONFIDENTIELLE. IL EST STRICTEMENT INTERDIT A QUICONQUE D'EN
PRENDRE CONNAISSANCE, DE LES UTILISER OU DE LES DIVULGUER. SI
VOUS RECEVEZ LE PRESENT MESSAGE PAR ERREUR, VEUILLEZ EN AVISER
LYRTECH IMMEDIATEMENT ET DETRUIRE LE MESSAGE SEANCE TENANTE,
AINSI QUE LES DOCUMENTS QUI Y SONT JOINTS.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Fix NAND erase progress error

2008-05-16 Thread Hugo Villeneuve
Scott Wood wrote:
> Hugo Villeneuve wrote:
>> I would be perfectly happy if the mtd driver reported a warning when
>> the requested erase size is not an exact multiple of the block size,
>> and allow the whole block erase to proceed. Then my patch would make
>> sense. 
> 
> That's what the mtd-2.6.22.1 branch in the NAND repository does.  I
> think it should reject such requests, though.

I don´t like that behavior. Let´s say that I want to program a new
binary application of 2.8MB. I want to be able to simply erase 2.8MB,
without having to do fancy math computations on my calculator based
on the block size :)

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

THIS MESSAGE AND ALL ATTACHED DOCUMENTS ARE EXCLUSIVELY INTENDED
TO THE INDICATED RECIPIENTS AND ITS CONTENTS MAY BE CONFIDENTIAL.
IT IS STRICTLY FORBIDDEN TO ANYONE TO TAKE COGNIZANCE, USE, OR
DIVULGE THE INFORMATION CONTAINED HEREIN. IF YOU MISTAKENLY
RECEIVE THIS MESSAGE, IMMEDIATELY INFORM LYRTECH AND DESTROY THE
MESSAGE AND ATTACHMENTS FORTHWITH.THANK YOU.

LE PRESENT MESSAGE ET LES DOCUMENTS QUI Y SONT JOINTS S'ADRESSENT
EXCLUSIVEMENT AU(X)DESTINATAIRE(S) INDIQUE(S) ET LEUR TENEUR PEUT
ETRE CONFIDENTIELLE. IL EST STRICTEMENT INTERDIT A QUICONQUE D'EN
PRENDRE CONNAISSANCE, DE LES UTILISER OU DE LES DIVULGUER. SI
VOUS RECEVEZ LE PRESENT MESSAGE PAR ERREUR, VEUILLEZ EN AVISER
LYRTECH IMMEDIATEMENT ET DETRUIRE LE MESSAGE SEANCE TENANTE,
AINSI QUE LES DOCUMENTS QUI Y SONT JOINTS.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Fix NAND erase progress error

2008-05-16 Thread Hugo Villeneuve
Scott Wood wrote:
> Hugo Villeneuve wrote:
>> Scott Wood wrote:
>>> That should be an error.
>> 
>> What should be an error, the fact that 6400% is displayed, or the
>> fact that the user is trying to erase less than a block? :)
> 
> The latter.  It should tell the user what the erase block size is, and
> abort.
> 
> -Scott

I would be perfectly happy if the mtd driver reported a warning when the
requested erase size is not an exact multiple of the block size, and
allow the whole block erase to proceed. Then my patch would make sense.
Right now, there is not even a warning displayed...

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

THIS MESSAGE AND ALL ATTACHED DOCUMENTS ARE EXCLUSIVELY INTENDED
TO THE INDICATED RECIPIENTS AND ITS CONTENTS MAY BE CONFIDENTIAL.
IT IS STRICTLY FORBIDDEN TO ANYONE TO TAKE COGNIZANCE, USE, OR
DIVULGE THE INFORMATION CONTAINED HEREIN. IF YOU MISTAKENLY
RECEIVE THIS MESSAGE, IMMEDIATELY INFORM LYRTECH AND DESTROY THE
MESSAGE AND ATTACHMENTS FORTHWITH.THANK YOU.

LE PRESENT MESSAGE ET LES DOCUMENTS QUI Y SONT JOINTS S'ADRESSENT
EXCLUSIVEMENT AU(X)DESTINATAIRE(S) INDIQUE(S) ET LEUR TENEUR PEUT
ETRE CONFIDENTIELLE. IL EST STRICTEMENT INTERDIT A QUICONQUE D'EN
PRENDRE CONNAISSANCE, DE LES UTILISER OU DE LES DIVULGUER. SI
VOUS RECEVEZ LE PRESENT MESSAGE PAR ERREUR, VEUILLEZ EN AVISER
LYRTECH IMMEDIATEMENT ET DETRUIRE LE MESSAGE SEANCE TENANTE,
AINSI QUE LES DOCUMENTS QUI Y SONT JOINTS.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Fix NAND erase progress error

2008-05-16 Thread Hugo Villeneuve
Scott Wood wrote:
> On Fri, May 16, 2008 at 02:39:17PM -0400, Hugo Villeneuve wrote:
>> This patch fixes an error when reporting the NAND erase progress as
>>   in this example: U-Boot > nand erase  800
>>   NAND erase: device 0 offset 0x0, size 0x800
>>   Erasing at 0x0 -- 6400% complete.
> 
> So the problem is when trying to erase less than an erase block
> boundary?

The problem seems to be present if the requested erase size is not an
exact multiple of the block size.

> That should be an error.

What should be an error, the fact that 6400% is displayed, or the fact
that the user is trying to erase less than a block? :)

> The mtd-2.6.22.1 branch emits a warning and increases the length to
> be erased if it's less than one block, but that's still wrong as it
> won't deal with unaligned lengths that are greater than one
> blocksize, and more importantly because it's rather dangerous to
> erase more than was asked for without the user having the ability to
> stop it after the warning is printed.

Here are other examples:
---
U-Boot > nand erase 10 00800
NAND erase: device 0 offset 0x10, size 0x800
Erasing at 0x10 -- 6400% complete.
OK

U-Boot > nand erase 10 2
NAND erase: device 0 offset 0x10, size 0x2
Erasing at 0x10 -- 100% complete.
OK

U-Boot > nand erase 10 4
NAND erase: device 0 offset 0x10, size 0x4
Erasing at 0x12 -- 100% complete.
OK

U-Boot > nand erase 10 40800
NAND erase: device 0 offset 0x10, size 0x40800
Erasing at 0x14 -- 148% complete.
OK
---


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

THIS MESSAGE AND ALL ATTACHED DOCUMENTS ARE EXCLUSIVELY INTENDED
TO THE INDICATED RECIPIENTS AND ITS CONTENTS MAY BE CONFIDENTIAL.
IT IS STRICTLY FORBIDDEN TO ANYONE TO TAKE COGNIZANCE, USE, OR
DIVULGE THE INFORMATION CONTAINED HEREIN. IF YOU MISTAKENLY
RECEIVE THIS MESSAGE, IMMEDIATELY INFORM LYRTECH AND DESTROY THE
MESSAGE AND ATTACHMENTS FORTHWITH.THANK YOU.

LE PRESENT MESSAGE ET LES DOCUMENTS QUI Y SONT JOINTS S'ADRESSENT
EXCLUSIVEMENT AU(X)DESTINATAIRE(S) INDIQUE(S) ET LEUR TENEUR PEUT
ETRE CONFIDENTIELLE. IL EST STRICTEMENT INTERDIT A QUICONQUE D'EN
PRENDRE CONNAISSANCE, DE LES UTILISER OU DE LES DIVULGUER. SI
VOUS RECEVEZ LE PRESENT MESSAGE PAR ERREUR, VEUILLEZ EN AVISER
LYRTECH IMMEDIATEMENT ET DETRUIRE LE MESSAGE SEANCE TENANTE,
AINSI QUE LES DOCUMENTS QUI Y SONT JOINTS.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] Fix NAND erase progress error

2008-05-16 Thread Hugo Villeneuve
This patch fixes an error when reporting the NAND erase
progress as in this example:
  U-Boot > nand erase  800
  NAND erase: device 0 offset 0x0, size 0x800
  Erasing at 0x0 -- 6400% complete.

Signed-off-by: Hugo Villeneuve <[EMAIL PROTECTED]>
---

 drivers/mtd/nand/nand_util.c |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 6c5624a..bd21e04 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -209,10 +209,15 @@ int nand_erase_opts(nand_info_t *meminfo, const 
nand_erase_options_t *opts)
}
 
if (!opts->quiet) {
-   unsigned long long n =(unsigned long long)
-   (erase.addr + meminfo->erasesize - opts->offset)
-   * 100;
+   unsigned long long n;
int percent;
+   size_t erased_size = erase.addr - opts->offset + 
meminfo->erasesize;
+
+   if (erased_size > erase_length) {
+   erased_size = erase_length;
+   }
+
+   n = (unsigned long long) erased_size * 100;
 
do_div(n, erase_length);
percent = (int)n;

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] Fix NAND erase progress error

2008-05-15 Thread Hugo Villeneuve
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 6c5624a..bd21e04 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -209,10 +209,15 @@ int nand_erase_opts(nand_info_t *meminfo, const 
nand_erase_options_t *opts)
}
 
if (!opts->quiet) {
-   unsigned long long n =(unsigned long long)
-   (erase.addr + meminfo->erasesize - opts->offset)
-   * 100;
+   unsigned long long n;
int percent;
+   size_t erased_size = erase.addr - opts->offset + 
meminfo->erasesize;
+
+   if (erased_size > erase_length) {
+   erased_size = erase_length;
+   }
+
+   n = (unsigned long long) erased_size * 100;
 
do_div(n, erase_length);
percent = (int)n;

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users