Re: [U-Boot-Users] [patch] DM9000 fix status check fail 0x6d error for trizeps board

2008-06-06 Thread Ben Warren
On Thu, Jun 5, 2008 at 4:03 AM, Remy Bohmer [EMAIL PROTECTED] wrote:
 According to the Application Notes of the DM9000, only the 2 bits 0:1 of
 the status byte need to be checked to identify a valid packet in the fifo

 But, The several different Application Notes do not all speak the same
 language on these bits. They do not disagree, but only 1 Application Note
 noted explicitly that only these 2 bits need to be checked.
 Even the datasheets do not mention anything about these 2 bits.

 Because the old code, and the kernel check the whole byte, I left this piece
 untouched.

 However, I tested all board/DM9000[A|E|EP] devices with this 2 bit check, so
 it should work.

 Notice, that the 2nd iteration through this receive loop (when a 2nd packet is
 in the fifo) is much shorter now, compared to the older U-boot driver code,
 so that we can maybe run into a hardware condition now that was never seen
 before, or maybe was seen very unfrequently.

 Additionaly added a cleanup of a stack variable.

 Signed-off-by: Remy Bohmer [EMAIL PROTECTED]



Applied to net repo.  Thanks!

Stefano, please test from the net repo if you can on your Trizeps board.

regards,
Ben

-
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


Re: [U-Boot-Users] [PATCH][AT91][Re-submit] DataFlash AT45DB021 support

2008-06-06 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:06 Thu 05 Jun , Sergey Lapin wrote:
 Some boards based on AT91SAM926X-EK use smaller DF chips to keep
 bootstrap, u-boot and its environment, using NAND or other external
 storage for kernel and rootfs. This patch adds support for
 small 1024x263 chip.
 
 Signed-off-by: Sergey Lapin [EMAIL PROTECTED]
Scott will you handle this patch or I will do?

Best Regards,
J.

-
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


Re: [U-Boot-Users] LL_TEMAC on Avnet MiniModule-FX12

2008-06-06 Thread Michal Simek
Hi Llandre,

that's why you use opb_emac driver for ll_temac. That's all. Different driver
and different ip_core.

Regards,
Michal


 Hi all,
 
 I ported U-Boot 1.3.1 on Avnet MiniModule-FX12 (the repository I'm 
 working with has been patched previously with ML403 patch). Here is my 
 first dirty patch:
 
 http://www.dave.eu/download/misc/mmfx12/mmfx12-0.8.3.patch
 
 U-Boot works fine and it boots correctly from flash, however ethernet 
 interface (LL_TEMAC) does not work.
 For example, when I try to perform a TFTP download, the XEmac_PollSend 
 function never returns because the following loop never ends:
 
 /*
   * Loop on the MAC's status to wait for the transmit to complete. The
   * transmit status is in the FIFO when the XMIT_DONE bit is set.
   */
 do {
  IntrStatus = XIIF_V123B_READ_IISR(InstancePtr-BaseAddress);
 }
 while ((IntrStatus  XEM_EIR_XMIT_DONE_MASK) == 0);
 
 Please note that the FPGA bitstream is ok because the linux kernel works 
 fine and can mount root file system via NFS so I pretty sure something 
 is wrong in my U-Boot port.
 
 Anybody experienced similar problems?
 
 
 TIA,
 llandre
 
 DAVE Electronics System House - RD Department
 web:   http://www.dave.eu
 email: r[EMAIL PROTECTED]
 
 -
 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
 


-
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


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

2008-06-06 Thread Jean-Christophe PLAGNIOL-VILLARD
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.

-
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] sh: SH7763 SCIF support

2008-06-06 Thread Nobuhiro Iwamatsu
SH7763 has 3 SCIF channels. SCIF0 and 1 are same register constitution,
but only SCIF2 is different. This patch work all SCIF channel.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/serial/serial_sh.c |  128 +---
 1 files changed, 73 insertions(+), 55 deletions(-)

diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index aa4ff35..0801ac4 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -26,6 +26,8 @@
 #define SCIF_BASE  SCIF0_BASE
 #elif defined (CONFIG_CONS_SCIF1)
 #define SCIF_BASE  SCIF1_BASE
+#elif defined (CONFIG_CONS_SCIF2)
+#define SCIF_BASE  SCIF2_BASE
 #else
 #error Default SCIF doesn't set.
 #endif
@@ -36,17 +38,17 @@
 #define SCSCR  (vu_short *)(SCIF_BASE + 0x8)
 #define SCFCR  (vu_short *)(SCIF_BASE + 0x18)
 #define SCFDR  (vu_short *)(SCIF_BASE + 0x1C)
-#ifdef CONFIG_CPU_SH7720 /* SH7720 specific */
-# define SCFSR (vu_short *)(SCIF_BASE + 0x14) /* SCSSR */
+#ifdef CONFIG_CPU_SH7720   /* SH7720 specific */
+# define SCFSR (vu_short *)(SCIF_BASE + 0x14)  /* SCSSR */
 # define SCFTDR(vu_char  *)(SCIF_BASE + 0x20)
 # define SCFRDR(vu_char  *)(SCIF_BASE + 0x24)
 #else
 # define SCFTDR (vu_char  *)(SCIF_BASE + 0xC)
-# define SCFSR (vu_short *)(SCIF_BASE + 0x10)
+# define SCFSR (vu_short *)(SCIF_BASE + 0x10)
 # define SCFRDR (vu_char  *)(SCIF_BASE + 0x14)
 #endif

-#if defined(CONFIG_CPU_SH7780) || \
+#ifdefined(CONFIG_CPU_SH7780) || \
defined(CONFIG_CPU_SH7785)
 # define SCRFDR(vu_short *)(SCIF_BASE + 0x20)
 # define SCSPTR(vu_short *)(SCIF_BASE + 0x24)
@@ -54,20 +56,34 @@
 # define SCRER (vu_short *)(SCIF_BASE + 0x2C)
 # define LSR_ORER  1
 # define FIFOLEVEL_MASK0xFF
+#elif defined(CONFIG_CPU_SH7763)
+# if defined (CONFIG_CONS_SCIF2)
+# define SCSPTR(vu_short *)(SCIF_BASE + 0x20)
+# define SCLSR (vu_short *)(SCIF_BASE + 0x24)
+# define LSR_ORER  1
+# define FIFOLEVEL_MASK0x1F
+# else
+# define SCRFDR(vu_short *)(SCIF_BASE + 0x20)
+# define SCSPTR(vu_short *)(SCIF_BASE + 0x24)
+# define SCLSR (vu_short *)(SCIF_BASE + 0x28)
+# define SCRER (vu_short *)(SCIF_BASE + 0x2C)
+# define LSR_ORER  1
+# define FIFOLEVEL_MASK0xFF
+# endif
 #elif defined(CONFIG_CPU_SH7750) || \
defined(CONFIG_CPU_SH7751) || \
defined(CONFIG_CPU_SH7722)
 # define SCSPTR(vu_short *)(SCIF_BASE + 0x20)
-# define SCLSR (vu_short *)(SCIF_BASE + 0x24)
+# define SCLSR (vu_short *)(SCIF_BASE + 0x24)
 # define LSR_ORER  1
 # define FIFOLEVEL_MASK0x1F
 #elif defined(CONFIG_CPU_SH7720)
-# define SCLSR  (vu_short *)(SCIF_BASE + 0x24)
+# define SCLSR (vu_short *)(SCIF_BASE + 0x24)
 # define LSR_ORER  0x0200
 # define FIFOLEVEL_MASK0x1F
-#elif defined(CONFIG_CPU_SH7710)
+#elif defined(CONFIG_CPU_SH7710) || \
defined(CONFIG_CPU_SH7712)
-# define SCLSR SCFSR   /* SCSSR */
+# define SCLSR SCFSR   /* SCSSR */
 # define LSR_ORER  1
 # define FIFOLEVEL_MASK0x1F
 #endif
@@ -75,34 +91,34 @@
 /* SCBRR register value setting */
 #if defined(CONFIG_CPU_SH7720)
 # define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1)
-#else  /* Generic SuperH */
+#else /* Generic SuperH */
 # define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(32*bps)-1)
 #endif

-#define SCR_RE (1  4)
-#define SCR_TE (1  5)
-#define FCR_RFRST  (1  1) /* RFCL */
-#define FCR_TFRST  (1  2) /* TFCL */
-#define FSR_DR (1  0)
-#define FSR_RDF(1  1)
-#define FSR_FER(1  3)
-#define FSR_BRK(1  4)
-#define FSR_FER(1  3)
-#define FSR_TEND   (1  6)
-#define FSR_ER (1  7)
+#define SCR_RE (1  4)
+#define SCR_TE (1  5)
+#define FCR_RFRST  (1  1)/* RFCL */
+#define FCR_TFRST  (1  2)/* TFCL */
+#define FSR_DR (1  0)
+#define FSR_RDF(1  1)
+#define FSR_FER(1  3)
+#define FSR_BRK(1  4)
+#define FSR_FER(1  3)
+#define FSR_TEND   (1  6)
+#define FSR_ER (1  7)

 /*--*/

-void serial_setbrg (void)
+void serial_setbrg(void)
 {
DECLARE_GLOBAL_DATA_PTR;
-   *SCBRR = SCBRR_VALUE(gd-baudrate,CONFIG_SYS_CLK_FREQ);
+   *SCBRR = SCBRR_VALUE(gd-baudrate, CONFIG_SYS_CLK_FREQ);
 }

-int serial_init (void)
+int serial_init(void)
 {
*SCSCR = (SCR_RE | SCR_TE);
-   *SCSMR = 0 ;
+   *SCSMR = 0;
*SCSMR = 0;
*SCFCR = (FCR_RFRST | FCR_TFRST);
*SCFCR;
@@ -112,21 +128,21 @@ int serial_init (void)
return 0;
 }

-static int serial_rx_fifo_level (void)
+static int serial_rx_fifo_level(void)
 {
-#if defined(CONFIG_SH4A)
+#if defined(SCRFDR)
return (*SCRFDR  0)  FIFOLEVEL_MASK;
 #else
return (*SCFDR  0)  FIFOLEVEL_MASK;
 #endif
 }

-void 

[U-Boot-Users] [PATCH] net: sh: Renesas SH7763 Ethernet device support

2008-06-06 Thread Nobuhiro Iwamatsu
Renesas SH7763 has 2 channel Ethernet device.
This is 10/100/1000 Base support.
But this patch check 10/100 Base only.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/net/Makefile |1 +
 drivers/net/sh_eth.c |  599 ++
 drivers/net/sh_eth.h |  195 
 3 files changed, 795 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/sh_eth.c
 create mode 100644 drivers/net/sh_eth.h

diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 5b031c9..e2a6b35 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -66,6 +66,7 @@ COBJS-y += uli526x.o
 COBJS-y += vsc7385.o
 COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o
 COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
+COBJS-$(CONFIG_SH_ETHER) += sh_eth.o

 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
new file mode 100644
index 000..869a8f0
--- /dev/null
+++ b/drivers/net/sh_eth.c
@@ -0,0 +1,599 @@
+/*
+ * sh_eth.c - Driver for Renesas SH7763's ethernet controler.
+ *
+ * Copyright (C) 2008 Renesas Solutions Corp.
+ * Copyright (c) 2008 Nobuhiro Iwamatsu
+ * Copyright (c) 2007 Carlos Munoz [EMAIL PROTECTED]
+ *
+ * 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 config.h
+#include common.h
+#include malloc.h
+#include net.h
+#include asm/errno.h
+
+#include sh_eth.h
+
+#ifndef CONFIG_SH_ETHER_USE_PORT
+# error Please define CONFIG_SH_ETHER_USE_PORT
+#endif
+#ifndef CONFIG_SH_ETHER_PHY_ADDR
+# error Please define CONFIG_SH_ETHER_PHY_ADDR
+#endif
+
+extern int eth_init(bd_t *bd);
+extern void eth_halt(void);
+extern int eth_rx(void);
+extern int eth_send(volatile void *packet, int length);
+
+static struct dev_info_s *dev;
+
+/*
+ * Bits are written to the PHY serially using the
+ * PIR register, just like a bit banger.
+ */
+static void sh_eth_mii_write_phy_bits(int port, u32 val, int len)
+{
+   int i;
+   u32 pir;
+
+   /* Bit positions is 1 less than the number of bits */
+   for (i = len - 1; i = 0; i--) {
+   /* Write direction, bit to write, clock is low */
+   pir = 2 | ((val  1  i) ? 1  2 : 0);
+   OUT32(PIR(port), pir);
+   PHY_DELAY;
+   /* Write direction, bit to write, clock is high */
+   pir = 3 | ((val  1  i) ? 1  2 : 0);
+   OUT32(PIR(port), pir);
+   PHY_DELAY;
+   /* Write direction, bit to write, clock is low */
+   pir = 2 | ((val  1  i) ? 1  2 : 0);
+   OUT32(PIR(port), pir);
+   PHY_DELAY;
+   }
+}
+
+static void sh_eth_mii_bus_release(int port)
+{
+   /* Read direction, clock is low */
+   OUT32(PIR(port), 0);
+   PHY_DELAY;
+   /* Read direction, clock is high */
+   OUT32(PIR(port), 1);
+   PHY_DELAY;
+   /* Read direction, clock is low */
+   OUT32(PIR(port), 0);
+   PHY_DELAY;
+}
+
+static void sh_eth_mii_ind_bus_release(int port)
+{
+   /* Read direction, clock is low */
+   OUT32(PIR(port), 0);
+   PHY_DELAY;
+}
+
+static int sh_eth_mii_read_phy_bits(int port, u32 * val, int len)
+{
+   int i;
+   u32 pir;
+
+   *val = 0;
+   for (i = len - 1; i = 0; i--) {
+   /* Read direction, clock is high */
+   OUT32(PIR(port), 1);
+   PHY_DELAY;
+   /* Read bit */
+   pir = IN32(PIR(port));
+   *val |= (pir  8) ? 1  i : 0;
+   /* Read direction, clock is low */
+   OUT32(PIR(port), 0);
+   PHY_DELAY;
+   }
+
+   return 0;
+}
+
+/* To read a phy register, mii managements frames are sent to the phy.
+   The frames look like this:
+   pre (32 bits):  0x 
+   st (2 bits):01
+   op (2bits): 10: read 01: write
+   phyad (5 bits): x
+   regad (5 bits): x
+   ta (Bus release):
+   data (16 bits): read data */
+static u32 sh_eth_mii_read_phy_reg(int port, u8 phy_addr, int reg)
+{
+   u32 val;
+
+   /* Sent mii management frame */
+   /* pre */
+   sh_eth_mii_write_phy_bits(port, 0x, 32);
+   /* st (start of frame) */
+   sh_eth_mii_write_phy_bits(port, 0x1, 2);
+   /* op (code) */
+   

Re: [U-Boot-Users] LL_TEMAC on Avnet MiniModule-FX12

2008-06-06 Thread llandre
 What repository are you working from?
U-Boot 1.3.1 cloned last February.

 What ML403 patch are you referencing?
http://www.dave.eu/download/misc/mmfx12/ml403.patch
This derives directly from this old patch that has been around since 2005:
http://www.dave.eu/download/misc/mmfx12/4-ml403.2005-10-01.patch
This patch has been applied by my colleague. Then I put my hands on 
repository and started working on MiniModule port.

 I'm working on a ML403 board at the moment and would be willing to help
 debug / share fixes for u-boot.
Thanks for your availability.

 I have just started looking at a u-boot port but have been working lots
 with the 2.6 kernel (using the ACE support).
We did the same. First we worked on the ML403, then we ported our 
project to MiniModule that will be the base for the final application.


-- 
llandre

DAVE Electronics System House - RD Department
web:   http://www.dave.eu
email: r[EMAIL PROTECTED]


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of llandre
 Sent: Thursday, June 05, 2008 12:15 AM
 To: u-boot-users@lists.sourceforge.net
 Subject: [U-Boot-Users] LL_TEMAC on Avnet MiniModule-FX12
 
 Hi all,
 
 I ported U-Boot 1.3.1 on Avnet MiniModule-FX12 (the repository I'm
 working with has been patched previously with ML403 patch). Here is my
 first dirty patch:
 
 http://www.dave.eu/download/misc/mmfx12/mmfx12-0.8.3.patch
 
 U-Boot works fine and it boots correctly from flash, however ethernet
 interface (LL_TEMAC) does not work.
 For example, when I try to perform a TFTP download, the XEmac_PollSend
 function never returns because the following loop never ends:
 
 /*
   * Loop on the MAC's status to wait for the transmit to complete. The
   * transmit status is in the FIFO when the XMIT_DONE bit is set.
   */
 do {
  IntrStatus = XIIF_V123B_READ_IISR(InstancePtr-BaseAddress);
 }
 while ((IntrStatus  XEM_EIR_XMIT_DONE_MASK) == 0);
 
 Please note that the FPGA bitstream is ok because the linux kernel works
 fine and can mount root file system via NFS so I pretty sure something
 is wrong in my U-Boot port.
 
 Anybody experienced similar problems?
 
 
 TIA,
 llandre
 
 DAVE Electronics System House - RD Department
 web:   http://www.dave.eu
 email: r[EMAIL PROTECTED]
 
 
 -
 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
 
 


-
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] sh: Renesas Solutions SH7763RDP board support

2008-06-06 Thread Nobuhiro Iwamatsu
SH7763RDP has SCIF, NOR Flash, Ethernet, USB host, LCDC and MMC.
In this patch, support SCIF, NOR Flash, and Ethernet.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 MAINTAINERS |1 +
 MAKEALL |1 +
 Makefile|5 +
 board/sh7763rdp/Makefile|   47 +
 board/sh7763rdp/config.mk   |   11 ++
 board/sh7763rdp/lowlevel_init.S |  351 +++
 board/sh7763rdp/sh7763rdp.c |   76 +
 board/sh7763rdp/u-boot.lds  |  106 
 include/configs/sh7763rdp.h |  129 ++
 9 files changed, 727 insertions(+), 0 deletions(-)
 create mode 100644 board/sh7763rdp/Makefile
 create mode 100644 board/sh7763rdp/config.mk
 create mode 100644 board/sh7763rdp/lowlevel_init.S
 create mode 100644 board/sh7763rdp/sh7763rdp.c
 create mode 100644 board/sh7763rdp/u-boot.lds
 create mode 100644 include/configs/sh7763rdp.h

diff --git a/MAINTAINERS b/MAINTAINERS
index d3dfd48..b3daaeb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -718,6 +718,7 @@ Nobuhiro Iwamatsu [EMAIL PROTECTED]
MS7722SESH7722
R7780MP SH7780
R2DPlus SH7751R
+   SH7763RDP   SH7763

 Mark Jonas [EMAIL PROTECTED]

diff --git a/MAKEALL b/MAKEALL
index 3cb1d24..45ef33e 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -749,6 +749,7 @@ LIST_sh4=  \
Migo-R  \
r7780mp \
r2dplus \
+   sh7763rdp   \
 

 LIST_sh=  \
diff --git a/Makefile b/Makefile
index cc988e1..cb63223 100644
--- a/Makefile
+++ b/Makefile
@@ -2941,6 +2941,11 @@ r2dplus_config  :   unconfig
@echo #define CONFIG_R2DPLUS 1  include/config.h
@./mkconfig -a $(@:_config=) sh sh4 r2dplus

+sh7763rdp_config  :   unconfig
+   @ include/config.h
+   @echo #define CONFIG_SH7763RDP 1  include/config.h
+   @./mkconfig -a $(@:_config=) sh sh4 sh7763rdp
+
 #
 # SPARC
 #
diff --git a/board/sh7763rdp/Makefile b/board/sh7763rdp/Makefile
new file mode 100644
index 000..9e63ea7
--- /dev/null
+++ b/board/sh7763rdp/Makefile
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2008 Renesas Solutions Corp.
+# Copyright (C) 2008 Nobuhiro Iwamatsu [EMAIL PROTECTED]
+# Copyright (C) 2007 Kenati Technologies, Inc.
+#
+# board/sh7763rdp/Makefile
+#
+# 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= lib$(BOARD).a
+
+OBJS   := sh7763rdp.o
+SOBJS  := lowlevel_init.o
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) crv $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+.depend:   Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
+   $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c)  $@
+
+-include .depend
+
+#
diff --git a/board/sh7763rdp/config.mk b/board/sh7763rdp/config.mk
new file mode 100644
index 000..c52dbfd
--- /dev/null
+++ b/board/sh7763rdp/config.mk
@@ -0,0 +1,11 @@
+#
+# board/sh7763rdp/config.mk
+#
+# TEXT_BASE refers to image _after_ relocation.
+#
+# NOTE: Must match value used in u-boot.lds (in this directory).
+#
+
+TEXT_BASE = 0x8FFC
+
+# PLATFORM_CPPFLAGS += -DCONFIG_MULTIBOOT
diff --git a/board/sh7763rdp/lowlevel_init.S b/board/sh7763rdp/lowlevel_init.S
new file mode 100644
index 000..1942892
--- /dev/null
+++ b/board/sh7763rdp/lowlevel_init.S
@@ -0,0 +1,351 @@
+/*
+ * Copyright (C) 2008 Renesas Solutions Corp.
+ * Copyright (C) 2008 Nobuhiro Iwamatsu [EMAIL PROTECTED]
+ * Copyright (C) 2007 Kenati Technologies, Inc.
+ *
+ * board/sh7763rdp/lowlevel_init.S
+ *
+ * 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 

Re: [U-Boot-Users] Loading from NAND using 'nboot' Periodically Fails Where 'nand read' Succeeds

2008-06-06 Thread Marian Balakowicz

Hi Grant,

Grant Erickson wrote:
 On 6/5/08 3:30 PM, Grant Erickson wrote:
 I'm following up with you on this since 'git blame cmd_nand.c' seems to
 indicate you added the CONFIG_FIT support to this file.

 Based on stepping through with the debugger, my initial guess about hardware
 issues may have been incorrect. Is there an implicit assumption in the
 following snippet from nand_load_image() in cmd_nand.c:

 [ code omitted ]

 that casting 'addr' to 'fit_hdr' represents more than 512 bytes of valid data
 to be accessed by fit_check_format()? If so, should not 'cnt = 
 nand-oobblock'
 be explicitly set to match that assumption?

 I am guessing that my observation that NFS booting and nand read.i addressed
 the issue strictly had to do with the fact that the 8 MiB address to which
 those operate were not getting used or otherwise updated between resets after
 the boot of the kernel allowing subsequent runs of 'nboot' to leverage the
 stale data.
 
 The boot.itb image I have in NAND is 0x13CB98 bytes in size. Running a
 series of 'nand read.i ${bootaddr} 0 ...':

...
 
 So, it would appear that the answer, at least for this trivial boot.itb of a
 kernel and DTB, for how large must the initial value of 'cnt' be is as
 large as the image being nboot'ed is. That said, it looks like nboot and
 FIT images may not work together at present with today's code.
 
 Any thoughts?

Doing a FIT format check on a first sector data is obviously wrong.
This was a good spot for such check with the initial implementation of
the routine, but it should have been corrected after that changed,
stupid me. As you'll note fit_print_contents() call is deferred, and
that is for the same reason, it needs the whole image data to operate
on. Same, for format check, it cannot be done earlier than that.

I'll post a patch later today that fixes it, please give it a try on
your system.

Cheers,
m.

-
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


Re: [U-Boot-Users] [patch] DM9000 fix status check fail 0x6d error for trizeps board

2008-06-06 Thread Stefano Babic
Ben Warren wrote:

 Applied to net repo.  Thanks!
 
 Stefano, please test from the net repo if you can on your Trizeps board.
 

Done, it works, thanks.

Kind regards,
Stefano

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]
=

-
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


Re: [U-Boot-Users] build failure in tools - missing CFG_ENV_SIZE ?

2008-06-06 Thread Andre Schwarz
Wolfgang,

thanks for your verification. Trying to do it your way gives :

nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200 MPC8349ITX
Configuring for TQM5200 board...
In file included from environment.c:30:
/home/u-boot-clean/include/environment.h:107: error: 'CFG_ENV_SIZE'
undeclared here (not in a function)
make[1]: *** [environment.o] Error 1
make: *** [tools] Error 2
ppc_6xx-size: './u-boot': No such file
Configuring for MPC8349ITX board...
In file included from environment.c:30:
/home/u-boot-clean/include/environment.h:107: error: 'CFG_ENV_SIZE'
undeclared here (not in a function)
make[1]: *** [environment.o] Error 1
make: *** [tools] Error 2
ppc_6xx-size: './u-boot': No such file


Obviously it's a problem regarding include mechanism.
Changing line 28 in common/environment.c ( config.h -
../include/config.h) gives positive result :

nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200 MPC8349ITX
Configuring for TQM5200 board...
   textdata bss dec hex filename
 326532   32464  315024  674020   a48e4 ./u-boot
Configuring for MPC8349ITX board...
   textdata bss dec hex filename
 217741   15388  223684  456813   6f86d ./u-boot


Unfortunately I'm not a Makefile expert ... do you have any ideas ?

regards,
Andre


Wolfgang Denk schrieb:
 In message [EMAIL PROTECTED] you wrote:
   
 after getting a clean  u-boot clone (1.3.3 today) I get a compile error
 in tools subdir.

 I've tried 2 different boards making a TQM5200_config and
 MPC8349ITX_config - just to make sure ...

 make CROSS_COMPILE=3Dppc_6xx- 

 cross-compiler is gcc 4.0 as shipped with ELDK 4.1.
 

 Hm. Let's see:

 - MAKEALL TQM5200 MPC8349ITX
 Configuring for TQM5200 board...
textdata bss dec hex filename
  326532   32456  315024  674012   a48dc ./u-boot
 Configuring for MPC8349ITX board...
textdata bss dec hex filename
  217741   15388  223684  456813   6f86d ./u-boot

 That's U-Boot 1.3.3-00117-g8155efb

   
 Can someome help me out please ?
 

 Sorry, I cannot reproduce the problem.

 Best regards,

 Wolfgang Denk

   


MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: 
Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

-
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


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

2008-06-06 Thread Jean-Christophe PLAGNIOL-VILLARD
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?

 +/* Read ethernet MAC address from Integrity data structure inside EEPROM. */
 +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;
 + }
 + if (value != INTEGRITY_CHECKWORD_VALUE)
 + return 1;
 +
 + /* Read SYSCFG structure offset. */
 + if (i2c_read(CFG_I2C_EEPROM_ADDR, INTEGRITY_SYSCFG_OFFSET,
 +  CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) value, 4)) {
 + printf(Read from EEPROM @ 0x%02x failed\n,
 +CFG_I2C_EEPROM_ADDR);
 + return 1;
 + }
 + address = 0x800 + (int) value; /* Address where SYSCFG structure
 + * is located. */
 +
 + * 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
 + */
 +
 +#ifndef __CONFIG_H
 +#define __CONFIG_H
 +#include asm/sizes.h
 +
 +/*===*/
 +/* Board */
 +/*===*/
If Possible use this kind of comment style
/*
 *
 */

I'll ack this too
 +#define SFFSDR
 +#define CFG_NAND_LARGEPAGE
 +#define CFG_USE_NAND
 +/*===*/
 +/* SoC Configuration */
 +/*===*/
 +#define CONFIG_ARM926EJS /* arm926ejs CPU core */
 +#define CONFIG_SYS_CLK_FREQ  29700   /* Arm Clock frequency */
 +#define CFG_TIMERBASE0x01c21400  /* use timer 0 */
 +#define CFG_HZ_CLOCK 2700/* Timer Input clock freq */
 +#define CFG_HZ   1000
 +/*==*/
 +/* EEPROM definitions for Atmel 24LC64 EEPROM chip  */
 +/*==*/
 +#define CFG_I2C_EEPROM_ADDR_LEN  2
 +#define CFG_I2C_EEPROM_ADDR  0x50
 +#define CFG_EEPROM_PAGE_WRITE_BITS   5
 +#define CFG_EEPROM_PAGE_WRITE_DELAY_MS   20
 +/*=*/
 +/* Memory Info */
 +/*=*/
 +#define CFG_MALLOC_LEN   (0x1 + 256*1024)/* malloc() len 
 */
 +#define CFG_GBL_DATA_SIZE128 /* reserved for initial data */
 +#define CFG_MEMTEST_START0x8000  /* memtest start address */
 +#define CFG_MEMTEST_END  0x8100  /* 16MB RAM test */
 +#define CONFIG_NR_DRAM_BANKS 1   /* we have 1 bank of DRAM */
 +#define CFG_LOAD_ADDR0x8070  /* Default Linux kernel
 +  * load address. */
 +#define CONFIG_VERSION_VARIABLE
 +#define CONFIG_AUTO_COMPLETE /* Won't work with hush so far,
 +  * may be later */
 +#define CFG_HUSH_PARSER
 +#define CFG_PROMPT_HUSH_PS2   
 +#define CONFIG_CMDLINE_EDITING
 +#define CFG_LONGHELP
 +#define CONFIG_CRC32_VERIFY
 +#define CONFIG_MX_CYCLIC
 +/*===*/
 +/* Linux Information */
 +/*===*/
 +#define LINUX_BOOT_PARAM_ADDR0x8100
 +#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 10 30; \
 + bootelf 87A0
Could you align it or I will do it when I'll apply the patch,
If it's ok with you.

Best Regards,
J.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.

Re: [U-Boot-Users] build failure in tools - missing CFG_ENV_SIZE ?

2008-06-06 Thread Wolfgang Denk
In message [EMAIL PROTECTED] you wrote:
 
 thanks for your verification. Trying to do it your way gives :
 
 nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200 MPC8349ITX
 Configuring for TQM5200 board...
 In file included from environment.c:30:
 /home/u-boot-clean/include/environment.h:107: error: 'CFG_ENV_SIZE'
 undeclared here (not in a function)

So what exactly is the difference between your source tree and
toolchain and mine?

 Unfortunately I'm not a Makefile expert ... do you have any ideas ?

I don't see why or which changes would be necessary as  it's  working
fine here...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
The C-shell doesn't parse. It adhoculates.
- [EMAIL PROTECTED] in [EMAIL PROTECTED]

-
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


Re: [U-Boot-Users] Does u-boot provide SCP or FTP feature?

2008-06-06 Thread Wolfgang Denk
In message [EMAIL PROTECTED] you wrote:
 
 Not in the main line, although I wouldn't rule out that somebody
 somewhere has implemented FTP at least.  Can you elaborate on why you
 want something less trivial?

IBM's Blue Gene port implements not only TCP/IP, but also a HTTP
server so you can push your images to U-Boot.

See http://www.research.ibm.com/kittyhawk

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Chapter 1 -- The story so  far:
In the beginning the Universe was created. This has  made  a  lot  of
people very angry and been widely regarded as a bad move.

-
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


Re: [U-Boot-Users] build failure in tools - missing CFG_ENV_SIZE ?

2008-06-06 Thread Andre Schwarz
Wolfgang Denk schrieb:
 In message [EMAIL PROTECTED] you wrote:
   
 thanks for your verification. Trying to do it your way gives :

 nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200 MPC8349ITX
 Configuring for TQM5200 board...
 In file included from environment.c:30:
 /home/u-boot-clean/include/environment.h:107: error: 'CFG_ENV_SIZE'
 undeclared here (not in a function)
 

 So what exactly is the difference between your source tree and
 toolchain and mine?

   
I'm running ELDK 4.1 and latest u-boot from git.
 Unfortunately I'm not a Makefile expert ... do you have any ideas ?
 

 I don't see why or which changes would be necessary as  it's  working
 fine here...

   
How am I supposed to know if you do not ? :-(
I'll stick to the local change of the #include statement.
 Best regards,

 Wolfgang Denk

   

cheers,
Andre

MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: 
Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

-
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


Re: [U-Boot-Users] build failure in tools - missing CFG_ENV_SIZE ?

2008-06-06 Thread Martin Krause
Hi Andre,

[EMAIL PROTECTED] wrote on :
 Wolfgang Denk schrieb:
  In message [EMAIL PROTECTED] you wrote:
  
   thanks for your verification. Trying to do it your way gives :
   
   nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200
   MPC8349ITX Configuring for TQM5200 board...
   In file included from environment.c:30:
   /home/u-boot-clean/include/environment.h:107: error:
   'CFG_ENV_SIZE' undeclared here (not in a function)

I'm also able to build (top of) U-Boot for the TQM5200 with 
ELDK4.1:

[EMAIL PROTECTED]:~/git/u-boot_denx echo $CROSS_COMPILE
ppc_82xx-
[EMAIL PROTECTED]:~/git/u-boot_denx ./MAKEALL TQM5200
Configuring for TQM5200 board...
md5.c: In function `MD5Update':
md5.c:95: warning: implicit declaration of function `memmove'
md5.c: In function `MD5Final':
md5.c:143: warning: implicit declaration of function `memset'
sha1.c: In function `sha1_update':
sha1.c:249: warning: implicit declaration of function `memcpy'
sha1.c: In function `sha1_hmac':
sha1.c:360: warning: implicit declaration of function `memset'
   textdata bss dec hex filename
 326532   32456  315024  674012   a48dc ./u-boot
[EMAIL PROTECTED]:~/git/u-boot_denx 

I don't know, why I get the warnings (they appeared first several
weeks ago, and I get it for every build, since then). But since the
resulting U-Boot runs fine, there was no pressure (and no time) 
to dig for the reason of the warnings ...

Best Regards,
Martin Krause

--
TQ-Systems GmbH
Muehlstrasse 2, Gut Delling, D-82229 Seefeld
Amtsgericht Muenchen, HRB 105 018, UST-IdNr. DE 811 607 913
Geschaeftsfuehrer: Dipl.-Ing. (FH) Detlef Schneider, Dipl.-Ing. (FH) Ruediger 
Stahl
http://www.tq-group.com

-
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


Re: [U-Boot-Users] build failure in tools - missing CFG_ENV_SIZE ?

2008-06-06 Thread Andre Schwarz
Martin,

thanks for the info.
The misbehaviour surely has its cause on my system setup.

I simply don't know why ... it's driving me mad.

Just wanted to port another board from my local v1.3.1 and submit a
patch during this merge window.
But the e1000 driver isn't working anymore. Making a diff gives files
are identical.

There's something utterly wrong ... time to go home and prepare for
soccer :-(

cheers,
Andre

Martin Krause schrieb:
 Hi Andre,

 [EMAIL PROTECTED] wrote on :
   
 Wolfgang Denk schrieb:
 
 In message [EMAIL PROTECTED] you wrote:

   
 thanks for your verification. Trying to do it your way gives :

 nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200
 MPC8349ITX Configuring for TQM5200 board...
 In file included from environment.c:30:
 /home/u-boot-clean/include/environment.h:107: error:
 'CFG_ENV_SIZE' undeclared here (not in a function)
 

 I'm also able to build (top of) U-Boot for the TQM5200 with 
 ELDK4.1:

 [EMAIL PROTECTED]:~/git/u-boot_denx echo $CROSS_COMPILE
 ppc_82xx-
 [EMAIL PROTECTED]:~/git/u-boot_denx ./MAKEALL TQM5200
 Configuring for TQM5200 board...
 md5.c: In function `MD5Update':
 md5.c:95: warning: implicit declaration of function `memmove'
 md5.c: In function `MD5Final':
 md5.c:143: warning: implicit declaration of function `memset'
 sha1.c: In function `sha1_update':
 sha1.c:249: warning: implicit declaration of function `memcpy'
 sha1.c: In function `sha1_hmac':
 sha1.c:360: warning: implicit declaration of function `memset'
textdata bss dec hex filename
  326532   32456  315024  674012   a48dc ./u-boot
 [EMAIL PROTECTED]:~/git/u-boot_denx 

 I don't know, why I get the warnings (they appeared first several
 weeks ago, and I get it for every build, since then). But since the
 resulting U-Boot runs fine, there was no pressure (and no time) 
 to dig for the reason of the warnings ...

 Best Regards,
 Martin Krause

 --
 TQ-Systems GmbH
 Muehlstrasse 2, Gut Delling, D-82229 Seefeld
 Amtsgericht Muenchen, HRB 105 018, UST-IdNr. DE 811 607 913
 Geschaeftsfuehrer: Dipl.-Ing. (FH) Detlef Schneider, Dipl.-Ing. (FH) Ruediger 
 Stahl
 http://www.tq-group.com
   


MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: 
Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

-
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


Re: [U-Boot-Users] build failure in tools - missing CFG_ENV_SIZE ?

2008-06-06 Thread Wolfgang Denk
In message [EMAIL PROTECTED] you wrote:

  So what exactly is the difference between your source tree and
  toolchain and mine?

 I'm running ELDK 4.1 and latest u-boot from git.

Me too. Also tried ELDK 4.0 and 4.2, with the same results.

  I don't see why or which changes would be necessary as  it's  working
  fine here...

 How am I supposed to know if you do not ? :-(

I guess it must be some local changes in your environment.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
The light at the end of the tunnel is usually a No Exit sign.

-
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


Re: [U-Boot-Users] build failure in tools - missing CFG_ENV_SIZE ?

2008-06-06 Thread Wolfgang Denk
Hello,

in message [EMAIL PROTECTED] you wrote:
 
 I don't know, why I get the warnings (they appeared first several
 weeks ago, and I get it for every build, since then). But since the
 resulting U-Boot runs fine, there was no pressure (and no time) 
 to dig for the reason of the warnings ...

Can you please check if this patch fixes the warnings? Thanks in
advance.

diff --git a/lib_generic/md5.c b/lib_generic/md5.c
index 78ef475..a9aae46 100644
--- a/lib_generic/md5.c
+++ b/lib_generic/md5.c
@@ -27,6 +27,8 @@
 
 #ifndef USE_HOSTCC
 #include common.h
+#else
+#include string.h
 #endif /* USE_HOSTCC */
 #include watchdog.h
 #include linux/types.h
diff --git a/lib_generic/sha1.c b/lib_generic/sha1.c
index c8ef4d2..a192e5f 100644
--- a/lib_generic/sha1.c
+++ b/lib_generic/sha1.c
@@ -31,6 +31,8 @@
 
 #ifndef USE_HOSTCC
 #include common.h
+#else
+#include string.h
 #endif /* USE_HOSTCC */
 #include watchdog.h
 #include linux/string.h


Viele Grüße,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Any technology distinguishable from magic is insufficiently advanced.

-
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


Re: [U-Boot-Users] build failure in tools - missing CFG_ENV_SIZE ?

2008-06-06 Thread Martin Krause
Hello,

[EMAIL PROTECTED] wrote on Friday, June 06, 2008 2:28 PM:
  I don't know, why I get the warnings (they appeared first several
  weeks ago, and I get it for every build, since then). But since the
  resulting U-Boot runs fine, there was no pressure (and no time)
  to dig for the reason of the warnings ...
 
 Can you please check if this patch fixes the warnings? Thanks in
 advance.
 
 diff --git a/lib_generic/md5.c b/lib_generic/md5.c
 index 78ef475..a9aae46 100644
 --- a/lib_generic/md5.c
 +++ b/lib_generic/md5.c
 @@ -27,6 +27,8 @@
 
  #ifndef USE_HOSTCC
  #include common.h
 +#else
 +#include string.h
  #endif /* USE_HOSTCC */
  #include watchdog.h
  #include linux/types.h
 diff --git a/lib_generic/sha1.c b/lib_generic/sha1.c
 index c8ef4d2..a192e5f 100644
 --- a/lib_generic/sha1.c
 +++ b/lib_generic/sha1.c
 @@ -31,6 +31,8 @@
 
  #ifndef USE_HOSTCC
  #include common.h
 +#else
 +#include string.h
  #endif /* USE_HOSTCC */
  #include watchdog.h
  #include linux/string.h

This helped, thanks! With your patch I get a clean build:

[EMAIL PROTECTED]:~/git/u-boot_denx ./MAKEALL TQM5200
Configuring for TQM5200 board...
   textdata bss dec hex filename
 326532   32464  315024  674020   a48e4 ./u-boot
[EMAIL PROTECTED]:~/git/u-boot_denx  

But why did I get the warning without the patch and you not (both
build with ELDK4.1 and top-of-U-Boot)?

Best Regards,
Martin Krause


-
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 08/08] Socrates: Added FPGA base address update in FDT.

2008-06-06 Thread Wolfgang Denk
From: Sergei Poselenov [EMAIL PROTECTED]

Signed-off-by: Sergei Poselenov [EMAIL PROTECTED]
---
 board/socrates/socrates.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index 59e8865..76047c5 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -224,5 +224,15 @@ ft_board_setup(void *blob, bd_t *bd)
if (rc)
printf(Unable to update property NOR mapping, err=%s\n,
   fdt_strerror(rc));
+
+#if defined (CFG_FPGA_BASE)
+   memset(val, 0, sizeof(val));
+   val[0] = CFG_FPGA_BASE;
+   rc = fdt_find_and_setprop(blob, /localbus/fpga, virtual-reg,
+ val, sizeof(val), 1);
+   if (rc)
+   printf(Unable to update property \fpga\, err=%s\n,
+  fdt_strerror(rc));
+#endif
 }
 #endif /* defined(CONFIG_OF_LIBFDT)  defined(CONFIG_OF_BOARD_SETUP) */
-- 
1.5.4.2


-
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 05/08] Socrates: added missed file with UPMA configuration data.

2008-06-06 Thread Wolfgang Denk
From: Sergei Poselenov [EMAIL PROTECTED]

Signed-of-by: Sergei Poselenov [EMAIL PROTECTED]
---
 board/socrates/upm_table.h |   55 
 1 files changed, 55 insertions(+), 0 deletions(-)
 create mode 100644 board/socrates/upm_table.h

diff --git a/board/socrates/upm_table.h b/board/socrates/upm_table.h
new file mode 100644
index 000..f26d8a7
--- /dev/null
+++ b/board/socrates/upm_table.h
@@ -0,0 +1,55 @@
+/*
+ * (C) Copyright 2008
+ * Sergei Poselenov, Emcraft Systems, [EMAIL PROTECTED]
+ *
+ * Copyright 2004, 2007 Freescale Semiconductor, Inc.
+ * (C) Copyright 2003 Motorola Inc.
+ * Xianghua Xiao, ([EMAIL PROTECTED])
+ *
+ * (C) Copyright 2000
+ * 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
+ */
+
+#ifndef __UPM_TABLE_H
+#define __UPM_TABLE_H
+
+/* UPM Table Configuration Code for FPGA access */
+static const unsigned int UPMTableA[] =
+{
+   0x00fcfc00,  0x00fcfc00,  0x00fcfc00,  0x00fcfc00, //Words 0 to 3
+   0x00fcfc00,  0x00fcfc00,  0x00fcfc00,  0x00fcfc05, //Words 4 to 7
+   0x00fcfc00,  0x00fcfc00,  0x00fcfc04,  0x00fcfc04, //Words 8 to 11
+   0x00fcfc04,  0x00fcfc04,  0x00fcfc04,  0x00fcfc04, //Words 12 to 15
+   0x00fcfc04,  0x00fcfc04,  0x00fcfc00,  0xfc00, //Words 16 to 19
+   0xfc00,  0xfc00,  0xfc00,  0xfc01, //Words 20 to 23
+   0x0c00,  0x0c00,  0x0c00,  0x00f3fc04, //Words 24 to 27
+   0x0c00,  0xfc01,  0xfc00,  0xfc01, //Words 28 to 31
+   0x0c00,  0x00f3fc04,  0x00f3fc04,  0x00f3fc04, //Words 32 to 35
+   0x00f3fc04,  0x00f3fc04,  0x00f3fc04,  0x00f3fc04, //Words 36 to 39
+   0x00f3fc04,  0x0c00,  0xfc00,  0xfc00, //Words 40 to 43
+   0xfc01,  0xfc00,  0xfc00,  0xfc01, //Words 44 to 47
+   0xfc00,  0xfc00,  0xfc00,  0xfc00, //Words 48 to 51
+   0xfc00,  0xfc00,  0xfc00,  0xfc00, //Words 52 to 55
+   0xfc00,  0xfc00,  0xfc00,  0xfc01, //Words 56 to 59
+   0xfc00,  0xfc00,  0xfc00,  0xfc01  //Words 60 to 63
+};
+
+#endif
-- 
1.5.4.2


-
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 06/08] NAND: Added support for 128-bit OOB, adapted

2008-06-06 Thread Wolfgang Denk
From: Sergei Poselenov [EMAIL PROTECTED]

Signed-off-by: Sergei Poselenov [EMAIL PROTECTED]
---
 drivers/mtd/nand/nand_base.c |   46 ++---
 include/linux/mtd/mtd-abi.h  |2 +-
 2 files changed, 34 insertions(+), 14 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 5aef31c..740d3fc 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -113,18 +113,22 @@ static struct nand_oobinfo nand_oob_64 = {
.oobfree = { {2, 38} }
 };
 
-/* This is used for padding purposes in nand_write_oob */
-static u_char ffchars[] = {
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+static struct nand_oobinfo nand_oob_128 = {
+   .useecc = MTD_NANDECC_AUTOPLACE,
+   .eccbytes = 48,
+   .eccpos = {
+   80,  81,  82,  83,  84,  85,  86,  87,
+   88,  89,  90,  91,  92,  93,  94,  95,
+   96,  97,  98,  99, 100, 101, 102, 103,
+   104, 105, 106, 107, 108, 109, 110, 111,
+   112, 113, 114, 115, 116, 117, 118, 119,
+   120, 121, 122, 123, 124, 125, 126, 127},
+   .oobfree = { {2, 78} }
 };
 
+/* This is used for padding purposes in nand_write_oob */
+static u_char *ffchars;
+
 /*
  * NAND low-level MTD interface functions
  */
@@ -193,6 +197,10 @@ static void nand_release_device (struct mtd_info *mtd)
 {
struct nand_chip *this = mtd-priv;
this-select_chip(mtd, -1); /* De-select the NAND device */
+   if (ffchars) {
+   kfree(ffchars);
+   ffchars = NULL;
+   }
 }
 #endif
 
@@ -891,7 +899,7 @@ static int nand_write_page (struct mtd_info *mtd, struct 
nand_chip *this, int pa
u_char *oob_buf,  struct nand_oobinfo *oobsel, int cached)
 {
int i, status;
-   u_char  ecc_code[32];
+   u_char  ecc_code[NAND_MAX_OOBSIZE];
int eccmode = oobsel-useecc ? this-eccmode : NAND_ECC_NONE;
uint*oob_config = oobsel-eccpos;
int datidx = 0, eccidx = 0, eccsteps = this-eccsteps;
@@ -1112,8 +1120,8 @@ static int nand_read_ecc (struct mtd_info *mtd, loff_t 
from, size_t len,
int read = 0, oob = 0, ecc_status = 0, ecc_failed = 0;
struct nand_chip *this = mtd-priv;
u_char *data_poi, *oob_data = oob_buf;
-   u_char ecc_calc[32];
-   u_char ecc_code[32];
+   u_char ecc_calc[NAND_MAX_OOBSIZE];
+   u_char ecc_code[NAND_MAX_OOBSIZE];
int eccmode, eccsteps;
unsigned *oob_config;
int datidx;
@@ -1811,6 +1819,15 @@ static int nand_write_oob (struct mtd_info *mtd, loff_t 
to, size_t len, size_t *
if (NAND_MUST_PAD(this)) {
/* Write out desired data */
this-cmdfunc (mtd, NAND_CMD_SEQIN, mtd-oobblock, page  
this-pagemask);
+   if (!ffchars) {
+   if (!(ffchars = kmalloc (mtd-oobsize, GFP_KERNEL))) {
+   DEBUG (MTD_DEBUG_LEVEL0, nand_write_oob: 
+  No memory for padding array, need 
%d bytes, mtd-oobsize);
+   ret = -ENOMEM;
+   goto out;
+   }
+   memset(ffchars, 0xff, mtd-oobsize);
+   }
/* prepad 0xff for partial programming */
this-write_buf(mtd, ffchars, column);
/* write data */
@@ -2479,6 +2496,9 @@ int nand_scan (struct mtd_info *mtd, int maxchips)
case 64:
this-autooob = nand_oob_64;
break;
+   case 128:
+   this-autooob = nand_oob_128;
+   break;
default:
printk (KERN_WARNING No oob scheme defined for oobsize 
%d\n,
mtd-oobsize);
diff --git a/include/linux/mtd/mtd-abi.h b/include/linux/mtd/mtd-abi.h
index 72d7341..4cebea9 100644
--- a/include/linux/mtd/mtd-abi.h
+++ b/include/linux/mtd/mtd-abi.h
@@ -93,7 +93,7 @@ struct nand_oobinfo {
uint32_t useecc;
uint32_t eccbytes;
uint32_t oobfree[8][2];
-   uint32_t eccpos[32];
+   uint32_t eccpos[48];
 };
 
 #endif /* __MTD_ABI_H__ */
-- 
1.5.4.2


-
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] [PATCH 07/08] Socrates: NAND support added. Changed the U-Boot base address and

2008-06-06 Thread Wolfgang Denk
From: Sergei Poselenov [EMAIL PROTECTED]

Signed-off-by: Sergei Poselenov [EMAIL PROTECTED]
---
 board/socrates/Makefile|2 +-
 board/socrates/config.mk   |3 +-
 board/socrates/nand.c  |  218 
 include/configs/socrates.h |8 ++-
 4 files changed, 227 insertions(+), 4 deletions(-)
 create mode 100644 board/socrates/nand.c

diff --git a/board/socrates/Makefile b/board/socrates/Makefile
index 6453f24..11503eb 100644
--- a/board/socrates/Makefile
+++ b/board/socrates/Makefile
@@ -28,7 +28,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(BOARD).a
 #
 
-COBJS  := $(BOARD).o law.o tlb.o sdram.o
+COBJS  := $(BOARD).o law.o tlb.o sdram.o nand.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
diff --git a/board/socrates/config.mk b/board/socrates/config.mk
index 1cf5d38..4f17294 100644
--- a/board/socrates/config.mk
+++ b/board/socrates/config.mk
@@ -25,6 +25,5 @@
 #
 # socrates board
 # default CCARBAR is at 0xff70
-# assume U-Boot is less than 256k
 #
-TEXT_BASE = 0xfffc
+TEXT_BASE = 0xfffa
diff --git a/board/socrates/nand.c b/board/socrates/nand.c
new file mode 100644
index 000..960f847
--- /dev/null
+++ b/board/socrates/nand.c
@@ -0,0 +1,218 @@
+/*
+ * (C) Copyright 2008
+ * Sergei Poselenov, Emcraft Systems, [EMAIL PROTECTED]
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+
+#if defined(CFG_NAND_BASE)
+#include nand.h
+#include asm/errno.h
+#include asm/io.h
+
+int state;
+static void nand_write_byte(struct mtd_info *mtd, u_char byte);
+static void nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len);
+static void nand_write_word(struct mtd_info *mtd, u16 word);
+static u_char nand_read_byte(struct mtd_info *mtd);
+static u16 nand_read_word(struct mtd_info *mtd);
+static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len);
+static int nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len);
+static int nand_device_ready(struct mtd_info *mtdinfo);
+static void nand_hwcontrol(struct mtd_info *mtdinfo, int cmd);
+
+#define FPGA_NAND_CMD_MASK (0x7  28)
+#define FPGA_NAND_CMD_COMMAND  (0x0  28)
+#define FPGA_NAND_CMD_ADDR (0x1  28)
+#define FPGA_NAND_CMD_READ (0x2  28)
+#define FPGA_NAND_CMD_WRITE(0x3  28)
+#define FPGA_NAND_BUSY (0x1  15)
+#define FPGA_NAND_ENABLE   (0x1  31)
+#define FPGA_NAND_DATA_SHIFT   16
+
+/**
+ * nand_write_byte -  write one byte to the chip
+ * @mtd:   MTD device structure
+ * @byte:  pointer to data byte to write
+ */
+static void nand_write_byte(struct mtd_info *mtd, u_char byte)
+{
+   nand_write_buf(mtd, (const uchar *)byte, sizeof(byte));
+}
+
+/**
+ * nand_write_word -  write one word to the chip
+ * @mtd:   MTD device structure
+ * @word:  data word to write
+ */
+static void nand_write_word(struct mtd_info *mtd, u16 word)
+{
+   nand_write_buf(mtd, (const uchar *)word, sizeof(word));
+}
+
+/**
+ * nand_write_buf -  write buffer to chip
+ * @mtd:   MTD device structure
+ * @buf:   data buffer
+ * @len:   number of bytes to write
+ */
+static void nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
+{
+   int i;
+   struct nand_chip *this = mtd-priv;
+   long val;
+
+   if ((state  FPGA_NAND_CMD_MASK) == FPGA_NAND_CMD_MASK) {
+   /* Write data */
+   val = (state  FPGA_NAND_ENABLE) | FPGA_NAND_CMD_WRITE;
+   } else {
+   /* Write address or command */
+   val = state;
+   }
+
+   for (i = 0; i  len; i++) {
+   out_be32(this-IO_ADDR_W, val | (buf[i]  
FPGA_NAND_DATA_SHIFT));
+   }
+}
+
+
+/**
+ * nand_read_byte -  read one byte from the chip
+ * @mtd:   MTD device structure
+ */
+static u_char nand_read_byte(struct mtd_info *mtd)
+{
+   u8 byte;
+   nand_read_buf(mtd, (uchar *)byte, sizeof(byte));
+   return byte;
+}
+
+/**
+ * nand_read_word -  read one word from the chip
+ * @mtd:   MTD device structure
+ */
+static u16 nand_read_word(struct mtd_info *mtd)
+{
+   u16 word;
+   nand_read_buf(mtd, (uchar *)word, 

[U-Boot-Users] [PATCH] PHY: Add support for the M88E1121R Marvell chip.

2008-06-06 Thread Wolfgang Denk
From: Sergei Poselenov [EMAIL PROTECTED]

Signed-off-by: Yuri Tikhonov [EMAIL PROTECTED]
Signed-off-by: Sergei Poselenov [EMAIL PROTECTED]
---
 drivers/net/tsec.c |   49 +
 drivers/net/tsec.h |7 +++
 2 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index c7af930..565da5c 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -1128,6 +1128,54 @@ struct phy_info phy_info_M88ES = {
   },
 };
 
+/*
+ *  Since to access LED register we need do switch the page, we
+ * do LED configuring in the miim_read-like function as follows
+ */
+uint mii_88E1121_set_led (uint mii_reg, struct tsec_private *priv)
+{
+   uint pg;
+
+   /* Switch the page to access the led register */
+   pg = read_phy_reg(priv, MIIM_88E1121_PHY_PAGE);
+   write_phy_reg(priv, MIIM_88E1121_PHY_PAGE, MIIM_88E1121_PHY_LED_PAGE);
+
+   /* Configure leds */
+   write_phy_reg(priv, MIIM_88E1121_PHY_LED_CTRL,
+ MIIM_88E1121_PHY_LED_DEF);
+
+   /* Restore the page pointer */
+   write_phy_reg(priv, MIIM_88E1121_PHY_PAGE, pg);
+   return 0;
+}
+
+struct phy_info phy_info_M88E1121R = {
+   0x01410cb,
+   Marvell 88E1121R,
+   4,
+   (struct phy_cmd[]){ /* config */
+  /* Reset and configure the PHY */
+  {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL},
+  {MIIM_GBIT_CONTROL, MIIM_GBIT_CONTROL_INIT, NULL},
+  {MIIM_ANAR, MIIM_ANAR_INIT, NULL},
+  /* Configure leds */
+  {MIIM_88E1121_PHY_LED_CTRL, miim_read,
+   mii_88E1121_set_led},
+  {MIIM_CONTROL, MIIM_CONTROL_INIT, mii_cr_init},
+  {miim_end,}
+  },
+   (struct phy_cmd[]){ /* startup */
+  /* Status is read once to clear old link state */
+  {MIIM_STATUS, miim_read, NULL},
+  {MIIM_STATUS, miim_read, mii_parse_sr},
+  {MIIM_STATUS, miim_read, mii_parse_link},
+  {miim_end,}
+  },
+   (struct phy_cmd[]){ /* shutdown */
+  {miim_end,}
+  },
+};
+
 static unsigned int m88e1145_setmode(uint mii_reg, struct tsec_private *priv)
 {
uint mii_data = read_phy_reg(priv, mii_reg);
@@ -1492,6 +1540,7 @@ struct phy_info *phy_info[] = {
phy_info_BCM5464S,
phy_info_M88E1011S,
phy_info_M88ES,
+   phy_info_M88E1121R,
phy_info_M88E1145,
phy_info_M88E1149S,
phy_info_dm9161,
diff --git a/drivers/net/tsec.h b/drivers/net/tsec.h
index 6a2338b..fee5934 100644
--- a/drivers/net/tsec.h
+++ b/drivers/net/tsec.h
@@ -184,6 +184,13 @@
 #define MIIM_88E_PHY_LED_DIRECT0x4100
 #define MIIM_88E_PHY_LED_COMBINE   0x411C
 
+/* 88E1121 PHY LED Control Register */
+#define MIIM_88E1121_PHY_LED_CTRL  16
+#define MIIM_88E1121_PHY_LED_PAGE  3
+#define MIIM_88E1121_PHY_LED_DEF   0x0030
+
+#define MIIM_88E1121_PHY_PAGE  22
+
 /* 88E1145 Extended PHY Specific Control Register */
 #define MIIM_88E1145_PHY_EXT_CR 20
 #define MIIM_M88E1145_RGMII_RX_DELAY   0x0080
-- 
1.5.4.2


-
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


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 10 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 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 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 

[U-Boot-Users] [PATCH] ppc4xx: Unify AMCC's board config files (part 1/3)

2008-06-06 Thread Stefan Roese
This patch series unifies the AMCC eval board ports by introducing
a common include header for all AMCC eval boards:

include/configs/amcc-common.h

This header now includes all common configuration options/defines which
are removed from the board specific headers.

The reason for this is ease of maintenance and unified look and feel
of all AMCC boards.

Signed-off-by: Stefan Roese [EMAIL PROTECTED]
---
 include/configs/amcc-common.h |  259 +
 1 files changed, 259 insertions(+), 0 deletions(-)
 create mode 100644 include/configs/amcc-common.h

diff --git a/include/configs/amcc-common.h b/include/configs/amcc-common.h
new file mode 100644
index 000..1f27d78
--- /dev/null
+++ b/include/configs/amcc-common.h
@@ -0,0 +1,259 @@
+/*
+ * (C) Copyright 2008
+ * Stefan Roese, DENX Software Engineering, [EMAIL PROTECTED]
+ *
+ * Common configuration options for all AMCC boards
+ *
+ * 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
+ */
+
+#ifndef __AMCC_COMMON_H
+#define __AMCC_COMMON_H
+
+#define CFG_SDRAM_BASE 0x  /* _must_ be 0  */
+#define CFG_MONITOR_BASE   TEXT_BASE   /* Start of U-Boot  */
+#define CFG_MONITOR_LEN(0x - CFG_MONITOR_BASE + 1)
+#define CFG_MALLOC_LEN (1  20)   /* Reserved for malloc  */
+
+/*
+ * UART
+ */
+#define CONFIG_BAUDRATE115200
+#define CONFIG_SERIAL_MULTI
+#define CFG_BAUDRATE_TABLE  \
+{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}
+
+/*
+ * I2C
+ */
+#define CONFIG_HARD_I2C/* I2C with hardware support
*/
+#define CFG_I2C_SLAVE  0x7F
+
+/*
+ * Ethernet/EMAC/PHY
+ */
+#define CONFIG_MII /* MII PHY management   */
+#define CONFIG_NET_MULTI
+#define CONFIG_NETCONSOLE  /* include NetConsole support   */
+#if defined(CONFIG_440)
+#define CFG_RX_ETH_BUFFER  32  /* number of eth rx buffers */
+#else
+#define CFG_RX_ETH_BUFFER  16  /* number of eth rx buffers */
+#endif
+
+/*
+ * Commands
+ */
+#include config_cmd_default.h
+
+#define CONFIG_CMD_ASKENV
+#if defined(CONFIG_440)
+#define CONFIG_CMD_CACHE
+#endif
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_DIAG
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_IRQ
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_NFS
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_REGINFO
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_BOOTDELAY   5   /* autoboot after 5 seconds */
+#define CFG_LONGHELP   /* undef to save memory */
+#define CFG_PROMPT =/* Monitor Command Prompt   */
+#if defined(CONFIG_CMD_KGDB)
+#define CFG_CBSIZE 1024/* Console I/O Buffer Size  */
+#else
+#define CFG_CBSIZE 256 /* Console I/O Buffer Size  */
+#endif
+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16)
+#define CFG_MAXARGS16  /* max number of command args   */
+#define CFG_BARGSIZE   CFG_CBSIZE /* Boot Argument Buffer Size */
+
+#define CFG_MEMTEST_START  0x040 /* memtest works on   */
+#define CFG_MEMTEST_END0x0C0 /* 4 ... 12 MB in DRAM
*/
+
+#define CFG_LOAD_ADDR  0x10  /* default load address   */
+#define CFG_EXTBDINFO  /* To use extended board_into (bd_t) */
+
+#define CFG_HZ 1000/* decrementer freq: 1 ms ticks */
+
+#define CONFIG_CMDLINE_EDITING /* add command line history */
+#define CONFIG_AUTO_COMPLETE   /* add autocompletion support   */
+#define CONFIG_LOOPW   /* enable loopw command */
+#define CONFIG_MX_CYCLIC   /* enable mdc/mwc commands  */
+#define CONFIG_ZERO_BOOTDELAY_CHECK/* check for keypress on bootdelay==0 */
+#define CONFIG_VERSION_VARIABLE/* include version env variable */
+#define CFG_CONSOLE_INFO_QUIET /* don't print console @ startup*/
+
+#define CFG_HUSH_PARSER/* Use the HUSH parser  
*/
+#ifdef CFG_HUSH_PARSER
+#defineCFG_PROMPT_HUSH_PS2  
+#endif
+
+#define CONFIG_LOADS_ECHO  /* echo on 

Re: [U-Boot-Users] [PATCH 1/2] 83xx/85xx/86xx: factor out Freescale Localbus defines out of mpc83xx.h

2008-06-06 Thread Wolfgang Grandegger
Anton Vorontsov wrote:
 On Wed, May 28, 2008 at 12:21:26PM -0500, Kim Phillips wrote:
 On Wed, 28 May 2008 18:20:15 +0400
 Anton Vorontsov [EMAIL PROTECTED] wrote:

 This patch moves Freescale Localbus defines out of mpc83xx.h, so we could
 use it on MPC85xx and MPC86xx processors.

 Signed-off-by: Anton Vorontsov [EMAIL PROTECTED]
 ---
  include/asm-ppc/fsl_lbc.h |  251 
 +
  include/mpc83xx.h |  234 +-
  include/mpc85xx.h |2 +
  include/mpc86xx.h |2 +
  4 files changed, 256 insertions(+), 233 deletions(-)
  create mode 100644 include/asm-ppc/fsl_lbc.h

 can we move the BRx_* and ORx_* left behind in mpc85xx.h also?
 
 Yes, easily (because there is no single user).
 
 The same is needed for mpc8xx.h and mpc8260.h (defines are almost
 the same, just few differences which needs some attention though).
 
 But the bad news for mpc8xx and mpc8260 is that there are a lot of users
 of these defines. So this cleanup I'll leave for the better times.
 
 - - - -
 From: Anton Vorontsov [EMAIL PROTECTED]
 Subject: 83xx/85xx: further localbus cleanups
 
 Merge mpc85xx.h's LBC defines to fsl_lbc.h. Also, adopt ACS names
 from mpc85xx.h, so ACS_0b10 renamed to ACS_DIV4, ACS_0b11 to ACS_DIV2.
 
 Signed-off-by: Anton Vorontsov [EMAIL PROTECTED]
 ---
  include/asm-ppc/fsl_lbc.h |   17 +++--
  include/configs/MPC8315ERDB.h |2 +-
  include/configs/MPC8349EMDS.h |2 +-
  include/configs/MPC8349ITX.h  |4 ++--
  include/configs/MPC8360EMDS.h |2 +-
  include/configs/MPC8360ERDK.h |2 +-
  include/configs/MPC837XEMDS.h |2 +-
  include/configs/TQM834x.h |2 +-
  include/mpc85xx.h |   35 ---
  9 files changed, 23 insertions(+), 45 deletions(-)

What is the status of these two patches? It would be nice if we could
apply them quickly because some pending patches already rely on (or
conflict with) them.

Thanks,

Wolfgang.

-
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 0/8] Updates for socrates board

2008-06-06 Thread Wolfgang Denk

The following series of patches contain updates for the socrates
board.

Note: most patches are 85xx stuff, but there are also some NAND
patches.

0001-Socrates-Fixed-PCI-bus-frequency-report.patch
0002-Socrates-config-file-cleanup.patch
0003-Added-the-upmconfig-function-for-85xx.patch
0004-Socrates-Added-FPGA-mapping.-LAWs-and-TLBs-cleanup.patch
0005-Socrates-added-missed-file-with-UPMA-configuration.patch
0006-NAND-Added-support-for-128-bit-OOB-adapted.patch
0007-Socrates-NAND-support-added.-Changed-the-U-Boot-bas.patch
0008-Socrates-Added-FPGA-base-address-update-in-FDT.patch

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
A meeting is an event at which the minutes are kept and the hours are
lost.

-
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


Re: [U-Boot-Users] Pull Request for mpc86xx repository

2008-06-06 Thread Jon Loeliger
On Mon, 2008-06-02 at 11:38 -0500, Jon Loeliger wrote:
 On Mon, 2008-05-19 at 11:06 -0500, Jon Loeliger wrote:
  The following changes since commit 180a90abdae72587c0f679edf8991455e559440d:
Wolfgang Denk (1):
  Release v1.3.3
  
  are available in the git repository at:
  
git://www.denx.de/git/u-boot-mpc86xx.git master
  
  Jon Loeliger (1):
mpc86xx: Removed unused and unconfigured memory test code.
  
   board/freescale/mpc8610hpcd/mpc8610hpcd.c |   36 
  -
   board/freescale/mpc8641hpcn/mpc8641hpcn.c |   36 
  -
   include/configs/MPC8610HPCD.h |2 -
   include/configs/MPC8641HPCN.h |1 -
   4 files changed, 0 insertions(+), 75 deletions(-)
 
 
 Wolfgang,
 
 Wasn't sure if this was still on your radar or not.
 Just wanted to make sure it hit this merge window.
 
 Thanks,
 jdl


Wolfgang,

This pull request has had one more commit added to it,
so now it has:

Becky Bruce (1):
  MPC86xx: Change traps.c to not reference non-addressable memory

Jon Loeliger (1):
  mpc86xx: Removed unused and unconfigured memory test code.

 board/freescale/mpc8610hpcd/mpc8610hpcd.c |   36 -
 board/freescale/mpc8641hpcn/mpc8641hpcn.c |   36 -
 cpu/mpc86xx/traps.c   |8 +-
 include/configs/MPC8610HPCD.h |2 -
 include/configs/MPC8641HPCN.h |1 -
 5 files changed, 7 insertions(+), 76 deletions(-)

The added patch from Becky was already posted to the list on May 14.

Thanks,
jdl



-
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] [FIT] Delay FIT format check on sector based devices

2008-06-06 Thread Marian Balakowicz
Global FIT image operations like format check cannot be performed on
a first sector data, defer them to the point when whole FIT image was
uploaded to a system RAM.

Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
---

Grant,

Please give this patch a try on your system and let me know if it helped to
solve the nand booting issue.

Thanks,
m.

 common/cmd_doc.c  |   19 ++-
 common/cmd_fdc.c  |   15 ---
 common/cmd_ide.c  |   19 ++-
 common/cmd_nand.c |   38 --
 common/cmd_scsi.c |   15 ---
 common/cmd_usb.c  |   15 ---
 6 files changed, 64 insertions(+), 57 deletions(-)


diff --git a/common/cmd_doc.c b/common/cmd_doc.c
index 83aba37..d7b2f53 100644
--- a/common/cmd_doc.c
+++ b/common/cmd_doc.c
@@ -206,7 +206,7 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
image_header_t *hdr;
int rcode = 0;
 #if defined(CONFIG_FIT)
-   const void *fit_hdr;
+   const void *fit_hdr = NULL;
 #endif
 
show_boot_progress (34);
@@ -275,12 +275,6 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
 #if defined(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
fit_hdr = (const void *)addr;
-   if (!fit_check_format (fit_hdr)) {
-   show_boot_progress (-130);
-   puts (** Bad FIT image format\n);
-   return 1;
-   }
-   show_boot_progress (131);
puts (Fit image detected...\n);
 
cnt = fit_get_size (fit_hdr);
@@ -304,8 +298,15 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
 
 #if defined(CONFIG_FIT)
/* This cannot be done earlier, we need complete FIT image in RAM first 
*/
-   if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT)
-   fit_print_contents ((const void *)addr);
+   if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) {
+   if (!fit_check_format (fit_hdr)) {
+   show_boot_progress (-130);
+   puts (** Bad FIT image format\n);
+   return 1;
+   }
+   show_boot_progress (131);
+   fit_print_contents (fit_hdr);
+   }
 #endif
 
/* Loading ok, update default load address */
diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c
index 0293d18..e4fbf29 100644
--- a/common/cmd_fdc.c
+++ b/common/cmd_fdc.c
@@ -787,7 +787,7 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
char *ep;
int rcode = 0;
 #if defined(CONFIG_FIT)
-   const void *fit_hdr;
+   const void *fit_hdr = NULL;
 #endif
 
switch (argc) {
@@ -847,10 +847,6 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
 #if defined(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
fit_hdr = (const void *)addr;
-   if (!fit_check_format (fit_hdr)) {
-   puts (** Bad FIT image format\n);
-   return 1;
-   }
puts (Fit image detected...\n);
 
imsize = fit_get_size (fit_hdr);
@@ -879,8 +875,13 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
 
 #if defined(CONFIG_FIT)
/* This cannot be done earlier, we need complete FIT image in RAM first 
*/
-   if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT)
-   fit_print_contents ((const void *)addr);
+   if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) {
+   if (!fit_check_format (fit_hdr)) {
+   puts (** Bad FIT image format\n);
+   return 1;
+   }
+   fit_print_contents (fit_hdr);
+   }
 #endif
 
/* Loading ok, update default load address */
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 6560702..97a873d 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -367,7 +367,7 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
image_header_t *hdr;
int rcode = 0;
 #if defined(CONFIG_FIT)
-   const void *fit_hdr;
+   const void *fit_hdr = NULL;
 #endif
 
show_boot_progress (41);
@@ -465,12 +465,6 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, 
char *argv[])
 #if defined(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
fit_hdr = (const void *)addr;
-   if (!fit_check_format (fit_hdr)) {
-   show_boot_progress (-140);
-   puts (** Bad FIT image format\n);
-   return 1;
-   }
-   show_boot_progress (141);
puts (Fit image detected...\n);
 
cnt = fit_get_size (fit_hdr);
@@ -496,8 +490,15 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, 
char *argv[])
 
 #if defined(CONFIG_FIT)
/* This cannot be done earlier, 

Re: [U-Boot-Users] [PATCH] [FIT] Delay FIT format check on sector based devices

2008-06-06 Thread Grant Erickson
On 6/6/08 2:07 PM, Marian Balakowicz wrote:
 Global FIT image operations like format check cannot be performed on
 a first sector data, defer them to the point when whole FIT image was
 uploaded to a system RAM.
 
 Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
 ---
 
 Grant,
 
 Please give this patch a try on your system and let me know if it helped to
 solve the nand booting issue.

Marian:

Thanks for the prompt response on the patch. This matches what I mocked up
as a fix and testing your solution works for the 'cmd_nand' case on my AMCC
board. I did not test and cannot comment on the others so I'll partially ACK
it.

Partial Acked-by: Grant Erickson [EMAIL PROTECTED]

Thanks again,

Grant



-
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


Re: [U-Boot-Users] [PATCH] sh: Renesas Solutions SH7763RDP board support

2008-06-06 Thread Nobuhiro Iwamatsu
Hi, Ben.

On Fri, 06 Jun 2008 08:58:21 -0700
Ben Warren [EMAIL PROTECTED] wrote:

 snip
  +#define CONFIG_NETMASK 255.255.255.0
  +#define CONFIG_IPADDR  192.168.0.63
  +#define CONFIG_SERVERIP192.168.0.1

 Please remove default network address parameters.
Thank you for your comment.

OK. I will remove and resend.

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu

-
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] [GIT PULL] MIPS updates

2008-06-06 Thread Shinya Kuribayashi
Please pull MIPS updates to pick up the following patches.

The following changes since commit 8155efbd7ae9c65564ca98affe94631d612ae088:
  Wolfgang Denk (1):
Merge branch 'master' of ssh://mercury/home/wd/git/u-boot/master

are available in the git repository at:

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

Shinya Kuribayashi (8):
  [MIPS] lib_mips/time.c: Replace CP0 access functions with existing macros
  [MIPS] lib_mips/time.c: Fix udelay
  [MIPS] lib_mips/time.c: Fix CP0 count register usage and timer routines
  [MIPS] Kill unused version.h inclusions
  [MIPS] mips_config.mk: Misc fixes
  [MIPS] Update asm/addrspace.h header
  [MIPS] Rename Alchemy processor configs into CONFIGO_SOC_*
  [MIPS] cpu/mips/Makefile: Split [CS]OBJS onto separate lines

 board/dbau1x00/lowlevel_init.S  |1 -
 board/gth2/gth2.c   |2 +-
 board/gth2/lowlevel_init.S  |1 -
 board/incaip/incaip.c   |2 +-
 board/incaip/lowlevel_init.S|1 -
 board/pb1x00/lowlevel_init.S|1 -
 board/purple/lowlevel_init.S|1 -
 board/purple/purple.c   |   14 ++--
 board/qemu-mips/lowlevel_init.S |1 -
 board/tb0229/lowlevel_init.S|1 -
 board/tb0229/vr4131-pci.c   |   56 ++--
 cpu/mips/Makefile   |   15 ++--
 cpu/mips/asc_serial.c   |3 -
 cpu/mips/au1x00_eth.c   |   12 +--
 cpu/mips/au1x00_serial.c|4 -
 cpu/mips/au1x00_usb_ohci.c  |2 +-
 cpu/mips/cache.S|7 +-
 cpu/mips/incaip_wdt.S   |1 -
 cpu/mips/start.S|1 -
 drivers/net/inca-ip_sw.c|   28 +++---
 include/asm-mips/addrspace.h|  173 +--
 include/asm-mips/au1x00.h   |6 +-
 include/asm-mips/io.h   |4 +-
 include/configs/dbau1x00.h  |   14 ++--
 include/configs/gth2.h  |8 +-
 include/configs/incaip.h|4 +-
 include/configs/pb1x00.h|   12 ++-
 include/configs/purple.h|3 +-
 include/configs/qemu-mips.h |4 +-
 include/configs/tb0229.h|4 +-
 lib_mips/time.c |   57 ++---
 mips_config.mk  |7 +-
 32 files changed, 263 insertions(+), 187 deletions(-)

diff --git a/board/dbau1x00/lowlevel_init.S b/board/dbau1x00/lowlevel_init.S
index 27b51f7..13e6bfc 100644
--- a/board/dbau1x00/lowlevel_init.S
+++ b/board/dbau1x00/lowlevel_init.S
@@ -1,7 +1,6 @@
 /* Memory sub-system initialization code */
 
 #include config.h
-#include version.h
 #include asm/regdef.h
 #include asm/au1x00.h
 #include asm/mipsregs.h
diff --git a/board/gth2/gth2.c b/board/gth2/gth2.c
index 9bc4d3f..3e56678 100644
--- a/board/gth2/gth2.c
+++ b/board/gth2/gth2.c
@@ -36,7 +36,7 @@ static int wdi_status = 0;
 #define SDRAM_SIZE ((64*1024*1024)-(12*4096))
 
 
-#define SERIAL_LOG_BUFFER KSEG1ADDR(SDRAM_SIZE + (8*4096))
+#define SERIAL_LOG_BUFFER CKSEG1ADDR(SDRAM_SIZE + (8*4096))
 
 void inline log_serial_char(char c){
char *serial_log_buffer = (char*)SERIAL_LOG_BUFFER;
diff --git a/board/gth2/lowlevel_init.S b/board/gth2/lowlevel_init.S
index bf615c1..4c4f0eb 100644
--- a/board/gth2/lowlevel_init.S
+++ b/board/gth2/lowlevel_init.S
@@ -1,7 +1,6 @@
 /* Memory sub-system initialization code */
 
 #include config.h
-#include version.h
 #include asm/regdef.h
 #include asm/au1x00.h
 #include asm/mipsregs.h
diff --git a/board/incaip/incaip.c b/board/incaip/incaip.c
index c624b3d..dc51373 100644
--- a/board/incaip/incaip.c
+++ b/board/incaip/incaip.c
@@ -63,7 +63,7 @@ long int initdram(int board_type)
 
/* Can't probe for RAM size unless we are running from Flash.
 */
-   if (PHYSADDR(our_address)  PHYSADDR(PHYS_FLASH_1))
+   if (CPHYSADDR(our_address)  CPHYSADDR(PHYS_FLASH_1))
{
return max_sdram_size();
}
diff --git a/board/incaip/lowlevel_init.S b/board/incaip/lowlevel_init.S
index 08f7f21..fe525ec 100644
--- a/board/incaip/lowlevel_init.S
+++ b/board/incaip/lowlevel_init.S
@@ -23,7 +23,6 @@
  */
 
 #include config.h
-#include version.h
 #include asm/regdef.h
 
 
diff --git a/board/pb1x00/lowlevel_init.S b/board/pb1x00/lowlevel_init.S
index 98bb394..b145e43 100644
--- a/board/pb1x00/lowlevel_init.S
+++ b/board/pb1x00/lowlevel_init.S
@@ -1,7 +1,6 @@
 /* Memory sub-system initialization code */
 
 #include config.h
-#include version.h
 #include asm/regdef.h
 #include asm/au1x00.h
 #include asm/mipsregs.h
diff --git a/board/purple/lowlevel_init.S b/board/purple/lowlevel_init.S
index b9d03fc..1bd3edb 100644
--- a/board/purple/lowlevel_init.S
+++ b/board/purple/lowlevel_init.S
@@ -23,7 +23,6 @@
  */
 
 #include config.h
-#include version.h
 #include asm/regdef.h
 
 #define MC_IOGP0xBF800800
diff --git a/board/purple/purple.c b/board/purple/purple.c
index 89cb906..72d5734 100644
--- a/board/purple/purple.c
+++ b/board/purple/purple.c
@@ -85,16 +85,16 @@ static void