Message ID | 1312375027-27693-7-git-send-email-valentin.longchamp@keymile.com |
---|---|
State | Superseded |
Headers | show |
On Wednesday, August 03, 2011 08:37:05 Valentin Longchamp wrote: > 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@keymile.com> > Signed-off-by: Holger Brunck <holger.brunck@keymile.com> > --- > post/board/km_arm/Makefile | 29 +++++++++++++++++++++++++++++ > post/board/km_arm/memory.c | 37 +++++++++++++++++++++++++++++++++++++ i'm not sure post/board/<board>/ is something we want to continue. putting the post logic into your normal board/<board>/ dir works fine. might i suggest board/km_arm/post.c ... -mike
On 08/14/2011 09:49 PM, Mike Frysinger wrote: > On Wednesday, August 03, 2011 08:37:05 Valentin Longchamp wrote: >> 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@keymile.com> >> Signed-off-by: Holger Brunck <holger.brunck@keymile.com> >> --- >> post/board/km_arm/Makefile | 29 +++++++++++++++++++++++++++++ >> post/board/km_arm/memory.c | 37 +++++++++++++++++++++++++++++++++++++ > > i'm not sure post/board/<board>/ is something we want to continue. putting > the post logic into your normal board/<board>/ dir works fine. might i > suggest board/km_arm/post.c ... > -mike Fine for me, I will change it for the next version of the series.
On Sunday, August 14, 2011 09:49:27 PM Mike Frysinger wrote: > On Wednesday, August 03, 2011 08:37:05 Valentin Longchamp wrote: > > 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@keymile.com> > > Signed-off-by: Holger Brunck <holger.brunck@keymile.com> > > --- > > > > post/board/km_arm/Makefile | 29 +++++++++++++++++++++++++++++ > > post/board/km_arm/memory.c | 37 +++++++++++++++++++++++++++++++++++++ > > i'm not sure post/board/<board>/ is something we want to continue. putting > the post logic into your normal board/<board>/ dir works fine. might i > suggest board/km_arm/post.c ... > -mike post/board/... seems fine to me actually ... there might be more post tests for the board so poluting usual board directory would be stupid.
On Thursday, August 18, 2011 06:44:34 Marek Vasut wrote: > On Sunday, August 14, 2011 09:49:27 PM Mike Frysinger wrote: > > On Wednesday, August 03, 2011 08:37:05 Valentin Longchamp wrote: > > > 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@keymile.com> > > > Signed-off-by: Holger Brunck <holger.brunck@keymile.com> > > > --- > > > > > > post/board/km_arm/Makefile | 29 +++++++++++++++++++++++++++++ > > > post/board/km_arm/memory.c | 37 > > > +++++++++++++++++++++++++++++++++++++ > > > > i'm not sure post/board/<board>/ is something we want to continue. > > putting the post logic into your normal board/<board>/ dir works fine. > > might i suggest board/km_arm/post.c ... > > post/board/... seems fine to me actually ... there might be more post tests > for the board so poluting usual board directory would be stupid. no it wouldnt. post tests that are board specific belong in the board specific location: board/<board>/. creating a mirror of that existing hierarchy is stupid, and most board dirs have very few files, so there really isn't all that much to clutter up in the first place. -mike
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@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@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; +}