A little review of my first patch. As you can see, I removed some
unnecessary modifications that I did in arm920t directory ... (I don't
really remember why I did it), and some modifications on drivers (nand
and i2c) that was unnecessary because I am not currently supporting
theses features.
I forget to say in my first mail that is a porting from an old version
of u-boot patched by BusError (Michel Pollet).
From 9cefb0a55332b094256447f32d1b27c4f3f7808a Mon Sep 17 00:00:00 2001
From: Gabriel Huau cont...@huau-gabriel.fr
Date: Sun, 15 Apr 2012 00:10:22 +0200
Subject: [PATCH v2] Add support for MINI2440 (s3c2440). Documentation about
the product can be found on:
http://www.friendlyarm.net/products/mini2440
---
Changes for v2:
- Coding style cleanup
- Remove unnecessary files modification
- Remove unnecessary board configuration set
---
arch/arm/include/asm/arch-s3c24x0/s3c24x0.h | 51 +-
board/friendlyarm/mini2440/Makefile | 45 +
board/friendlyarm/mini2440/lowlevel_init.S | 177 +
board/friendlyarm/mini2440/mini2440.c | 283 +++
boards.cfg |1 +
include/configs/mini2440.h | 203 +++
6 files changed, 710 insertions(+), 50 deletions(-)
create mode 100644 board/friendlyarm/mini2440/Makefile
create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S
create mode 100644 board/friendlyarm/mini2440/mini2440.c
create mode 100644 include/configs/mini2440.h
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
index ca978c9..96e623b 100644
--- a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
+++ b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
@@ -416,7 +416,7 @@ struct s3c24x0_gpio {
u32 misccr;
u32 extint;
#endif
-#ifdef CONFIG_S3C2410
+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
u32 gpacon;
u32 gpadat;
u32 res1[2];
@@ -467,55 +467,6 @@ struct s3c24x0_gpio {
u32 gstatus4;
#endif
#if defined(CONFIG_S3C2440)
- u32 gpacon;
- u32 gpadat;
- u32 res1[2];
- u32 gpbcon;
- u32 gpbdat;
- u32 gpbup;
- u32 res2;
- u32 gpccon;
- u32 gpcdat;
- u32 gpcup;
- u32 res3;
- u32 gpdcon;
- u32 gpddat;
- u32 gpdup;
- u32 res4;
- u32 gpecon;
- u32 gpedat;
- u32 gpeup;
- u32 res5;
- u32 gpfcon;
- u32 gpfdat;
- u32 gpfup;
- u32 res6;
- u32 gpgcon;
- u32 gpgdat;
- u32 gpgup;
- u32 res7;
- u32 gphcon;
- u32 gphdat;
- u32 gphup;
- u32 res8;
-
- u32 misccr;
- u32 dclkcon;
- u32 extint0;
- u32 extint1;
- u32 extint2;
- u32 eintflt0;
- u32 eintflt1;
- u32 eintflt2;
- u32 eintflt3;
- u32 eintmask;
- u32 eintpend;
- u32 gstatus0;
- u32 gstatus1;
- u32 gstatus2;
- u32 gstatus3;
- u32 gstatus4;
-
u32 res9;
u32 dsc0;
u32 dsc1;
diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile
new file mode 100644
index 000..065f1db
--- /dev/null
+++ b/board/friendlyarm/mini2440/Makefile
@@ -0,0 +1,45 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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).o
+
+COBJS := mini2440.o
+SOBJS := lowlevel_init.o
+
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S
new file mode 100644
index 000..2a057ea
--- /dev/null
+++ b/board/friendlyarm/mini2440/lowlevel_init.S
@@ -0,0 +1,177 @@
+/*
+ * Memory Setup stuff - taken from blob memsetup.S
+ *
+ * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and
+ * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl)
+ *
+ * Modified for the Samsung SMDK2410 by
+ * (C) Copyright 2002
+ * David Mueller, ELSOFT AG, d.muel...@elsoft.ch
+ *
+ * See file CREDITS for list of people