[U-Boot] "raise" not defined, when compiler uses its own div0

2009-08-11 Thread Ulf Samuelsson
When trying to build U-Boot under Buildroot and OpenEmbedded,
I run into a problem:

When linking u-boot the linker seems to use the div0 from
the C compiler libgcc instead of the u-boot div0.

gcc div0 for ARM contains a call to "raise" which is not defined
in libgcc.a (someone said it was part of glibc),
so the linking process fails due to no "raise" symbol

gcc/config/arm/lib1funcs.asm contains:


FUNC_START div0

tmfd sp!, {r1, lr}
mov r0, #SIGFPE
bl SYM(raise) __PLT__
...

The problem can be fixed by patching the C compiler:

+   bl SYM(raise) __PLT__
+   bl SYM(_div0) __PLT__

--
What I'd like to know: Is there a way to fix this in u-boot?

Tried creating a "raise" function in libarm/board.c
void raise(void)
{
hang();
}

which did not work.

I later saw that raise needs a parameter,
but it complained that raise is not found,
and not that the parameters is wrong.

Is board.c not included in the link?

Anyone else got this problem?

BR
Ulf Samuelsson

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


Re: [U-Boot] "raise" not defined, when compiler uses its own div0

2009-08-11 Thread Gaye Abdoulaye Walsimou
Ulf Samuelsson wrote:
> When trying to build U-Boot under Buildroot and OpenEmbedded,
> I run into a problem:
>
> When linking u-boot the linker seems to use the div0 from
> the C compiler libgcc instead of the u-boot div0.
>   

Yes i had the same problem with a home made toolchain (eglibc-2.10,
gcc-4.4.1| gcc-4.3.4 | gcc-4.3.3 | gcc-4.3.2) with smdk2410 board.
It seems to be same with this thread
http://lists.denx.de/pipermail/u-boot/2009-August/058349.html with
codesourcery's toolchain.
However, I have tested u-boot-arm repository which includes a
controversial :-) "ARM: Don't include libgcc anymore"
(70163a381f1a5c93fcc181365cdb092566d8c5c5) without compile errors.

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


[U-Boot] dtt, lm81: move unneccessary printf into a debug printf

2009-08-11 Thread Heiko Schocher
Signed-off-by: Heiko Schocher 
---
 drivers/hwmon/lm81.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/lm81.c b/drivers/hwmon/lm81.c
index 668ee9f..afe5b0d 100644
--- a/drivers/hwmon/lm81.c
+++ b/drivers/hwmon/lm81.c
@@ -109,7 +109,7 @@ static int _dtt_init(int sensor)
if (adr < 0)
return 1;

-   printf ("DTT:   Found l...@%x Rev: %d\n", adr, rev);
+   debug ("DTT:   Found l...@%x Rev: %d\n", adr, rev);
return 0;
 } /* _dtt_init() */

-- 
1.6.0.6

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


Re: [U-Boot] "raise" not defined, when compiler uses its own div0

2009-08-11 Thread Wolfgang Denk
Dear Ulf Samuelsson,

In message <4a810dbc.50...@atmel.com> you wrote:
> When trying to build U-Boot under Buildroot and OpenEmbedded,

These probably count to the tool chains with "broken" ARM cross
compilers.

> When linking u-boot the linker seems to use the div0 from
> the C compiler libgcc instead of the u-boot div0.

Try setting USE_PRIVATE_LIBGCC=yes in your envrionment, like

USE_PRIVATE_LIBGCC=yes make ...

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
Quote from the Boss... "I didn't say it was your fault.  I said I was
going to blame it on you."
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] "raise" not defined, when compiler uses its own div0

2009-08-11 Thread Wolfgang Denk
Dear Gaye Abdoulaye Walsimou,

In message <4a81285b.8010...@walsimou.com> you wrote:
>
> However, I have tested u-boot-arm repository which includes a
> controversial :-) "ARM: Don't include libgcc anymore"
> (70163a381f1a5c93fcc181365cdb092566d8c5c5) without compile errors.

It's not controversial. It has been formally NAKed and rejected. It is
not needed as working fixes are already available in mainline.

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
You said you  didn't  want  to  use  CGI.pm,  but  methinks  you  are
needlessly reinventing the wheel, one spoke at a time. Either you are
masochistic,  or  you  just haven't seen enough of what CGI.pm can do
for you. -- Randal L. Schwartz in <8cyb81rg81@gadget.cscaper.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] driving a serial peripheral in u-boot

2009-08-11 Thread Dexdyne Postmaster

Our AVR32 board has a GSM modem attached..

I'd like to send an SMS at power-on, though if we successfully boot Linux
it will do more sophisticated stuff.

If we get the SMS, then nothing further we know the boot failed.

Is there an example anywhere of u-boot talking to a device on a serial
port ( which is not the console ) I can use as an example?


David Collier

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


[U-Boot] u-boot and watchdogs

2009-08-11 Thread Dexdyne Postmaster
Our hardware has a watchdog which has a maximum period of 1 second.

Once I've got Linux up and going I can handle that.

I'd love to have a watchdog so that if Linux doesn't take over, the board
will reset and try again.

Is there any experience/example of u-boot driving a short-period watchdog
throughout the boot process I can try to copy?

David Collier

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


[U-Boot] reset environment

2009-08-11 Thread Dexdyne Postmaster

In development, it's a bit of a pain that installing a new u-boot image
with different settings for bootargs and bootcmd doesn't actually change
anything, because the environment in flash is still valid.

Worse, there doesn't seem to be a command to say "over-write that with
your new defaults"

If that is indeed so, then can I propose such a command should be added?

I'll try to knock out the patch if no-one more skilled wants to leap into
action!
David Collier

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


Re: [U-Boot] u-boot and watchdogs

2009-08-11 Thread rhabarber1848
Dexdyne Postmaster wrote:

> Is there any experience/example of u-boot driving a short-period watchdog
> throughout the boot process I can try to copy?

Hi,

have a look at include/watchdog.h
http://git.denx.de/?p=u-boot.git;a=blob;f=include/watchdog.h;h=9265be9737245d7a1e8468c398aef12d07945bad;hb=HEAD

and, for example, cpu/mpc8xx/cpu.c the function watchdog_reset().

Greetings, rhabarber1848



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


Re: [U-Boot] driving a serial peripheral in u-boot

2009-08-11 Thread Wolfgang Denk
Dear "Dexdyne Postmaster",

In message  you 
wrote:
> 
> Our AVR32 board has a GSM modem attached..
> 
> I'd like to send an SMS at power-on, though if we successfully boot Linux
> it will do more sophisticated stuff.
> 
> If we get the SMS, then nothing further we know the boot failed.
> 
> Is there an example anywhere of u-boot talking to a device on a serial
> port ( which is not the console ) I can use as an example?

See common/modem.c and search the code for mdm_init().

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
Horses just naturally have mohawk haircuts.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] u-boot and watchdogs

2009-08-11 Thread Wolfgang Denk
Dear "Dexdyne Postmaster",

In message  you 
wrote:
> Our hardware has a watchdog which has a maximum period of 1 second.
> 
> Once I've got Linux up and going I can handle that.
> 
> I'd love to have a watchdog so that if Linux doesn't take over, the board
> will reset and try again.
> 
> Is there any experience/example of u-boot driving a short-period watchdog
> throughout the boot process I can try to copy?

Yes, that's a standard feature used by many boards. Worst case is a
80 millisecond timeout with a tolerance of +/- 20 millisec.

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


Re: [U-Boot] reset environment

2009-08-11 Thread Wolfgang Denk
Dear "Dexdyne Postmaster",

In message  you 
wrote:
> 
> In development, it's a bit of a pain that installing a new u-boot image
> with different settings for bootargs and bootcmd doesn't actually change
> anything, because the environment in flash is still valid.

This depends on your configuration. When using an "embedded"
environment, this will get replaced with each install.

> Worse, there doesn't seem to be a command to say "over-write that with
> your new defaults"

You can run a script image that does whatever you want.

> If that is indeed so, then can I propose such a command should be added?

Search the archives. There has been a proposal before, and even an API
has been agreed on, it's just that nobody implemented it yet. Patches
are welcome.


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 universe does not have laws - it has habits, and  habits  can  be
broken.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] MIMC200: reduce LCD pixclock

2009-08-11 Thread Mark Jackson
[Resent to add CC u-b...@lists.denx.de]

The initial pixclock for the MIMC200 board is wrong (and causes
screen corruption due to DMA underruns).

This patch simply reduces the pixel clock to fix the problem.

Signed-off-by: Mark Jackson 
---
 board/mimc/mimc200/mimc200.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/board/mimc/mimc200/mimc200.c b/board/mimc/mimc200/mimc200.c
index b773c1a..0dcacb9 100644
--- a/board/mimc/mimc200/mimc200.c
+++ b/board/mimc/mimc200/mimc200.c
@@ -38,7 +38,7 @@
 vidinfo_t panel_info = {
.vl_col = 480,  /* Number of columns */
.vl_row = 272,  /* Number of rows */
-   .vl_clk = 1000, /* pixel clock in ps */
+   .vl_clk = 500,  /* pixel clock in ps */
.vl_sync= ATMEL_LCDC_INVCLK_INVERTED |
  ATMEL_LCDC_INVLINE_INVERTED |
  ATMEL_LCDC_INVFRAME_INVERTED,

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


[U-Boot] [PATCH] Support for the Calao TNY-A9260/TNY-A9G20 boards

2009-08-11 Thread Albin Tonnerre
The Calao TNY-A9260 and TNY-9G20 are boards manufactured and sold by
Calao Systems . Their components are very
similar to the AT91SAM9260EK board, so their configuration is based on
the configuration of this board. There are however some differences:
different clocks, no LCD, no ethernet. They also can use SPI EEPROM to
store the environment.

Signed-off-by: Albin Tonnerre 
---

Changes since previous patch:
As per Wolfgang's comments, remove the scripting from the Makefile and do that
in the board config instead.

 MAINTAINERS  |4 +
 MAKEALL  |1 +
 Makefile |   10 ++
 board/calao/tny_a9260/Makefile   |   55 ++
 board/calao/tny_a9260/config.mk  |1 +
 board/calao/tny_a9260/spi.c  |   50 +
 board/calao/tny_a9260/tny_a9260.c|  110 +++
 cpu/arm926ejs/at91/at91sam9260_devices.c |2 +-
 include/configs/tny_a9260.h  |  170 ++
 9 files changed, 402 insertions(+), 1 deletions(-)
 create mode 100644 board/calao/tny_a9260/Makefile
 create mode 100644 board/calao/tny_a9260/config.mk
 create mode 100644 board/calao/tny_a9260/spi.c
 create mode 100644 board/calao/tny_a9260/tny_a9260.c
 create mode 100644 include/configs/tny_a9260.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 620604c..79873f3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -681,6 +681,10 @@ Andrea Scian 
 
B2  ARM7TDMI (S3C44B0X)
 
+Albin Tonnerre 
+
+   tny_a9260   ARM926EJS (AT91SAM9260 SoC)
+
 Greg Ungerer 
 
cm4008  ks8695p
diff --git a/MAKEALL b/MAKEALL
index edebaea..5882ceb 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -607,6 +607,7 @@ LIST_at91=" \
m501sk  \
pm9261  \
pm9263  \
+   tny_a9260   \
 "
 
 #
diff --git a/Makefile b/Makefile
index 54c0b67..55e9ccd 100644
--- a/Makefile
+++ b/Makefile
@@ -2838,6 +2838,16 @@ at91sam9g45ekes_config   :   unconfig
 pm9263_config  :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
 
+tny_a9g20_nandflash_config \
+tny_a9g20_eeprom_config \
+tny_a9g20_config \
+tny_a9260_nandflash_config \
+tny_a9260_eeprom_config \
+tny_a9260_config   :   unconfig
+   @mkdir -p $(obj)include
+   @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
+   @$(MKCONFIG) -a tny_a9260 arm arm926ejs tny_a9260 calao at91
+
 
 ## ARM Integrator boards - see doc/README-integrator for more info.
 integratorap_config\
diff --git a/board/calao/tny_a9260/Makefile b/board/calao/tny_a9260/Makefile
new file mode 100644
index 000..21f5ed1
--- /dev/null
+++ b/board/calao/tny_a9260/Makefile
@@ -0,0 +1,55 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# (C) Copyright 2008
+# Stelian Pop 
+# Lead Tech Design 
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS-y+= tny_a9260.o
+COBJS-$(CONFIG_ATMEL_SPI)  += spi.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/calao/tny_a9260/config.mk b/board/calao/tny_a9260/config.mk
new file mode 100644
index 000..ff2cfd1
--- /dev/null
+++ b/board/calao/tny_a9260/config.mk
@@ -0,0 +1 @@
+TEXT_BASE = 0x23f0
diff --git a/board/calao/tny_a9260/spi.c b/board/calao/tny_a9260/spi.c
new file mode 100644
index 000..2db9f84
---

[U-Boot] Query on running example on u-boot for OMAP3

2009-08-11 Thread Pillai, Manikandan
Hi,

I encounter issue with crash when I try to run examples on u-boot.

I started modifying the hello_world application and trying to add more static 
function related to my application.
As far I see the signs, it stops working or has crashes when the level of 
function calls go beyond a certain number.

It looks like a stack crash to me but I cant confirm it. I tried increasing the 
size of the u-boot stack but that does not work.
Any clues on this behaviour  ??


Regards

Mani

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


Re: [U-Boot] Query on running example on u-boot for OMAP3

2009-08-11 Thread Wolfgang Denk
Dear Pillai,

in message <19f8576c6e063c45be387c64729e73940432b7a...@dbde02.ent.ti.com> you 
wrote:
> 
> I encounter issue with crash when I try to run examples on u-boot.
> 
> I started modifying the hello_world application and trying to add more
> static function related to my application.
> As far I see the signs, it stops working or has crashes when the level
> of function calls go beyond a certain number.

Are you sure you use the correct entry point address?

> It looks like a stack crash to me but I cant confirm it. I tried
> increasing the size of the u-boot stack but that does not work.
> Any clues on this behaviour  ??

See the FAQ:
http://www.denx.de/wiki/DULG/MyStandaloneProgramDoesNotWork

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
There is a theory which states that if ever anyone discovers  exactly
what  the  Universe is for and why it is here, it will instantly dis-
appear and be replaced by something even more  bizarre  and  inexpli-
cable.  There  is  another  theory which states that this has already
happened.-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIMC200: reduce LCD pixclock

2009-08-11 Thread Anatolij Gustschin
Mark Jackson wrote:
> [Resent to add CC u-b...@lists.denx.de]
> 
> The initial pixclock for the MIMC200 board is wrong (and causes
> screen corruption due to DMA underruns).
> 
> This patch simply reduces the pixel clock to fix the problem.
> 
> Signed-off-by: Mark Jackson 
> ---
>  board/mimc/mimc200/mimc200.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied to u-boot-video/master

Thanks,
Anatolij

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


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

2009-08-11 Thread Anatolij Gustschin
Dear Wolfgang,

The following fixes since commit eb1a4d0a471505c169bef19a73a60f8641f0b875:
  Wolfgang Denk (1):
Prepare 2009.08-rc2

are available in the git repository at:

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

Mark Jackson (1):
  MIMC200: reduce LCD pixclock

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

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


Re: [U-Boot] [STATUS] v2009.08-rc2 is out

2009-08-11 Thread Shinya Kuribayashi
Hi,

Ben Warren wrote:
>> I found qemu_mips_config is spotted by it:
>> Configuring for qemu-mips board...
>> eth.c:497:2: warning: #warning Ethernet driver is deprecated. Please
>> update to use CONFIG_NET_MULTI
>>
>> But I don't follow the recent changes including that CONFIG_NET_MULTI
>> migration, nor I don't have enough spare time to look into it, so gave
>> up this time, sorry.
>>
>>   
> The DM9000 driver uses the old networking API, and needs to be updated. 
> I have it partly done and will be submitting to the ML soon.  Hopefully
> you'll be able to test my patch :)

Nice!  Once submitted, I'll check it builds on my side.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Support for NANDs greater than/equal to 4 GB

2009-08-11 Thread Paulraj, Sandeep
Scott,

There was a patch some time which added the 64 bit support in the MTD 
subsystem. I am referring to the patch below

http://git.infradead.org/mtd-2.6.git/blobdiff/8a4c2495b142fe612b291a810d9e695f269c26db..69423d99fc182a81f3c5db3eb5c140acc6fc64be:/drivers/mtd/nand/nand_base.c


This feature still is not part of U-Boot. Is it going to be added?

Without this NANDs of size greater than equal to 4 GB fail to get recognized.

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


[U-Boot] FIT image support ARM architecture ?

2009-08-11 Thread Cyrille Francois
Hello,

I'm trying to generate a FIT kernel image.

I'm using u-boot 1.3.4 / dtc 1.2.0.

All seems ok when i generates the FIT image

mkimage -l kernel.itb

Created: Tue Aug 11 14:51:23 2009
 Image 0 (ker...@1)
  Description:  Vanilla Linux kernel
  Type: Kernel Image
  Compression:  gzip compressed
  Data Size:1703896 Bytes = 1663.96 kB = 1.62 MB
  Architecture: ARM
  OS:   Linux
  Load Address: 0x0008
  Entry Point:  0x0008
  Hash node:'h...@1'
  Hash algo:crc32
  Hash value:   1566f6d1
  Hash len: 4
  Hash node:'h...@2'
  Hash algo:sha1
  Hash value:   faa6d60d546a3f7fa85f414c28bcf261d1a9bc51
  Hash len: 20
 Default Configuration: 'con...@1'
 Configuration 0 (con...@1)
  Description:  Boot Linux kernel
  Kernel:   ker...@1

But on u-boot prompt :
=> iminfo

## Checking Image at 0090 ...
Unknown image format!

I don't masterise all.

However, I have one question :
FIT image support ARM architecture ??
All examples i found talk about PowerPC

Regards

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


[U-Boot] PPC460EX with 2 Ethernet Tranceivers

2009-08-11 Thread Judd Gilbert
Hi,
 
I am currently running linux 2.6.28.4 on a PPC460EX with 2 Marvell
Alaska 88E Ethernet transceivers connected to it. I've added the
flags I believe to configure u-boot properly:
 
#define CONFIG_IBM_EMAC4_V4  1
#define CONFIG_HAS_ETH0
#define CONFIG_HAS_ETH1
/* Based on the marvell phy datasheet for obscure details */
#define CONFIG_PHY_ADDR 1  /* PHY address, See schematics
*/
#define CONFIG_PHY1_ADDR2  /* 2nd PHY address. See
schematics */
#define CONFIG_PHY_RESET1  /* reset phy upon startup
*/
#define CONFIG_PHY_GIGE  1  /* Include GbE speed/duplex
detection */
#define CONFIG_PHY_DYNAMIC_ANEG 1
 
If I hold one the 2nd transceiver (address 2) in reset on power up,
(just for a second or so) the linux kernel boots, detects both PHYs, and
eth0 and eth1 both work fine. I'm holding the chip in reset manually
with a switch I added to the board. The linux kernel spits the following
information out on success:
 
eth0: EMAC-0 /plb/opb/ether...@ef600e00, MAC 00:13:a8:00:0d:c6
eth0: found Generic MII PHY (0x00)
/plb/opb/emac-rg...@ef601500: input 1 in RGMII mode
eth1: EMAC-1 /plb/opb/ether...@ef600f00, MAC 00:13:a8:00:0d:c7
eth1: found Generic MII PHY (0x02)
 
If I don't hold the 2nd transceiver in reset I get the following message
when linux boots:
 
eth0: EMAC-0 /plb/opb/ether...@ef600e00, MAC 00:13:a8:00:0d:c6
eth0: found Generic MII PHY (0x00)
/plb/opb/emac-rg...@ef601500: input 1 in RGMII mode
/plb/opb/ether...@ef600f00: can't find PHY!
 
I've played around removing the "CONFIG_PHY_RESET" and also andding the
"CONFIG_PHY_RESET_DELAY" flag (with different uSec values) with no luck.
It seems that unless the 2nd transceiver is held in reset on power up it
won't work.
 
Has anyone seen any issues similar to this?
 
Thanks for your time,
 
Judd Gilbert
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ARM: DaVinci DM355: Updating the DM355 EVM config

2009-08-11 Thread s-paulraj
From: Sandeep Paulraj 

This patch enables NAND support on the DM355 EVM.
Changes in this patch mostly relate to adding the NAND support.
This patch also defines a boot delay.


Signed-off-by: Sandeep Paulraj 
---
 include/configs/davinci_dm355evm.h |   21 +
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/include/configs/davinci_dm355evm.h 
b/include/configs/davinci_dm355evm.h
index c35f5c9..19660a3 100644
--- a/include/configs/davinci_dm355evm.h
+++ b/include/configs/davinci_dm355evm.h
@@ -66,9 +66,11 @@
 #define CONFIG_SYS_I2C_SLAVE   0x10/* SMBus host address */
 
 /* NAND: socketed, two chipselects, normally 2 GBytes */
-/* NYET -- #define CONFIG_NAND_DAVINCI */
+#define CONFIG_NAND_DAVINCI
 #define CONFIG_SYS_NAND_HW_ECC
 #define CONFIG_SYS_NAND_USE_FLASH_BBT
+#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
+#define CONFIG_SYS_NAND_PAGE_2K
 
 #define CONFIG_SYS_NAND_LARGEPAGE
 #define CONFIG_SYS_NAND_BASE_LIST  { 0x0200, }
@@ -92,19 +94,17 @@
 #define CONFIG_CMD_I2C
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SAVES
+#define CONFIG_CMD_SAVEENV
 
 #ifdef CONFIG_NAND_DAVINCI
 #define CONFIG_CMD_MTDPARTS
 #define CONFIG_MTD_PARTITIONS
+#define CONFIG_MTD_DEVICE
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_UBI
 #define CONFIG_RBTREE
 #endif
 
-/* TEMPORARY -- no safe place to save env, yet */
-#define CONFIG_ENV_IS_NOWHERE
-#undef CONFIG_CMD_SAVEENV
-
 #ifdef CONFIG_USB_DAVINCI
 #define CONFIG_MUSB_HCD
 #define CONFIG_CMD_USB
@@ -130,9 +130,14 @@
 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
 #define CONFIG_SYS_LONGHELP
 
-#define CONFIG_ENV_SIZESZ_16K
+#ifdef CONFIG_NAND_DAVINCI
+#define CONFIG_ENV_SIZESZ_256K
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET  0x3C
+#undef CONFIG_ENV_IS_IN_FLASH
+#endif
 
-/* NYET -- #define CONFIG_BOOTDELAY5 */
+#define CONFIG_BOOTDELAY   3
 #define CONFIG_BOOTCOMMAND \
"dhcp;bootm"
 #define CONFIG_BOOTARGS \
@@ -147,7 +152,7 @@
 
 /* U-Boot memory configuration */
 #define CONFIG_STACKSIZE   SZ_256K /* regular stack */
-#define CONFIG_SYS_MALLOC_LEN  SZ_512K /* malloc() arena */
+#define CONFIG_SYS_MALLOC_LEN  SZ_1M   /* malloc() arena */
 #define CONFIG_SYS_GBL_DATA_SIZE   128 /* for initial data */
 #define CONFIG_SYS_MEMTEST_START   0x8700  /* physical address */
 #define CONFIG_SYS_MEMTEST_END 0x8800  /* test 16MB RAM */
-- 
1.6.0.4

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


[U-Boot] [PATCH] NAND: DaVinci: Adding 4 BIT ECC support

2009-08-11 Thread s-paulraj
From: Sandeep Paulraj 

This patch adds 4 BIT ecc support in the DaVinci NAND
driver. Tested on both the DM355 and DM365.


Signed-off-by: Sandeep Paulraj 
---
 drivers/mtd/nand/davinci_nand.c  |  290 +-
 include/asm-arm/arch-davinci/emif_defs.h |   10 +
 2 files changed, 298 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 7837a8e..6a53037 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -47,6 +47,16 @@
 #include 
 #include 
 
+/* Definitions for 4-bit hardware ECC */
+#define NAND_TIMEOUT   10240
+#define NAND_ECC_BUSY  0xC
+#define NAND_4BITECC_MASK  0x03FF03FF
+#define EMIF_NANDFSR_ECC_STATE_MASK0x0F00
+#define ECC_STATE_NO_ERR   0x0
+#define ECC_STATE_TOO_MANY_ERRS0x1
+#define ECC_STATE_ERR_CORR_COMP_P  0x2
+#define ECC_STATE_ERR_CORR_COMP_N  0x3
+
 static emif_registers *const emif_regs = (void *) 
DAVINCI_ASYNC_EMIF_CNTRL_BASE;
 
 static void nand_davinci_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int 
ctrl)
@@ -170,6 +180,274 @@ static int nand_davinci_correct_data(struct mtd_info 
*mtd, u_char *dat, u_char *
 }
 #endif /* CONFIG_SYS_NAND_HW_ECC */
 
+#ifdef CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
+static struct nand_ecclayout nand_davinci_4bit_layout_oobfirst = {
+/*
+ * TI uses a different layout for 4K page deviecs. Since the
+ * eccpos filed can hold only a limited number of entries, adding
+ * support for 4K page will result in compilation warnings
+ * 4K Support will be added later
+ */
+#ifdef CONFIG_SYS_NAND_PAGE_2K
+   .eccbytes = 40,
+   .eccpos = {
+   24, 25, 26, 27, 28,
+   29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+   39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+   49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+   59, 60, 61, 62, 63,
+   },
+   .oobfree = {
+   {.offset = 2, .length = 22, },
+   },
+#endif
+};
+#endif
+
+static void nand_davinci_4bit_enable_hwecc(struct mtd_info *mtd, int mode)
+{
+   u32 val;
+
+   switch (mode) {
+   case NAND_ECC_WRITE:
+   case NAND_ECC_READ:
+   /*
+* Start a new ECC calculation for reading or writing 512 bytes
+* of data.
+*/
+   val = (emif_regs->NANDFCR & ~(3 << 4)) | (1 << 12);
+   emif_regs->NANDFCR = val;
+   break;
+   case NAND_ECC_READSYN:
+   val = emif_regs->NAND4BITECC1;
+   break;
+   default:
+   break;
+   }
+}
+
+static u32 nand_davinci_4bit_readecc(struct mtd_info *mtd, unsigned int ecc[4])
+{
+   ecc[0] = emif_regs->NAND4BITECC1 & NAND_4BITECC_MASK;
+   ecc[1] = emif_regs->NAND4BITECC2 & NAND_4BITECC_MASK;
+   ecc[2] = emif_regs->NAND4BITECC3 & NAND_4BITECC_MASK;
+   ecc[3] = emif_regs->NAND4BITECC4 & NAND_4BITECC_MASK;
+
+   return 0;
+}
+
+static int nand_davinci_4bit_calculate_ecc(struct mtd_info *mtd,
+  const uint8_t *dat,
+  uint8_t *ecc_code)
+{
+   unsigned int hw_4ecc[4] = { 0, 0, 0, 0 };
+   unsigned int const1 = 0, const2 = 0;
+   unsigned char count1 = 0;
+
+   /*
+* Since the NAND_HWECC_SYNDROME option is enabled, this routine is
+* only called just after the data and oob have been written.  The
+* ECC value calculated by the hardware ECC generator is available
+* for us to read.
+*/
+   nand_davinci_4bit_readecc(mtd, hw_4ecc);
+
+   /*Convert 10 bit ecc value to 8 bit */
+   for (count1 = 0; count1 < 2; count1++) {
+   const2 = count1 * 5;
+   const1 = count1 * 2;
+
+   /* Take first 8 bits from val1 (count1=0) or val5 (count1=1) */
+   ecc_code[const2] = hw_4ecc[const1] & 0xFF;
+
+   /*
+* Take 2 bits as LSB bits from val1 (count1=0) or val5
+* (count1=1) and 6 bits from val2 (count1=0) or
+* val5 (count1=1)
+*/
+   ecc_code[const2 + 1] =
+   ((hw_4ecc[const1] >> 8) & 0x3) | ((hw_4ecc[const1] >> 14) &
+ 0xFC);
+
+   /*
+* Take 4 bits from val2 (count1=0) or val5 (count1=1) and
+* 4 bits from val3 (count1=0) or val6 (count1=1)
+*/
+   ecc_code[const2 + 2] =
+   ((hw_4ecc[const1] >> 22) & 0xF) |
+   ((hw_4ecc[const1 + 1] << 4) & 0xF0);
+
+   /*
+* Take 6 bits from val3(count1=0) or val6 (count1=1) and
+* 2 bits from val4 (count1=0) or  val7 (count1=1)
+*/
+   ecc_code[const2 + 3] =
+   ((hw_4

Re: [U-Boot] Support for NANDs greater than/equal to 4 GB

2009-08-11 Thread Scott Wood
On Tue, Aug 11, 2009 at 09:02:44AM -0500, Paulraj, Sandeep wrote:
> There was a patch some time which added the 64 bit support in the MTD 
> subsystem. I am referring to the patch below
> 
> http://git.infradead.org/mtd-2.6.git/blobdiff/8a4c2495b142fe612b291a810d9e695f269c26db..69423d99fc182a81f3c5db3eb5c140acc6fc64be:/drivers/mtd/nand/nand_base.c

Was it submitted to U-Boot?  If it was, I missed it.

> This feature still is not part of U-Boot. Is it going to be added?

If someone submits a patch, yes.  Otherwise it'll get picked up the next
time I sync with Linux.

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