Commit Graph

42 Commits

Author SHA1 Message Date
Valentin Longchamp 4e518b8875 post: remove #warning for kirkwood CPUs
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>
2012-03-30 18:21:09 +02:00
Simon Glass 770605e4f9 bootstage: Replace show_boot_progress/error() with bootstage_...()
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>
2012-03-18 21:41:39 +01:00
Simon Glass 8ade950638 bootstage: Convert progress numbers 20-41 to enums
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-03-18 21:16:22 +01:00
Simon Glass 5ddb118da4 bootstage: Use show_boot_error() for -ve progress numbers
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>
2012-03-18 20:56:00 +01:00
Mike Frysinger 23f1dded5e post: add blackfin to the post_time_ms list
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:03:25 -05:00
Holger Brunck 2f88566aaa post: fix compile issue for post tests on kirkwood
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>
2011-12-11 13:44:23 +01:00
Christian Riesch c90a4dd79c post/post.c: Use lldiv for 64-bit divisions
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>
2011-12-10 23:15:14 +01:00
Wolfgang Denk 4d6402b012 post/post.c: fix GCC 4.6 build warnings
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>
2011-11-03 20:44:18 +01:00
Wolfgang Denk 50da837663 post/post.c: CodingStyle cleanup
Make checkpatch-clean..

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-11-03 20:43:51 +01:00
Heiko Schocher f31a911fe2 arm, post: add missing post_time_ms for arm
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2011-10-27 21:56:30 +02:00
Heiko Schocher e92372c8a7 cosmetic, post: Codingstyle cleanup
Signed-off-by: Heiko Schocher <hs@denx.de>
2011-10-27 21:56:30 +02:00
Valentin Longchamp 212a0cafad POST: make env test flags fetching optional
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>
2011-10-05 22:03:10 +02:00
Valentin Longchamp 79843950b2 POST: add post_log_res field for post results in global data
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>
2011-10-05 22:03:10 +02:00
James Kosin 975afc34dd post: fix indendation/brace confusion
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>
2011-07-26 16:57:49 +02:00
Mike Frysinger d2397817f1 post: use ARRAY_SIZE
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>
2011-07-26 16:48:33 +02:00
Mike Frysinger 9146d13821 post: add gpio hotkey support
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>
2011-07-26 16:47:39 +02:00
Wolfgang Denk 2e5167ccad Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC
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>
2010-10-29 21:32:07 +02:00
Wolfgang Denk cdb749778a Rename getenv_r() into getenv_f()
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>
2010-08-04 00:45:36 +02:00
Michael Zaidman e070a56c77 POST: add progress API
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>
2010-03-21 22:44:58 +01:00
Stefan Roese 39ff7d5f4c POST: Remove duplicated post_hotkey_pressed() functions
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>
2009-12-07 22:44:31 +01:00
Peter Tyser 521af04d85 Conditionally perform common relocation fixups
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>
2009-10-03 10:17:57 +02:00
Jean-Christophe PLAGNIOL-VILLARD 52cb4d4fb3 stdio/device: rework function naming convention
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>
2009-07-18 00:27:46 +02:00
Jean-Christophe PLAGNIOL-VILLARD 6d0f6bcf33 rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18 21:54:03 +02:00
Sascha Laue 5744ddc663 Configure DSP POST; add watchdog reset to diag command
Signed-off-by: Sascha Laue <sascha.laue@liebherr.com>
2008-06-29 19:19:35 +02:00
Yuri Tikhonov 28a3850658 POST: add POST_STOP flag
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>
2008-05-20 23:24:37 +02:00
Yuri Tikhonov 0a51e9248e POST: preparations for moving CONFIG_POST to Makefiles
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>
2008-04-22 14:38:38 +02:00
Yuri Tikhonov e262efe357 The patch introduces the CRITICAL feature of POST tests. If the test
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>
2008-03-18 21:59:23 +01:00
Heiko Schocher fad6340715 make show_boot_progress () weak.
Signed-off-by: Heiko Schocher <hs@denx.de>
2007-07-13 09:54:17 +02:00
Igor Lisitsin a11e06965e Extend POST support for PPC440
Added memory, CPU, UART, I2C and SPR POST tests for PPC440.

Signed-off-by: Igor Lisitsin <igor@emcraft.com>
--
2007-06-22 23:21:01 +02:00
Wolfgang Denk ad5bb451ad Restructure POST directory to support of other CPUs, boards, etc. 2007-03-06 18:08:43 +01:00
Wolfgang Denk d87080b721 GCC-4.x fixes: clean up global data pointer initialization for all boards. 2006-03-31 18:32:53 +02:00
wdenk 63e73c9a8e * Patches by Reinhard Meyer, 14 Feb 2004:
- 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
2004-02-23 22:22:28 +00:00
wdenk 42d1f0394b * Patches by Xianghua Xiao, 15 Oct 2003:
- 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
2003-10-15 23:53:47 +00:00
wdenk 27b207fd0a * Implement new mechanism to export U-Boot's functions to standalone
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)
2003-07-24 23:38:38 +00:00
wdenk 6dff552972 * Patches by Martin Krause, 14 Jul 2003:
- add I2C support for s3c2400 systems (trab board)
  - (re-) add "ping" to command table

* Fix handling of "slow" POST routines
2003-07-15 07:45:49 +00:00
wdenk 8564acf936 * Patches by Yuli Barcohen, 13 Jul 2003:
- 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
2003-07-14 22:13:32 +00:00
wdenk 8bde7f776c * Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
  - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
  - major rework of command structure
    (work done mostly by Michal Cendrowski and Joakim Kristiansen)
2003-06-27 21:31:46 +00:00
wdenk 4532cb696e * LWMON extensions:
- Splashscreen support
  - modem support
  - sysmon support
  - temperature dependend enabling of LCD

* Allow booting from old "PPCBoot" disk partitions

* Add support for TQM8255 Board / MPC8255 CPU
2003-04-27 22:52:51 +00:00
wdenk 228f29ac6e * Improve log buffer code; use "loglevel" to decide which messages
to log on the console, too (like in Linux); get rid of "logstart"
2002-12-08 09:53:23 +00:00
wdenk ea909b7604 * Added support for both PCMCIA slots (at the same time!) on MPC8xx
* Patch by Rod Boyce, 21 Nov 2002:
  fix PCMCIA on MBX8xx board

* Patch by Pierre Aubert , 21 Nov 2002
  Add CFG_CPM_POST_WORD_ADDR to make the offset of the
  bootmode word in DPRAM configurable
2002-11-21 23:11:29 +00:00
wdenk 56f94be3ef * Add support for log buffer which can be passed to Linux kernel's
syslog mechanism; used especially for POST results.

* Patch by Klaus Heydeck, 31 Oct 2002:
  Add initial support for kup4k board
2002-11-05 16:35:14 +00:00
wdenk a042ac8439 Initial revision 2002-09-12 22:36:57 +00:00