summaryrefslogtreecommitdiffstats
path: root/post/post.c
Commit message (Collapse)AuthorAgeFilesLines
* common: Drop asm/global_data.h from common headerSimon Glass2021-02-021-0/+1
| | | | | | | | | | | | Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* common: board_r: Drop initr_post_backlog wrapperOvidiu Panait2021-01-151-1/+3
| | | | | | | | Add a return value to post_output_backlog and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* post: remove redundant conditionHeinrich Schuchardt2020-10-231-1/+1
| | | | | | | (A && A == 0x20) is only true for (A == 0x20). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* common: Drop log.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop bootstage.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this fairly uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Create a new header file for 'compat' featuresSimon Glass2020-02-051-0/+1
| | | | | | | | | | | | At present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files. Move the compatibility features into a separate header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move get_ticks() function out of common.hSimon Glass2019-12-021-0/+1
| | | | | | | This function belongs in time.h so move it over and add a comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* env: Move env_get_f() to env.hSimon Glass2019-08-111-0/+1
| | | | | | | Move this function over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* Drop the log bufferSimon Glass2017-12-071-9/+0
| | | | | | | | This does not appear to be used by any boards. Before introducing a new log system, remove this old one. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* env: Rename getenv/_f() to env_get()Simon Glass2017-08-161-1/+1
| | | | | | | | | | | We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* Blackfin: RemoveTom Rini2017-04-051-1/+1
| | | | | | | | | | | | | | | | | | | The architecture is currently unmaintained, remove. Cc: Benjamin Matthews <mben12@gmail.com> Cc: Chong Huang <chuang@ucrobotics.com> Cc: Dimitar Penev <dpn@switchfin.org> Cc: Haitao Zhang <hzhang@ucrobotics.com> Cc: I-SYST Micromodule <support@i-syst.com> Cc: M.Hasewinkel (MHA) <info@ssv-embedded.de> Cc: Marek Vasut <marex@denx.de> Cc: Martin Strubel <strubel@section5.ch> Cc: Peter Meerwald <devel@bct-electronic.com> Cc: Sonic Zhang <sonic.adi@gmail.com> Cc: Valentin Yakovenkov <yakovenkov@niistt.ru> Cc: Wojtek Skulski <info@skutek.com> Cc: Wojtek Skulski <skulski@pas.rochester.edu> Signed-off-by: Tom Rini <trini@konsulko.com>
* misc: use __weakJeroen Hofstee2014-10-251-7/+2
| | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* post: remove #warning for kirkwood CPUsValentin Longchamp2012-03-301-2/+1
| | | | | | | | | | | Since commit 96f5c4b the needed functions (get_ticks() and get_tbclk() ) are defined for kirkwood CPUs as well. This warning is then not relevant anymore. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Holger Brunck <holger.brunck@keymile.com> cc: Prafulla Wadaskar <prafulla@marvell.com> cc: Albert Aribaud <albert.u.boot@aribaud.net>
* bootstage: Replace show_boot_progress/error() with bootstage_...()Simon Glass2012-03-181-2/+2
| | | | | | | These calls should not be made directly any more, since bootstage will call the show_boot_...() functions as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Convert progress numbers 20-41 to enumsSimon Glass2012-03-181-2/+2
| | | | Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Use show_boot_error() for -ve progress numbersSimon Glass2012-03-181-2/+2
| | | | | | | | Rather than the caller negating our progress numbers to indicate an error has occurred, which seems hacky, add a function to indicate this. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* post: add blackfin to the post_time_ms listMike Frysinger2012-02-121-1/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* post: fix compile issue for post tests on kirkwoodHolger Brunck2011-12-111-1/+1
| | | | | | | | | | | | commit f31a911fe (arm, post: add missing post_time_ms for arm) enables get_ticks and get_tbclk for all arm based boards, but kirkwood has currently no implementation for this. So undefine this for kirkwood boards. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Prafulla Wadaskar <prafulla@marvell.com> cc: Valentin Longchamp <valentin.longchamp@keymile.com>
* post/post.c: Use lldiv for 64-bit divisionsChristian Riesch2011-12-101-1/+2
| | | | | | | Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Tom Rini <trini@ti.com> Cc: Heiko Schocher <hs@denx.de> Cc: Wolfgang Denk <wd@denx.de>
* post/post.c: fix GCC 4.6 build warningsWolfgang Denk2011-11-031-2/+1
| | | | | | | | | Fix: post.c: In function 'post_log': post.c:425:7: warning: variable 'i' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de>
* post/post.c: CodingStyle cleanupWolfgang Denk2011-11-031-32/+27
| | | | | | | Make checkpatch-clean.. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Marek Vasut <marek.vasut@gmail.com>
* arm, post: add missing post_time_ms for armHeiko Schocher2011-10-271-1/+1
| | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
* cosmetic, post: Codingstyle cleanupHeiko Schocher2011-10-271-68/+59
| | | | Signed-off-by: Heiko Schocher <hs@denx.de>
* POST: make env test flags fetching optionalValentin Longchamp2011-10-051-5/+15
| | | | | | | | | | | | | | Some boards have the environment variables defined in a slow EEPROM. post_run accesses these environment variables to define which tests have to be run (in post_get_flags). This is very slow before the code relocation on some boards with a slow I2C EEPROM for environement variables. This patch adds a config option to skip the fetching of the test flags in the environment variables. The test flags assigned to the tests then only are the ones statically defined for the test in post/tests.c. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
* POST: add post_log_res field for post results in global dataValentin Longchamp2011-10-051-4/+5
| | | | | | | | | | | | | | | | The current post_log_word in global data is currently split into 2x 16 bits: half for the test start, half for the test success. Since we alredy have more than 16 POST tests defined and more could be defined, this may result in an overflow and the post_output_backlog would not work for the tests defined further of these 16 positions. An additional field is added to global data so that we can now support up to 32 (depending of architecture) tests. The post_log_word is only used to record the start of the test and the new field post_log_res for the test success (or failure). The post_output_backlog is for this change also adapted. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
* post: fix indendation/brace confusionJames Kosin2011-07-261-12/+12
| | | | | | | | | | | | | | The post.c code is missing braces around the pass case, and as a result, the diagnostic function will post both fail and pass for a failed test. The reason for this bug is probably the incorrect indentation used, so when reading the code it seems like there are proper braces. Indent the code to the correct depth and put proper braces around the "else" branch of the "if" statement. Signed-off-by: James Kosin <jkosin@intcomgrp.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* post: use ARRAY_SIZEMike Frysinger2011-07-261-1/+1
| | | | | | | We've got a handy dandy macro already for calculating the number of elements in an array, so use it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* post: add gpio hotkey supportMike Frysinger2011-07-261-0/+21
| | | | | | | Now that we have the generic GPIO layer, we can easily provide a common implementation for the post_hotkeys_pressed() function based on it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOCWolfgang Denk2010-10-291-1/+1
| | | | | | | | | | | By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* Rename getenv_r() into getenv_f()Wolfgang Denk2010-08-041-1/+1
| | | | | | | | | | | | | | | | | | | While running from flash, i. e. before relocation, we have only a limited C runtime environment without writable data segment. In this phase, some configurations (for example with environment in EEPROM) must not use the normal getenv(), but a special function. This function had been called getenv_r(), with the idea that the "_r" suffix would mean the same as in the _r_eentrant versions of some of the C library functions (for example getdate vs. getdate_r, getgrent vs. getgrent_r, etc.). Unfortunately this was a misleading name, as in U-Boot the "_r" generally means "running from RAM", i. e. _after_ relocation. To avoid confusion, rename into getenv_f() [as "running from flash"] Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
* POST: add progress APIMichael Zaidman2010-03-211-2/+15
| | | | | | | | | Add POST progress API implemented as weak calls before and after each call to the POST test callback in the post_run_single routine of the post.c file. Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com> Acked-by: Detlev Zundel <dzu@denx.de>
* POST: Remove duplicated post_hotkey_pressed() functionsStefan Roese2009-12-071-0/+16
| | | | | | | | | | | | | This patch introduces a weak default function for post_hotkey_pressed(), returning 0, for boards without hotkey support. The long-running tests won't be started on those boards. This default function was implemented in many board directories. By implementing this weak default we can remove all those duplicate versions. Boards with hotkey support, can override this weak default function by defining one in their board specific code. Signed-off-by: Stefan Roese <sr@denx.de>
* Conditionally perform common relocation fixupsPeter Tyser2009-10-031-0/+2
| | | | | | | | | | | Add #ifdefs where necessary to not perform relocation fixups. This allows boards/architectures which support relocation to trim a decent chunk of code. Note that this patch doesn't add #ifdefs to architecture-specific code which does not support relocation. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* stdio/device: rework function naming conventionJean-Christophe PLAGNIOL-VILLARD2009-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far the console API uses the following naming convention: ======Extract====== typedef struct device_t; int device_register (device_t * dev); int devices_init (void); int device_deregister(char *devname); struct list_head* device_get_list(void); device_t* device_get_by_name(char* name); device_t* device_clone(device_t *dev); ======= which is too generic and confusing. Instead of using device_XX and device_t we change this into stdio_XX and stdio_dev This will also allow to add later a generic device mechanism in order to have support for multiple devices and driver instances. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Edited commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-181-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Configure DSP POST; add watchdog reset to diag commandSascha Laue2008-06-291-0/+1
| | | | Signed-off-by: Sascha Laue <sascha.laue@liebherr.com>
* POST: add POST_STOP flagYuri Tikhonov2008-05-201-2/+15
| | | | | | | | Don't run futher tests in case of a test fails that is marked as POST_STOP. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
* POST: preparations for moving CONFIG_POST to MakefilesYuri Tikhonov2008-04-221-4/+0
| | | | | | | Remove CONFIG_POST ifdefs from the post/ source files. Signed-off-by: Yuri Tikhonov <yur@emcraft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* The patch introduces the CRITICAL feature of POST tests. If the testYuri Tikhonov2008-03-181-3/+15
| | | | | | | | | marked as POST_CRITICAL fails then the alternative, post_critical, boot-command is used. If this command is not defined then U-Boot enters into interactive mode. Signed-off-by: Dmitry Rakhchev <rda@emcraft.com> Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
* make show_boot_progress () weak.Heiko Schocher2007-07-131-6/+2
| | | | Signed-off-by: Heiko Schocher <hs@denx.de>
* Extend POST support for PPC440Igor Lisitsin2007-06-221-1/+1
| | | | | | | Added memory, CPU, UART, I2C and SPR POST tests for PPC440. Signed-off-by: Igor Lisitsin <igor@emcraft.com> --
* Restructure POST directory to support of other CPUs, boards, etc.Wolfgang Denk2007-03-061-0/+1
|
* GCC-4.x fixes: clean up global data pointer initialization for all boards.Wolfgang Denk2006-03-311-8/+2
|
* * Patches by Reinhard Meyer, 14 Feb 2004:wdenk2004-02-231-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | - update board/emk tree; use common flash driver - Corrected tested bits in machine check exception in cpu/mpc5xxx/traps.c [adapted for other PPC CPUs -- wd] - Added support for the M48T08 on the EVAL5200 board in rtc/mk48t59.c * Patch by Jon Diekema, 13 Feb 2004: Call show_boot_progress() whenever POST "FAILED" is printed. * Patch by Nishant Kamat, 13 Feb 2004: Add support for TI OMAP1610 H2 Board Fixes for cpu/arm926ejs/interrupt.c (based on Richard Woodruff's patch for arm925, 16 Oct 03) Fix for a timer bug in OMAP1610 Innovator Add support for CS0 (ROM)/CS3 (Flash) boot in OMAP1610 Innovator and H2 * Patches by Stephan Linz, 12 Feb 2004: - add support for NIOS timer with variable period preload counter value - prepare POST framework support for NIOS targets * Patch by Denis Peter, 11 Feb 2004: add POST support for the MIP405 board
* * Patches by Xianghua Xiao, 15 Oct 2003:LABEL_2003_10_16_0200wdenk2003-10-151-1/+1
| | | | | | | | - Added Motorola CPU 8540/8560 support (cpu/85xx) - Added Motorola MPC8540ADS board support (board/mpc8540ads) - Added Motorola MPC8560ADS board support (board/mpc8560ads) * Minor code cleanup
* * Implement new mechanism to export U-Boot's functions to standalonewdenk2003-07-241-8/+17
| | | | | | | | applications: instead of using (PPC-specific) system calls we now use a jump table; please see doc/README.standalone for details * Patch by Dave Westwood, 24 Jul 2003: added support for Unity OS (a proprietary OS)
* * Patches by Martin Krause, 14 Jul 2003:wdenk2003-07-151-7/+10
| | | | | | | - add I2C support for s3c2400 systems (trab board) - (re-) add "ping" to command table * Fix handling of "slow" POST routines
* * Patches by Yuli Barcohen, 13 Jul 2003:wdenk2003-07-141-3/+3
| | | | | | | | | | | | | | | | | | - Correct flash and JFFS2 support for MPC8260ADS - fix PVR values and clock generation for PowerQUICC II family (8270/8275/8280) * Patch by Bernhard Kuhn, 08 Jul 2003: - add support for M68K targets * Patch by Ken Chou, 3 Jul: - Fix PCI config table for A3000 - Fix iobase for natsemi.c (PCI_BASE_ADDRESS_0 is the IO base register for DP83815) * Allow to enable "slow" POST routines by key press on power-on * Fix temperature dependend switching of LCD backlight on LWMON * Tweak output format for LWMON