diff options
author | Minkyu Kang <mk7.kang@samsung.com> | 2010-05-10 15:20:50 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2010-05-10 15:20:50 +0900 |
commit | 9d62f20d0861ef87460d073dc189c851715b46ae (patch) | |
tree | 43a05c86e947f01079879735ddf93218870df50b /post | |
parent | 6596753387c3310b86f75bebe464684d70651052 (diff) | |
parent | e0531f975ce124f4ebdd9c7b7b107673c5628f68 (diff) | |
download | u-boot-imx-9d62f20d0861ef87460d073dc189c851715b46ae.zip u-boot-imx-9d62f20d0861ef87460d073dc189c851715b46ae.tar.gz u-boot-imx-9d62f20d0861ef87460d073dc189c851715b46ae.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Conflicts:
arch/arm/include/asm/mach-types.h
common/serial.c
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'post')
-rw-r--r-- | post/board/pdm360ng/Makefile | 29 | ||||
-rw-r--r-- | post/board/pdm360ng/coproc_com.c | 97 | ||||
-rw-r--r-- | post/cpu/ppc4xx/spr.c | 2 | ||||
-rw-r--r-- | post/lib_powerpc/Makefile (renamed from post/lib_ppc/Makefile) | 2 | ||||
-rw-r--r-- | post/lib_powerpc/andi.c (renamed from post/lib_ppc/andi.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/asm.S (renamed from post/lib_ppc/asm.S) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/b.c (renamed from post/lib_ppc/b.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/cmp.c (renamed from post/lib_ppc/cmp.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/cmpi.c (renamed from post/lib_ppc/cmpi.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/complex.c (renamed from post/lib_ppc/complex.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/cpu.c (renamed from post/lib_ppc/cpu.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/cpu_asm.h (renamed from post/lib_ppc/cpu_asm.h) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/cr.c (renamed from post/lib_ppc/cr.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/fpu/20001122-1.c (renamed from post/lib_ppc/fpu/20001122-1.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/fpu/20010114-2.c (renamed from post/lib_ppc/fpu/20010114-2.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/fpu/20010226-1.c (renamed from post/lib_ppc/fpu/20010226-1.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/fpu/980619-1.c (renamed from post/lib_ppc/fpu/980619-1.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/fpu/Makefile (renamed from post/lib_ppc/fpu/Makefile) | 2 | ||||
-rw-r--r-- | post/lib_powerpc/fpu/acc1.c (renamed from post/lib_ppc/fpu/acc1.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/fpu/compare-fp-1.c (renamed from post/lib_ppc/fpu/compare-fp-1.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/fpu/fpu.c (renamed from post/lib_ppc/fpu/fpu.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/fpu/mul-subnormal-single-1.c (renamed from post/lib_ppc/fpu/mul-subnormal-single-1.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/load.c (renamed from post/lib_ppc/load.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/multi.c (renamed from post/lib_ppc/multi.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/rlwimi.c (renamed from post/lib_ppc/rlwimi.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/rlwinm.c (renamed from post/lib_ppc/rlwinm.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/rlwnm.c (renamed from post/lib_ppc/rlwnm.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/srawi.c (renamed from post/lib_ppc/srawi.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/store.c (renamed from post/lib_ppc/store.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/string.c (renamed from post/lib_ppc/string.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/three.c (renamed from post/lib_ppc/three.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/threei.c (renamed from post/lib_ppc/threei.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/threex.c (renamed from post/lib_ppc/threex.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/two.c (renamed from post/lib_ppc/two.c) | 0 | ||||
-rw-r--r-- | post/lib_powerpc/twox.c (renamed from post/lib_ppc/twox.c) | 0 | ||||
-rw-r--r-- | post/tests.c | 13 |
36 files changed, 142 insertions, 3 deletions
diff --git a/post/board/pdm360ng/Makefile b/post/board/pdm360ng/Makefile new file mode 100644 index 0000000..d1538f6 --- /dev/null +++ b/post/board/pdm360ng/Makefile @@ -0,0 +1,29 @@ +# +# (C) Copyright 2010 DENX Software Engineering +# Anatolij Gustschin, agust@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 = libpostpdm360ng.a + +COBJS-$(CONFIG_HAS_POST) += coproc_com.o + +include $(TOPDIR)/post/rules.mk diff --git a/post/board/pdm360ng/coproc_com.c b/post/board/pdm360ng/coproc_com.c new file mode 100644 index 0000000..0755352 --- /dev/null +++ b/post/board/pdm360ng/coproc_com.c @@ -0,0 +1,97 @@ +/* + * (C) Copyright 2010 DENX Software Engineering, + * Anatolij Gustschin, agust@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 + */ + +/* + * Co-Processor communication POST + */ +#include <common.h> +#include <post.h> +#include <serial.h> + +#if defined(CONFIG_SERIAL_MULTI) + +/* + * Actually the termination sequence of the coprocessor + * commands is "\r\n" (CR LF), but here we use a side effect of + * the putc() routine of the serial driver which checks for LF + * and sends CR before sending LF. Therefore the termination + * sequence in the command below is only "\n". + * "alive" string is the coprocessor response for ping command + * and not a command, therefore it is terminated with "\r\n". + */ +char alive[] = "$AL;38\r\n"; +char ping[] = "$PI;2C\n"; + +int coprocessor_post_test(int flags) +{ + struct stdio_dev *cop_port; + int ret; + char buf[10]; + + /* Test IO Coprocessor communication */ + cop_port = open_port(4, CONFIG_SYS_PDM360NG_COPROC_BAUDRATE); + if (!cop_port) + return -1; + + write_port(cop_port, ping); + udelay(CONFIG_SYS_PDM360NG_COPROC_READ_DELAY); + + memset(buf, 0, sizeof(buf)); + ret = read_port(cop_port, buf, sizeof(buf)); + close_port(4); + if (ret <= 0) { + post_log("Error: Can't read IO Coprocessor port.\n"); + return -1; + } + + if (strcmp(buf, alive)) { + post_log("Error: IO-Cop. resp.: %s\n", buf); + return -1; + } + + /* Test WD Coprocessor communication */ + cop_port = open_port(1, CONFIG_SYS_PDM360NG_COPROC_BAUDRATE); + if (!cop_port) { + post_log("Error: Can't open WD Coprocessor port.\n"); + return -1; + } + + write_port(cop_port, ping); + udelay(CONFIG_SYS_PDM360NG_COPROC_READ_DELAY); + + memset(buf, 0, sizeof(buf)); + ret = read_port(cop_port, buf, sizeof(buf)); + close_port(1); + if (ret <= 0) { + post_log("Error: Can't read WD Coprocessor port.\n"); + return -1; + } + + if (strcmp(buf, alive)) { + post_log("Error: WD-Cop. resp.: %s\n", buf); + return -1; + } + + return 0; +} +#endif /* CONFIG_SERIAL_MULTI */ diff --git a/post/cpu/ppc4xx/spr.c b/post/cpu/ppc4xx/spr.c index 6ff5c79..cb18b64 100644 --- a/post/cpu/ppc4xx/spr.c +++ b/post/cpu/ppc4xx/spr.c @@ -69,7 +69,7 @@ static struct { /* Additional Special-Purpose Registers. * The values must match the initialization - * values from arch/ppc/cpu/ppc4xx/start.S + * values from arch/powerpc/cpu/ppc4xx/start.S */ {0x30, "PID", 0x00000000, 0x00000000}, {0x3a, "CSRR0", 0x00000000, 0x00000000}, diff --git a/post/lib_ppc/Makefile b/post/lib_powerpc/Makefile index bd7a232..0cd15cf 100644 --- a/post/lib_ppc/Makefile +++ b/post/lib_powerpc/Makefile @@ -22,7 +22,7 @@ # include $(TOPDIR)/config.mk -LIB = libpostppc.a +LIB = libpost$(ARCH).a AOBJS-$(CONFIG_HAS_POST) += asm.o COBJS-$(CONFIG_HAS_POST) += cpu.o cmp.o cmpi.o two.o twox.o three.o threex.o diff --git a/post/lib_ppc/andi.c b/post/lib_powerpc/andi.c index 52ec7c4..52ec7c4 100644 --- a/post/lib_ppc/andi.c +++ b/post/lib_powerpc/andi.c diff --git a/post/lib_ppc/asm.S b/post/lib_powerpc/asm.S index f6b329a..f6b329a 100644 --- a/post/lib_ppc/asm.S +++ b/post/lib_powerpc/asm.S diff --git a/post/lib_ppc/b.c b/post/lib_powerpc/b.c index 492fba4..492fba4 100644 --- a/post/lib_ppc/b.c +++ b/post/lib_powerpc/b.c diff --git a/post/lib_ppc/cmp.c b/post/lib_powerpc/cmp.c index 5f6a3b9..5f6a3b9 100644 --- a/post/lib_ppc/cmp.c +++ b/post/lib_powerpc/cmp.c diff --git a/post/lib_ppc/cmpi.c b/post/lib_powerpc/cmpi.c index 1a2fc3d..1a2fc3d 100644 --- a/post/lib_ppc/cmpi.c +++ b/post/lib_powerpc/cmpi.c diff --git a/post/lib_ppc/complex.c b/post/lib_powerpc/complex.c index 4a3bc00..4a3bc00 100644 --- a/post/lib_ppc/complex.c +++ b/post/lib_powerpc/complex.c diff --git a/post/lib_ppc/cpu.c b/post/lib_powerpc/cpu.c index 3793a60..3793a60 100644 --- a/post/lib_ppc/cpu.c +++ b/post/lib_powerpc/cpu.c diff --git a/post/lib_ppc/cpu_asm.h b/post/lib_powerpc/cpu_asm.h index ef6fe61..ef6fe61 100644 --- a/post/lib_ppc/cpu_asm.h +++ b/post/lib_powerpc/cpu_asm.h diff --git a/post/lib_ppc/cr.c b/post/lib_powerpc/cr.c index fbee6d5..fbee6d5 100644 --- a/post/lib_ppc/cr.c +++ b/post/lib_powerpc/cr.c diff --git a/post/lib_ppc/fpu/20001122-1.c b/post/lib_powerpc/fpu/20001122-1.c index bef80c5..bef80c5 100644 --- a/post/lib_ppc/fpu/20001122-1.c +++ b/post/lib_powerpc/fpu/20001122-1.c diff --git a/post/lib_ppc/fpu/20010114-2.c b/post/lib_powerpc/fpu/20010114-2.c index ee564e8..ee564e8 100644 --- a/post/lib_ppc/fpu/20010114-2.c +++ b/post/lib_powerpc/fpu/20010114-2.c diff --git a/post/lib_ppc/fpu/20010226-1.c b/post/lib_powerpc/fpu/20010226-1.c index 099ca4a..099ca4a 100644 --- a/post/lib_ppc/fpu/20010226-1.c +++ b/post/lib_powerpc/fpu/20010226-1.c diff --git a/post/lib_ppc/fpu/980619-1.c b/post/lib_powerpc/fpu/980619-1.c index 46a31ae..46a31ae 100644 --- a/post/lib_ppc/fpu/980619-1.c +++ b/post/lib_powerpc/fpu/980619-1.c diff --git a/post/lib_ppc/fpu/Makefile b/post/lib_powerpc/fpu/Makefile index a681539..25726db 100644 --- a/post/lib_ppc/fpu/Makefile +++ b/post/lib_powerpc/fpu/Makefile @@ -22,7 +22,7 @@ # include $(TOPDIR)/config.mk -LIB = libpostppcfpu.a +LIB = libpost$(ARCH)fpu.a COBJS-$(CONFIG_HAS_POST) += fpu.o 20001122-1.o 20010114-2.o 20010226-1.o 980619-1.o COBJS-$(CONFIG_HAS_POST) += acc1.o compare-fp-1.o mul-subnormal-single-1.o diff --git a/post/lib_ppc/fpu/acc1.c b/post/lib_powerpc/fpu/acc1.c index 9fca9b3..9fca9b3 100644 --- a/post/lib_ppc/fpu/acc1.c +++ b/post/lib_powerpc/fpu/acc1.c diff --git a/post/lib_ppc/fpu/compare-fp-1.c b/post/lib_powerpc/fpu/compare-fp-1.c index f836b29..f836b29 100644 --- a/post/lib_ppc/fpu/compare-fp-1.c +++ b/post/lib_powerpc/fpu/compare-fp-1.c diff --git a/post/lib_ppc/fpu/fpu.c b/post/lib_powerpc/fpu/fpu.c index 3f3adea..3f3adea 100644 --- a/post/lib_ppc/fpu/fpu.c +++ b/post/lib_powerpc/fpu/fpu.c diff --git a/post/lib_ppc/fpu/mul-subnormal-single-1.c b/post/lib_powerpc/fpu/mul-subnormal-single-1.c index 1f3732d..1f3732d 100644 --- a/post/lib_ppc/fpu/mul-subnormal-single-1.c +++ b/post/lib_powerpc/fpu/mul-subnormal-single-1.c diff --git a/post/lib_ppc/load.c b/post/lib_powerpc/load.c index 98d4373..98d4373 100644 --- a/post/lib_ppc/load.c +++ b/post/lib_powerpc/load.c diff --git a/post/lib_ppc/multi.c b/post/lib_powerpc/multi.c index e42a7c0..e42a7c0 100644 --- a/post/lib_ppc/multi.c +++ b/post/lib_powerpc/multi.c diff --git a/post/lib_ppc/rlwimi.c b/post/lib_powerpc/rlwimi.c index fd628b3..fd628b3 100644 --- a/post/lib_ppc/rlwimi.c +++ b/post/lib_powerpc/rlwimi.c diff --git a/post/lib_ppc/rlwinm.c b/post/lib_powerpc/rlwinm.c index 88a28c6..88a28c6 100644 --- a/post/lib_ppc/rlwinm.c +++ b/post/lib_powerpc/rlwinm.c diff --git a/post/lib_ppc/rlwnm.c b/post/lib_powerpc/rlwnm.c index 60bcb6d..60bcb6d 100644 --- a/post/lib_ppc/rlwnm.c +++ b/post/lib_powerpc/rlwnm.c diff --git a/post/lib_ppc/srawi.c b/post/lib_powerpc/srawi.c index be153ad..be153ad 100644 --- a/post/lib_ppc/srawi.c +++ b/post/lib_powerpc/srawi.c diff --git a/post/lib_ppc/store.c b/post/lib_powerpc/store.c index 1956f6b..1956f6b 100644 --- a/post/lib_ppc/store.c +++ b/post/lib_powerpc/store.c diff --git a/post/lib_ppc/string.c b/post/lib_powerpc/string.c index c0ddeaf..c0ddeaf 100644 --- a/post/lib_ppc/string.c +++ b/post/lib_powerpc/string.c diff --git a/post/lib_ppc/three.c b/post/lib_powerpc/three.c index 7f8c1e2..7f8c1e2 100644 --- a/post/lib_ppc/three.c +++ b/post/lib_powerpc/three.c diff --git a/post/lib_ppc/threei.c b/post/lib_powerpc/threei.c index 31953f9..31953f9 100644 --- a/post/lib_ppc/threei.c +++ b/post/lib_powerpc/threei.c diff --git a/post/lib_ppc/threex.c b/post/lib_powerpc/threex.c index 350a12a..350a12a 100644 --- a/post/lib_ppc/threex.c +++ b/post/lib_powerpc/threex.c diff --git a/post/lib_ppc/two.c b/post/lib_powerpc/two.c index 2b11147..2b11147 100644 --- a/post/lib_ppc/two.c +++ b/post/lib_powerpc/two.c diff --git a/post/lib_ppc/twox.c b/post/lib_powerpc/twox.c index d6714f9..d6714f9 100644 --- a/post/lib_ppc/twox.c +++ b/post/lib_powerpc/twox.c diff --git a/post/tests.c b/post/tests.c index 3224f00..a4066f9 100644 --- a/post/tests.c +++ b/post/tests.c @@ -53,6 +53,7 @@ extern int gdc_post_test (int flags); extern int fpga_post_test (int flags); extern int lwmon5_watchdog_post_test(int flags); extern int sysmon1_post_test(int flags); +extern int coprocessor_post_test(int flags); extern int sysmon_init_f (void); @@ -286,6 +287,18 @@ struct post_test post_list[] = #if CONFIG_POST & CONFIG_SYS_POST_BSPEC5 CONFIG_POST_BSPEC5, #endif +#if CONFIG_POST & CONFIG_SYS_POST_COPROC + { + "Coprocessors communication test", + "coproc_com", + "This test checks communication with coprocessors.", + POST_RAM | POST_ALWAYS | POST_CRITICAL, + &coprocessor_post_test, + NULL, + NULL, + CONFIG_SYS_POST_COPROC + } +#endif }; unsigned int post_list_size = sizeof (post_list) / sizeof (struct post_test); |