]> git.ipfire.org Git - thirdparty/u-boot.git/blame - lib/hang.c
Merge tag 'video-for-2019.07-rc1' of git://git.denx.de/u-boot-video
[thirdparty/u-boot.git] / lib / hang.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
d2eae43b
AB
2/*
3 * (C) Copyright 2013
09c2b8f3 4 * Andreas Bießmann <andreas@biessmann.org>
d2eae43b
AB
5 *
6 * This file consolidates all the different hang() functions implemented in
7 * u-boot.
d2eae43b
AB
8 */
9
10#include <common.h>
11#include <bootstage.h>
12
13/**
14 * hang - stop processing by staying in an endless loop
15 *
16 * The purpose of this function is to stop further execution of code cause
17 * something went completely wrong. To catch this and give some feedback to
18 * the user one needs to catch the bootstage_error (see show_boot_progress())
19 * in the board code.
20 */
21void hang(void)
22{
aa0ffe8e
SG
23#if !defined(CONFIG_SPL_BUILD) || \
24 (CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT) && \
25 CONFIG_IS_ENABLED(SERIAL_SUPPORT))
d2eae43b
AB
26 puts("### ERROR ### Please RESET the board ###\n");
27#endif
28 bootstage_error(BOOTSTAGE_ID_NEED_RESET);
29 for (;;)
30 ;
31}