[U-Boot] Pull request: u-boot-sh

2011-02-03 Thread Nobuhiro Iwamatsu
Dear Wolfgang Denk,

Please pull the following changes.

Best regards,
  Nobuhiro

The following changes since commit 6f918bd46482f889f4d94623b09daf659a1974bd:

  Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
(2011-01-31 23:20:32 +0100)

are available in the git repository at:

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

Nobuhiro Iwamatsu (14):
  sh: Remove config.mk for MigoR board
  sh: Remove config.mk for ap325rxa board
  sh: Remove config.mk for r2dplus board
  sh: Remove config.mk for r7780mp board
  sh: Remove config.mk for rsk7203 board
  sh: Remove config.mk for sh7763rdp board
  sh: Remove config.mk for sh7785lcr board
  sh: Remove config.mk for ms7720se board
  sh: Remove config.mk for ms7722se board
  sh: Remove config.mk for ms7750se board
  sh: Remove config.mk for mpr2 board
  sh: Remove config.mk for espt board
  sh: Remove config.mk for shmin board
  sh: sh7785lcr: Fix out of tree building

Yoshihiro Shimoda (6):
  sh: add support the CONFIG_SYS_LDSCRIPT
  README: add description of sh_eth driver
  net: sh_eth: add cache handling
  spi: add support SuperH SPI module
  sh: add support for sh7757lcr board
  change email address in MAINTAINERS

 MAINTAINERS|3 +-
 README |   17 +
 arch/sh/config.mk  |6 +
 arch/sh/include/asm/cpu_sh4.h  |2 +
 arch/sh/include/asm/cpu_sh7757.h   |  218 
 board/espt/config.mk   |9 -
 board/mpr2/config.mk   |   37 --
 board/ms7720se/config.mk   |   34 --
 board/ms7722se/config.mk   |   31 --
 board/ms7750se/config.mk   |   23 -
 board/renesas/ap325rxa/config.mk   |   26 -
 board/renesas/r2dplus/config.mk|   23 -
 board/renesas/r7780mp/config.mk|   27 -
 board/renesas/rsk7203/config.mk|   28 -
 .../{MigoR/config.mk = sh7757lcr/Makefile}|   38 +-
 board/renesas/sh7757lcr/lowlevel_init.S|  558 
 board/renesas/sh7757lcr/sh7757lcr.c|  454 
 board/renesas/sh7757lcr/spi-boot.c |  109 
 board/renesas/sh7757lcr/u-boot.lds |  101 
 board/renesas/sh7763rdp/config.mk  |   11 -
 board/renesas/sh7785lcr/Makefile   |8 +-
 board/renesas/sh7785lcr/config.mk  |   31 --
 board/shmin/config.mk  |   27 -
 boards.cfg |1 +
 doc/README.sh7757lcr   |   64 +++
 drivers/net/sh_eth.c   |9 +
 drivers/spi/Makefile   |1 +
 drivers/spi/sh_spi.c   |  261 +
 drivers/spi/sh_spi.h   |   79 +++
 include/configs/MigoR.h|1 +
 include/configs/ap325rxa.h |2 +
 include/configs/espt.h |1 +
 include/configs/mpr2.h |2 +
 include/configs/ms7720se.h |1 +
 include/configs/ms7722se.h |1 +
 include/configs/ms7750se.h |1 +
 include/configs/r2dplus.h  |1 +
 include/configs/r7780mp.h  |1 +
 include/configs/rsk7203.h  |1 +
 include/configs/sh7757lcr.h|  146 +
 include/configs/sh7763rdp.h|1 +
 include/configs/sh7785lcr.h|2 +
 include/configs/shmin.h|1 +
 43 files changed, 2075 insertions(+), 323 deletions(-)
 create mode 100644 arch/sh/include/asm/cpu_sh7757.h
 delete mode 100644 board/espt/config.mk
 delete mode 100644 board/mpr2/config.mk
 delete mode 100644 board/ms7720se/config.mk
 delete mode 100644 board/ms7722se/config.mk
 delete mode 100644 board/ms7750se/config.mk
 delete mode 100644 board/renesas/ap325rxa/config.mk
 delete mode 100644 board/renesas/r2dplus/config.mk
 delete mode 100644 board/renesas/r7780mp/config.mk
 delete mode 100644 board/renesas/rsk7203/config.mk
 rename board/renesas/{MigoR/config.mk = sh7757lcr/Makefile} (54%)
 create mode 100644 board/renesas/sh7757lcr/lowlevel_init.S
 create mode 100644 board/renesas/sh7757lcr/sh7757lcr.c
 create mode 100644 board/renesas/sh7757lcr/spi-boot.c
 create mode 100644 board/renesas/sh7757lcr/u-boot.lds
 delete mode 100644 board/renesas/sh7763rdp/config.mk
 delete mode 100644 board/renesas/sh7785lcr/config.mk
 delete mode 100644 board/shmin/config.mk
 create mode 100644 doc/README.sh7757lcr
 create mode 100644 

Re: [U-Boot] [PATCH] NAND: add more watchdog resets

2011-02-03 Thread Jaap de Jong
My testresults:

unpatched ~~~

 nand read 0x2000 0x0010 0x0300
 no problem

 nand write 0x2000 0x0010 0x00c0
 no problem

 nand write 0x2000 0x0010 0x00d0
 the watchdog will reset the processor

patched 

 nand read 0x2000 0x0010 0x0300
 no problem

 nand write 0x2000 0x0010 0x07f0
 no problem

~~

So, reading was never a problem, only writing.
And that is fixed now!
Thanks!


On 02/03/2011 01:23 AM, Scott Wood wrote:
 Poke the watchdog in a variety of looping constructs, which could take
 a long time to complete.

 Signed-off-by: Scott Woodscottw...@freescale.com
 ---
 Jaap, does this resolve the watchdog problems you were seeing?

   drivers/mtd/nand/nand_base.c |6 ++
   drivers/mtd/nand/nand_util.c |2 ++
   2 files changed, 8 insertions(+), 0 deletions(-)

 diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
 index 70c0593..b9bd394 100644
 --- a/drivers/mtd/nand/nand_base.c
 +++ b/drivers/mtd/nand/nand_base.c
 @@ -1156,6 +1156,8 @@ static int nand_do_read_ops(struct mtd_info *mtd, 
 loff_t from,
   oob = ops-oobbuf;

   while(1) {
 + WATCHDOG_RESET();
 +
   bytes = min(mtd-writesize - col, readlen);
   aligned = (bytes == mtd-writesize);

 @@ -1485,6 +1487,7 @@ static int nand_do_read_oob(struct mtd_info *mtd, 
 loff_t from,
   page = realpage  chip-pagemask;

   while(1) {
 + WATCHDOG_RESET();
   sndcmd = chip-ecc.read_oob(mtd, chip, page, sndcmd);

   len = min(len, readlen);
 @@ -1884,6 +1887,8 @@ static int nand_do_write_ops(struct mtd_info *mtd, 
 loff_t to,
   memset(chip-oob_poi, 0xff, mtd-oobsize);

   while(1) {
 + WATCHDOG_RESET();
 +
   int bytes = mtd-writesize;
   int cached = writelen  bytes  page != blockmask;
   uint8_t *wbuf = buf;
 @@ -2215,6 +2220,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct 
 erase_info *instr,
   instr-state = MTD_ERASING;

   while (len) {
 + WATCHDOG_RESET();
   /*
* heck if we have a bad block, we do not erase bad blocks !
*/
 diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
 index 8b4f738..5a6f7ae 100644
 --- a/drivers/mtd/nand/nand_util.c
 +++ b/drivers/mtd/nand/nand_util.c
 @@ -542,6 +542,8 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, 
 size_t *length,

   pages = write_size / pagesize_oob;
   for (page = 0; page  pages; page++) {
 + WATCHDOG_RESET();
 +
   ops.datbuf = p_buffer;
   ops.oobbuf = ops.datbuf + pagesize;

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


Re: [U-Boot] BSS footprint of FAT very high - SPL issues

2011-02-03 Thread Graeme Russ
On 03/02/11 18:01, Aneesh V wrote:
 Hello Graeme,
 
 On Thursday 03 February 2011 02:31 AM, Graeme Russ wrote:
 [snip ..]
 Yes. These are variables that otherwise would go to BSS. I do this
 because I need them before SDRAM initialization. One of this is the gd
 structure. I allocate gd structure in .data that is in IRAM.
 Why I need gd before SDRAM? Because I try to initialize serial console
 as early as possible and this code has some reference to gd.


 Which is a perfectly normal scenario and the way things have always been.
 There should have been no need to shuffle gd around because of console
 initialisation.

 And as I understand it, gd itself does not get statically 'allocated' in
 the u-boot image per-se (i.e. not in .data and not in .bss) - Only the
 pointer to it is allocated. In most arches, this pointer is itself not
 in .data or .bss but rather in a fixed reserved register. In the new x86
 (final patches coming soon), the pointer is allocated in .data with a
 preset initialised value pointing into  Cache-As-RAM (i.e. IRAM). Prior to
 relocation, the gd pointer variable points to somewhere in IRAM / CAR and
 after relocation, gd gets copied into the heap and the gd pointer adjusted
 to point to the new permanent copy.
 
 Please note that SPL starts executing from IRAM and not
 FLASH (copied there by ROM code). So we have .data available
 immediately. Actually we do not need gd except to reuse some code from
 u-boot that uses it. Declaring gd as a static variable was just a
 convenience decision.

Ah, silly me - I missed the fact this was SPL. Makes more sense now :)

 
 If I were to allocate it separately I would have to allocate it in the
 same IRAM and I may end up reserving more space than needed to allow
 for future expansion. IRAM space is at a premium. So, declaring it as a
 static variable helps in allocating only as much space as is needed.
 

Makes sense

Regards,

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


Re: [U-Boot] spi subystem maintainer?

2011-02-03 Thread Kumar Gala

On Feb 2, 2011, at 3:30 AM, Reinhard Meyer wrote:

 Dear Stefano Babic:
 On 02/02/2011 08:23 AM, Kumar Gala wrote:
 Wanted to see if anyone had input on how to deal with the SPI
 controller on some of our newer parts.  It expects command  data
 xfer's to happen together.  However our current code does not call
 spi_xfer() that way.
 
 Which is your concrete case ? spi_xfer is responsible to setup the
 controller and to start the transfer, and everything could be done
 inside this function. What do you mean exactly with command and data ?
 
 Regards,
 Stefano
 
 
 I think he refers to the common problem that many SPI devices
 require CS to stay low during both phases of issuing the
 read/write command and transfering the actual data.
 
 Current u-boot code calls spi_xfer() two times.
 
 Hardware controlled CS often go high between both calls, which
 requires you to (at least) use GPIO controlled CS, or, even worse,
 use bitbang SPI (in cases where the SPI pin assignment is in groups,
 not individually).

That's correct, and with the newer FSL controller's we dont have direct control 
over the CS.  I'm thinking we need to have the command and response dealt with 
in a single call to spi_xfer instead of what we seem to do all over the place 
today:

ret = spi_xfer(spi, 8, cmd, NULL, flags);
if (ret) {
debug(SF: Failed to send command %02x: %d\n, cmd, ret);
return ret;
}

if (len) {
ret = spi_xfer(spi, len * 8, NULL, response, SPI_XFER_END);
if (ret)
debug(SF: Failed to read response (%zu bytes): %d\n,
len, ret);
}

Needs to turn into something like:

ret = spi_xfer(spi, 8 + len * 8, cmd, response, flags | SPI_XFER_END)

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


Re: [U-Boot] BSS footprint of FAT very high - SPL issues

2011-02-03 Thread Aneesh V
Hello Albert,

On Wednesday 02 February 2011 08:44 PM, Albert ARIBAUD wrote:
[snip ..]

 However, there is one minor issue that I would like to report.

 Making .bss disjoint from the rest of the image may break the
 relocation code in start.S. Currently the assumption is that
 '__bss_start' indicates the end of .data and hence the image.
 That will not be the case when .text and .data are in IRAM and .bss in
 SDRAM. I am not affected because our SPL doesn't need relocation.

 That's a good remark -- formally, the relocation code should go from
 start of text to end of data, not to start of BSS.

 And that's one more reason for me to want bss stay with text and data
 (and your two variables above should stay uninitialized) and external
 RAM get its own memory declaration in the linker file. :)


 I can try that too. Just one small question.
 You want to have the source file changes for putting the buffers in
 .ram section only for SPL, right?
 We could have done this globally(for both u-boot and SPL) and merge .ram
 with .bss for u-boot. But that would require changes to all linker
 scripts.

 Correct: the BSS size issue only hits SPL, and only in your case --
 U-Boot as such does not have strict BSS size issues. So yes, the change
 should affect only the board's SPL linker file if it exists, but if not,
 then the generic SPL linker file should be ok, because the change will
 only have an effect for boards where the code actually maps data to the
 DRAM section.

On second thoughts I would like to keep the entire bss in SDRAM. With
MMC and FAT support, the SPL is already nearing the IRAM budget in
OMAP3. It helps to save some space by moving out bss to SDRAM.

If needed, I can fix up the start.S by defining something like
_end_of_data. But is that really needed. I do not see any SPL that
needs relocation and SDRAM bss at the same time.

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


Re: [U-Boot] spi subystem maintainer?

2011-02-03 Thread Stefano Babic
On 02/03/2011 11:36 AM, Kumar Gala wrote:
 That's correct, and with the newer FSL controller's we dont have
 direct control over the CS.

I know. You are probably talking about PowerPC, but it is the same for
the i.MX processors.

  I'm thinking we need to have the command
 and response dealt with in a single call to spi_xfer instead of what
 we seem to do all over the place today:
 
 ret = spi_xfer(spi, 8, cmd, NULL, flags); if (ret) { debug(SF:
 Failed to send command %02x: %d\n, cmd, ret); return ret; }

Ok. You are not talking generally about spi, but how to manage spi
flash. I saw the same problem with the i.MX51, but then a GPIO was used
instead of the internal SS and I forgot this issue. We do not need to
change the spi_xfer() call (I mean, in the spi controllers).

 
 if (len) { ret = spi_xfer(spi, len * 8, NULL, response,
 SPI_XFER_END); if (ret) debug(SF: Failed to read response (%zu
 bytes): %d\n, len, ret); }
 
 Needs to turn into something like:
 
 ret = spi_xfer(spi, 8 + len * 8, cmd, response, flags |
 SPI_XFER_END)

I think it could depend on the SPI flash you use. I checked in
stmicro.c, and the mechanism to split the enabling of SS and the
transfer of data is really used.

In stmicro_wait_ready(), it is used to poll the status of the flash. The
SS is active until the flash has complete the operation. Probably the
flash can accept a single call, too, but I am unsure.

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: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] EfikaMX: switch to MACH_TYPE_MX51_EFIKAMX

2011-02-03 Thread Loïc Minier
Upstream linux moved from MACH_TYPE_MX51_LANGE51 to
MACH_TYPE_MX51_EFIKAMX.
---
 board/efikamx/efikamx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/board/efikamx/efikamx.c b/board/efikamx/efikamx.c
index 4efbeaf..f735260 100644
--- a/board/efikamx/efikamx.c
+++ b/board/efikamx/efikamx.c
@@ -621,7 +621,7 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
-   gd-bd-bi_arch_number = MACH_TYPE_MX51_LANGE51;
+   gd-bd-bi_arch_number = MACH_TYPE_MX51_EFIKAMX;
gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
return 0;
-- 
1.7.2.3

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


[U-Boot] [PATCH 0/3] MIPS: Fix failed run of MAKEALL mips script

2011-02-03 Thread daniel . schwierzeck
Currently MAKEALL mips covers 21 boards and 15 of them have compile
errors with gcc-4.3.3. This patch series fixes these boards.

Daniel Schwierzeck (3):
  MIPS: VCT: Fix enabling of unwanted options if networking or USB
support are disabled
  MIPS: Purple: Fix multiple definition error on final linking of
u-boot binary
  MIPS: dbau1x00: Disable compilation of flash driver stub

 board/dbau1x00/Makefile |2 +-
 board/purple/u-boot.lds |5 -
 include/configs/vct.h   |7 +--
 3 files changed, 6 insertions(+), 8 deletions(-)

--
1.7.3.5

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


[U-Boot] [PATCH 1/3] MIPS: VCT: Fix enabling of unwanted options if networking or USB support are disabled

2011-02-03 Thread daniel . schwierzeck
Some VCT boards lacks the support of networking or USB.
Additionally that support is disabled in small image
configurations.

If CONFIG_CMD_NET should not used the CONFIG_CMD_NFS option
have to be disabled too. Otherwise the linker fails with
unresolved symbols.

If CONFIG_VCT_SMALL_IMAGE is set than CONFIG_CMD_NET and
CONFIG_CMD_USB are disabled at the end of vct.h.
This is not adequate because CONFIG_CMD_USB enables additional
options and the linker fails again with unresolved symbols.

This patch adds an early check against CONFIG_VCT_SMALL_IMAGE
so the additional options are only enabled if they are really
needed.

Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
Cc: Stefan Roese s...@denx.de
---
 include/configs/vct.h |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/configs/vct.h b/include/configs/vct.h
index 4894969..8162217 100644
--- a/include/configs/vct.h
+++ b/include/configs/vct.h
@@ -109,17 +109,20 @@
 /*
  * Only Premium/Platinum have ethernet support right now
  */
-#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
+#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM))  \
+   !defined CONFIG_VCT_SMALL_IMAGE
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SNTP
 #else
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 #endif

 /*
  * Only Premium/Platinum have USB-EHCI support right now
  */
-#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
+#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM))  \
+   !defined CONFIG_VCT_SMALL_IMAGE
 #define CONFIG_CMD_USB
 #define CONFIG_CMD_FAT
 #endif
--
1.7.3.5

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


[U-Boot] [PATCH 2/3] MIPS: Purple: Fix multiple definition error on final linking of u-boot binary

2011-02-03 Thread daniel . schwierzeck
The linker of recent toolchains complains about multiple definitions
on final linking of u-boot binary. This patch removes all redundant
object files from u-boot.lds those are already added to .text section
by the linker.

That patch could not be tested but the resulting u-boot.map still looks
good. The start symbol is at 0xB000, the environment at 0xB0008000
so u-boot should boot.

Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
Cc: Wolfgang Denk w...@denx.de
---
 board/purple/u-boot.lds |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/board/purple/u-boot.lds b/board/purple/u-boot.lds
index 542601a..719f268 100644
--- a/board/purple/u-boot.lds
+++ b/board/purple/u-boot.lds
@@ -36,11 +36,6 @@ SECTIONS
{
  arch/mips/cpu/start.o (.text)
  board/purple/lowlevel_init.o  (.text)
- arch/mips/cpu/cache.o (.text)
- common/main.o (.text)
- common/dlmalloc.o (.text)
- common/cmd_boot.o (.text)
- lib/zlib.o(.text)
  . = DEFINED(env_offset) ? env_offset : .;
  common/env_embedded.o (.ppcenv)

--
1.7.3.5

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


[U-Boot] [PATCH 3/3] MIPS: dbau1x00: Disable compilation of flash driver stub

2011-02-03 Thread daniel . schwierzeck
All dbau1x00 boards use the CFI driver so this stub driver is useless
and should not be compiled.

This patch fixes the error:

u-boot-git/board/dbau1x00/flash.c:34: multiple definition of `flash_init'
drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:2084: first defined here
board/dbau1x00/libdbau1x00.o: In function `write_buff':
u-boot-git/board/dbau1x00/flash.c:40: multiple definition of `write_buff'
drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:1265: first defined here

Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
Cc: Wolfgang Denk w...@denx.de
---
 board/dbau1x00/Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/board/dbau1x00/Makefile b/board/dbau1x00/Makefile
index f1594a2..e36a9d2 100644
--- a/board/dbau1x00/Makefile
+++ b/board/dbau1x00/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk

 LIB= $(obj)lib$(BOARD).o

-COBJS  = $(BOARD).o flash.o
+COBJS  = $(BOARD).o
 SOBJS  = lowlevel_init.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
--
1.7.3.5

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


Re: [U-Boot] [PATCH 1/3] MIPS: VCT: Fix enabling of unwanted options if networking or USB support are disabled

2011-02-03 Thread Stefan Roese
Hi Daniel,

On Thursday 03 February 2011 12:59:50 daniel.schwierz...@googlemail.com wrote:
 Some VCT boards lacks the support of networking or USB.
 Additionally that support is disabled in small image
 configurations.
 
 If CONFIG_CMD_NET should not used the CONFIG_CMD_NFS option
 have to be disabled too. Otherwise the linker fails with
 unresolved symbols.
 
 If CONFIG_VCT_SMALL_IMAGE is set than CONFIG_CMD_NET and
 CONFIG_CMD_USB are disabled at the end of vct.h.
 This is not adequate because CONFIG_CMD_USB enables additional
 options and the linker fails again with unresolved symbols.
 
 This patch adds an early check against CONFIG_VCT_SMALL_IMAGE
 so the additional options are only enabled if they are really
 needed.
 
 Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
 Cc: Stefan Roese s...@denx.de
 ---
  include/configs/vct.h |7 +--
  1 files changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/include/configs/vct.h b/include/configs/vct.h
 index 4894969..8162217 100644
 --- a/include/configs/vct.h
 +++ b/include/configs/vct.h
 @@ -109,17 +109,20 @@
  /*
   * Only Premium/Platinum have ethernet support right now
   */
 -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
 +#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM))  \
 + !defined CONFIG_VCT_SMALL_IMAGE

I would prefer consistent style with braces around CONFIG_VCT_SMALL_IMAGE 
here.

  #define CONFIG_CMD_PING
  #define CONFIG_CMD_SNTP
  #else
  #undef CONFIG_CMD_NET
 +#undef CONFIG_CMD_NFS
  #endif
 
  /*
   * Only Premium/Platinum have USB-EHCI support right now
   */
 -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
 +#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM))  \
 + !defined CONFIG_VCT_SMALL_IMAGE

Same here. Otherwise:

Acked-by: Stefan Roese s...@denx.de

Thanks.

Cheers,
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: off...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] MIPS: dbau1x00: Disable compilation of flash driver stub

2011-02-03 Thread Stefan Roese
Hi Daniel,

On Thursday 03 February 2011 12:59:52 daniel.schwierz...@googlemail.com wrote:
 All dbau1x00 boards use the CFI driver so this stub driver is useless
 and should not be compiled.
 
 This patch fixes the error:
 
 u-boot-git/board/dbau1x00/flash.c:34: multiple definition of `flash_init'
 drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:2084: first defined
 here board/dbau1x00/libdbau1x00.o: In function `write_buff':
 u-boot-git/board/dbau1x00/flash.c:40: multiple definition of `write_buff'
 drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:1265: first defined
 here

I suggest that you not only disable the compilation of this file, but remove 
it completely.
 
Cheers,
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: off...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] MIPS: VCT: Fix enabling of unwanted options if networking or USB support are disabled

2011-02-03 Thread Daniel Schwierzeck
Hi Stefan,


 * Only Premium/Platinum have ethernet support right now

 */

 -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)

 +#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM))  \

 + !defined CONFIG_VCT_SMALL_IMAGE

 I would prefer consistent style with braces around CONFIG_VCT_SMALL_IMAGE
 here.
Ok I'll change this.


 #define CONFIG_CMD_PING

 #define CONFIG_CMD_SNTP

 #else

 #undef CONFIG_CMD_NET

 +#undef CONFIG_CMD_NFS

 #endif



 /*

 * Only Premium/Platinum have USB-EHCI support right now

 */

 -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)

 +#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM))  \

 + !defined CONFIG_VCT_SMALL_IMAGE

 Same here. Otherwise:
Dito.

Thanks

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


Re: [U-Boot] [PATCH 3/3] MIPS: dbau1x00: Disable compilation of flash driver stub

2011-02-03 Thread Daniel Schwierzeck
Hi Stefan,

2011/2/3 Stefan Roese s...@denx.de:
 Hi Daniel,

 On Thursday 03 February 2011 12:59:52 daniel.schwierz...@googlemail.com
 wrote:

 All dbau1x00 boards use the CFI driver so this stub driver is useless

 and should not be compiled.



 This patch fixes the error:



 u-boot-git/board/dbau1x00/flash.c:34: multiple definition of `flash_init'

 drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:2084: first
 defined

 here board/dbau1x00/libdbau1x00.o: In function `write_buff':

 u-boot-git/board/dbau1x00/flash.c:40: multiple definition of `write_buff'

 drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:1265: first
 defined

 here

 I suggest that you not only disable the compilation of this file, but remove
 it completely.

Ok  I can do that if you and Wolfgang agree

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


[U-Boot] [PATCH] Fix misc spelling errors found by lintian

2011-02-03 Thread Loïc Minier
---
 arch/arm/cpu/arm920t/at91rm9200/ether.c |2 +-
 arch/sparc/cpu/leon2/cpu_init.c |4 ++--
 arch/sparc/cpu/leon3/cpu_init.c |4 ++--
 common/cmd_usb.c|2 +-
 common/usb_storage.c|2 +-
 drivers/net/at91_emac.c |2 +-
 fs/jffs2/jffs2_1pass.c  |2 +-
 fs/jffs2/jffs2_nand_1pass.c |2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/cpu/arm920t/at91rm9200/ether.c 
b/arch/arm/cpu/arm920t/at91rm9200/ether.c
index e1cdeba..d7135c5 100644
--- a/arch/arm/cpu/arm920t/at91rm9200/ether.c
+++ b/arch/arm/cpu/arm920t/at91rm9200/ether.c
@@ -39,7 +39,7 @@ typedef struct {
 #define RBF_MULTICAST (130)
 #define RBF_UNICAST   (129)
 #define RBF_EXTERNAL  (128)
-#define RBF_UNKOWN(127)
+#define RBF_UNKNOWN   (127)
 #define RBF_SIZE  0x07ff
 #define RBF_LOCAL4(126)
 #define RBF_LOCAL3(125)
diff --git a/arch/sparc/cpu/leon2/cpu_init.c b/arch/sparc/cpu/leon2/cpu_init.c
index a24f778..795c7d7 100644
--- a/arch/sparc/cpu/leon2/cpu_init.c
+++ b/arch/sparc/cpu/leon2/cpu_init.c
@@ -47,9 +47,9 @@ struct {
  * initialize a bunch of registers.
  *
  * Run from FLASH/PROM:
- *  - until memory controller is set up, only registers avaiable
+ *  - until memory controller is set up, only registers available
  *  - no global variables available for writing
- *  - constants avaiable
+ *  - constants available
  */
 
 void cpu_init_f(void)
diff --git a/arch/sparc/cpu/leon3/cpu_init.c b/arch/sparc/cpu/leon3/cpu_init.c
index be22ec2..cba9d0e 100644
--- a/arch/sparc/cpu/leon3/cpu_init.c
+++ b/arch/sparc/cpu/leon3/cpu_init.c
@@ -57,9 +57,9 @@ struct {
  * initialize a bunch of registers.
  *
  * Run from FLASH/PROM:
- *  - until memory controller is set up, only registers avaiable
+ *  - until memory controller is set up, only registers available
  *  - no global variables available for writing
- *  - constants avaiable
+ *  - constants available
  */
 
 void cpu_init_f(void)
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index b04a8df..7fcc61a 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -580,7 +580,7 @@ int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
break;
}
if (dev == NULL) {
-   printf(*** NO Device avaiable ***\n);
+   printf(*** NO Device available ***\n);
return 0;
} else {
usb_display_desc(dev);
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 1e6cd6a..de48c5a 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -254,7 +254,7 @@ int usb_stor_scan(int mode)
dev = usb_get_dev_index(i); /* get device */
USB_STOR_PRINTF(i=%d\n, i);
if (dev == NULL)
-   break; /* no more devices avaiable */
+   break; /* no more devices available */
 
if (usb_storage_probe(dev, 0, usb_stor[usb_max_devs])) {
/* OK, it's a storage device.  Iterate over its LUNs
diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index 4e5685c..90eb515 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -93,7 +93,7 @@
 #define RBF_MULTICAST (130)
 #define RBF_UNICAST   (129)
 #define RBF_EXTERNAL  (128)
-#define RBF_UNKOWN(127)
+#define RBF_UNKNOWN   (127)
 #define RBF_SIZE  0x07ff
 #define RBF_LOCAL4(126)
 #define RBF_LOCAL3(125)
diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index c4f7445..5ddc2b9 100644
--- a/fs/jffs2/jffs2_1pass.c
+++ b/fs/jffs2/jffs2_1pass.c
@@ -794,7 +794,7 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char 
*dest)
 #endif
default:
/* unknown */
-   putLabeledWord(UNKOWN COMPRESSION 
METHOD = , jNode-compr);
+   putLabeledWord(UNKNOWN COMPRESSION 
METHOD = , jNode-compr);
put_fl_mem(jNode, pL-readbuf);
return -1;
break;
diff --git a/fs/jffs2/jffs2_nand_1pass.c b/fs/jffs2/jffs2_nand_1pass.c
index 3982003..740f787 100644
--- a/fs/jffs2/jffs2_nand_1pass.c
+++ b/fs/jffs2/jffs2_nand_1pass.c
@@ -350,7 +350,7 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 ino, char 
*dest,
 #endif
default:
/* unknown */
-   putLabeledWord(UNKOWN COMPRESSION METHOD = , 
inode-compr);
+   putLabeledWord(UNKNOWN COMPRESSION METHOD = , 
inode-compr);
return -1;
}
}
-- 
1.7.2.3


Re: [U-Boot] [PATCH] Fix gunzip to work for any gzipped uImage size Signed-off-by: Catalin Radu cata...@virtualmetrix.com

2011-02-03 Thread Sergei Shtylyov
Hello.

On 02-02-2011 19:41, Catalin Radu wrote:

 diff --git a/lib/gunzip.c b/lib/gunzip.c
 index 482a476..18cb45b 100644
 --- a/lib/gunzip.c
 +++ b/lib/gunzip.c
 @@ -106,12 +106,16 @@ int zunzip(void *dst, int dstlen, unsigned char *src, 
 unsigned long *lenp,
   s.avail_in = *lenp - offset;
   s.next_out = dst;
   s.avail_out = dstlen;
 - r = inflate(s, Z_FINISH);
 - if ((r != Z_STREAM_END)  (stoponerr==1)) {
 - printf (Error: inflate() returned %d\n, r);
 - inflateEnd(s);
 - return (-1);
 - }
 +do {
 +r = inflate(s, Z_FINISH);
 +if ((r != Z_STREAM_END)  (r != Z_BUF_ERROR)  (stoponerr==1)) {
 +printf (Error: inflate() returned %d\n, r);
 +inflateEnd(s);
 +return (-1);
 +}
 +s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned 
 char*)dst);
 +s.avail_out = dstlen;
 +} while (r == Z_BUF_ERROR);

Don't use spaces for indenting, only tabs.

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


Re: [U-Boot] [PATCH] Fix gunzip to work for any gzipped uImage size Signed-off-by: Catalin Radu cata...@virtualmetrix.com

2011-02-03 Thread Sergei Shtylyov
Your signoff line got pasted to the subject.

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


[U-Boot] [PATCH v2 0/3] MIPS: Fix failed run of MAKEALL mips script

2011-02-03 Thread daniel . schwierzeck
Currently MAKEALL mips covers 21 boards and 15 of them have compile
errors with gcc-4.3.3. This patch series fixes these boards.

Changes for v2:
- make brace style consistent in vct.h
- delete unused board/dbau1x00/flash.c

Daniel Schwierzeck (3):
  MIPS: VCT: Fix enabling of unwanted options if networking or USB
support are disabled
  MIPS: Purple: Fix multiple definition error on final linking of
u-boot binary
  MIPS: dbau1x00: Remove unused flash driver stub

 board/dbau1x00/Makefile |2 +-
 board/dbau1x00/flash.c  |   43 ---
 board/purple/u-boot.lds |5 -
 include/configs/vct.h   |7 +--
 4 files changed, 6 insertions(+), 51 deletions(-)
 delete mode 100644 board/dbau1x00/flash.c

--
1.7.3.5

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


[U-Boot] [PATCH v2 1/3] MIPS: VCT: Fix enabling of unwanted options if networking or USB support are disabled

2011-02-03 Thread daniel . schwierzeck
Some VCT boards lacks the support of networking or USB.
Additionally that support is disabled in small image
configurations.

If CONFIG_CMD_NET should not used the CONFIG_CMD_NFS option
have to be disabled too. Otherwise the linker fails with
unresolved symbols.

If CONFIG_VCT_SMALL_IMAGE is set than CONFIG_CMD_NET and
CONFIG_CMD_USB are disabled at the end of vct.h.
This is not adequate because CONFIG_CMD_USB enables additional
options and the linker fails again with unresolved symbols.

This patch adds an early check against CONFIG_VCT_SMALL_IMAGE
so the additional options are only enabled if they are really
needed.

Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
Acked-by: Stefan Roese s...@denx.de
---
 include/configs/vct.h |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/configs/vct.h b/include/configs/vct.h
index 4894969..325ac8c 100644
--- a/include/configs/vct.h
+++ b/include/configs/vct.h
@@ -109,17 +109,20 @@
 /*
  * Only Premium/Platinum have ethernet support right now
  */
-#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
+#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM))  \
+   !defined(CONFIG_VCT_SMALL_IMAGE)
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SNTP
 #else
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 #endif

 /*
  * Only Premium/Platinum have USB-EHCI support right now
  */
-#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
+#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM))  \
+   !defined(CONFIG_VCT_SMALL_IMAGE)
 #define CONFIG_CMD_USB
 #define CONFIG_CMD_FAT
 #endif
--
1.7.3.5

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


[U-Boot] [PATCH v2 2/3] MIPS: Purple: Fix multiple definition error on final linking of u-boot binary

2011-02-03 Thread daniel . schwierzeck
The linker of recent toolchains complains about multiple definitions
on final linking of u-boot binary. This patch removes all redundant
object files from u-boot.lds those are already added to .text section
by the linker.

That patch could not be tested but the resulting u-boot.map still looks
good. The start symbol is at 0xB000, the environment at 0xB0008000
so u-boot should boot.

Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
Cc: Wolfgang Denk w...@denx.de
---
 board/purple/u-boot.lds |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/board/purple/u-boot.lds b/board/purple/u-boot.lds
index 542601a..719f268 100644
--- a/board/purple/u-boot.lds
+++ b/board/purple/u-boot.lds
@@ -36,11 +36,6 @@ SECTIONS
{
  arch/mips/cpu/start.o (.text)
  board/purple/lowlevel_init.o  (.text)
- arch/mips/cpu/cache.o (.text)
- common/main.o (.text)
- common/dlmalloc.o (.text)
- common/cmd_boot.o (.text)
- lib/zlib.o(.text)
  . = DEFINED(env_offset) ? env_offset : .;
  common/env_embedded.o (.ppcenv)

--
1.7.3.5

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


[U-Boot] [PATCH v2 3/3] MIPS: dbau1x00: Remove unused flash driver stub

2011-02-03 Thread daniel . schwierzeck
All dbau1x00 boards use the CFI driver so this stub driver is useless
and should not be compiled.

This patch fixes the error:

u-boot-git/board/dbau1x00/flash.c:34: multiple definition of `flash_init'
drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:2084: first defined here
board/dbau1x00/libdbau1x00.o: In function `write_buff':
u-boot-git/board/dbau1x00/flash.c:40: multiple definition of `write_buff'
drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:1265: first defined here

Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
Cc: Wolfgang Denk w...@denx.de
---
 board/dbau1x00/Makefile |2 +-
 board/dbau1x00/flash.c  |   43 ---
 2 files changed, 1 insertions(+), 44 deletions(-)
 delete mode 100644 board/dbau1x00/flash.c

diff --git a/board/dbau1x00/Makefile b/board/dbau1x00/Makefile
index f1594a2..e36a9d2 100644
--- a/board/dbau1x00/Makefile
+++ b/board/dbau1x00/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk

 LIB= $(obj)lib$(BOARD).o

-COBJS  = $(BOARD).o flash.o
+COBJS  = $(BOARD).o
 SOBJS  = lowlevel_init.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/dbau1x00/flash.c b/board/dbau1x00/flash.c
deleted file mode 100644
index a2fed1d..000
--- a/board/dbau1x00/flash.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * (C) Copyright 2003
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * 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
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];   /* info for FLASH chips 
*/
-
-/*---
- * flash_init()
- *
- * sets up flash_info and returns size of FLASH (bytes)
- */
-unsigned long flash_init (void)
-{
-   printf (Skipping flash_init\n);
-   return (0);
-}
-
-int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
-{
-   printf (write_buff not implemented\n);
-   return (-1);
-}
--
1.7.3.5

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


[U-Boot] P2020 SPL L2 clearing

2011-02-03 Thread Fabian Cenedese
Hi

I'm creating a SPL u-boot image for our board. In the file
arch/powerpc/cpu/mpc85xx/cpu_init_nand.c is the setup for
the L2 cache as SRAM. In the end is a loop that fills the
cache with 0 (512KB in this case).

/* Initialize L2 SRAM to zero */
l2srbar = (char *)CONFIG_SYS_INIT_L2_ADDR;
for (i = 0; i  CONFIG_SYS_L2_SIZE; i++)
l2srbar[i] = 0;

Two questions for this:

1. Why is the access byte-wise and not dword-wise? This
is only for mpx85xx and I think they all can access the cache
with 32bits instead of just 8. That would speed up by factor 4
(confirmed in my tests).

2. Why does the cache to be cleared at all? L2-SRAM is usually
just used to copy in the second part of the u-boot image, so
the 0s will be overwritten again anyway.

I came to this loop because the board takes an awful long
time to boot up. I'm measuring now cpu ticks until board_init_r
(in the first part loader before the u-boot image gets loaded).
With this loop it takes about 4 seconds, without just 50 ms.
How come the L2 access is so slow? I already increased
the lb clock but that only helps outside. Even if this loop
didn't need any time I'd still have the questions above.

Thanks

bye  Fabi

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


[U-Boot] [PATCH] Fix gunzip to work for any gziped uImage size

2011-02-03 Thread Catalin Radu

Signed-off-by: Catalin Radu cata...@virtualmetrix.com
---
 lib/gunzip.c |   16 ++--
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/lib/gunzip.c b/lib/gunzip.c
index 482a476..2922608 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -106,12 +106,16 @@ int zunzip(void *dst, int dstlen, unsigned char *src, 
unsigned long *lenp,
s.avail_in = *lenp - offset;
s.next_out = dst;
s.avail_out = dstlen;
-   r = inflate(s, Z_FINISH);
-   if ((r != Z_STREAM_END)  (stoponerr==1)) {
-   printf (Error: inflate() returned %d\n, r);
-   inflateEnd(s);
-   return (-1);
-   }
+   do {
+   r = inflate(s, Z_FINISH);
+   if ((r != Z_STREAM_END)  (r != Z_BUF_ERROR)  
(stoponerr==1)) {
+   printf (Error: inflate() returned %d\n, r);
+   inflateEnd(s);
+   return (-1);
+   }
+   s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned 
char*)dst);
+   s.avail_out = dstlen;
+   } while (r == Z_BUF_ERROR);
*lenp = s.next_out - (unsigned char *) dst;
inflateEnd(s);
 
-- 
1.6.3.3

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


Re: [U-Boot] [PATCH 3/3] MIPS: dbau1x00: Disable compilation of flash driver stub

2011-02-03 Thread Wolfgang Denk
Dear Daniel Schwierzeck,

In message aanlktikffkjqhgo8s4973p919bcwc7fjwpj+8d_gy...@mail.gmail.com you 
wrote:
 
  I suggest that you not only disable the compilation of this file, but remove
  it completely.
 
 Ok  I can do that if you and Wolfgang agree

I do.

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: w...@denx.de
The moral of the story is: Don't stop to  tighten  your  shoe  laces
during the Olympics 100m finals.
 - Kevin Jones in dejo68@bri.hp.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [STATUS] v2011.03-rc1 released

2011-02-03 Thread Ben Gardiner
On Wed, Feb 2, 2011 at 4:55 PM, Wolfgang Denk w...@denx.de wrote:
 Hello  everybody:

 * U-Boot v2011.03-rc1 was released on Wed, 02 Feb 2011.

 * Release v2011.03 is scheduled in 39 days - on March 13, 2011.

 Please help testing, and check if all your relevant patches have been
 included.

Hi Sandeep,

Please also apply:
http://patchwork.ozlabs.org/patch/78425/ -- [U-Boot,1/2] ea20: fix
libea20.o not found
and
http://patchwork.ozlabs.org/patch/78426/ -- [U-Boot,2/2] ea20: fix
undefined PHY_* errors

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] MPC8536 - U-Boot - Serial Port baudrate

2011-02-03 Thread Fischer, Sven

Hi,

I'm trying to get the NAND-Boot working.
So far I was able to access the 4k-byte Bootloader and it is copying the
whole U-Boot to L2-SRAM and it tries to start it from the new location.
While loading the 4k-byte bootloader the serial interface is working
fine. After loading from the new loaction the serial interface reports
strange characters.
Do you know where I have to set the baudrate?

Regards,

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


Re: [U-Boot] Pull request: u-boot-sh

2011-02-03 Thread Wolfgang Denk
Dear Nobuhiro Iwamatsu,

In message aanlktikwvpmrmsytweoofwkwd2rzb_kexlmyobcml...@mail.gmail.com you 
wrote:
 
 Please pull the following changes.

Thanks.

[This message is just a feature test.]


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: w...@denx.de
Men of peace usually are [brave].
-- Spock, The Savage Curtain, stardate 5906.5
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Drop config.h include in tools/imximage.h

2011-02-03 Thread Loïc Minier
make tools-all should allow building tools such as mkimage and the new
imximage without any config, but imximage.c currently fails to build
with:
imximage.h:27:20: error: config.h: No such file or directory

config.h is not needed in imximage.h nor in imximage.c, and imximage.h
is only included from imximage.c, so drop this include to fix the build.

Signed-off-by: Loïc Minier loic.min...@linaro.org
---
 tools/imximage.h |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/tools/imximage.h b/tools/imximage.h
index 38ca6be..d126a46 100644
--- a/tools/imximage.h
+++ b/tools/imximage.h
@@ -24,8 +24,6 @@
 #ifndef _IMXIMAGE_H_
 #define _IMXIMAGE_H_
 
-#include config.h
-
 #define MAX_HW_CFG_SIZE_V2 121 /* Max number of registers imx can set for v2 */
 #define MAX_HW_CFG_SIZE_V1 60  /* Max number of registers imx can set for v1 */
 #define APP_CODE_BARKER0xB1
-- 
1.7.2.3

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


Re: [U-Boot] [PATCH] mpc83xx: Use correct register to calculate clocks.

2011-02-03 Thread Joakim Tjernlund
Ping?

Kim are you maintaining 83xx or should I poke someone else?

 Jocke


 Use SPMR instead of HRCWL when calculating clocks as HCRWL
 may be changed and the CPU will not pick up all changes
 until there is a POR. u-boot will think SPMF has changed and get
 the clocks wrong.

 Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se
 ---
  arch/powerpc/cpu/mpc83xx/speed.c |   15 ---
  include/mpc83xx.h|7 +++
  2 files changed, 15 insertions(+), 7 deletions(-)

 diff --git a/arch/powerpc/cpu/mpc83xx/speed.c 
 b/arch/powerpc/cpu/mpc83xx/speed.c
 index 500eef1..55290b4 100644
 --- a/arch/powerpc/cpu/mpc83xx/speed.c
 +++ b/arch/powerpc/cpu/mpc83xx/speed.c
 @@ -159,7 +159,7 @@ int get_clocks(void)
  #endif
 }

 -   spmf = ((im-reset.rcwl  HRCWL_SPMF)  HRCWL_SPMF_SHIFT);
 +   spmf = ((im-clk.spmr  SPMR_SPMF)  SPMR_SPMF_SHIFT);
 csb_clk = pci_sync_in * (1 + clkin_div) * spmf;

 sccr = im-clk.sccr;
 @@ -387,7 +387,7 @@ int get_clocks(void)
  #endif

 lbiu_clk = csb_clk *
 -  (1 + ((im-reset.rcwl  HRCWL_LBIUCM)  HRCWL_LBIUCM_SHIFT));
 +  (1 + ((im-clk.spmr  SPMR_LBIUCM)  SPMR_LBIUCM_SHIFT));
 lcrr = (im-lbus.lcrr  LCRR_CLKDIV)  LCRR_CLKDIV_SHIFT;
 switch (lcrr) {
 case 2:
 @@ -401,11 +401,12 @@ int get_clocks(void)
 }

 mem_clk = csb_clk *
 -(1 + ((im-reset.rcwl  HRCWL_DDRCM)  HRCWL_DDRCM_SHIFT));
 -   corepll = (im-reset.rcwl  HRCWL_COREPLL)  HRCWL_COREPLL_SHIFT;
 +(1 + ((im-clk.spmr  SPMR_DDRCM)  SPMR_DDRCM_SHIFT));
 +   corepll = (im-clk.spmr  SPMR_COREPLL)  SPMR_COREPLL_SHIFT;
 +
  #if defined(CONFIG_MPC8360)
 mem_sec_clk = csb_clk * (1 +
 - ((im-reset.rcwl  HRCWL_LBIUCM)  HRCWL_LBIUCM_SHIFT));
 + ((im-clk.spmr  SPMR_LBIUCM)  SPMR_LBIUCM_SHIFT));
  #endif

 corecnf_tab_index = ((corepll  0x1F)  2) | ((corepll  0x60)  5);
 @@ -437,8 +438,8 @@ int get_clocks(void)
 }

  #if defined(CONFIG_MPC8360) || defined(CONFIG_MPC832x)
 -   qepmf = (im-reset.rcwl  HRCWL_CEPMF)  HRCWL_CEPMF_SHIFT;
 -   qepdf = (im-reset.rcwl  HRCWL_CEPDF)  HRCWL_CEPDF_SHIFT;
 +   qepmf = (im-clk.spmr  SPMR_CEPMF)  SPMR_CEPMF_SHIFT;
 +   qepdf = (im-clk.spmr  SPMR_CEPDF)  SPMR_CEPDF_SHIFT;
 qe_clk = (pci_sync_in * qepmf) / (1 + qepdf);
 brg_clk = qe_clk / 2;
  #endif
 diff --git a/include/mpc83xx.h b/include/mpc83xx.h
 index 5214911..a46a3aa 100644
 --- a/include/mpc83xx.h
 +++ b/include/mpc83xx.h
 @@ -642,14 +642,21 @@
  /* SPMR - System PLL Mode Register
   */
  #define SPMR_LBIUCM 0x8000
 +#define SPMR_LBIUCM_SHIFT  31
  #define SPMR_DDRCM 0x4000
 +#define SPMR_DDRCM_SHIFT  30
  #define SPMR_SPMF 0x0F00
 +#define SPMR_SPMF_SHIFT  24
  #define SPMR_CKID 0x0080
  #define SPMR_CKID_SHIFT 23
  #define SPMR_COREPLL 0x007F
 +#define SPMR_COREPLL_SHIFT  16
  #define SPMR_CEVCOD 0x00C0
 +#define SPMR_CEVCOD_SHIFT  6
  #define SPMR_CEPDF 0x0020
 +#define SPMR_CEPDF_SHIFT  5
  #define SPMR_CEPMF 0x001F
 +#define SPMR_CEPMF_SHIFT  0

  /* OCCR - Output Clock Control Register
   */
 --
 1.7.3.4

 ___
 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


[U-Boot] [PATCH V2] Fix misc spelling errors found by lintian

2011-02-03 Thread Loïc Minier
Signed-off-by: Loïc Minier loic.min...@linaro.org
---
Changes for V2:
 * add Signed-off-by

 arch/arm/cpu/arm920t/at91rm9200/ether.c |2 +-
 arch/sparc/cpu/leon2/cpu_init.c |4 ++--
 arch/sparc/cpu/leon3/cpu_init.c |4 ++--
 common/cmd_usb.c|2 +-
 common/usb_storage.c|2 +-
 drivers/net/at91_emac.c |2 +-
 fs/jffs2/jffs2_1pass.c  |2 +-
 fs/jffs2/jffs2_nand_1pass.c |2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/cpu/arm920t/at91rm9200/ether.c 
b/arch/arm/cpu/arm920t/at91rm9200/ether.c
index e1cdeba..d7135c5 100644
--- a/arch/arm/cpu/arm920t/at91rm9200/ether.c
+++ b/arch/arm/cpu/arm920t/at91rm9200/ether.c
@@ -39,7 +39,7 @@ typedef struct {
 #define RBF_MULTICAST (130)
 #define RBF_UNICAST   (129)
 #define RBF_EXTERNAL  (128)
-#define RBF_UNKOWN(127)
+#define RBF_UNKNOWN   (127)
 #define RBF_SIZE  0x07ff
 #define RBF_LOCAL4(126)
 #define RBF_LOCAL3(125)
diff --git a/arch/sparc/cpu/leon2/cpu_init.c b/arch/sparc/cpu/leon2/cpu_init.c
index a24f778..795c7d7 100644
--- a/arch/sparc/cpu/leon2/cpu_init.c
+++ b/arch/sparc/cpu/leon2/cpu_init.c
@@ -47,9 +47,9 @@ struct {
  * initialize a bunch of registers.
  *
  * Run from FLASH/PROM:
- *  - until memory controller is set up, only registers avaiable
+ *  - until memory controller is set up, only registers available
  *  - no global variables available for writing
- *  - constants avaiable
+ *  - constants available
  */
 
 void cpu_init_f(void)
diff --git a/arch/sparc/cpu/leon3/cpu_init.c b/arch/sparc/cpu/leon3/cpu_init.c
index be22ec2..cba9d0e 100644
--- a/arch/sparc/cpu/leon3/cpu_init.c
+++ b/arch/sparc/cpu/leon3/cpu_init.c
@@ -57,9 +57,9 @@ struct {
  * initialize a bunch of registers.
  *
  * Run from FLASH/PROM:
- *  - until memory controller is set up, only registers avaiable
+ *  - until memory controller is set up, only registers available
  *  - no global variables available for writing
- *  - constants avaiable
+ *  - constants available
  */
 
 void cpu_init_f(void)
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index b04a8df..7fcc61a 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -580,7 +580,7 @@ int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
break;
}
if (dev == NULL) {
-   printf(*** NO Device avaiable ***\n);
+   printf(*** NO Device available ***\n);
return 0;
} else {
usb_display_desc(dev);
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 1e6cd6a..de48c5a 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -254,7 +254,7 @@ int usb_stor_scan(int mode)
dev = usb_get_dev_index(i); /* get device */
USB_STOR_PRINTF(i=%d\n, i);
if (dev == NULL)
-   break; /* no more devices avaiable */
+   break; /* no more devices available */
 
if (usb_storage_probe(dev, 0, usb_stor[usb_max_devs])) {
/* OK, it's a storage device.  Iterate over its LUNs
diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index 4e5685c..90eb515 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -93,7 +93,7 @@
 #define RBF_MULTICAST (130)
 #define RBF_UNICAST   (129)
 #define RBF_EXTERNAL  (128)
-#define RBF_UNKOWN(127)
+#define RBF_UNKNOWN   (127)
 #define RBF_SIZE  0x07ff
 #define RBF_LOCAL4(126)
 #define RBF_LOCAL3(125)
diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index c4f7445..5ddc2b9 100644
--- a/fs/jffs2/jffs2_1pass.c
+++ b/fs/jffs2/jffs2_1pass.c
@@ -794,7 +794,7 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char 
*dest)
 #endif
default:
/* unknown */
-   putLabeledWord(UNKOWN COMPRESSION 
METHOD = , jNode-compr);
+   putLabeledWord(UNKNOWN COMPRESSION 
METHOD = , jNode-compr);
put_fl_mem(jNode, pL-readbuf);
return -1;
break;
diff --git a/fs/jffs2/jffs2_nand_1pass.c b/fs/jffs2/jffs2_nand_1pass.c
index 3982003..740f787 100644
--- a/fs/jffs2/jffs2_nand_1pass.c
+++ b/fs/jffs2/jffs2_nand_1pass.c
@@ -350,7 +350,7 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 ino, char 
*dest,
 #endif
default:
/* unknown */
-   putLabeledWord(UNKOWN COMPRESSION METHOD = , 
inode-compr);
+   putLabeledWord(UNKNOWN COMPRESSION METHOD = , 
inode-compr);

[U-Boot] [PATCH V2] EfikaMX: switch to MACH_TYPE_MX51_EFIKAMX

2011-02-03 Thread Loïc Minier
Upstream linux moved from MACH_TYPE_MX51_LANGE51 to
MACH_TYPE_MX51_EFIKAMX.

Signed-off-by: Loïc Minier loic.min...@linaro.org
---
Changes for V2:
 * Add Signed-off-by

 board/efikamx/efikamx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/board/efikamx/efikamx.c b/board/efikamx/efikamx.c
index 4efbeaf..f735260 100644
--- a/board/efikamx/efikamx.c
+++ b/board/efikamx/efikamx.c
@@ -621,7 +621,7 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
-   gd-bd-bi_arch_number = MACH_TYPE_MX51_LANGE51;
+   gd-bd-bi_arch_number = MACH_TYPE_MX51_EFIKAMX;
gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
return 0;
-- 
1.7.2.3

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


Re: [U-Boot] [PATCH V2] Fix misc spelling errors found by lintian

2011-02-03 Thread Andy Pont
Loic wrote...

snip

 diff --git a/common/cmd_usb.c b/common/cmd_usb.c
 index b04a8df..7fcc61a 100644
 --- a/common/cmd_usb.c
 +++ b/common/cmd_usb.c
 @@ -580,7 +580,7 @@ int do_usb(cmd_tbl_t *cmdtp, int flag, int argc,
 char * const argv[])
   break;
   }
   if (dev == NULL) {
 - printf(*** NO Device avaiable ***\n);
 + printf(*** NO Device available ***\n);

Should this be further amended to be all upper case or all words starting with 
an upper case character rather than the current random looking collection?

snip

Andy.


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


Re: [U-Boot] [PATCH] powerpc: Add cpu_secondary_init_r to allow for initialization post env setup

2011-02-03 Thread Kumar Gala

On Feb 2, 2011, at 12:21 PM, Kumar Gala wrote:

 We can simplify some cpu/SoC level initialization by moving it to be
 after the environment and non-volatile storage is setup as there might
 be dependancies on such things in various boot configurations.
 
 For example for FSL SoC's with QE if we boot from NAND we need it setup
 to extra the ucode image to initialize the QE.  If we always do this
 after environment  non-volatile storage is working we can have the code
 be the same regardless of NOR, NAND, SPI, MMC boot.
 
 Signed-off-by: Kumar Gala ga...@kernel.crashing.org
 ---
 * This is really second version of the cpu_late_init_r patch
  - changed where we call cpu_secondary_init_r to be right after env_relocate
 
 arch/powerpc/cpu/mpc85xx/cpu_init.c |   15 +--
 arch/powerpc/lib/board.c|   14 ++
 2 files changed, 23 insertions(+), 6 deletions(-)
 
 diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c 
 b/arch/powerpc/cpu/mpc85xx/cpu_init.c
 index 8ece970..215b7b3 100644
 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
 +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
 @@ -384,12 +384,6 @@ int cpu_init_r(void)
 
   enable_cpc();
 
 -#ifdef CONFIG_QE
 - uint qe_base = CONFIG_SYS_IMMR + 0x0008; /* QE immr base */
 - qe_init(qe_base);
 - qe_reset();
 -#endif
 -
   /* needs to be in ram since code uses global static vars */
   fsl_serdes_init();
 
 @@ -449,3 +443,12 @@ int sata_initialize(void)
   return 1;
 }
 #endif
 +
 +void cpu_secondary_init_r(void)
 +{
 +#ifdef CONFIG_QE
 + uint qe_base = CONFIG_SYS_IMMR + 0x0008; /* QE immr base */
 + qe_init(qe_base);
 + qe_reset();
 +#endif
 +}
 diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
 index b88cf6b..38ca1f8 100644
 --- a/arch/powerpc/lib/board.c
 +++ b/arch/powerpc/lib/board.c
 @@ -186,6 +186,12 @@ int __board_flash_wp_on(void)
 }
 int board_flash_wp_on(void) __attribute__((weak, 
 alias(__board_flash_wp_on)));
 
 +void __cpu_secondary_init_r(void)
 +{
 +}
 +void cpu_secondary_init_r(void)
 +__attribute__((weak, alias(__cpu_secondary_init_r)));
 +
 static int init_func_ram (void)
 {
 #ifdefCONFIG_BOARD_TYPES
 @@ -798,6 +804,14 @@ void board_init_r (gd_t *id, ulong dest_addr)
   env_relocate ();
 
   /*
 +  * after non-volatile devices  environment is setup and cpu code have
 +  * another round to deal with any initialization that might require
 +  * full access to the environment or loading of some image (firmware)
 +  * from a non-volatile device
 +  */
 + cpu_secondary_init_r();
 +
 + /*
* Fill in missing fields of bd_info.
* We do this here, where we have normal access to the
* environment; we used to do this still running from ROM,
 -- 
 1.6.0.6

Wolfgang,

Any comments on this, based on the discussion here:

http://lists.denx.de/pipermail/u-boot/2011-January/086567.html
http://lists.denx.de/pipermail/u-boot/2011-February/086711.html

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


Re: [U-Boot] [STATUS] v2011.03-rc1 released

2011-02-03 Thread Michael Schwingen
Wolfgang Denk wrote:
 Hello  everybody:

 * U-Boot v2011.03-rc1 was released on Wed, 02 Feb 2011.

 * Release v2011.03 is scheduled in 39 days - on March 13, 2011.

 Please help testing, and check if all your relevant patches have been
 included.


 Note that still a large number of ARM boards are broken. I hope many
 people join the efforts and fix all the currently broken boards.
 Thanks in advance to everybody who lends a helping hand.
   
What is the time frame?

I think I have IXP425 mostly in shape - my own boards work, and IXDP425 
boots up and basically works. PCI is still a working area: I pulled out 
most of the old, IXP-specific code and changed the PCI code to use 
u-boot's PCI infrastructure.

This works fine for configuration, and I can dump and modify memory (eg. 
the bootrom on a E1000 card), but I can't get any of the ethernet 
drivers to work - possibly due to endian issues, but this might take 
some time to sort out.

Would it be OK to commit this as-is, knowing it may require some further 
fixups? At least it does work better than before.

Otherwise, I could leave out the whole PCI area and only provide patches 
for the boards without PCI, leaving IXP PCI in its current broken state.

cu
Michael



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


[U-Boot] [PATCH 1/3] ColdFire: Queued SPI driver

2011-02-03 Thread Richard Retanubun
This patch adds a driver for Freescale Colfire Queued SPI bus.
Coded to work with 8 bits per transfer to use with SPI flash.
CPOL, CPHA, and CS_ACTIVE_HIGH can be configured.

Tested with MCF5270 which have 4 chip selects.

Activate by #define CONFIG_CF_QSPI in board config.
---
 arch/m68k/cpu/mcf52x2/cpu_init.c  |  134 +-
 arch/m68k/include/asm/coldfire/qspi.h |2 +-
 arch/m68k/include/asm/m5271.h |   26 
 drivers/spi/Makefile  |1 +
 drivers/spi/cf_qspi.c |  257 +
 5 files changed, 418 insertions(+), 2 deletions(-)
 create mode 100644 drivers/spi/cf_qspi.c

diff --git a/arch/m68k/cpu/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c
index 170bbfc..6dbf5b2 100644
--- a/arch/m68k/cpu/mcf52x2/cpu_init.c
+++ b/arch/m68k/cpu/mcf52x2/cpu_init.c
@@ -332,7 +332,139 @@ int fecpin_setclear(struct eth_device *dev, int setclear)
return 0;
 }
 #endif /* CONFIG_CMD_NET */
-#endif
+
+#if defined(CONFIG_CF_QSPI)
+
+/* Configure PIOs for SIN, SOUT, and SCK */
+void cfspi_port_conf(void)
+{
+   mbar_writeByte(MCF_GPIO_PAR_QSPI,
+  MCF_GPIO_PAR_QSPI_SIN_SIN   |
+  MCF_GPIO_PAR_QSPI_SOUT_SOUT |
+  MCF_GPIO_PAR_QSPI_SCK_SCK);
+}
+
+/* Assert chip select, val = [1|0] , dir = out, mode = GPIO */
+void cfspi_cs_activate(uint bus, uint cs, uint cs_active_high)
+{
+   debug(%s: bus %d cs %d cs_active_high %d\n,
+   __func__, bus, cs, cs_active_high);
+
+   switch (cs) {
+   case 0: /* QSPI_CS[0] = PQSPI[3] */
+   if (cs_active_high)
+   mbar_writeByte(MCF_GPIO_PPDSDR_QSPI, 0x08);
+   else
+   mbar_writeByte(MCF_GPIO_PCLRR_QSPI, 0xF7);
+
+   mbar_writeByte(MCF_GPIO_PDDR_QSPI,
+   mbar_readByte(MCF_GPIO_PDDR_QSPI) | 0x08);
+
+   mbar_writeByte(MCF_GPIO_PAR_QSPI,
+   mbar_readByte(MCF_GPIO_PAR_QSPI)  0xDF);
+   break;
+   case 1: /* QSPI_CS[1] = PQSPI[4] */
+   if (cs_active_high)
+   mbar_writeByte(MCF_GPIO_PPDSDR_QSPI, 0x10);
+   else
+   mbar_writeByte(MCF_GPIO_PCLRR_QSPI, 0xEF);
+
+   mbar_writeByte(MCF_GPIO_PDDR_QSPI,
+   mbar_readByte(MCF_GPIO_PDDR_QSPI) | 0x10);
+
+   mbar_writeByte(MCF_GPIO_PAR_QSPI,
+   mbar_readByte(MCF_GPIO_PAR_QSPI)  0x3F);
+   break;
+   case 2: /* QSPI_CS[2] = PTIMER[7] */
+   if (cs_active_high)
+   mbar_writeByte(MCF_GPIO_PPDSDR_TIMER, 0x80);
+   else
+   mbar_writeByte(MCF_GPIO_PCLRR_TIMER, 0x7F);
+
+   mbar_writeByte(MCF_GPIO_PDDR_TIMER,
+   mbar_readByte(MCF_GPIO_PDDR_TIMER) | 0x80);
+
+   mbar_writeShort(MCF_GPIO_PAR_TIMER,
+   mbar_readShort(MCF_GPIO_PAR_TIMER)  0x3FFF);
+   break;
+   case 3: /* QSPI_CS[3] = PTIMER[3] */
+   if (cs_active_high)
+   mbar_writeByte(MCF_GPIO_PPDSDR_TIMER, 0x08);
+   else
+   mbar_writeByte(MCF_GPIO_PCLRR_TIMER, 0xF7);
+
+   mbar_writeByte(MCF_GPIO_PDDR_TIMER,
+   mbar_readByte(MCF_GPIO_PDDR_TIMER) | 0x08);
+
+   mbar_writeShort(MCF_GPIO_PAR_TIMER,
+   mbar_readShort(MCF_GPIO_PAR_TIMER)  0xFF3F);
+   break;
+   }
+}
+
+/* Deassert chip select, val = [1|0], dir = in, mode = GPIO
+ * direction set as IN to undrive the pin, external pullup/pulldown will bring
+ * bus to deassert state.
+ */
+void cfspi_cs_deactivate(uint bus, uint cs, uint cs_active_high)
+{
+   debug(%s: bus %d cs %d cs_active_high %d\n,
+   __func__, bus, cs, cs_active_high);
+
+   switch (cs) {
+   case 0: /* QSPI_CS[0] = PQSPI[3] */
+   if (cs_active_high)
+   mbar_writeByte(MCF_GPIO_PCLRR_QSPI, 0xF7);
+   else
+   mbar_writeByte(MCF_GPIO_PPDSDR_QSPI, 0x08);
+
+   mbar_writeByte(MCF_GPIO_PDDR_QSPI,
+   mbar_readByte(MCF_GPIO_PDDR_QSPI)  0xF7);
+
+   mbar_writeByte(MCF_GPIO_PAR_QSPI,
+   mbar_readByte(MCF_GPIO_PAR_QSPI)  0xDF);
+   break;
+   case 1: /* QSPI_CS[1] = PQSPI[4] */
+   if (cs_active_high)
+   mbar_writeByte(MCF_GPIO_PCLRR_QSPI, 0xEF);
+   else
+   mbar_writeByte(MCF_GPIO_PPDSDR_QSPI, 0x10);
+
+   mbar_writeByte(MCF_GPIO_PDDR_QSPI,
+   mbar_readByte(MCF_GPIO_PDDR_QSPI)  0xEF);
+
+   mbar_writeByte(MCF_GPIO_PAR_QSPI,
+   mbar_readByte(MCF_GPIO_PAR_QSPI)  0x3F);
+   break;
+   case 2: /* 

Re: [U-Boot] [PATCH V2] Fix misc spelling errors found by lintian

2011-02-03 Thread Loïc Minier
On Thu, Feb 03, 2011, Andy Pont wrote:
 Should this be further amended to be all upper case or all words
 starting with an upper case character rather than the current random
 looking collection?

 I wasn't sure whether it was extra emphasis on NO, and there was no
 other similarly looking message in the file (with ***) so I didn't
 change the casing.

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


Re: [U-Boot] [STATUS] v2011.03-rc1 released

2011-02-03 Thread Alexander Holler
Hello,

Am 02.02.2011 22:55, schrieb Wolfgang Denk:
 * U-Boot v2011.03-rc1 was released on Wed, 02 Feb 2011.

 * Release v2011.03 is scheduled in 39 days - on March 13, 2011.

 Please help testing, and check if all your relevant patches have been
 included.

I'm missing my patch for the problem with redundand environments in NAND:

http://lists.denx.de/pipermail/u-boot/2011-January/086293.html

I think this should go into the 2010.03 too.

Regards,

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


Re: [U-Boot] [PATCH V2] Fix misc spelling errors found by lintian

2011-02-03 Thread Wolfgang Denk
Dear Andy Pont,

In message 012501cbc3ae$ae525bf0$0af713d0$@p...@sdcsystems.com you wrote:
 
  -   printf(*** NO Device avaiable ***\n);
  +   printf(*** NO Device available ***\n);
 
 Should this be further amended to be all upper case or all words starting 
 with an upper case character rather than the current random looking 
 collection?

If you feel it's worth the effort, please feel free to rewrite as
No device available.

Thanks.

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: w...@denx.de
America has been discovered before, but it has always been hushed up.
- Oscar Wilde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] powerpc: Add cpu_secondary_init_r to allow for initialization post env setup

2011-02-03 Thread Wolfgang Denk
Dear Kumar Gala,

In message 1e454b65-b8dc-4276-b6dd-7d4a3f522...@kernel.crashing.org you wrote:
 
 Any comments on this, based on the discussion here:

Not really.  I mean, I don't object.

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: w...@denx.de
  Is there a way to determine Yesterday's date using Unix utilities?
 echo what is yesterday's date? | /bin/mail root
 -- Randal L. Schwartz in ukbuh2y982@julie.teleport.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [STATUS] v2011.03-rc1 released

2011-02-03 Thread Wolfgang Denk
Dear Michael Schwingen,

In message 4d4acba0.9030...@discworld.dascon.de you wrote:

  Note that still a large number of ARM boards are broken. I hope many
  people join the efforts and fix all the currently broken boards.
  Thanks in advance to everybody who lends a helping hand.

 What is the time frame?

The original entry in doc/feature-removal-schedule.txt said:

Support for CONFIG_SYS_ARM_WITHOUT_RELOC will be removed
after release v2011.03; all boards that have not been
converted by then, i. e. that are still broken then, are
considered unmaintained and without interest for the
community and will be removed as well.

Support for CONFIG_SYS_ARM_WITHOUT_RELOC has already been dropped,
which makes the problem obvious, but the time frame remains: boards
that are not working after v2011.03 has been released are treated as
wolfsheads i. e. may be killed on sight by anybody who submits such a
patch.

Of course, you can still object to such patches, but then you will
probably be asked to provide fixes to make the respective board
working before the end of the merge window.

 This works fine for configuration, and I can dump and modify memory (eg. 
 the bootrom on a E1000 card), but I can't get any of the ethernet 
 drivers to work - possibly due to endian issues, but this might take 
 some time to sort out.
 
 Would it be OK to commit this as-is, knowing it may require some further 
 fixups? At least it does work better than before.

From my point of view this is OK. And if you are actually working on
this, then there is little danger. We will not remove a board that is
visibly actively being maintained,

 Otherwise, I could leave out the whole PCI area and only provide patches 
 for the boards without PCI, leaving IXP PCI in its current broken state.

Even that would be OK, as it's still an improvemnt over the status
quo.

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: w...@denx.de
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not Eureka! (I found it!) but That's funny ...
  -- Isaac Asimov
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Fix NAND_SPL and ONENAND_IPL in Makefile

2011-02-03 Thread Haiying Wang
Dear Wolfgang,
On Thu, 2011-01-27 at 09:44 -0500, haiying.w...@freescale.com wrote:
 From: Haiying Wang haiying.w...@freescale.com
 
 Signed-off-by: Haiying Wang haiying.w...@freescale.com
 Acked-by: Scott Wood scottw...@freescale.com
 
 ---
  Makefile |   30 ++
  1 files changed, 14 insertions(+), 16 deletions(-)
 
 diff --git a/Makefile b/Makefile
 index 5f93646..0d1ea5d 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -287,17 +287,6 @@ LDPPFLAGS += \
   $(shell $(LD) --version | \
 sed -ne 's/GNU ld version 
 \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
  
 -ifeq ($(CONFIG_NAND_U_BOOT),y)
 -NAND_SPL = nand_spl
 -U_BOOT_NAND = $(obj)u-boot-nand.bin
 -endif
 -
 -ifeq ($(CONFIG_ONENAND_U_BOOT),y)
 -ONENAND_IPL = onenand_ipl
 -U_BOOT_ONENAND = $(obj)u-boot-onenand.bin
 -ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
 -endif
 -
  __OBJS := $(subst $(obj),,$(OBJS))
  __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
  
 @@ -320,7 +309,16 @@ BOARD_SIZE_CHECK =
  endif
  
  # Always append ALL so that arch config.mk's can add custom ones
 -ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) 
 $(U_BOOT_ONENAND)
 +ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map
 +
 +ifeq ($(CONFIG_NAND_U_BOOT),y)
 +ALL += $(obj)u-boot-nand.bin
 +endif
 +
 +ifeq ($(CONFIG_ONENAND_U_BOOT),y)
 +ALL += $(obj)u-boot-onenand.bin
 +ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
 +endif
  
  all: $(ALL)
  
 @@ -401,16 +399,16 @@ $(LDSCRIPT):depend
  $(obj)u-boot.lds: $(LDSCRIPT)
   $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - $^ 
 $@
  
 -$(NAND_SPL): $(TIMESTAMP_FILE) $(VERSION_FILE) depend
 +nand_spl:$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
   $(MAKE) -C nand_spl/board/$(BOARDDIR) all
  
 -$(U_BOOT_NAND):  $(NAND_SPL) $(obj)u-boot.bin
 +$(obj)u-boot-nand.bin:   nand_spl $(obj)u-boot.bin
   cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin  
 $(obj)u-boot-nand.bin
  
 -$(ONENAND_IPL):  $(TIMESTAMP_FILE) $(VERSION_FILE) 
 $(obj)include/autoconf.mk
 +onenand_ipl: $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
   $(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
  
 -$(U_BOOT_ONENAND):   $(ONENAND_IPL) $(obj)u-boot.bin
 +$(obj)u-boot-onenand.bin:onenand_ipl $(obj)u-boot.bin
   cat $(ONENAND_BIN) $(obj)u-boot.bin  $(obj)u-boot-onenand.bin
  
  $(VERSION_FILE):

Do you have any comments on this patch? Based on your reply at
http://lists.denx.de/pipermail/u-boot/2011-January/086285.html , I added
the changes for ONENAND_IPL as well.

Thanks.

Haiying


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


[U-Boot] [PATCH V3] Fix misc spelling errors found by lintian

2011-02-03 Thread Loïc Minier
Signed-off-by: Loïc Minier loic.min...@linaro.org
---
Changes for V3:
 * tweak casing of string in common/cmd_usb.c to No device available

Changes for V2:
 * add Signed-off-by

 arch/arm/cpu/arm920t/at91rm9200/ether.c |2 +-
 arch/sparc/cpu/leon2/cpu_init.c |4 ++--
 arch/sparc/cpu/leon3/cpu_init.c |4 ++--
 common/cmd_usb.c|2 +-
 common/usb_storage.c|2 +-
 drivers/net/at91_emac.c |2 +-
 fs/jffs2/jffs2_1pass.c  |2 +-
 fs/jffs2/jffs2_nand_1pass.c |2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/cpu/arm920t/at91rm9200/ether.c 
b/arch/arm/cpu/arm920t/at91rm9200/ether.c
index e1cdeba..d7135c5 100644
--- a/arch/arm/cpu/arm920t/at91rm9200/ether.c
+++ b/arch/arm/cpu/arm920t/at91rm9200/ether.c
@@ -39,7 +39,7 @@ typedef struct {
 #define RBF_MULTICAST (130)
 #define RBF_UNICAST   (129)
 #define RBF_EXTERNAL  (128)
-#define RBF_UNKOWN(127)
+#define RBF_UNKNOWN   (127)
 #define RBF_SIZE  0x07ff
 #define RBF_LOCAL4(126)
 #define RBF_LOCAL3(125)
diff --git a/arch/sparc/cpu/leon2/cpu_init.c b/arch/sparc/cpu/leon2/cpu_init.c
index a24f778..795c7d7 100644
--- a/arch/sparc/cpu/leon2/cpu_init.c
+++ b/arch/sparc/cpu/leon2/cpu_init.c
@@ -47,9 +47,9 @@ struct {
  * initialize a bunch of registers.
  *
  * Run from FLASH/PROM:
- *  - until memory controller is set up, only registers avaiable
+ *  - until memory controller is set up, only registers available
  *  - no global variables available for writing
- *  - constants avaiable
+ *  - constants available
  */
 
 void cpu_init_f(void)
diff --git a/arch/sparc/cpu/leon3/cpu_init.c b/arch/sparc/cpu/leon3/cpu_init.c
index be22ec2..cba9d0e 100644
--- a/arch/sparc/cpu/leon3/cpu_init.c
+++ b/arch/sparc/cpu/leon3/cpu_init.c
@@ -57,9 +57,9 @@ struct {
  * initialize a bunch of registers.
  *
  * Run from FLASH/PROM:
- *  - until memory controller is set up, only registers avaiable
+ *  - until memory controller is set up, only registers available
  *  - no global variables available for writing
- *  - constants avaiable
+ *  - constants available
  */
 
 void cpu_init_f(void)
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index b04a8df..ced818a 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -580,7 +580,7 @@ int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
break;
}
if (dev == NULL) {
-   printf(*** NO Device avaiable ***\n);
+   printf(*** No device available ***\n);
return 0;
} else {
usb_display_desc(dev);
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 1e6cd6a..de48c5a 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -254,7 +254,7 @@ int usb_stor_scan(int mode)
dev = usb_get_dev_index(i); /* get device */
USB_STOR_PRINTF(i=%d\n, i);
if (dev == NULL)
-   break; /* no more devices avaiable */
+   break; /* no more devices available */
 
if (usb_storage_probe(dev, 0, usb_stor[usb_max_devs])) {
/* OK, it's a storage device.  Iterate over its LUNs
diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index 4e5685c..90eb515 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -93,7 +93,7 @@
 #define RBF_MULTICAST (130)
 #define RBF_UNICAST   (129)
 #define RBF_EXTERNAL  (128)
-#define RBF_UNKOWN(127)
+#define RBF_UNKNOWN   (127)
 #define RBF_SIZE  0x07ff
 #define RBF_LOCAL4(126)
 #define RBF_LOCAL3(125)
diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index c4f7445..5ddc2b9 100644
--- a/fs/jffs2/jffs2_1pass.c
+++ b/fs/jffs2/jffs2_1pass.c
@@ -794,7 +794,7 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char 
*dest)
 #endif
default:
/* unknown */
-   putLabeledWord(UNKOWN COMPRESSION 
METHOD = , jNode-compr);
+   putLabeledWord(UNKNOWN COMPRESSION 
METHOD = , jNode-compr);
put_fl_mem(jNode, pL-readbuf);
return -1;
break;
diff --git a/fs/jffs2/jffs2_nand_1pass.c b/fs/jffs2/jffs2_nand_1pass.c
index 3982003..740f787 100644
--- a/fs/jffs2/jffs2_nand_1pass.c
+++ b/fs/jffs2/jffs2_nand_1pass.c
@@ -350,7 +350,7 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 ino, char 
*dest,
 #endif
default:
/* unknown */
-   putLabeledWord(UNKOWN COMPRESSION METHOD = , 
inode-compr);
+  

[U-Boot] [PATCH] arm relocation: Fix calculation of board_init_r

2011-02-03 Thread Alexander Stein
Signed-off-by: Alexander Stein alexander.st...@informatik.tu-chemnitz.de
---
Hello,

I just played a bit with my at91sam9g20ek and tried using a new u-boot.
So I compiled 656b990daa84bfdd512407ee2e3d2610e305a455 (atmel/wip110202) load
it into memory using jtag to 0x2200 while it was linked to 0x2000.
I stepped through the relocation code and at start.S:291 'mov pc, lr' the pc
gets an invalid address (0x25F81D70 while memory ends at 0x2400).
While stepping to start.S:286 some registers have the following contents:
r0: 0d70
r1: 2200
r9: 03f81000
lr: 22000d70
The content if r0 seems ok, but r1 seems wrong, it should be 0x2000.
Indeed r1 should contain the linked address of _start not the address
relative from the current code.

Just for the records, here is the output of u-boot while DEBUG is set in
board.c:
U-Boot 2010.12-00322-g656b990-dirty (Feb 03 2011 - 20:40:07)

U-Boot code: 2000 - 2002DAE8  BSS: - 2006EE80
CPU: AT91SAM9G20
Crystal frequency:   18.432 MHz
CPU clock:  396.288 MHz
Master clock :  132.096 MHz
monitor len: 0006EE80
ramsize: 0400
TLB table at: 23ff
Top of RAM usable for U-Boot at: 23ff
Reserving 443k for U-Boot at: 23f81000
Reserving 644k for malloc() at: 23ee
Reserving 24 Bytes for Board Info at: 23edffe8
Reserving 144 Bytes for Global Data at: 23edff58
New Stack Pointer is: 23edff50
RAM Configuration:
Bank #0: 2000 64 MiB
relocation Offset is: 03f81000

If I load u-boot to the linking address (no relocation needed), everything
works fine, obviously.

Best regards,
Alexander

 arch/arm/cpu/arm926ejs/start.S |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
index eb93ac9..f4c177e 100644
--- a/arch/arm/cpu/arm926ejs/start.S
+++ b/arch/arm/cpu/arm926ejs/start.S
@@ -281,7 +281,7 @@ _nand_boot_ofs:
.word nand_boot
 #else
ldr r0, _board_init_r_ofs
-   adr r1, _start
+   ldr r1, _TEXT_BASE
add lr, r0, r1
add lr, lr, r9
/* setup parameters for board_init_r */
-- 
1.7.4

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


Re: [U-Boot] [STATUS] v2011.03-rc1 released

2011-02-03 Thread Michael Schwingen
Am 02/03/2011 08:27 PM, schrieb Wolfgang Denk:
 Dear Michael Schwingen,

 In message 4d4acba0.9030...@discworld.dascon.de you wrote:
 Note that still a large number of ARM boards are broken. I hope many
 people join the efforts and fix all the currently broken boards.
 Thanks in advance to everybody who lends a helping hand.
   
 What is the time frame?
 The original entry in doc/feature-removal-schedule.txt said:

   Support for CONFIG_SYS_ARM_WITHOUT_RELOC will be removed
   after release v2011.03; all boards that have not been
   converted by then, i. e. that are still broken then, are
   considered unmaintained and without interest for the
   community and will be removed as well.

 Support for CONFIG_SYS_ARM_WITHOUT_RELOC has already been dropped,
 which makes the problem obvious, but the time frame remains: boards
 that are not working after v2011.03 has been released are treated as
 wolfsheads i. e. may be killed on sight by anybody who submits such a
 patch.

 Of course, you can still object to such patches, but then you will
 probably be asked to provide fixes to make the respective board
 working before the end of the merge window.
Sorry, unclear wording on my part - I meant what is the timeframe to
submit the final version of the patches for inclusion into the current
release.

 This works fine for configuration, and I can dump and modify memory (eg. 
 the bootrom on a E1000 card), but I can't get any of the ethernet 
 drivers to work - possibly due to endian issues, but this might take 
 some time to sort out.

 Would it be OK to commit this as-is, knowing it may require some further 
 fixups? At least it does work better than before.
 From my point of view this is OK. And if you are actually working on
 this, then there is little danger. We will not remove a board that is
 visibly actively being maintained,
OK - I will proceed that route. I think I can clean this up for
submission during the next weekend.

cu
Michael

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


Re: [U-Boot] [PATCH] mpc83xx: Use correct register to calculate clocks.

2011-02-03 Thread Kim Phillips
On Thu, 3 Feb 2011 15:17:23 +0100
Joakim Tjernlund joakim.tjernl...@transmode.se wrote:

 Kim are you maintaining 83xx or should I poke someone else?

no, I'm here - I'll get back to you by Monday.

Kim

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


[U-Boot] [PATCH] powerpc/85xx: Don't build read_tlbcam_entry for CONFIG_NAND_SPL

2011-02-03 Thread Kumar Gala
Slim down NAND SPL build a bit as we don't need read_tlbcam_entry.

Signed-off-by: Kumar Gala ga...@kernel.crashing.org
---
 arch/powerpc/cpu/mpc85xx/tlb.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index 31143ba..295f175 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008-2009 Freescale Semiconductor, Inc.
+ * Copyright 2008-2011 Freescale Semiconductor, Inc.
  *
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
@@ -55,6 +55,7 @@ void init_tlbs(void)
return ;
 }
 
+#ifndef CONFIG_NAND_SPL
 void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, unsigned long *epn,
   phys_addr_t *rpn)
 {
@@ -73,7 +74,6 @@ void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, 
unsigned long *epn,
 #endif
 }
 
-#ifndef CONFIG_NAND_SPL
 void print_tlbcam(void)
 {
int i;
-- 
1.7.2.3

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


Re: [U-Boot] [U-BOOT] [PATCH V2] bootm: replace blob_start with image_start

2011-02-03 Thread Lei Wen
Hi Albert,

On Mon, Jan 10, 2011 at 6:21 PM, Lei Wen lei...@marvell.com wrote:
 For uImage always has a 64 bytes header, we couldn't expect to do
 the xip from the header but should xip from the image start.

 The latter logic in that section is also move the image from image_start
 to the load address, so sync this logic to the xip operation.

 Signed-off-by: Lei Wen lei...@marvell.com
 ---
 V2: keep the original XIP setting to compare with blob_start.
        This would make original uImage still could works, since
        it modify the make uImage Makefile in the kernel.

  common/cmd_bootm.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
 index 18019d6..778f6a4 100644
 --- a/common/cmd_bootm.c
 +++ b/common/cmd_bootm.c
 @@ -344,7 +344,7 @@ static int bootm_load_os(image_info_t os, ulong 
 *load_end, int boot_progress)

        switch (comp) {
        case IH_COMP_NONE:
 -               if (load == blob_start) {
 +               if (load == blob_start || load == image_start) {
                        printf (   XIP %s ... , type_name);
                } else {
                        printf (   Loading %s ... , type_name);
 --
 1.7.0.4

How about merge this patch into arm git tree?

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


[U-Boot] [PATCH] powerpc/8xxx: Fix LAW init to respect pre-initialized entries

2011-02-03 Thread Kumar Gala
If some pre-boot or earlier stage bootloader (NAND SPL) has setup LAW
entries consider them good and mark them used.

In the NAND SPL case we skip re-initializing based on the law_table
since the SPL phase already did that.

Signed-off-by: Kumar Gala ga...@kernel.crashing.org
---
 drivers/misc/fsl_law.c |   20 
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c
index 63c08bf..52b 100644
--- a/drivers/misc/fsl_law.c
+++ b/drivers/misc/fsl_law.c
@@ -24,6 +24,7 @@
  */
 
 #include common.h
+#include linux/compiler.h
 #include asm/fsl_law.h
 #include asm/io.h
 
@@ -246,6 +247,25 @@ void init_laws(void)
 #error FSL_HW_NUM_LAWS can not be greater than 32 w/o code changes
 #endif
 
+   /* 
+* Any LAWs that where setup before we booted assume they are meant to
+* be around and mark them used.
+*/
+   for (i = 0; i  FSL_HW_NUM_LAWS; i++) {
+   u32 lawar = in_be32(LAWAR_ADDR(i));
+   
+   if (lawar  LAW_EN)
+   gd-used_laws |= (1  i);
+   }
+
+#ifndef CONFIG_NAND_SPL
+   /*
+* in NAND boot we've already parsed the law_table and setup those LAWs
+* so don't do it again.
+*/
+   return;
+#endif
+
for (i = 0; i  num_law_entries; i++) {
if (law_table[i].index == -1)
set_next_law(law_table[i].addr, law_table[i].size,
-- 
1.7.2.3

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


[U-Boot] [U-BOOT] [PATCH] env: reduce the stack footprint for the env buf

2011-02-03 Thread Lei Wen
Original env buf directly locate at stack lead large stack footprint
when call those env functions. It is not good when the system memory
is critical or only want the uboot run at restrict range, that is not
to touch the memory of other place at its best.

So now this patch move the env buf to the heap area, which reduce the
area uboot need to touch.

Signed-off-by: Lei Wen lei...@marvell.com
---
 common/env_dataflash.c |8 +++-
 common/env_eeprom.c|8 +++-
 common/env_mgdisk.c|   10 +-
 common/env_mmc.c   |9 -
 common/env_nand.c  |   10 +-
 common/env_nvram.c |9 -
 common/env_sf.c|9 -
 7 files changed, 56 insertions(+), 7 deletions(-)

diff --git a/common/env_dataflash.c b/common/env_dataflash.c
index 1d57079..a5a409a 100644
--- a/common/env_dataflash.c
+++ b/common/env_dataflash.c
@@ -50,11 +50,17 @@ uchar env_get_char_spec(int index)
 
 void env_relocate_spec(void)
 {
-   char buf[CONFIG_ENV_SIZE];
+   char *buf;
 
+   buf = malloc(CONFIG_ENV_SIZE);
+   if (!buf) {
+   set_default_env(!dataflash env buf malloc failed);
+   return;
+   }
read_dataflash(CONFIG_ENV_ADDR, CONFIG_ENV_SIZE, buf);
 
env_import(buf, 1);
+   free(buf);
 }
 
 #ifdef CONFIG_ENV_OFFSET_REDUND
diff --git a/common/env_eeprom.c b/common/env_eeprom.c
index 0a179ad..ed7d2d7 100644
--- a/common/env_eeprom.c
+++ b/common/env_eeprom.c
@@ -113,9 +113,14 @@ uchar env_get_char_spec (int index)
 
 void env_relocate_spec (void)
 {
-   char buf[CONFIG_ENV_SIZE];
+   char *buf;
unsigned int off = CONFIG_ENV_OFFSET;
 
+   buf = malloc(CONFIG_ENV_SIZE);
+   if (!buf) {
+   set_default_env(!eeprom env buf malloc failed);
+   return;
+   }
 #ifdef CONFIG_ENV_OFFSET_REDUND
if (gd-env_valid == 2)
off = CONFIG_ENV_OFFSET_REDUND;
@@ -126,6 +131,7 @@ void env_relocate_spec (void)
 CONFIG_ENV_SIZE);
 
env_import(buf, 1);
+   free(buf);
 }
 
 int saveenv(void)
diff --git a/common/env_mgdisk.c b/common/env_mgdisk.c
index a69923b..7638ac3 100644
--- a/common/env_mgdisk.c
+++ b/common/env_mgdisk.c
@@ -43,22 +43,30 @@ uchar env_get_char_spec(int index)
 
 void env_relocate_spec(void)
 {
-   char buf[CONFIG_ENV_SIZE];
+   char *buf;
unsigned int err, rc;
 
+   buf = malloc(CONFIG_ENV_SIZE);
+   if (!buf) {
+   set_default_env(!mgdisk env buf malloc failed);
+   return;
+   }
err = mg_disk_init();
if (err) {
set_default_env(!mg_disk_init error);
+   free(buf);
return;
}
 
err = mg_disk_read(CONFIG_ENV_ADDR, buf, CONFIG_ENV_SIZE);
if (err) {
set_default_env(!mg_disk_read error);
+   free(buf);
return;
}
 
env_import(buf, 1);
+   free(buf);
 }
 
 int saveenv(void)
diff --git a/common/env_mmc.c b/common/env_mmc.c
index 71dcc4c..2eb2953 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -141,7 +141,7 @@ inline int read_env(struct mmc *mmc, unsigned long size,
 void env_relocate_spec(void)
 {
 #if !defined(ENV_IS_EMBEDDED)
-   char buf[CONFIG_ENV_SIZE];
+   char *buf;
 
struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
 
@@ -150,12 +150,19 @@ void env_relocate_spec(void)
return;
}
 
+   buf = malloc(CONFIG_ENV_SIZE);
+   if (!buf) {
+   set_default_env(!mmc env buf malloc failed);
+   return;
+   }
if (read_env(mmc, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, buf)) {
use_default();
+   free(buf);
return;
}
 
env_import(buf, 1);
+   free(buf);
 #endif
 }
 
diff --git a/common/env_nand.c b/common/env_nand.c
index 2682f07..3efc23d 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -416,8 +416,13 @@ void env_relocate_spec (void)
 {
 #if !defined(ENV_IS_EMBEDDED)
int ret;
-   char buf[CONFIG_ENV_SIZE];
+   char *buf;
 
+   buf = malloc(CONFIG_ENV_SIZE);
+   if (!buf) {
+   set_default_env(!nand env buf malloc failed);
+   return;
+   }
 #if defined(CONFIG_ENV_OFFSET_OOB)
ret = get_nand_env_oob(nand_info[0], nand_env_oob_offset);
/*
@@ -428,6 +433,7 @@ void env_relocate_spec (void)
printf(Found Environment offset in OOB..\n);
} else {
set_default_env(!no env offset in OOB);
+   free(buf);
return;
}
 #endif
@@ -435,10 +441,12 @@ void env_relocate_spec (void)
ret = readenv(CONFIG_ENV_OFFSET, (u_char *)buf);
if (ret) {
set_default_env(!readenv() failed);
+   free(buf);
return;
}
 
env_import(buf, 1);
+   free(buf);
 #endif /* ! 

[U-Boot] Health insurance (2/3/2011)

2011-02-03 Thread Robert Moore
Hello,

Our company is an authorized agent for a unique advertising opportunity, 
reaching over 36,000,000 consumers, 94% of which are US based. We're able 
to present our users with a preferred choice whenever they are looking for
anything on the major search engines.

I seek one source to send the users on our Network, from the major search
engines, for health insurance in Thornton and surrounding markets.

Please contact me at your earliest convenience. I am in the office
daily from 9:00 AM to 5:00 PM Pacific time.
 
Best regards,
 
 
 
Robert Moore 
Placement Analyst, SPN Search 
Phone: (888) 418-4028, ext 2011
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] powerpc/8xxx: Fix LAW init to respect pre-initialized entries

2011-02-03 Thread Timur Tabi
On Thu, Feb 3, 2011 at 8:36 PM, Kumar Gala ga...@kernel.crashing.org wrote:

 +        * Any LAWs that where setup before we booted assume they are meant to
 +        * be around and mark them used.

I think you mean were set up.  setup == noun, set up == verb.

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


Re: [U-Boot] MPC8536 - U-Boot - Serial Port baudrate

2011-02-03 Thread Sinan Akman
Fischer, Sven wrote:
 Hi,
 
 I'm trying to get the NAND-Boot working.

   Are  you doing this MPC8536RDK (aka csb1880)
or for your custom design (or referring to
current implementation in MPC8536DS) ?

   -- sinan


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


Re: [U-Boot] [PATCH] Fix gunzip to work for any gziped uImage size

2011-02-03 Thread Anthony Foiani

Catalin, greetings!

Some very minor code style issues that I noticed.  All cosmetic.

Catalin Radu cata...@virtualmetrix.com writes:

 Signed-off-by: Catalin Radu cata...@virtualmetrix.com
 ---
  lib/gunzip.c |   16 ++--
  1 files changed, 10 insertions(+), 6 deletions(-)

 diff --git a/lib/gunzip.c b/lib/gunzip.c
 index 482a476..2922608 100644
 --- a/lib/gunzip.c
 +++ b/lib/gunzip.c
 @@ -106,12 +106,16 @@ int zunzip(void *dst, int dstlen, unsigned char *src, 
 unsigned long *lenp,
   s.avail_in = *lenp - offset;
   s.next_out = dst;
   s.avail_out = dstlen;
 - r = inflate(s, Z_FINISH);
 - if ((r != Z_STREAM_END)  (stoponerr==1)) {
 - printf (Error: inflate() returned %d\n, r);
 - inflateEnd(s);
 - return (-1);
 - }
 + do {
 + r = inflate(s, Z_FINISH);

Space after function name?

 + if ((r != Z_STREAM_END)  (r != Z_BUF_ERROR)  
 (stoponerr==1)) {

Inconsistent spacing around  operator.

Parentheses around each condition are unnecessary (both == and !=
bind tighter than ), but I suppose that's basically personal
preference (and the code being replaced did it that way.)

 + printf (Error: inflate() returned %d\n, r);
 + inflateEnd(s);

Space after function name?

 + return (-1);

These parentheses are unnecessary.  (Another question of taste:
return is a keyword, not a function.)

 + }
 + s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned 
 char*)dst);
 + s.avail_out = dstlen;
 + } while (r == Z_BUF_ERROR);
   *lenp = s.next_out - (unsigned char *) dst;
   inflateEnd(s);

Space after function name?

As I said, all totally trivial, but especially thosecaught my eye.  :)

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


Re: [U-Boot] [PATCH] pm9g45_v1.3: make ethernet works

2011-02-03 Thread RONETIX - Asen Dimov
Hello,

Asen Dimov with Message-Id: 
1296141314-9580-1-git-send-email-di...@ronetix.at wrote:
 Signed-off-by: Asen Dimov di...@ronetix.at
 ---
  board/ronetix/pm9g45/pm9g45.c |   15 +++
  include/configs/pm9g45.h  |5 +
  2 files changed, 20 insertions(+), 0 deletions(-)

 diff --git a/board/ronetix/pm9g45/pm9g45.c b/board/ronetix/pm9g45/pm9g45.c
 index 79b7c9d..0e1d6b2 100644
 --- a/board/ronetix/pm9g45/pm9g45.c
 +++ b/board/ronetix/pm9g45/pm9g45.c
 @@ -96,6 +96,8 @@ static void pm9g45_nand_hw_init(void)
  static void pm9g45_macb_hw_init(void)
  {
   at91_pmc_t  *pmc= (at91_pmc_t *) AT91_PMC_BASE;
 + at91_rstc_t *rstc   = (at91_rstc_t *) AT91_RSTC_BASE;
 + unsigned long   erstl;
  
   /*
* PD2 enables the 50MHz oscillator for Ethernet PHY
 @@ -120,6 +122,19 @@ static void pm9g45_macb_hw_init(void)
   at91_set_pio_pullup(AT91_PIO_PORTA, 12, 0);
   at91_set_pio_pullup(AT91_PIO_PORTA, 13, 0);
  
 + erstl = readl(rstc-mr)  AT91_RSTC_MR_ERSTL_MASK;
 +
 + /* Need to reset PHY - 500ms reset */
 + writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(0x0D) |
 + AT91_RSTC_MR_URSTEN, rstc-mr);
 + writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST, rstc-cr);
 +
 + /* Wait for end hardware reset */
 + while (!(readl(rstc-sr)  AT91_RSTC_SR_NRSTL));
 +
 + /* Restore NRST value */
 + writel(AT91_RSTC_KEY | erstl | AT91_RSTC_MR_URSTEN, rstc-mr);
 +
   /* Re-enable pull-up */
   at91_set_pio_pullup(AT91_PIO_PORTA, 15, 1);
   at91_set_pio_pullup(AT91_PIO_PORTA, 12, 1);
 diff --git a/include/configs/pm9g45.h b/include/configs/pm9g45.h
 index ec51ccf..4d8089f 100644
 --- a/include/configs/pm9g45.h
 +++ b/include/configs/pm9g45.h
 @@ -125,6 +125,11 @@
  #define CONFIG_NET_MULTI 1
  #define CONFIG_NET_RETRY_COUNT   20
  #define CONFIG_RESET_PHY_R   1
 +#define CONFIG_MACB_SEARCH_PHY
 +#define CONFIG_CMD_MII
 +#define CONFIG_OVERWRITE_ETHADDR_ONCE
 +/* MAC is Organizationally Unique Identifier + 3 octects user numbers */
 +#define CONFIG_ETHADDR   02:00:00:fe:ed:00
  
  /* USB */
  #define CONFIG_USB_ATMEL
   
is this fix lost or there is something wrong with it?


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