From mboxrd@z Thu Jan 1 00:00:00 1970 From: Valentin Longchamp Date: Thu, 1 Sep 2011 17:39:25 +0200 Subject: [U-Boot] [PATCH v2 6/8] POST/km_arm: add POST memory tests infrastructure In-Reply-To: <1314891567-6476-1-git-send-email-valentin.longchamp@keymile.com> References: <1314891567-6476-1-git-send-email-valentin.longchamp@keymile.com> Message-ID: <1314891567-6476-7-git-send-email-valentin.longchamp@keymile.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Signed-off-by: Holger Brunck --- post/board/km_arm/Makefile | 29 +++++++++++++++++++++++++++++ post/board/km_arm/memory.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 64 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..eaf96e7 --- /dev/null +++ b/post/board/km_arm/memory.c @@ -0,0 +1,35 @@ +/* + * (C) Copyright 2011 + * Valentin Longchamp, Keymile AG Bern, + * + * 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 +#include + +int arch_memory_test_prepare(u32 *vstart, u32 *size, phys_addr_t *phys_offset) +{ + *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