Re: [U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-28 Thread Scott Wood
Wolfgang Denk wrote:
 Dear Alan Carvalho de Assis,
 
 In message [EMAIL PROTECTED] you wrote:
 This code is executed from internal 2KB NAND Flash Controller RAM buffer
 and will copy the remaining U-Boot code from NAND Flash verifying its
 bad blocks (case it exists).

 Signed-off-by: Alan Carvalho de Assis [EMAIL PROTECTED]
 ---
  cpu/arm1136/mx31/Makefile |2 +
  cpu/arm1136/mx31/nand_copy.S  |  263 
 +
  include/asm-arm/arch-mx31/mx31-regs.h |   69 +
  3 files changed, 334 insertions(+), 0 deletions(-)
  create mode 100644 cpu/arm1136/mx31/nand_copy.S
 
 NAK.
 
 All this should be in nand_spl/, I think.
 
 Scott, am I right?

Yes.

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


Re: [U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-27 Thread Wolfgang Denk
Dear Alan Carvalho de Assis,

In message [EMAIL PROTECTED] you wrote:
 This code is executed from internal 2KB NAND Flash Controller RAM buffer
 and will copy the remaining U-Boot code from NAND Flash verifying its
 bad blocks (case it exists).
 
 Signed-off-by: Alan Carvalho de Assis [EMAIL PROTECTED]
 ---
  cpu/arm1136/mx31/Makefile |2 +
  cpu/arm1136/mx31/nand_copy.S  |  263 
 +
  include/asm-arm/arch-mx31/mx31-regs.h |   69 +
  3 files changed, 334 insertions(+), 0 deletions(-)
  create mode 100644 cpu/arm1136/mx31/nand_copy.S

NAK.

All this should be in nand_spl/, I think.

Scott, am I right?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Language shapes the way we think, and determines what we  can  think
about. - B. L. Whorf
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-24 Thread Guennadi Liakhovetski
On Thu, 23 Oct 2008, Alan Carvalho de Assis wrote:

 Hi Guennadi,
 
 On Thu, Oct 23, 2008 at 4:10 PM, Guennadi Liakhovetski [EMAIL PROTECTED] 
 wrote:
 
  Last time Scott Wood suggested to use nand_spl you replied I think using
  nand_spl is the best approach, but it will needs more effort to complete.
  and Anyway, right now we can have iMX31PDK booting with this code as an
  option for users willing to use U-Boot in this board. So, what's the
  status of this effort? If this your new submission, which still doesn't
  use nand_spl is not really targeted for upstream merge, I think, it would
  be better not to mark these mails PATCH. Or have I missed anything?
 
 
 This patch is just a rebase of previous patch, to be merged on
 u-boot-arm/master repository.
 I don't have nand_spl working until now.
 
 I am new sending patches to u-boot mailing list. So what is the
 problem when calling it of PATCH? Please, let me know about my
 mistake, can you explain about it?

My understanding was, that the patch in this form, i.e., not using 
nand_spl should _not_ be accepted in the mainline and you sent it to the 
list just as a FYI for users willing to use your solution. That's why I 
suggested not to mark it as a PATCH. I haven't followed discussions of 
your previous submissions of this patch very closely, so I might have 
missed something, but I would agree with Scott and wait until a nand_spl 
version of this patch appears, and _not_ apply this patch in its present 
form.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

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


Re: [U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-24 Thread Wolfgang Denk
Dear Alan,

In message [EMAIL PROTECTED] you wrote:
 
  Last time Scott Wood suggested to use nand_spl you replied I think using
  nand_spl is the best approach, but it will needs more effort to complete.
  and Anyway, right now we can have iMX31PDK booting with this code as an
  option for users willing to use U-Boot in this board. So, what's the
  status of this effort? If this your new submission, which still doesn't
  use nand_spl is not really targeted for upstream merge, I think, it would
  be better not to mark these mails PATCH. Or have I missed anything?
 
 
 This patch is just a rebase of previous patch, to be merged on
 u-boot-arm/master repository.

It will not be merged to arm/master ...

 I don't have nand_spl working until now.

...because we are waiting for nand_spl code.

 I am new sending patches to u-boot mailing list. So what is the
 problem when calling it of PATCH? Please, let me know about my
 mistake, can you explain about it?

The problem is that we told you we will only add code that fits intop
the existing framework, i. e. nand_spl

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
As long as we're going to reinvent the wheel again, we might as  well
try making it round this time.- Mike Dennison
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-24 Thread Magnus Lilja
2008/10/24 Wolfgang Denk [EMAIL PROTECTED]:
 Dear Alan,

 In message [EMAIL PROTECTED] you wrote:

  Last time Scott Wood suggested to use nand_spl you replied I think using
  nand_spl is the best approach, but it will needs more effort to complete.
  and Anyway, right now we can have iMX31PDK booting with this code as an
  option for users willing to use U-Boot in this board. So, what's the
  status of this effort? If this your new submission, which still doesn't
  use nand_spl is not really targeted for upstream merge, I think, it would
  be better not to mark these mails PATCH. Or have I missed anything?
 

 This patch is just a rebase of previous patch, to be merged on
 u-boot-arm/master repository.

 It will not be merged to arm/master ...

 I don't have nand_spl working until now.

 ...because we are waiting for nand_spl code.

 I am new sending patches to u-boot mailing list. So what is the
 problem when calling it of PATCH? Please, let me know about my
 mistake, can you explain about it?

 The problem is that we told you we will only add code that fits intop
 the existing framework, i. e. nand_spl

Where can one find developer documentation for nand_spl? Also, is
there any ARM board supporting this already?

The nand_spl for the i.MX31 has to fit within 2048 bytes, along with
some of the usual low_levelinit.S stuff.

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


Re: [U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-24 Thread Guennadi Liakhovetski
On Fri, 24 Oct 2008, Magnus Lilja wrote:

 Where can one find developer documentation for nand_spl?

doc/README.nand-boot-ppc440

 Also, is there any ARM board supporting this already?

nand_spl/board/samsung/smdk6400/

 The nand_spl for the i.MX31 has to fit within 2048 bytes, along with
 some of the usual low_levelinit.S stuff.

src/u-boot$ ls -l nand_spl/u-boot-spl.bin
-rwxrwxr-x 1 * * 2840 2008-10-23 09:22 nand_spl/u-boot-spl.bin

So, you just need to reduce it by about 30%:-)

Also, for anyone implementing a new nand_spl board, please, change the 
SPL-image name from nand_spl/u-boot-spl-16k.bin to something more 
flexible:-)

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

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


Re: [U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-24 Thread Alan Carvalho de Assis
Hi Guennadi,

On Fri, Oct 24, 2008 at 4:57 AM, Guennadi Liakhovetski [EMAIL PROTECTED] 
wrote:
 On Fri, 24 Oct 2008, Magnus Lilja wrote:

 Where can one find developer documentation for nand_spl?

 doc/README.nand-boot-ppc440

 Also, is there any ARM board supporting this already?

 nand_spl/board/samsung/smdk6400/

 The nand_spl for the i.MX31 has to fit within 2048 bytes, along with
 some of the usual low_levelinit.S stuff.

 src/u-boot$ ls -l nand_spl/u-boot-spl.bin
 -rwxrwxr-x 1 * * 2840 2008-10-23 09:22 nand_spl/u-boot-spl.bin

 So, you just need to reduce it by about 30%:-)

 Also, for anyone implementing a new nand_spl board, please, change the
 SPL-image name from nand_spl/u-boot-spl-16k.bin to something more
 flexible:-)


Thank you very much! I found your explanation very useful.
Sorry about my mistake. Really is better get the right implementation
integrated at first than apply other patch to remove the wrong
implementation and add the new one.

I am going to implement it on nand_spl.

 Thanks

Thank you very much,

 Guennadi
 ---
 Guennadi Liakhovetski, Ph.D.

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


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


[U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-23 Thread Alan Carvalho de Assis
This code is executed from internal 2KB NAND Flash Controller RAM buffer
and will copy the remaining U-Boot code from NAND Flash verifying its
bad blocks (case it exists).

Signed-off-by: Alan Carvalho de Assis [EMAIL PROTECTED]
---
 cpu/arm1136/mx31/Makefile |2 +
 cpu/arm1136/mx31/nand_copy.S  |  263 +
 include/asm-arm/arch-mx31/mx31-regs.h |   69 +
 3 files changed, 334 insertions(+), 0 deletions(-)
 create mode 100644 cpu/arm1136/mx31/nand_copy.S

diff --git a/cpu/arm1136/mx31/Makefile b/cpu/arm1136/mx31/Makefile
index b648ffd..0490706 100644
--- a/cpu/arm1136/mx31/Makefile
+++ b/cpu/arm1136/mx31/Makefile
@@ -26,7 +26,9 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(SOC).a

 COBJS  = interrupts.o serial.o generic.o
+SOBJS-$(CONFIG_BOOT_FROM_NAND) = nand_copy.o

+SOBJS  := $(SOBJS-y)
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))

diff --git a/cpu/arm1136/mx31/nand_copy.S b/cpu/arm1136/mx31/nand_copy.S
new file mode 100644
index 000..7a2460c
--- /dev/null
+++ b/cpu/arm1136/mx31/nand_copy.S
@@ -0,0 +1,263 @@
+/*
+ * Copyright (C) 2008 Freescale Semiconductor, Inc.
+ *
+ * Alan Carvalho de Assis [EMAIL PROTECTED]
+ * based on iMX31PDK RedBoot_200814 code.
+ *
+ * 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 config.h
+#include asm/arch/mx31-regs.h
+
+.macro do_addr_input
+   and r3, r3, #0xFF
+   strhr3, [r12, #NFC_FLASH_ADDR_OFF]
+   mov r3, #NAND_FLASH_CONFIG2_FADD_EN
+   strhr3, [r12, #NFC_CONFIG2_OFF]
+   bl  do_wait_op_done
+.endm   /* do_addr_input */
+
+do_wait_op_done:
+1: ldrhr3, [r12, #NFC_CONFIG2_OFF]
+   andsr3, r3, #NAND_FLASH_CONFIG2_INT_DONE
+   beq 1b
+   bx  lr
+
+nfc_data_output:
+   mov r3, #(NAND_FLASH_CONFIG1_INT_MSK | NAND_FLASH_CONFIG1_ECC_EN)
+   strhr3, [r12, #NFC_CONFIG1_OFF]
+   strhr8, [r12, #NFC_BUF_ADDR_OFF]
+   mov r3, #FDO_PAGE_SPARE_VAL
+   strhr3, [r12, #NFC_CONFIG2_OFF]
+   bx  lr
+
+.globl nand_copy
+nand_copy:
+   /* Copy image from flash to SDRAM first */
+   mov r0, #NFC_BASE_ADDR
+   add r2, r0, #0x800  /* 2K window */
+   ldr r1, MXC_UBOOT_ROM_START
+
+1: ldmia   r0!, {r3-r10}
+   stmia   r1!, {r3-r10}
+   cmp r0, r2
+   blo 1b
+   /* Jump to SDRAM */
+   ldr r1, =0x0FFF
+   and r0, pc, r1 /* offset of pc */
+   ldr r1, MXC_UBOOT_ROM_START
+   add r1, r1, #0x10
+   add pc, r0, r1
+   nop
+   nop
+   nop
+   nop
+
+nand_copy_main:
+   /* Check if x16/2kb page */
+   ldr r7, =CCM_BASE
+   ldr r7, [r7, #0xC]
+   andsr7, r7, #(1  30)
+
+   mov r0, #NAND_FLASH_BOOT
+   ldr r1, =AVIC_VECTOR0
+   str r0, [r1]
+   mov r0, #MXCFIS_NAND
+   ldr r1, =AVIC_VECTOR1
+   str r0, [r1]
+
+   mov r0, #NFC_BASE_ADDR /* r0: nfc base. Reloaded after each page 
copying */
+   mov r1, #0x800   /* r1: starting flash addr to be copied.
Updated constantly */
+   add r2, r0, #0x800   /* r2: end of 3rd RAM buf. Doesn't change */
+   addeq   r2, r0, #0x200   /* r2: end of 1st RAM buf. Doesn't change
(only set for small page NAND) */
+   add r12, r0, #0xE00  /* r12: NFC register base. Doesn't change */
+   ldr r11, MXC_UBOOT_ROM_START
+   add r13, r11, #0x4 /* r13: end of SDRAM address for copying.
Doesn't change */
+   add r11, r11, r1 /* r11: starting SDRAM address for copying.
Updated constantly */
+
+   /* unlock internal buffer */
+   mov r3, #0x2
+   strhr3, [r12, #0xA]
+
+nfc_read_page:
+   mov r3, #0x0
+   strhr3, [r12, #NFC_FLASH_CMD_OFF]
+   mov r3, #NAND_FLASH_CONFIG2_FCMD_EN
+   strhr3, [r12, #NFC_CONFIG2_OFF]
+   bl  do_wait_op_done
+
+   /* Check if x16/2kb page */
+   ldr r7, =CCM_BASE
+   ldr r7, [r7, #0xC]
+   andsr7, r7, #(1  30)
+   bne nfc_addr_ops_2kb
+
+   /* 1st addr cycle */
+   mov r3, r1
+   do_addr_input
+   /* 1st addr cycle */
+   mov r3, r1, lsr #9
+   

Re: [U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-23 Thread Guennadi Liakhovetski
On Thu, 23 Oct 2008, Alan Carvalho de Assis wrote:

 This code is executed from internal 2KB NAND Flash Controller RAM buffer
 and will copy the remaining U-Boot code from NAND Flash verifying its
 bad blocks (case it exists).
 
 Signed-off-by: Alan Carvalho de Assis [EMAIL PROTECTED]

Last time Scott Wood suggested to use nand_spl you replied I think using 
nand_spl is the best approach, but it will needs more effort to complete. 
and Anyway, right now we can have iMX31PDK booting with this code as an
option for users willing to use U-Boot in this board. So, what's the 
status of this effort? If this your new submission, which still doesn't 
use nand_spl is not really targeted for upstream merge, I think, it would 
be better not to mark these mails PATCH. Or have I missed anything?

Thanks
Guennadi

 ---
  cpu/arm1136/mx31/Makefile |2 +
  cpu/arm1136/mx31/nand_copy.S  |  263 
 +
  include/asm-arm/arch-mx31/mx31-regs.h |   69 +
  3 files changed, 334 insertions(+), 0 deletions(-)
  create mode 100644 cpu/arm1136/mx31/nand_copy.S
 
 diff --git a/cpu/arm1136/mx31/Makefile b/cpu/arm1136/mx31/Makefile
 index b648ffd..0490706 100644
 --- a/cpu/arm1136/mx31/Makefile
 +++ b/cpu/arm1136/mx31/Makefile
 @@ -26,7 +26,9 @@ include $(TOPDIR)/config.mk
  LIB  = $(obj)lib$(SOC).a
 
  COBJS= interrupts.o serial.o generic.o
 +SOBJS-$(CONFIG_BOOT_FROM_NAND) = nand_copy.o
 
 +SOBJS:= $(SOBJS-y)
  SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
  OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
 
 diff --git a/cpu/arm1136/mx31/nand_copy.S b/cpu/arm1136/mx31/nand_copy.S
 new file mode 100644
 index 000..7a2460c
 --- /dev/null
 +++ b/cpu/arm1136/mx31/nand_copy.S
 @@ -0,0 +1,263 @@
 +/*
 + * Copyright (C) 2008 Freescale Semiconductor, Inc.
 + *
 + * Alan Carvalho de Assis [EMAIL PROTECTED]
 + * based on iMX31PDK RedBoot_200814 code.
 + *
 + * 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 config.h
 +#include asm/arch/mx31-regs.h
 +
 +.macro do_addr_input
 + and r3, r3, #0xFF
 + strhr3, [r12, #NFC_FLASH_ADDR_OFF]
 + mov r3, #NAND_FLASH_CONFIG2_FADD_EN
 + strhr3, [r12, #NFC_CONFIG2_OFF]
 + bl  do_wait_op_done
 +.endm   /* do_addr_input */
 +
 +do_wait_op_done:
 +1:   ldrhr3, [r12, #NFC_CONFIG2_OFF]
 + andsr3, r3, #NAND_FLASH_CONFIG2_INT_DONE
 + beq 1b
 + bx  lr
 +
 +nfc_data_output:
 + mov r3, #(NAND_FLASH_CONFIG1_INT_MSK | NAND_FLASH_CONFIG1_ECC_EN)
 + strhr3, [r12, #NFC_CONFIG1_OFF]
 + strhr8, [r12, #NFC_BUF_ADDR_OFF]
 + mov r3, #FDO_PAGE_SPARE_VAL
 + strhr3, [r12, #NFC_CONFIG2_OFF]
 + bx  lr
 +
 +.globl nand_copy
 +nand_copy:
 + /* Copy image from flash to SDRAM first */
 + mov r0, #NFC_BASE_ADDR
 + add r2, r0, #0x800  /* 2K window */
 + ldr r1, MXC_UBOOT_ROM_START
 +
 +1:   ldmia   r0!, {r3-r10}
 + stmia   r1!, {r3-r10}
 + cmp r0, r2
 + blo 1b
 + /* Jump to SDRAM */
 + ldr r1, =0x0FFF
 + and r0, pc, r1 /* offset of pc */
 + ldr r1, MXC_UBOOT_ROM_START
 + add r1, r1, #0x10
 + add pc, r0, r1
 + nop
 + nop
 + nop
 + nop
 +
 +nand_copy_main:
 + /* Check if x16/2kb page */
 + ldr r7, =CCM_BASE
 + ldr r7, [r7, #0xC]
 + andsr7, r7, #(1  30)
 +
 + mov r0, #NAND_FLASH_BOOT
 + ldr r1, =AVIC_VECTOR0
 + str r0, [r1]
 + mov r0, #MXCFIS_NAND
 + ldr r1, =AVIC_VECTOR1
 + str r0, [r1]
 +
 + mov r0, #NFC_BASE_ADDR /* r0: nfc base. Reloaded after each page 
 copying */
 + mov r1, #0x800   /* r1: starting flash addr to be copied.
 Updated constantly */
 + add r2, r0, #0x800   /* r2: end of 3rd RAM buf. Doesn't change */
 + addeq   r2, r0, #0x200   /* r2: end of 1st RAM buf. Doesn't change
 (only set for small page NAND) */
 + add r12, r0, #0xE00  /* r12: NFC register base. Doesn't change */
 + ldr r11, MXC_UBOOT_ROM_START
 + add r13, r11, #0x4 /* r13: end of SDRAM address for copying.
 Doesn't change */
 + add r11, r11, r1 /* r11: starting SDRAM address for copying.
 Updated constantly */
 +
 + /* 

Re: [U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-23 Thread Alan Carvalho de Assis
Hi Guennadi,

On Thu, Oct 23, 2008 at 4:10 PM, Guennadi Liakhovetski [EMAIL PROTECTED] 
wrote:

 Last time Scott Wood suggested to use nand_spl you replied I think using
 nand_spl is the best approach, but it will needs more effort to complete.
 and Anyway, right now we can have iMX31PDK booting with this code as an
 option for users willing to use U-Boot in this board. So, what's the
 status of this effort? If this your new submission, which still doesn't
 use nand_spl is not really targeted for upstream merge, I think, it would
 be better not to mark these mails PATCH. Or have I missed anything?


This patch is just a rebase of previous patch, to be merged on
u-boot-arm/master repository.
I don't have nand_spl working until now.

I am new sending patches to u-boot mailing list. So what is the
problem when calling it of PATCH? Please, let me know about my
mistake, can you explain about it?

 Thanks
 Guennadi


Best Regards,

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


Re: [U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-08 Thread Alan Carvalho de Assis
Hi Scott,

On Tue, Oct 7, 2008 at 3:03 PM, Scott Wood [EMAIL PROTECTED] wrote:
 Alan Carvalho de Assis wrote:

 From 473120de8390abd78014cac9fe0925cb49f57fbe Mon Sep 17 00:00:00 2001
 From: Alan Carvalho de Assis [EMAIL PROTECTED]
 Date: Sun, 5 Oct 2008 19:59:47 -0300
 Subject: [PATCH] iMX31: Add support to copy NAND Flash code to RAM

 This code is executed from internal 2KB NAND Flash Controller RAM buffer
 and will copy the remaining U-Boot code from NAND Flash verifying its
 bad blocks (case it exists).

 Signed-off-by: Alan Carvalho de Assis [EMAIL PROTECTED]
 ---
  cpu/arm1136/mx31/Makefile |2 +
  cpu/arm1136/mx31/nand_copy.S  |  263
 +
  include/asm-arm/arch-mx31/mx31-regs.h |   69 +

 Please use the nand_spl infrastructure to whatever extent is practical.

 Does this code really need to be in assembly to fit?

I reused the source code from RedBoot. I think using nand_spl is the
best approach, but it will needs more effort to complete.

I am afraid about the 2KB NAND loader limitation, this is too tight to
fill using C code. I will investigate to verify if it is feasible.

Anyway, right now we can have iMX31PDK booting with this code as an
option for users willing to use U-Boot in this board.

 -Scott


Best Regards,

Alan

P.S.: I am sending this email again because I sent it erroneously only to Scott
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] iMX31: Add support to copy NAND Flash code to RAM

2008-10-07 Thread Scott Wood
Alan Carvalho de Assis wrote:
 From 473120de8390abd78014cac9fe0925cb49f57fbe Mon Sep 17 00:00:00 2001
 From: Alan Carvalho de Assis [EMAIL PROTECTED]
 Date: Sun, 5 Oct 2008 19:59:47 -0300
 Subject: [PATCH] iMX31: Add support to copy NAND Flash code to RAM
 
 This code is executed from internal 2KB NAND Flash Controller RAM buffer
 and will copy the remaining U-Boot code from NAND Flash verifying its
 bad blocks (case it exists).
 
 Signed-off-by: Alan Carvalho de Assis [EMAIL PROTECTED]
 ---
  cpu/arm1136/mx31/Makefile |2 +
  cpu/arm1136/mx31/nand_copy.S  |  263 
 +
  include/asm-arm/arch-mx31/mx31-regs.h |   69 +

Please use the nand_spl infrastructure to whatever extent is practical.

Does this code really need to be in assembly to fit?

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