[U-Boot] [PATCH] at91: add support for PM9261 board

2008-11-07 Thread Ilko Iliev
This patch adds support for the PM9261 board of Ronetix GmbH (www.ronetix.at)

Signed-off-by: Ilko Iliev <[EMAIL PROTECTED]>
---
 MAKEALL |1 +
 Makefile|3 +
 board/ronetix/pm9261/Makefile   |   60 +
 board/ronetix/pm9261/config.mk  |1 +
 board/ronetix/pm9261/pm9261.c   |  352 +
 board/ronetix/pm9261/pm9261_led.c   |   79 ++
 board/ronetix/pm9261/pm9261_lowlevel_init.S |  368 +++
 board/ronetix/pm9261/pm9261_nand.c  |   79 ++
 board/ronetix/pm9261/pm9261_partition.c |   47 
 include/configs/pm9261.h|  266 
 10 files changed, 1265 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 MAKEALL
 create mode 100644 board/ronetix/pm9261/Makefile
 create mode 100644 board/ronetix/pm9261/config.mk
 create mode 100644 board/ronetix/pm9261/pm9261.c
 create mode 100644 board/ronetix/pm9261/pm9261_led.c
 create mode 100644 board/ronetix/pm9261/pm9261_lowlevel_init.S
 create mode 100644 board/ronetix/pm9261/pm9261_nand.c
 create mode 100644 board/ronetix/pm9261/pm9261_partition.c
 create mode 100644 include/configs/pm9261.h

diff --git a/MAKEALL b/MAKEALL
old mode 100755
new mode 100644
index a1df37b..09ba6d1
--- a/MAKEALL
+++ b/MAKEALL
@@ -545,6 +545,7 @@ LIST_at91=" \
kb9202  \
mp2usb  \
m501sk  \
+   pm9261  \
pm9263  \
 "
 
diff --git a/Makefile b/Makefile
index 7d43159..0a5d3a9 100644
--- a/Makefile
+++ b/Makefile
@@ -2561,6 +2561,9 @@ at91cap9adk_config:   unconfig
 at91sam9260ek_config   :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9260ek atmel at91
 
+pm9261_config  :   unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9261 ronetix at91
+
 pm9263_config  :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
 
diff --git a/board/ronetix/pm9261/Makefile b/board/ronetix/pm9261/Makefile
new file mode 100644
index 000..48a42ea
--- /dev/null
+++ b/board/ronetix/pm9261/Makefile
@@ -0,0 +1,60 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# (C) Copyright 2008
+# Stelian Pop <[EMAIL PROTECTED]>
+# Lead Tech Design 
+# Ilko Iliev 
+#
+# 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-y += pm9261.o
+COBJS-y += pm9261_led.o
+COBJS-y+= pm9261_partition.o
+COBJS-$(CONFIG_CMD_NAND) += pm9261_nand.o
+
+SOBJS  := pm9261_lowlevel_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y) $(SOBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $@, $(OBJS))
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/ronetix/pm9261/config.mk b/board/ronetix/pm9261/config.mk
new file mode 100644
index 000..7185419
--- /dev/null
+++ b/board/ronetix/pm9261/config.mk
@@ -0,0 +1 @@
+TEXT_BASE = 0x23f0
\ No newline at end of file
diff --git a/board/ronetix/pm9261/pm9261.c b/board/ronetix/pm9261/pm9261.c
new file mode 100644
index 000..632eab1
--- /dev/null
+++ b/board/ronetix/pm9261/pm9261.c
@@ -0,0 +1,352 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <[EMAIL PROTECTED]>
+ * Lead Tech Design 
+ * Ilko Iliev 
+*
+ * 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

Re: [U-Boot] broken lib_arm/boom.c/do_bootm_linux()

2008-11-07 Thread Kumar Gala

On Nov 7, 2008, at 5:07 AM, Ilko Iliev wrote:

> Hi,
>
> There is a bug in lib_arm/boom.c/do_bootm_linux():
>if ((flag != 0) || (flag != BOOTM_STATE_OS_GO))
>return 1;
>
> The parameter "flag" is 0 and the above condition is always true.
>
> The result is - the boom command doesn't start the kernel.
> Affected targets: all arm based.
>
> Maybe it should be corrected to:
>if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
>return 1;
>

that's correct.. for some reason the lib_arm/ case didn't get fixed.   
How about sending a patch to fix it.

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


Re: [U-Boot] [PATCH 2/6] AT572D940HF-EB Support v2 (cpu folder)

2008-11-07 Thread Haavard Skinnemoen
"Antonio R. Costa" <[EMAIL PROTECTED]> wrote:

> As we agreed with Haavard I'll try to make a general SDHC patch for all
> Atmel platform soon.

Note that there's a generic MMC framework in the works:

http://www.nabble.com/-U-Boot---PATCH-00-10--Add-MMC-Framework-td20256840.html

which we should probably consider using once it is finished.

Of course, adding support for AT91 and SDHC to the atmel-mci driver is
a good thing in itself, so it can happen earlier, but depending on the
timing of things, there may be conflicts.

So I highly recommend that you keep the list informed about what you're
doing at that front, so that we can avoid stepping on each others' toes.

If you have the time, I'm sure Andy will appreciate your comments on
his patches too.

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


[U-Boot] [PATCH v2] OneNAND: Bad block aware read/write command support

2008-11-07 Thread Stefan Roese
Update OneNAND command to support bad block awareness.
Also change the OneNAND command style to better match the
NAND version.

Signed-off-by: Stefan Roese <[EMAIL PROTECTED]>
Acked-by: Kyungmin Park <[EMAIL PROTECTED]>
---
v2:
- Removed the bad block marking when an erase/read/write access to a block
  fails
- More cleanup's


 common/cmd_onenand.c |  529 +++---
 1 files changed, 419 insertions(+), 110 deletions(-)

diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c
index 8d87b78..a490ef7 100644
--- a/common/cmd_onenand.c
+++ b/common/cmd_onenand.c
@@ -1,7 +1,7 @@
 /*
  *  U-Boot command for OneNAND support
  *
- *  Copyright (C) 2005-2007 Samsung Electronics
+ *  Copyright (C) 2005-2008 Samsung Electronics
  *  Kyungmin Park <[EMAIL PROTECTED]>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -18,159 +19,467 @@
 
 #include 
 
-extern struct mtd_info onenand_mtd;
-extern struct onenand_chip onenand_chip;
+static struct mtd_info *mtd = &onenand_mtd;
+
+static loff_t next_ofs;
+static loff_t skip_ofs;
+
+static inline int str2long(char *p, ulong *num)
+{
+   char *endptr;
+
+   *num = simple_strtoul(p, &endptr, 16);
+   return (*p != '\0' && *endptr == '\0') ? 1 : 0;
+}
+
+static int arg_off_size(int argc, char *argv[], ulong *off, size_t *size)
+{
+   if (argc >= 1) {
+   if (!(str2long(argv[0], off))) {
+   printf("'%s' is not a number\n", argv[0]);
+   return -1;
+   }
+   } else {
+   *off = 0;
+   }
+
+   if (argc >= 2) {
+   if (!(str2long(argv[1], (ulong *)size))) {
+   printf("'%s' is not a number\n", argv[1]);
+   return -1;
+   }
+   } else {
+   *size = mtd->size - *off;
+   }
+
+   if ((*off + *size) > mtd->size) {
+   printf("total chip size (0x%x) exceeded!\n", mtd->size);
+   return -1;
+   }
+
+   if (*size == mtd->size)
+   puts("whole chip\n");
+   else
+   printf("offset 0x%lx, size 0x%x\n", *off, *size);
+
+   return 0;
+}
+
+static int onenand_block_read(loff_t from, size_t len,
+ size_t *retlen, u_char *buf, int oob)
+{
+   struct onenand_chip *this = mtd->priv;
+   int blocks = (int) len >> this->erase_shift;
+   int blocksize = (1 << this->erase_shift);
+   loff_t ofs = from;
+   struct mtd_oob_ops ops = {
+   .retlen = 0,
+   };
+   int ret, dump = 0;
+
+   if (oob)
+   ops.ooblen = blocksize;
+   else
+   ops.len = blocksize;
+
+   while (blocks) {
+   ret = mtd->block_isbad(mtd, ofs);
+   if (ret) {
+   printk("Bad blocks %d at 0x%x\n",
+  (u32)(ofs >> this->erase_shift), (u32)ofs);
+   ofs += blocksize;
+   continue;
+   }
+
+   if (oob)
+   ops.oobbuf = buf;
+   else
+   ops.datbuf = buf;
+
+   ops.retlen = 0;
+   ret = mtd->read_oob(mtd, ofs, &ops);
+   if (ret) {
+   printk("Read failed 0x%x, %d", (u32)ofs, ret);
+   ofs += blocksize;
+   continue;
+   }
+   ofs += blocksize;
+   buf += blocksize;
+   blocks--;
+   *retlen += ops.retlen;
+   }
+
+   return 0;
+}
+
+static int onenand_block_write(loff_t to, size_t len,
+  size_t *retlen, const u_char * buf)
+{
+   struct onenand_chip *this = mtd->priv;
+   int blocks = len >> this->erase_shift;
+   int blocksize = (1 << this->erase_shift);
+   loff_t ofs;
+   size_t _retlen = 0;
+   int ret;
+
+   if (to == next_ofs) {
+   next_ofs = to + len;
+   to += skip_ofs;
+   } else {
+   next_ofs = to + len;
+   skip_ofs = 0;
+   }
+   ofs = to;
+
+   while (blocks) {
+   ret = mtd->block_isbad(mtd, ofs);
+   if (ret) {
+   printk("Bad blocks %d at 0x%x\n",
+  (u32)(ofs >> this->erase_shift), (u32)ofs);
+   skip_ofs += blocksize;
+   goto next;
+   }
+
+   ret = mtd->write(mtd, ofs, blocksize, &_retlen, buf);
+   if (ret) {
+   printk("Write failed 0x%x, %d", (u32)ofs, ret);
+   skip_ofs += blocksize;
+   goto next;
+   }
+
+   buf += blocksize;
+   blocks--;
+   *retlen += _retlen;
+next:
+   

[U-Boot] [PATCH] OneNAND: Fix compiler warnings and add weak attribute to memcpy_16()

2008-11-07 Thread Stefan Roese
This patch adds memcpy_16_from_onenand() and memcpy_16_to_onenand()
functions and defaults them to the already available memcpy_16()
function. They are defined weak so that they can be overwritten by
a board/platform specific version.

This is needed for the vcth board support (still to come) which needs
custom access routines here.

It also removes some compiler warnings by adding the onenand_get_2x_blockpage()
function and removing the onenand_lock()/onenand_unlock() functions.

Signed-off-by: Stefan Roese <[EMAIL PROTECTED]>
---

This patch has to be applied on top of the patch submitted by Kyungmin Park
on 2008-11-04:
[PATCH] [OneNAND] Sync with 2.6.27


 drivers/mtd/onenand/onenand_base.c |   38 ---
 1 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c 
b/drivers/mtd/onenand/onenand_base.c
index 66214e8..5c752ca 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -24,7 +24,7 @@
 #include 
 
 /* It should access 16-bit instead of 8-bit */
-static inline void *memcpy_16(void *dst, const void *src, unsigned int len)
+void *__memcpy_16(void *dst, const void *src, unsigned int len)
 {
void *ret = dst;
short *d = dst;
@@ -35,6 +35,10 @@ static inline void *memcpy_16(void *dst, const void *src, 
unsigned int len)
*d++ = *s++;
return ret;
 }
+void *memcpy_16_from_onenand(void *dst, const void *src, unsigned int len)
+   __attribute__((weak, alias("__memcpy_16")));
+void *memcpy_16_to_onenand(void *dst, const void *src, unsigned int len)
+   __attribute__((weak, alias("__memcpy_16")));
 
 static const unsigned char ffchars[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
@@ -349,7 +353,7 @@ static int onenand_read_bufferram(struct mtd_info *mtd, 
loff_t addr, int area,
bufferram = this->base + area;
bufferram += onenand_bufferram_offset(mtd, area);
 
-   memcpy_16(buffer, bufferram + offset, count);
+   memcpy_16_from_onenand(buffer, bufferram + offset, count);
 
return 0;
 }
@@ -376,7 +380,7 @@ static int onenand_sync_read_bufferram(struct mtd_info 
*mtd, loff_t addr, int ar
 
this->mmcontrol(mtd, ONENAND_SYS_CFG1_SYNC_READ);
 
-   memcpy_16(buffer, bufferram + offset, count);
+   memcpy_16_from_onenand(buffer, bufferram + offset, count);
 
this->mmcontrol(mtd, 0);
 
@@ -403,12 +407,36 @@ static int onenand_write_bufferram(struct mtd_info *mtd, 
loff_t addr, int area,
bufferram = this->base + area;
bufferram += onenand_bufferram_offset(mtd, area);
 
-   memcpy_16(bufferram + offset, buffer, count);
+   memcpy_16_to_onenand(bufferram + offset, buffer, count);
 
return 0;
 }
 
 /**
+ * onenand_get_2x_blockpage - [GENERIC] Get blockpage at 2x program mode
+ * @param mtd  MTD data structure
+ * @param addr address to check
+ * @return blockpage address
+ *
+ * Get blockpage address at 2x program mode
+ */
+static int onenand_get_2x_blockpage(struct mtd_info *mtd, loff_t addr)
+{
+   struct onenand_chip *this = mtd->priv;
+   int blockpage, block, page;
+
+   /* Calculate the even block number */
+   block = (int) (addr >> this->erase_shift) & ~1;
+   /* Is it the odd plane? */
+   if (addr & this->writesize)
+   block++;
+   page = (int) (addr >> (this->page_shift + 1)) & this->page_mask;
+   blockpage = (block << 7) | page;
+
+   return blockpage;
+}
+
+/**
  * onenand_check_bufferram - [GENERIC] Check BufferRAM information
  * @param mtd  MTD data structure
  * @param addr address to check
@@ -1666,6 +1694,7 @@ static int onenand_do_lock_cmd(struct mtd_info *mtd, 
loff_t ofs, size_t len, int
return 0;
 }
 
+#ifdef ONENAND_LINUX
 /**
  * onenand_lock - [MTD Interface] Lock block(s)
  * @param mtd   MTD device structure
@@ -1701,6 +1730,7 @@ static int onenand_unlock(struct mtd_info *mtd, loff_t 
ofs, size_t len)
onenand_release_device(mtd);
return ret;
 }
+#endif
 
 /**
  * onenand_check_lock_status - [OneNAND Interface] Check lock status
-- 
1.6.0.3

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


Re: [U-Boot] AT91RM9200 boots from NOR Flash or not

2008-11-07 Thread Wolfgang Denk
Dear Jens,

in message <[EMAIL PROTECTED]> you wrote:
>
> I can do this in few weeks. But I have only our costum board. So I can't
> test the interaktion with other boards.

I can test on the DK, and eventually on the cmc_pu2.


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]
This cultural mystique surrounding the  biological  function  --  you
realize humans are overly preoccupied with the subject.
-- Kelinda the Kelvan, "By Any Other Name", stardate 4658.9
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] broken lib_arm/boom.c/do_bootm_linux()

2008-11-07 Thread Ilko Iliev
Hi,

There is a bug in lib_arm/boom.c/do_bootm_linux():
if ((flag != 0) || (flag != BOOTM_STATE_OS_GO))
return 1;

The parameter "flag" is 0 and the above condition is always true.

The result is - the boom command doesn't start the kernel.
Affected targets: all arm based.

Maybe it should be corrected to:
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
return 1;


-- 
With best regards,
Ilko Iliev
Ronetix Development Tools GmbH
CPU Modules, JTAG/BDM Emulators and Flash Programmers
Waidhausenstrasse 13/5, 1140 Vienna, Austria
E-Mail: [EMAIL PROTECTED]; Web: www.ronetix.at

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


Re: [U-Boot] [PATCH 2/6] AT572D940HF-EB Support v2 (cpu folder)

2008-11-07 Thread Antonio R. Costa
Hi JC,
  I'm very sorry for the delayed answer.
  I'm pretty close to release a Linux patch for our platform so no time for
now.

Anyway by the end of the year I would like to launch the complete BSP for
our platform
so I would like to make all things tidy.

As we agreed with Haavard I'll try to make a general SDHC patch for all
Atmel platform soon.

I hope to come back to you soon.

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


[U-Boot] [PATCH] mpc8641: Try to detect old .dts files

2008-11-07 Thread Becky Bruce
Since we've changed the memory map of the board, be nice and
add some checking to try to catch out-of-date .dts files.  We do
this by checking the CCSRBAR location in the .dts and comparing
it to the CCSRBAR location in u-boot.  If they don't match, a
warning msg is printed.  This isn't foolproof, but it's simple and
will catch most of the cases where an out-of-date .dts is present,
including all of the cases where a new u-boot is used with an old
standard MPC8641 .dts file as supplied with Linux.

Signed-off-by: Becky Bruce <[EMAIL PROTECTED]>
---
 board/freescale/mpc8641hpcn/mpc8641hpcn.c |   27 +++
 include/configs/MPC8641HPCN.h |3 +++
 2 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c 
b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
index d6a0a56..1f9f2a3 100644
--- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
+++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
@@ -254,6 +254,10 @@ extern void ft_fsl_pci_setup(void *blob, const char 
*pci_alias,
 void
 ft_board_setup(void *blob, bd_t *bd)
 {
+   int off;
+   u64 *tmp;
+   u32 *addrcells;
+
ft_cpu_setup(blob, bd);
 
 #ifdef CONFIG_PCI1
@@ -262,6 +266,29 @@ ft_board_setup(void *blob, bd_t *bd)
 #ifdef CONFIG_PCI2
ft_fsl_pci_setup(blob, "pci1", &pci2_hose);
 #endif
+
+   /*
+* Warn if it looks like the device tree doesn't match u-boot.
+* This is just an estimation, based on the location of CCSR,
+* which is defined by the "reg" property in the soc node.
+*/
+   off = fdt_path_offset(blob, "/soc8641");
+   addrcells = (u32 *)fdt_getprop(blob, 0, "#address-cells", NULL);
+   tmp = (u64 *)fdt_getprop(blob, off, "reg", NULL);
+
+   if (tmp) {
+   u64 addr;
+   if (addrcells && (*addrcells == 2))
+   addr = *tmp;
+   else
+   addr = *(u32 *)tmp;
+
+   if (addr != CONFIG_SYS_CCSRBAR_PHYS)
+   printf("WARNING: The CCSRBAR address in your .dts "
+  "does not match the address of the CCSR "
+  "in u-boot.  This means your .dts might "
+  "be old.\n");
+   }
 }
 #endif
 
diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h
index c84ae5e..69b4c44 100644
--- a/include/configs/MPC8641HPCN.h
+++ b/include/configs/MPC8641HPCN.h
@@ -115,8 +115,11 @@ extern unsigned long get_board_sys_clk(unsigned long 
dummy);
 #define CONFIG_SYS_CCSRBAR_PHYS_LOWCONFIG_SYS_CCSRBAR
 #ifdef CONFIG_PHYS_64BIT
 #define CONFIG_SYS_CCSRBAR_PHYS_HIGH   0xf
+#define CONFIG_SYS_CCSRBAR_PHYS(CONFIG_SYS_CCSRBAR_PHYS_LOW \
+| ((u64)CONFIG_SYS_CCSRBAR_PHYS_HIGH 
<< 32))
 #else
 #define CONFIG_SYS_CCSRBAR_PHYS_HIGH   0x0
+#define CONFIG_SYS_CCSRBAR_PHYSCONFIG_SYS_CCSRBAR_PHYS_LOW
 #endif
 
 #define CONFIG_SYS_PCI1_ADDR   (CONFIG_SYS_CCSRBAR+0x8000)
-- 
1.5.6.5

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


[U-Boot] [PATCH RFC] at91sam9/at91cap: move common initialisation to cpu

2008-11-07 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[EMAIL PROTECTED]>
---
The idea is to reduce common code initialisation which is actually in board.
as done on afeb9260 and Ronetix eval board for 9260 & 9263

Best Regards,
J.
 board/afeb9260/afeb9260.c |   32 ++--
 board/atmel/at91cap9adk/at91cap9adk.c |   33 ++---
 board/atmel/at91sam9260ek/at91sam9260ek.c |   34 ++---
 board/atmel/at91sam9261ek/at91sam9261ek.c |   33 ++---
 board/atmel/at91sam9263ek/at91sam9263ek.c |   33 ++---
 board/atmel/at91sam9rlek/at91sam9rlek.c   |   33 ++---
 cpu/arm926ejs/at91/Makefile   |   19 +++-
 cpu/arm926ejs/at91/at91cap9_serial.c  |   73 +
 cpu/arm926ejs/at91/at91cap9_spi.c |   41 
 cpu/arm926ejs/at91/at91sam9260_serial.c   |   73 +
 cpu/arm926ejs/at91/at91sam9260_spi.c  |   42 
 cpu/arm926ejs/at91/at91sam9261_serial.c   |   73 +
 cpu/arm926ejs/at91/at91sam9261_spi.c  |   41 
 cpu/arm926ejs/at91/at91sam9263_serial.c   |   73 +
 cpu/arm926ejs/at91/at91sam9263_spi.c  |   41 
 cpu/arm926ejs/at91/at91sam9rl_serial.c|   73 +
 cpu/arm926ejs/at91/at91sam9rl_spi.c   |   41 
 include/asm-arm/arch-at91/at91_common.h   |   31 
 18 files changed, 656 insertions(+), 163 deletions(-)
 create mode 100644 cpu/arm926ejs/at91/at91cap9_serial.c
 create mode 100644 cpu/arm926ejs/at91/at91cap9_spi.c
 create mode 100644 cpu/arm926ejs/at91/at91sam9260_serial.c
 create mode 100644 cpu/arm926ejs/at91/at91sam9260_spi.c
 create mode 100644 cpu/arm926ejs/at91/at91sam9261_serial.c
 create mode 100644 cpu/arm926ejs/at91/at91sam9261_spi.c
 create mode 100644 cpu/arm926ejs/at91/at91sam9263_serial.c
 create mode 100644 cpu/arm926ejs/at91/at91sam9263_spi.c
 create mode 100644 cpu/arm926ejs/at91/at91sam9rl_serial.c
 create mode 100644 cpu/arm926ejs/at91/at91sam9rl_spi.c
 create mode 100644 include/asm-arm/arch-at91/at91_common.h

diff --git a/board/afeb9260/afeb9260.c b/board/afeb9260/afeb9260.c
index 32445ab..e1d52ad 100644
--- a/board/afeb9260/afeb9260.c
+++ b/board/afeb9260/afeb9260.c
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -47,27 +48,19 @@ DECLARE_GLOBAL_DATA_PTR;
 static void afeb9260_serial_hw_init(void)
 {
 #ifdef CONFIG_USART0
-   at91_set_A_periph(AT91_PIN_PB4, 1); /* TXD0 */
-   at91_set_A_periph(AT91_PIN_PB5, 0); /* RXD0 */
-   at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_US0);
+   at91_serial_hw_init(0);
 #endif
 
 #ifdef CONFIG_USART1
-   at91_set_A_periph(AT91_PIN_PB6, 1); /* TXD1 */
-   at91_set_A_periph(AT91_PIN_PB7, 0); /* RXD1 */
-   at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_US1);
+   at91_serial_hw_init(1);
 #endif
 
 #ifdef CONFIG_USART2
-   at91_set_A_periph(AT91_PIN_PB8, 1); /* TXD2 */
-   at91_set_A_periph(AT91_PIN_PB9, 0); /* RXD2 */
-   at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_US2);
+   at91_serial_hw_init(2);
 #endif
 
 #ifdef CONFIG_USART3   /* DBGU */
-   at91_set_A_periph(AT91_PIN_PB14, 0);/* DRXD */
-   at91_set_A_periph(AT91_PIN_PB15, 1);/* DTXD */
-   at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
+   at91_serial_hw_init(3);
 #endif
 }
 
@@ -104,19 +97,6 @@ static void afeb9260_nand_hw_init(void)
at91_set_gpio_output(AT91_PIN_PC14, 1);
 }
 
-static void afeb9260_spi_hw_init(void)
-{
-   at91_set_A_periph(AT91_PIN_PA3, 0); /* SPI0_NPCS0 */
-   at91_set_B_periph(AT91_PIN_PC11, 0);/* SPI0_NPCS1 */
-
-   at91_set_A_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */
-   at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */
-   at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */
-
-   /* Enable clock */
-   at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_SPI0);
-}
-
 #ifdef CONFIG_MACB
 static void afeb9260_macb_hw_init(void)
 {
@@ -205,7 +185,7 @@ int board_init(void)
 #ifdef CONFIG_CMD_NAND
afeb9260_nand_hw_init();
 #endif
-   afeb9260_spi_hw_init();
+   at91_spi_hw_init();
 #ifdef CONFIG_MACB
afeb9260_macb_hw_init();
 #endif
diff --git a/board/atmel/at91cap9adk/at91cap9adk.c 
b/board/atmel/at91cap9adk/at91cap9adk.c
index f7d68b7..2d2cfe5 100644
--- a/board/atmel/at91cap9adk/at91cap9adk.c
+++ b/board/atmel/at91cap9adk/at91cap9adk.c
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -50,27 +51,19 @@ DECLARE_GLOBAL_DATA_PTR;
 static void at91cap9_serial_hw_init(void)
 {
 #ifdef CONFIG_USART0
-   at91_set_A_periph(AT91_PIN_PA22, 1);/* TXD0 */
-   at91_set_A_periph(AT91_PIN_PA23, 0);/* RXD0 */
-   at91_s

Re: [U-Boot] Broken network for different u-boot compilation

2008-11-07 Thread Duy-Ky Nguyen
Hello,

I'm using u-boot 1.3.0 from the latest FreeScale Linux BSP MPC8313E-RDB.

If I set TEXT_BASE = 0x100, so I could use BDI debugger to load into RAM
and run it out of RAM.
I'm ABLE to ping to the host from u-boot

But, if I set TEXT_BASE=0xFE00, and burn the image it into Flash,
recycle the power to run it out of Flash.
I'm NOT able to ping from u-boot with error message

"No link".

When I change TEXT_BASE from 0x100 to 0xFE00, I have to do "make
clean" before "make", otherwise it have error message
" undefined reference to 'env_name_space'"


On the other direction, when I change TEXT_BASE from 0xFE00 to
0x100, I have successful compilation without "make clean", but the
u-boot hangs at "DRAM". I have to do "make clean" for successful u-boot AND
network access.

I really appreciate your time and help.

Regards,

Duy-Ky

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


Re: [U-Boot] [PATCH v2] OneNAND: Bad block aware read/write command support

2008-11-07 Thread Scott Wood
On Fri, Nov 07, 2008 at 04:01:13PM +0100, Stefan Roese wrote:
> Update OneNAND command to support bad block awareness.
> Also change the OneNAND command style to better match the
> NAND version.

Is there any chance that we could merge this code with cmd_nand.c?

> +static struct mtd_info *mtd = &onenand_mtd;

Will this cause relocation problems on some architectures?
Could you have more than one OneNAND on a board?

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


[U-Boot] [PATCH] drivers/usb: Move conditional compilation to Makefile

2008-11-07 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[EMAIL PROTECTED]>
---
 drivers/usb/Makefile|   19 +--
 drivers/usb/isp116x-hcd.c   |4 
 drivers/usb/sl811_usb.c |3 ---
 drivers/usb/usb_ohci.c  |4 
 drivers/usb/usbdcore_ep0.c  |4 
 drivers/usb/usbdcore_mpc8xx.c   |4 
 drivers/usb/usbdcore_omap1510.c |4 
 7 files changed, 13 insertions(+), 29 deletions(-)

diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
index c67a490..856f51a 100644
--- a/drivers/usb/Makefile
+++ b/drivers/usb/Makefile
@@ -25,15 +25,22 @@ include $(TOPDIR)/config.mk
 
 LIB:= $(obj)libusb.a
 
+# core
+COBJS-y += usbdcore.o
+COBJS-$(CONFIG_USB_OHCI_NEW) += usb_ohci.o
+
+# host
+COBJS-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
 COBJS-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o
+COBJS-$(CONFIG_USB_SL811HS) += sl811_usb.o
 
-COBJS-y += isp116x-hcd.o
-COBJS-y += sl811_usb.o
-COBJS-y += usb_ohci.o
-COBJS-y += usbdcore.o
+# device
+ifdef CONFIG_USB_DEVICE
 COBJS-y += usbdcore_ep0.o
-COBJS-y += usbdcore_mpc8xx.o
-COBJS-y += usbdcore_omap1510.o
+COBJS-$(CONFIG_OMAP1510) += usbdcore_omap1510.o
+COBJS-$(CONFIG_OMAP1610) += usbdcore_omap1510.o
+COBJS-$(CONFIG_MPC885_FAMILY) += usbdcore_mpc8xx.o
+endif
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/usb/isp116x-hcd.c b/drivers/usb/isp116x-hcd.c
index cc46dfe..348e404 100644
--- a/drivers/usb/isp116x-hcd.c
+++ b/drivers/usb/isp116x-hcd.c
@@ -56,8 +56,6 @@
  */
 
 #include 
-
-#ifdef CONFIG_USB_ISP116X_HCD
 #include 
 #include 
 #include 
@@ -1441,5 +1439,3 @@ int usb_lowlevel_stop(void)
 
return 0;
 }
-
-#endif /* CONFIG_USB_ISP116X_HCD */
diff --git a/drivers/usb/sl811_usb.c b/drivers/usb/sl811_usb.c
index 48f1ee9..a03e469 100644
--- a/drivers/usb/sl811_usb.c
+++ b/drivers/usb/sl811_usb.c
@@ -36,7 +36,6 @@
  */
 
 #include 
-#ifdef CONFIG_USB_SL811HS
 #include 
 #include 
 #include "sl811.h"
@@ -733,5 +732,3 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, 
unsigned long pipe,
 
return status == 0 ? len : status;
 }
-
-#endif /* CONFIG_USB_SL811HS */
diff --git a/drivers/usb/usb_ohci.c b/drivers/usb/usb_ohci.c
index e03371c..d68fdcf 100644
--- a/drivers/usb/usb_ohci.c
+++ b/drivers/usb/usb_ohci.c
@@ -46,9 +46,6 @@
  */
 
 #include 
-
-#ifdef CONFIG_USB_OHCI_NEW
-
 #include 
 
 #if defined(CONFIG_PCI_OHCI)
@@ -2016,4 +2013,3 @@ int usb_lowlevel_stop(void)
ohci_inited = 0;
return 0;
 }
-#endif /* CONFIG_USB_OHCI_NEW */
diff --git a/drivers/usb/usbdcore_ep0.c b/drivers/usb/usbdcore_ep0.c
index cf3f382..f6e017d 100644
--- a/drivers/usb/usbdcore_ep0.c
+++ b/drivers/usb/usbdcore_ep0.c
@@ -51,8 +51,6 @@
  */
 
 #include 
-
-#if defined(CONFIG_USB_DEVICE)
 #include "usbdcore.h"
 
 #if 0
@@ -597,5 +595,3 @@ int ep0_recv_setup (struct urb *urb)
}
return -1;
 }
-
-#endif
diff --git a/drivers/usb/usbdcore_mpc8xx.c b/drivers/usb/usbdcore_mpc8xx.c
index 53bde0d..0e311ad 100644
--- a/drivers/usb/usbdcore_mpc8xx.c
+++ b/drivers/usb/usbdcore_mpc8xx.c
@@ -58,8 +58,6 @@
  */
 #include 
 #include 
-
-#if defined(CONFIG_MPC885_FAMILY) && defined(CONFIG_USB_DEVICE)
 #include 
 #include "usbdcore.h"
 #include "usbdcore_mpc8xx.h"
@@ -1398,5 +1396,3 @@ static u32 mpc8xx_udc_alloc (u32 data_size, u32 alignment)
 
return retaddr;
 }
-
-#endif /* CONFIG_MPC885_FAMILY && CONFIG_USB_DEVICE) */
diff --git a/drivers/usb/usbdcore_omap1510.c b/drivers/usb/usbdcore_omap1510.c
index 4e3239f..cb9dc44 100644
--- a/drivers/usb/usbdcore_omap1510.c
+++ b/drivers/usb/usbdcore_omap1510.c
@@ -27,9 +27,6 @@
  */
 
 #include 
-
-#if ((defined(CONFIG_OMAP1510) || defined(CONFIG_OMAP1610)) && 
defined(CONFIG_USB_DEVICE))
-
 #include 
 #ifdef CONFIG_OMAP_SX1
 #include 
@@ -1566,4 +1563,3 @@ void udc_unset_nak (int epid)
 {
/* TODO: implement this functionality in omap1510 */
 }
-#endif
-- 
1.5.6.5

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


[U-Boot] [PATCH] drivers/bios_emulator: Move conditional compilation to Makefile

2008-11-07 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[EMAIL PROTECTED]>
---
 drivers/bios_emulator/Makefile  |3 ++-
 drivers/bios_emulator/atibios.c |5 -
 drivers/bios_emulator/besys.c   |4 
 drivers/bios_emulator/bios.c|4 
 drivers/bios_emulator/biosemu.c |4 
 drivers/bios_emulator/x86emu/debug.c|5 -
 drivers/bios_emulator/x86emu/decode.c   |5 -
 drivers/bios_emulator/x86emu/ops.c  |5 -
 drivers/bios_emulator/x86emu/ops2.c |5 -
 drivers/bios_emulator/x86emu/prim_ops.c |5 -
 drivers/bios_emulator/x86emu/sys.c  |5 -
 11 files changed, 2 insertions(+), 48 deletions(-)

diff --git a/drivers/bios_emulator/Makefile b/drivers/bios_emulator/Makefile
index 90c64da..c73da97 100644
--- a/drivers/bios_emulator/Makefile
+++ b/drivers/bios_emulator/Makefile
@@ -6,7 +6,7 @@ X86DIR  = x86emu
 
 $(shell mkdir -p $(obj)$(X86DIR))
 
-COBJS  = atibios.o biosemu.o besys.o bios.o \
+COBJS-$(CONFIG_BIOSEMU)= atibios.o biosemu.o besys.o bios.o \
$(X86DIR)/decode.o \
$(X86DIR)/ops2.o \
$(X86DIR)/ops.o \
@@ -14,6 +14,7 @@ COBJS = atibios.o biosemu.o besys.o bios.o \
$(X86DIR)/sys.o \
$(X86DIR)/debug.o
 
+COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 
diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c
index 5779f99..d950b18 100644
--- a/drivers/bios_emulator/atibios.c
+++ b/drivers/bios_emulator/atibios.c
@@ -46,9 +46,6 @@
 *  BIOS in u-boot.
 /
 #include 
-
-#ifdef CONFIG_BIOSEMU
-
 #include "biosemui.h"
 #include 
 
@@ -336,5 +333,3 @@ int BootVideoCardBIOS(pci_dev_t pcidev, BE_VGAInfo ** 
pVGAInfo, int cleanUp)
*pVGAInfo = VGAInfo;
return true;
 }
-
-#endif
diff --git a/drivers/bios_emulator/besys.c b/drivers/bios_emulator/besys.c
index cb1b0c1..cbc5062 100644
--- a/drivers/bios_emulator/besys.c
+++ b/drivers/bios_emulator/besys.c
@@ -48,9 +48,6 @@
 /
 
 #include 
-
-#if defined(CONFIG_BIOSEMU)
-
 #include "biosemui.h"
 
 /*- Global Variables --*/
@@ -721,4 +718,3 @@ void X86API BE_outl(X86EMU_pioAddr port, u32 val)
 #endif
LOG_outpd(port, val);
 }
-#endif
diff --git a/drivers/bios_emulator/bios.c b/drivers/bios_emulator/bios.c
index d41511c..edda276 100644
--- a/drivers/bios_emulator/bios.c
+++ b/drivers/bios_emulator/bios.c
@@ -42,9 +42,6 @@
 /
 
 #include 
-
-#if defined(CONFIG_BIOSEMU)
-
 #include "biosemui.h"
 
 /*- Implementation */
@@ -323,4 +320,3 @@ void _BE_bios_init(u32 * intrTab)
bios_intr_tab[0x6D] = int10;
X86EMU_setupIntrFuncs(bios_intr_tab);
 }
-#endif
diff --git a/drivers/bios_emulator/biosemu.c b/drivers/bios_emulator/biosemu.c
index decdb79..d0c6521 100644
--- a/drivers/bios_emulator/biosemu.c
+++ b/drivers/bios_emulator/biosemu.c
@@ -47,9 +47,6 @@
 
 #include 
 #include 
-
-#if defined(CONFIG_BIOSEMU)
-
 #include "biosemui.h"
 
 BE_sysEnv _BE_env = {{0}};
@@ -372,4 +369,3 @@ int X86API BE_int86x(int intno, RMREGS * in, RMREGS * out, 
RMSREGS * sregs)
sregs->gs = M.x86.R_GS;
return out->x.ax;
 }
-#endif
diff --git a/drivers/bios_emulator/x86emu/debug.c 
b/drivers/bios_emulator/x86emu/debug.c
index 29fe3f1..241acf3 100644
--- a/drivers/bios_emulator/x86emu/debug.c
+++ b/drivers/bios_emulator/x86emu/debug.c
@@ -39,9 +39,6 @@
 
 #include 
 #include 
-
-#if defined(CONFIG_BIOSEMU)
-
 #include "x86emu/x86emui.h"
 
 /*- Implementation */
@@ -463,5 +460,3 @@ void x86emu_dump_xregs(void)
printk("NC ");
printk("\n");
 }
-
-#endif
diff --git a/drivers/bios_emulator/x86emu/decode.c 
b/drivers/bios_emulator/x86emu/decode.c
index 7a9a1dd..a782b81 100644
--- a/drivers/bios_emulator/x86emu/decode.c
+++ b/drivers/bios_emulator/x86emu/decode.c
@@ -37,9 +37,6 @@
 *
 /
 #include 
-
-#if defined(CONFIG_BIOSEMU)
-
 #include "x86emu/x86emui.h"
 
 /*- Implementation */
@@ -1145,5 +1142,3 @@ unsigned decode_rmXX_address(int mod, int rm)
 return decode_rm01_address(rm);
   return decode_rm10_address(rm);
 }
-
-#endif
diff --git a/drivers/bios_emulator/x86emu/ops.c 
b/drivers/bios_emulator/x86emu/ops.c
index 10f2757..d63c99f 100644
--- a/drivers/bios_emulator/x86emu/ops.c
+++ b/drivers/bios_emulator/x86emu/ops.c
@@ -76,9 +76,6 @@
 /
 
 #include 
-
-#if defined(CONFIG_BIOSEMU)
-
 #incl

Re: [U-Boot] [PATCH] OneNAND: Fix compiler warnings and add weak attribute to memcpy_16()

2008-11-07 Thread Scott Wood
Stefan Roese wrote:
> This patch adds memcpy_16_from_onenand() and memcpy_16_to_onenand()
> functions and defaults them to the already available memcpy_16()
> function. They are defined weak so that they can be overwritten by
> a board/platform specific version.
> 
> This is needed for the vcth board support (still to come) which needs
> custom access routines here.

Can it just override write_bufferram and read_bufferram?  What does it 
need to do specially?

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


Re: [U-Boot] Broken network for different u-boot compilation

2008-11-07 Thread Duy-Ky Nguyen
Hello,

I'm using u-boot 1.3.0 from the latest FreeScale Linux BSP MPC8313E-RDB.

If I set TEXT_BASE = 0x100, so I could use BDI debugger to load into RAM
and run it out of RAM.
I'm ABLE to ping to the host from u-boot

But, if I set TEXT_BASE=0xFE00, and burn the image it into Flash,
recycle the power to run it out of Flash.
I'm NOT able to ping from u-boot with error message

"No link".

When I change TEXT_BASE from 0x100 to 0xFE00, I have to do "make
clean" before "make", otherwise it have error message
" undefined reference to 'env_name_space'"


On the other direction, when I change TEXT_BASE from 0xFE00 to
0x100, I have successful compilation without "make clean", but the
u-boot hangs at "DRAM". I have to do "make clean" for successful u-boot AND
network access.

I really appreciate your time and help.

Regards,

Duy-Ky

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


Re: [U-Boot] AT91RM9200 boots from NOR Flash or not

2008-11-07 Thread Pink Boy

Martin Hejnfelt sez,

> Message from Jens Scharsig,
>> I am a little bit confused. We have designed a new AT91RM9200 
>> based board. It should boot from 16-bit NOR Flash. I have read 
>> many relevant article in the forum, but I don't know , which 
>> board should I use as a base. I have look at the actual source 
>> (2008.10 and> git), and I think, u-boot can't boot without a 
>> preloader as long> CONFIG_AT91RM9200 is defined. Is there an 
>> open patch to resolve this? Can you get an example for a working
>> implementation?

I built u-boot 1.3.4 for the AT91RM9200DK and was able to hack in
support for the flash chip I'm using.  You might try the same.

The setup I'm using is to store boot.bin from atmel in flash
at .  And a copy of u-boot.gz at 1001.

The way I did was to enable the AT91RM9200's boot serial port boot
loader and download Atmels loader.bin via XMODEM.  Then download
uboot.bin via XMODEM.  Once that it downloaded you should get a
prompt.

For auto booting I have Atmels boot program boot.bin stored in
flash at 1000-10005fff.  And gzipped u-boot stored at 
1001-1001.

> It's true that it won't boot when CONFIG_AT91RM9200
> is defined. I don't know why it is like this since older 
> versions of U-boot didn't have this problem (it changed 
> around 1.3.0 if I remember correctly).

Hmmm...

> It's almost like even if you do not define CONFIG_SKIP_LOWLEVEL_INIT
> and/or CONFIG_SKIP_RELOCATE_UBOOT, it still works like they were.
> Maybe it's because Atmel usually supplies their own Boot.bin 
> along with the Development Kit (the configuration I would say 
> you should use as example for your own) You can resolve this by 
> editing two lines in the start.S file of the ARM920T cpu specific
> directory. In version 2008.10 its line 181 you can delete this, or
> change to ifdef, and again in line 264 you can either delete the if
> statement, or just make it branch to the lowlevel_init no matter 
> what.
> 
> I know its what someone would call a hack, but it works :)

This is the second place I've seen this.  I've been using atmels
boot.bin loader to uncompress u-boot and it seems to work okay.

Matt Harper
Tehama-Wireless.


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


Re: [U-Boot] Broken network for different u-boot compilation

2008-11-07 Thread Sriram Chadalavada
Dear Uboot community,

  I have a Cirrus Logic EDB7312 prototype evaluation board and want
to port uboot to it. Is the newsgroup still functional? I was not able to
access it via thunderbird.

Regards,
Ram

On Fri, Nov 7, 2008 at 3:23 PM, Duy-Ky Nguyen <[EMAIL PROTECTED]>wrote:

> Hello,
>
> I'm using u-boot 1.3.0 from the latest FreeScale Linux BSP MPC8313E-RDB.
>
> If I set TEXT_BASE = 0x100, so I could use BDI debugger to load into
> RAM
> and run it out of RAM.
> I'm ABLE to ping to the host from u-boot
>
> But, if I set TEXT_BASE=0xFE00, and burn the image it into Flash,
> recycle the power to run it out of Flash.
> I'm NOT able to ping from u-boot with error message
>
> "No link".
>
> When I change TEXT_BASE from 0x100 to 0xFE00, I have to do "make
> clean" before "make", otherwise it have error message
> " undefined reference to 'env_name_space'"
>
>
> On the other direction, when I change TEXT_BASE from 0xFE00 to
> 0x100, I have successful compilation without "make clean", but the
> u-boot hangs at "DRAM". I have to do "make clean" for successful u-boot AND
> network access.
>
> I really appreciate your time and help.
>
> Regards,
>
> Duy-Ky
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] OneNAND: Bad block aware read/write command support

2008-11-07 Thread Stefan Roese
On Friday 07 November 2008, Scott Wood wrote:
> On Fri, Nov 07, 2008 at 04:01:13PM +0100, Stefan Roese wrote:
> > Update OneNAND command to support bad block awareness.
> > Also change the OneNAND command style to better match the
> > NAND version.
>
> Is there any chance that we could merge this code with cmd_nand.c?

Possibly. I'm not sure yet. I'll try to investigate this next week.

> > +static struct mtd_info *mtd = &onenand_mtd;
>
> Will this cause relocation problems on some architectures?

Yes, you're correct. I missed removing this assignment here. do_onenand() does 
it correctly though. I'll fix it in the next patch version.

> Could you have more than one OneNAND on a board?

No, currently only one OneNAND device is supported. We will add this 
multi-OneNAND support later.

Best regards,
Stefan

=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] OneNAND: Fix compiler warnings and add weak attribute to memcpy_16()

2008-11-07 Thread Stefan Roese
On Friday 07 November 2008, Scott Wood wrote:
> Stefan Roese wrote:
> > This patch adds memcpy_16_from_onenand() and memcpy_16_to_onenand()
> > functions and defaults them to the already available memcpy_16()
> > function. They are defined weak so that they can be overwritten by
> > a board/platform specific version.
> >
> > This is needed for the vcth board support (still to come) which needs
> > custom access routines here.
>
> Can it just override write_bufferram and read_bufferram?

There are multiple functions here using this memcpy_16():

onenand_read_bufferram()
onenand_sync_read_bufferram()
onenand_write_bufferram()

So it seemed "easier" for me to just override the memcpy_16() function itself.

> What does it 
> need to do specially?

On our board the bufferram can't be accessed memory-mapped via pointer access. 
We need special accessor functions. Something like this:

/*
 * Accessor functions replacing the "weak" functions in
 * drivers/mtd/onenand/onenand_base.c
 */
void *memcpy_16_from_onenand(void *dst, const void *src, unsigned int len)
{
void *ret = dst;
u16 *d = dst;
u16 *s = (u16 *)src;

len >>= 1;
while (len-- > 0)
*d++ = ebi_nand_read_word(s++);

return ret;
}


Best regards,
Stefan

=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot