[U-Boot-Users] [PATCH] The patch adds new POST tests for the Lwmon5 board.

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Wed Mar 19 13:17:28 CET 2008


On 22:12 Tue 18 Mar     , Wolfgang Denk wrote:
> From: Yuri Tikhonov <yur at pollux.denx.de>
> 
> * External Watchdog test;
> * dsPIC tests;
> * FPGA test;
> * GDC test;
> * Sysmon tests.
> 
> Signed-off-by: Dmitry Rakhchev <rda at emcraft.com>
> Signed-off-by: Yuri Tikhonov <yur at emcraft.com>
> ---
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include <common.h>
> +
> +#ifdef CONFIG_POST
Please move it to the Makefile
> +
> +#include <post.h>
> +
> +
> +#if CONFIG_POST & CFG_POST_DSP
> +#include <asm/io.h>
> +
> +/* This test verifies DSP status bits in FPGA */
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +#define DSP_STATUS_REG 0xC4000008
> +
> +int dsp_post_test(int flags)
> +{
> +	uint   read_value;
> +	int    ret;
> +
> +	ret = 0;
> +	read_value = in_be32((void *)DSP_STATUS_REG) & 0x3;
> +	if (read_value != 0x3) {
> +		post_log("\nDSP status read %08X\n", read_value);
> +		ret = 1;
> +	}
> +
> +	return ret;
> +}
> +
> +#endif /* CONFIG_POST & CFG_POST_DSP */
> +#endif /* CONFIG_POST */
> +
> diff --git a/post/board/lwmon5/dspic.c b/post/board/lwmon5/dspic.c
> new file mode 100644
> index 0000000..e8fed89
> --- /dev/null
> +++ b/post/board/lwmon5/dspic.c
> @@ -0,0 +1,109 @@
> +/*
> + * (C) Copyright 2008 Dmitry Rakhchev, EmCraft Systems, rda at emcraft.com
> + *
> + * Developed for DENX Software Engineering GmbH
> + *
> + * 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>
> +
> +#ifdef CONFIG_POST
Please move it to the Makefile
> +
> +/* There are two tests for dsPIC currently implemented:
> + * 1. dsPIC ready test. Done in board_early_init_f(). Only result verified here.
> + * 2. dsPIC POST result test.  This test gets dsPIC POST codes and version.
> + */
> +
> index 0000000..4e3f1d5
> --- /dev/null
> +++ b/post/board/lwmon5/fpga.c
> @@ -0,0 +1,104 @@
> +/*
> + * (C) Copyright 2008 Dmitry Rakhchev, EmCraft Systems, rda at emcraft.com
> + *
> + * Developed for DENX Software Engineering GmbH
> + *
> + * 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>
> +
> +#ifdef CONFIG_POST
Please move it to the Makefile
> +
> +/* This test performs testing of FPGA SCRATCH register,
> + * gets FPGA version and run get_ram_size() on FPGA memory
> + */
> +
> +#include <post.h>
> +
> +#include <asm/io.h>
> +
> + * Developed for DENX Software Engineering GmbH
> + *
> + * 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>
> +
> +#ifdef CONFIG_POST
Please move it to the Makefile
> +
> +/* This test attempts to verify board GDC. A scratch register tested, then
> + * simple memory test (get_ram_size()) run over GDC memory.
> + */
> +
> +#include <post.h>
> +
> +#include <asm/io.h>
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +#define GDC_SCRATCH_REG 0xC1FF8044
> +#define GDC_VERSION_REG 0xC1FF8084
> +#define GDC_RAM_START   0xC0000000
> +#define GDC_RAM_END     0xC2000000
> +
> + * 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 <post.h>
> +#include <common.h>
> +
> +#ifdef CONFIG_POST
Please move it to the Makefile
> +
> +/*
> + * SYSMON test
> + *
> + * 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>
> +
> +/* This test verifies if the reason of last reset was an abnormal voltage
> + * condition, than it performs watchdog test, measuing time required to
> + * trigger watchdog reset.
> + */
> +
> +#ifdef CONFIG_POST
Please move it to the Makefile
> +
> +#include <post.h>
> +
> +#if CONFIG_POST & CFG_POST_WATCHDOG
> +
Best Regards,
J.




More information about the U-Boot mailing list