Hi Itlay,

 

good to know that it works, so I will deeper investigate.

 

One question...how do you compiled u-boot? With Soft- or HW-ECC?

 

Thx

Jörg

 

-----Ursprüngliche Nachricht-----
Von: Itay Kirshenbaum [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 3. August 2007 14:28
An: Jörg Reiling; Dirk Behme; Ivan Tonchev
Cc: davinci-linux-open-source@linux.davincidsp.com
Betreff: Re: U-Boot-1.2.0 and NAND_Flash

 

Hi all.

We are now using Dirk's patch with slight modifications (mostly to remove
__udivsi3, __udivdi3 errors) to boot from a large page NAND device (Micron
MT29F8G08DAA) - So we can confirm it does work.

However, it seems the DSP is not configured correctly, as we're getting
errors similar to the ones from the days of the DVEVM 1.10 bug.

In addition, we've verified u-boot 1.1.3 does configure everything correctly
for our board (We do this by booting u-boot 1.1.3, loading a u-boot 1.2.0
image from tftp, and then proceed to boot from NAND - The DSP is fully
usable in that case).

Any idea what's missing from Ivan/Dirk's patch that can cause this? The DSP
fix from the DVEVM 1.10.1 update seems to be there, so we're a little
puzzled.

Thanks,
Itay.

On 8/3/07, Jörg Reiling < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

Hi Dirk & Ivan,

first thx to your effort! 
I found some time to test the patches on a DVEVM-system...sorry to say, but
no success. NAND driver complains about ECC when trying to load the kernel.

What i Did:

- erase complete NAND with dvflasher 

- compiled u-boot1.2.0 (included Dirks/Ivan patches) WITHOUT NAND_ECC_HW and
flashed it with dvflasher

- build kernel (latest download version form TI update side, no stuff from
mvzone) with MTD-support; CONFIG_NAND_FLASH_HW_ECC is defined, debug is 
enabled

- download kernel via tftp and start kernel from u-boot

- NAND flash is detected:
                [EMAIL PROTECTED]:~# cat /proc/mtd
                        dev:    size   erasesize  name
                        mtd0: 00040000 00004000 "bootloader"
                        mtd1: 00020000 00004000 "params"
                        mtd2: 00400000 00004000 "kernel"
                        mtd3: 03ba0000 00004000 "filesystem" 

- formatting device mtd2
                [EMAIL PROTECTED]:~# ftl_format /dev/mtd2
                        Writing erase unit headers...
                        nand_write_ecc: to = 0x00060000, len = 68
                        nand_write_ecc: Attempt to write not page aligned
data
                        write failed: Invalid argument
                        formnand_sync: called
                        format failed. 

- writing kernel to nand:
                [EMAIL PROTECTED]:~# nandwrite -p /dev/mtd2 /opt/uImage

- reboot target and start kernel with u-boot
        davinci>  nboot 0x80200000 0 0x60000

        Loading from NAND 64MiB 1,8V 8-bit, offset 0x60000 
        nand_read_ecc: Failed ECC read, page 0x00000300
        nand_read_ecc: Failed ECC read, page 0x00000300
        ** Read error

- dumping 0x60000 shows
davinci>  nand dump 0x60000
Page 00060000 dump: 
        27 05 19 56 bc 35 f5 b5  46 b1 87 d8 00 14 4f ec  <- kernel's magic
number
        80 00 80 00 80 00 80 00  30 92 40 b6 05 02 02 00
        4c 69 6e 75 78 2d 32 2e  36 2e 31 30 5f 6d 76 6c
        34 30 31 2d 64 61 76 69  6e 63 69 5f 65 76 6d 00 

Any ideas?
Jörg

-----Ursprüngliche Nachricht-----
Von: Dirk Behme [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 30. Juli 2007 18:48
An: Ivan Tonchev 
Cc: Philip Balister; davinci-linux-open-source@linux.davincidsp.com; Jörg
Reiling
Betreff: Re: U-Boot-1.2.0 and NAND_Flash

Ivan Tonchev wrote: 
> Hi Jörg,
>
> I have ported NAND and several other (SD, LCD) support to U-boot 1.2.0.
> I'm attaching a patch that adds:

Many thanks for this!

> A) basic davinci support (ported from u-boot-1.1.3)
> B) NAND support
>
> Three things that you need to pay attention:
> 1) It uses DM644x hardware ECC
> 2) It saves ECC in the format that DM644x RBL expects to read (i.e. 3
> bytes, packed in 4 bytes per 512 bytes of data) + current implementation 
> allows it to work only for small paged devices
> 3) It uses special EMIF timings optimized for PLL1 running @ 594 MHz and
> STM 512R3A NAND flash
>
> Since 2) is incompatible with the kernel NAND driver (which uses 6 bytes 
> of ECC), and it also works only for small paged devices, you may need to
> modify
>
>    nand->eccmode       = NAND_ECC_SOFT;
>
> and comment out
>
> #if 0
>    nand->autooob       = &nand_davinci_rbl_oobinfo_16; 
>
>    nand->calculate_ecc = nand_davinci_calculate_ecc;
>    nand->correct_data  = nand_davinci_correct_data;
>    nand->enable_hwecc  = nand_davinci_enable_hwecc;
> #endif

I put an update of your patch into attachment.

- It does the above stuff (1 & 2) and therefore makes your patch more
generic. Have a look to board/davinci/nand.c part of patch in
attachment. There, it introduces an additional #define 
ENABLE_DAVINCI_NAND_HW_ECC which can be used to switch between
NAND_ECC_SOFT and NAND_ECC_HW3IN4_512 by setting this macro in this file.

- I didn't touch (3), EMIF timing.

- I removed tons of trailing whitespaces. Your formatting isn't the 
best one ;)

- I removed the disabling of lib_arm stuff, see below.

- Patch cleanly applies to recent uboot git.

> +#
========================================================================== 
> +#   MultiMedia Solutions Ltd.
> +#   (c) Copyright 2007, MultiMedia Solutions Ltd. All Rights Reserved.
> +#
> +#   Use of this software is controlled by the terms and conditions found
> +#   in the license agreement under which this software has been supplied.

> +#
==========================================================================

Mmmh? This is no GPL?

> diff -urNp u-boot-1.2.0-vanilla/lib_arm/Makefile
u-boot-1.2.0-davinci/lib_arm/Makefile
> --- u-boot-1.2.0-vanilla/lib_arm/Makefile     2007-01-07
01:13:11.000000000 +0200
> +++ u-boot-1.2.0-davinci/lib_arm/Makefile     2007-06-13
21:08:56.000000000 +0300
> @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk 
>
>  LIB  = $(obj)lib$(ARCH).a
>
> -SOBJS        = _ashldi3.o _ashrdi3.o _divsi3.o _modsi3.o _udivsi3.o
_umodsi3.o
> +#SOBJS       = _ashldi3.o _ashrdi3.o _divsi3.o _modsi3.o _udivsi3.o
_umodsi3.o

As explained in

http://linux.omap.com/pipermail/davinci-linux-open-source/2007-July/003651.h
tml

I don't think disabling this stuff is a good idea. I removed this from
the update patch in the attachment.

With additional patch arm_floating_point_patch.txt (see attachment as
well) which is an recent version of 

http://sourceforge.net/mailarchive/forum.php?thread_name=468D2650.10603%40rf
o.atmel.com&forum_name=u-boot-users

recent git davinci uboot compiles and links fine for me.
Unfortunately, not target tested.

Best regards

Dirk

_______________________________________________
Davinci-linux-open-source mailing list 
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source 

 

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to