
Hi
On Fri, Jun 6, 2008 at 3:42 PM, Wolfgang Denk wd@denx.de wrote:
From: Sergei Poselenov sposelenov@emcraft.com
Signed-off-by: Sergei Poselenov sposelenov@emcraft.com
board/socrates/Makefile | 2 +- board/socrates/config.mk | 3 +- board/socrates/nand.c | 218 ++++++++++++++++++++++++++++++++++++++++++++ include/configs/socrates.h | 8 ++- 4 files changed, 227 insertions(+), 4 deletions(-) create mode 100644 board/socrates/nand.c
diff --git a/board/socrates/Makefile b/board/socrates/Makefile index 6453f24..11503eb 100644 --- a/board/socrates/Makefile +++ b/board/socrates/Makefile @@ -28,7 +28,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a #
-COBJS := $(BOARD).o law.o tlb.o sdram.o +COBJS := $(BOARD).o law.o tlb.o sdram.o nand.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/socrates/config.mk b/board/socrates/config.mk index 1cf5d38..4f17294 100644 --- a/board/socrates/config.mk +++ b/board/socrates/config.mk @@ -25,6 +25,5 @@ # # socrates board # default CCARBAR is at 0xff700000 -# assume U-Boot is less than 256k # -TEXT_BASE = 0xfffc0000 +TEXT_BASE = 0xfffa0000 diff --git a/board/socrates/nand.c b/board/socrates/nand.c new file mode 100644 index 0000000..960f847 --- /dev/null +++ b/board/socrates/nand.c @@ -0,0 +1,218 @@ +/*
- (C) Copyright 2008
- Sergei Poselenov, Emcraft Systems, sposelenov@emcraft.com.
- 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>
+#if defined(CFG_NAND_BASE) +#include <nand.h> +#include <asm/errno.h> +#include <asm/io.h>
+int state;
Can that variable be made static?
Regards, Magnus