Re: [U-Boot] [PATCH 3/5] [PATCH 3/5] Add nand_spl support for the apf27

2012-07-07 Thread Stefano Babic
On 28/06/2012 22:36, Philippe Reynes wrote:
> Signed-off-by: Philippe Reynes 
> Signed-off-by: Eric Jarrige 
> ---

Hi Philippe,

>  nand_spl/board/armadeus/apf27/Makefile   |   79 +
>  nand_spl/board/armadeus/apf27/config.mk  |   45 +++
>  nand_spl/board/armadeus/apf27/start.S|  548 
> ++
>  nand_spl/board/armadeus/apf27/u-boot.lds |   39 +++
>  4 files changed, 711 insertions(+), 0 deletions(-)
>  create mode 100644 nand_spl/board/armadeus/apf27/Makefile
>  create mode 100644 nand_spl/board/armadeus/apf27/config.mk
>  create mode 100644 nand_spl/board/armadeus/apf27/start.S
>  create mode 100644 nand_spl/board/armadeus/apf27/u-boot.lds
> 

nand_spl is obsolete - new boards should add spl support with the newer
SPL framework (using spl/ instead of nand_spl/)

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

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


Re: [U-Boot] [PATCH 3/5] [PATCH 3/5] Add nand_spl support for the apf27

2012-06-28 Thread Scott Wood
On 06/28/2012 03:36 PM, Philippe Reynes wrote:
> Signed-off-by: Philippe Reynes 
> Signed-off-by: Eric Jarrige 
> ---
>  nand_spl/board/armadeus/apf27/Makefile   |   79 +
>  nand_spl/board/armadeus/apf27/config.mk  |   45 +++
>  nand_spl/board/armadeus/apf27/start.S|  548 
> ++
>  nand_spl/board/armadeus/apf27/u-boot.lds |   39 +++
>  4 files changed, 711 insertions(+), 0 deletions(-)
>  create mode 100644 nand_spl/board/armadeus/apf27/Makefile
>  create mode 100644 nand_spl/board/armadeus/apf27/config.mk
>  create mode 100644 nand_spl/board/armadeus/apf27/start.S
>  create mode 100644 nand_spl/board/armadeus/apf27/u-boot.lds

nand_spl is deprecated -- please use the new spl/ infrastructure.

-Scott

> +/*
> + * Standard NAND flash commands
> + */
> +#define NAND_CMD_READ0   0
> +#define NAND_CMD_READ1   1
> +#define NAND_CMD_PAGEPROG0x10
> +#define NAND_CMD_READOOB 0x50
> +#define NAND_CMD_ERASE1  0x60
> +#define NAND_CMD_STATUS  0x70
> +#define NAND_CMD_STATUS_MULTI0x71
> +#define NAND_CMD_SEQIN   0x80
> +#define NAND_CMD_READID  0x90
> +#define NAND_CMD_ERASE2  0xd0
> +#define NAND_CMD_RESET   0xff
> +
> +/* Extended commands for large page devices */
> +#define NAND_CMD_READSTART   0x30
> +#define NAND_CMD_CACHEDPROG  0x15
> +
> +/* Status bits */
> +#define NAND_STATUS_FAIL 0x01
> +#define NAND_STATUS_FAIL_N1  0x02
> +#define NAND_STATUS_TRUE_READY   0x20
> +#define NAND_STATUS_READY0x40
> +#define NAND_STATUS_WP   0x80

Why do you need to redefine this stuff?

-Scott

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


[U-Boot] [PATCH 3/5] [PATCH 3/5] Add nand_spl support for the apf27

2012-06-28 Thread Philippe Reynes
Signed-off-by: Philippe Reynes 
Signed-off-by: Eric Jarrige 
---
 nand_spl/board/armadeus/apf27/Makefile   |   79 +
 nand_spl/board/armadeus/apf27/config.mk  |   45 +++
 nand_spl/board/armadeus/apf27/start.S|  548 ++
 nand_spl/board/armadeus/apf27/u-boot.lds |   39 +++
 4 files changed, 711 insertions(+), 0 deletions(-)
 create mode 100644 nand_spl/board/armadeus/apf27/Makefile
 create mode 100644 nand_spl/board/armadeus/apf27/config.mk
 create mode 100644 nand_spl/board/armadeus/apf27/start.S
 create mode 100644 nand_spl/board/armadeus/apf27/u-boot.lds

diff --git a/nand_spl/board/armadeus/apf27/Makefile 
b/nand_spl/board/armadeus/apf27/Makefile
new file mode 100644
index 000..600ef6b
--- /dev/null
+++ b/nand_spl/board/armadeus/apf27/Makefile
@@ -0,0 +1,79 @@
+#
+# (C) Copyright 2007
+# Stefan Roese, DENX Software Engineering, s...@denx.de.
+# (C) Copyright 2012
+# Eric Jarrige 
+#
+# 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
+include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk
+
+LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
+LDFLAGS= -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE) 
$(PLATFORM_LDFLAGS)
+AFLAGS += -DCONFIG_NAND_SPL
+CFLAGS += -DCONFIG_NAND_SPL
+
+SOBJS  = start.o
+COBJS  =
+
+SRCS   := $(addprefix $(src),$(SOBJS:.o=.S) $(COBJS:.o=.c))
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+__OBJS := $(SOBJS) $(COBJS)
+LNDIR  := $(OBJTREE)/nand_spl/board/$(BOARDDIR)
+
+nandobj:= $(OBJTREE)/nand_spl/
+
+ALL= $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin 
$(nandobj)u-boot-spl-16k.bin \
+   $(nandobj)System.map
+
+all:   $(obj).depend $(ALL)
+
+$(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
+   $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
+
+$(nandobj)u-boot-spl.bin:  $(nandobj)u-boot-spl
+   $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
+
+$(nandobj)u-boot-spl:  $(OBJS)
+   cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
+   -Map $(nandobj)u-boot-spl.map \
+   -o $(nandobj)u-boot-spl
+
+$(nandobj)System.map:  $(nandobj)u-boot-spl
+   @$(NM) $< | \
+   grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] 
\)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
+   sort > $(nandobj)System.map
+
+
+#
+
+$(obj)%.o: %.S
+   $(CC) $(AFLAGS) -c -o $@ $<
+
+$(obj)%.o: %.c
+   $(CC) $(CFLAGS) -c -o $@ $<
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/nand_spl/board/armadeus/apf27/config.mk 
b/nand_spl/board/armadeus/apf27/config.mk
new file mode 100644
index 000..3063c89
--- /dev/null
+++ b/nand_spl/board/armadeus/apf27/config.mk
@@ -0,0 +1,45 @@
+#
+# (C) Copyright 2007
+# Stefan Roese, DENX Software Engineering, s...@denx.de.
+# (C) Copyright 2012
+# Eric Jarrige 
+#
+# 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
+#
+#
+# This config file is used for compilation of armadeus apf27 board
+#
+
+#
+# TEXT_BASE for SPL:
+#
+#
+# This config file is used for compilation of armadeus sources
+#
+# You might change location of U-Boot in memory by setting right TEXT_BASE.
+# This allows for example having one copy located at the end of ram and stored
+# in flash device and later on while developing use other location to test
+# the code in RAM device only.
+