[U-Boot] [PATCH 6/8] POST/km_arm: add POST memory tests infrastructure

Valentin Longchamp valentin.longchamp at keymile.com
Wed Aug 3 14:37:05 CEST 2011


This patch adds a board support for km_arm in the POST framework.
It consists of a memory test configuration with the redefinition of
the arch_memory_test_prepare function.

Signed-off-by: Valentin Longchamp <valentin.longchamp at keymile.com>
Signed-off-by: Holger Brunck <holger.brunck at keymile.com>
---
 post/board/km_arm/Makefile |   29 +++++++++++++++++++++++++++++
 post/board/km_arm/memory.c |   37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 0 deletions(-)
 create mode 100644 post/board/km_arm/Makefile
 create mode 100644 post/board/km_arm/memory.c

diff --git a/post/board/km_arm/Makefile b/post/board/km_arm/Makefile
new file mode 100644
index 0000000..6e8a494
--- /dev/null
+++ b/post/board/km_arm/Makefile
@@ -0,0 +1,29 @@
+#
+# (C) Copyright 2002-2006
+# Wolfgang Denk, DENX Software Engineering, wd at 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 $(OBJTREE)/include/autoconf.mk
+
+LIB	= libpostkm_arm.o
+
+COBJS-$(CONFIG_HAS_POST)	+= memory.o
+
+include $(TOPDIR)/post/rules.mk
diff --git a/post/board/km_arm/memory.c b/post/board/km_arm/memory.c
new file mode 100644
index 0000000..dc466a6
--- /dev/null
+++ b/post/board/km_arm/memory.c
@@ -0,0 +1,37 @@
+/*
+ * (C) Copyright 2011
+ * Valentin Longchamp, Keymile AG Bern, <valentin.longchamp at keymile.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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include <common.h>
+#include <post.h>
+
+int arch_memory_test_prepare(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
+{
+	bd_t *bd = gd->bd;
+
+	*vstart = CONFIG_SYS_SDRAM_BASE;
+
+	/* we go up to relocation plus a 1 MB margin */
+	*size = CONFIG_SYS_TEXT_BASE - (1<<20);
+
+	return 0;
+}
-- 
1.7.1



More information about the U-Boot mailing list