]>
git.ipfire.org Git - u-boot.git/blob - post/board/lwmon5/dsp.c
2 * (C) Copyright 2008 Dmitry Rakhchev, EmCraft Systems, rda@emcraft.com
4 * Developed for DENX Software Engineering GmbH
6 * SPDX-License-Identifier: GPL-2.0+
13 #if CONFIG_POST & CONFIG_SYS_POST_DSP
16 /* This test verifies DSP status bits in FPGA */
18 DECLARE_GLOBAL_DATA_PTR
;
20 #define DSP_STATUS_REG 0xC4000008
21 #define FPGA_STATUS_REG 0xC400000C
23 int dsp_post_test(int flags
)
29 /* momorize fpga status */
30 old_value
= in_be32((void *)FPGA_STATUS_REG
);
32 out_be32((void *)FPGA_STATUS_REG
, 0x30);
34 /* generate sync signal */
35 out_be32((void *)DSP_STATUS_REG
, 0x300);
37 out_be32((void *)DSP_STATUS_REG
, 0);
42 read_value
= in_be32((void *)DSP_STATUS_REG
) & 0x3;
43 if (read_value
!= 0x03) {
44 post_log("\nDSP status read %08X\n", read_value
);
48 /* restore fpga status */
49 out_be32((void *)FPGA_STATUS_REG
, old_value
);
54 #endif /* CONFIG_POST & CONFIG_SYS_POST_DSP */