summaryrefslogtreecommitdiff
path: root/post
AgeCommit message (Collapse)Author
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-05-01post: fix I2C POST failure for devices in CONFIG_SYS_POST_I2C_IGNORESAnatolij Gustschin
Devices in CONFIG_SYS_POST_I2C_IGNORES list may be absent and the rule is not to report I2C POST failure for devices in this list. Currently this doesn't work since probing for these devices isn't done and thus they are not marked as successfully probed. Ignore optional devices when checking for devices that didn't respond. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-10-28PPC: remove dead boards (AMX860, c2mon, ETX094, IAD210, LANTEC, SCM)Wolfgang Denk
These boards have long reached EOL, and there has been no indication of any active users of such hardware for years. Get rid of the dead weight. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Wolfgang Grandegger <wg@denx.de>
2012-10-15serial: Remove CONFIG_SERIAL_MULTI from remaining sourcesMarek Vasut
Remove the parts depending either on disabled CONFIG_SERIAL_MULTI or ifdefs around CONFIG_SERIAL_MULTI parts since CONFIG_SERIAL_MULTI is now enabled by default. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de>
2012-03-30post: remove #warning for kirkwood CPUsValentin Longchamp
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-18bootstage: Replace show_boot_progress/error() with bootstage_...()Simon Glass
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-18bootstage: Convert progress numbers 20-41 to enumsSimon Glass
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-03-18bootstage: Use show_boot_error() for -ve progress numbersSimon Glass
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-12Revert "post/Makefile: Only build FP post tests if enabled via ↵Wolfgang Denk
CONFIG_SYS_POST_FPU" This reverts commit 3e16abe0e468c568b30acb7d8583e3dbed6f177b. The logic of this patch is broken - testing for CONFIG_SYS_POST_FPU in the Makefile cannot work, as this is only a bit that may (or may not) be set in the CONFIG_POST variable. The patch cases build errors on a number of boards, so we revert it. Signed-off-by: Wolfgang Denk <wd@denx.de>
2012-02-12post: add blackfin to the post_time_ms listMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-13post/Makefile: Only build FP post tests if enabled via CONFIG_SYS_POST_FPUKumar Gala
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-12-23post/lib_powerpc/multi.c: fix stack overflow errorWolfgang Denk
The code and comment disagreed: the comment claimed that r6...r31 were copied, and consequently the arrays for "src" and "dst" were declared with 26 entries, but the actual code ("lmw r5,0(r3)" and "stmw r5,0(r4)") copied _27_ words (r5 through r31), which resulted in false "POST cpu Error at multi test" messages. Fix the comment and the array sizes. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Kim Phillips <kim.phillips@freescale.com> Cc: Andy Fleming <afleming@gmail.com> Acked-by: Anatolij Gustschin <agust@denx.de> Tested-by: Anatolij Gustschin <agust@denx.de>
2011-12-23post/lib_powerpc/multi.c: code cleanupWolfgang Denk
Clean up and document the code: - get rid of unneeded code block - add comment which code is generated Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Kim Phillips <kim.phillips@freescale.com> Cc: Andy Fleming <afleming@gmail.com> Acked-by: Anatolij Gustschin <agust@denx.de>
2011-12-23post/lib_powerpc/multi.c: make checkpatch cleanWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Kim Phillips <kim.phillips@freescale.com> Cc: Andy Fleming <afleming@gmail.com> Acked-by: Anatolij Gustschin <agust@denx.de>
2011-12-23PPC: fix "Warning: FOO uses hard float, BAR uses soft float".Wolfgang Denk
It appears that with recent versions of GCC the explicit "-mhard-float" command line option takes precedence over the ``asm(".gnu_attribute 4, 2");'' in the source file, so this no longer helps to avoid the warnings we get when linking code that uses FP instructions with other code that was built using soft-float. We can remove the ".gnu_attribute" (which appears to carry no other information, at least so far) from the object files, but we also have to make sure we don't pull in the __gcc_qsub() and __gcc_qmul() functions from the standard libgcc, as these would again "infect" our linking. We copy this code from: gcc-4.2.2/gcc/config/rs6000/darwin-ldouble.c This old version was chosen because it was still available under a compatible license (GCC v2+). The file was stripped down to the needed parts, and reformatted so it passes checkpatch with only one warning (do not add new typedefs). Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Stefan Roese <sr@denx.de> Cc: Andy Fleming <afleming@gmail.com> Cc: Kim Phillips <kim.phillips@freescale.com> Tested-by: Stefan Roese <sr@denx.de> Tested-by: Anatolij Gustschin <agust@denx.de>
2011-12-11post: fix compile issue for post tests on kirkwoodHolger Brunck
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-10post/post.c: Use lldiv for 64-bit divisionsChristian Riesch
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-02post/board/lwmon5/gdc.c: Fix GCC 4.6 build warningWolfgang Denk
Fix: gdc.c: In function 'gdc_test_reg_one': gdc.c:66:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Acked-by: Stefan Roese <sr@denx.de>
2011-11-1620001122-1.c: Fix GCC 4.6 build warningStefan Roese
Fix: 20001122-1.c: In function 'fpu_post_test_math1': 20001122-1.c:37:22: warning: variable 'p' set but not used [-Wunused-but-set-variable] Signed-off-by: Stefan Roese <sr@denx.de>
2011-11-03post/post.c: fix GCC 4.6 build warningsWolfgang Denk
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-03post/post.c: CodingStyle cleanupWolfgang Denk
Make checkpatch-clean.. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-10-27arm, post: add missing post_time_ms for armHeiko Schocher
Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2011-10-27cosmetic, post: Codingstyle cleanupHeiko Schocher
Signed-off-by: Heiko Schocher <hs@denx.de>
2011-10-23arm, post, memory: fix bug if sdram base != 0x00000000Heiko Schocher
commit 8d3fcb5e60b6c8e1d530dbc2e2e33ec6a44670da breaks post memory support for sdram base != 0x00000000. Fix this. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Valentin Longchamp <valentin.longchamp@keymile.com> Cc: Holger Brunck <holger.brunck@keymile.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-05POST: add new memory regions testValentin Longchamp
This test is similar to the actual POST memory test but quicker and far less complete. It checks the address and data lines and then only tests some regularly placed sub regions of the RAM. This can be useful when we want to test the RAM but we do not have enough time to run the full memory test. The POST memory test code was rearranged in order to avoid code duplication between the two tests but the memory test functionnality remains the same. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Ackey-by: Mike Frysinger <vapier@gentoo.org>
2011-10-05POST: drivers/memory.c coding style cleanupValentin Longchamp
This is needed for a further patch adding a new memory test. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-05POST: make env test flags fetching optionalValentin Longchamp
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-05POST: add post_log_res field for post results in global dataValentin Longchamp
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-09-29Blackfin: post: generalize led/button tests with GPIOsMike Frysinger
Make it easy for any Blackfin board to enable led/push button tests. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-27post, memorytest: add support for none powerpc archsHeiko Schocher
change bd->bi_memsize to gd->ram_size, as this is defined on all archs, so this post test can used on none powerpc archs too. Signed-off-by: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <hs@denx.de> cc: Mike Frysinger <vapier@gentoo.org>
2011-07-27post, memorytest: fix if vstart is not = 0x0Heiko Schocher
Signed-off-by: Heiko Schocher <hs@denx.de>
2011-07-26post: fix indendation/brace confusionJames Kosin
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-26post: new nor flash testMike Frysinger
This adds a simple flash test to automatically verify erasing, writing, and reading of sectors. The code is based on existing Blackfin tests but generalized for everyone to use. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26post: use ARRAY_SIZEMike Frysinger
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-26post: add gpio hotkey supportMike Frysinger
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-01-25powerpc: Fix FPU post related link warningsKumar Gala
If we built POST on PPC's that didn't enable CONFIG_SYS_POST_FPU we'd get the following warning with newer toolchains: powerpc-linux-gnu-ld: Warning: lib_powerpc/fpu/libpostpowerpcfpu.o uses hard float, libpost.o uses soft float We actually worked around this sometime ago with the following commit: commit ce82ff05388b5ddafdf6082ef0776cce72c40b1c Author: Yuri Tikhonov <yur@emcraft.com> Date: Sat Dec 20 14:54:21 2008 +0300 FPU POST: fix warnings when building with 2.18 binutils However, this only took into effect if CONFIG_SYS_POST_FPU was enabled. We can simply move the GNU_FPOST_ATTR out of the CONFIG_SYS_POST_FPU ifdef block to address the issue. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-12-17ppc4xx/POST: Change ethernet test loop count to a default of 10Stefan Roese
This patch changes the PPC4xx ethernet POST loop test count from currently 192 (256 - 64) to a default of 10. While doing this the max frame size is increased. Each loop run uses a different frame size, starting with a max of 1514 bytes, down to 64. The default loop count of 10 can be overriden using CONFIG_SYS_POST_ETH_LOOPS in the board config header. The TEST_NUM loop has been removed as it was never used. The main reason for this change is to reduce the boot time on boards using this POST test, like the lwmon5 board. This change reduces the boot time by about 600ms on the lwmon5 board. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Wolfgang Denk <wd@denx.de>
2010-11-28ppc4xx/POST: Handle cached SDRAM correctly in Denali (440EPx) ECC POSTStefan Roese
This patch fixes a problem in the Denali (440EPx) SDRAM ECC POST test. When cache is enabled in the SDRAM area, the values written to SDRAM need to be flushed from cache to SDRAM using the dcfb instruction. Without this patch the POST ECC test failed. Now its working again on platforms with cache enabled in SDRAM. Signed-off-by: Stefan Roese <sr@denx.de>
2010-11-19Merge branch 'master' of git://git.denx.de/u-boot-i2cWolfgang Denk
2010-11-17Switch from archive libraries to partial linkingSebastien Carlier
Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
2010-11-17post, i2c: add missing curly bracket in i2c_post_testHeiko Schocher
If CONFIG_SYS_POST_I2C_ADDRS is not defined and CONFIG_SYS_POST_I2C is activated, i2c_probe() is not called in the for statement, because missing curly bracket. Signed-off-by: Heiko Schocher <hs@denx.de>
2010-10-29Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOCWolfgang Denk
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-27Coding Style cleanupWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-27post/drivers/i2c.c: fix compile errorWolfgang Denk
Commit 7e263ce "post/i2c: Clean up detection logic" added a "const" qualifier to the declaration of i2c_addr_list[], missing the fact that the list gets modified later in the code, which results in build errors like these: i2c.c: In function 'i2c_post_test': i2c.c:88: error: assignment of read-only location Remove the incorrect "const". Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
2010-10-22post/i2c: Add ability to ignore I2C devicesPeter Tyser
Add the ability to not report an I2C POST error for a set of given I2C addresses on bootup. This is useful for cases when a device may or may not be present, and neither case is considered an error. For example: - Some form factors such as XMC and Compact PCI Express have an I2C EEPROM whose address changes based on geographical address. Eg installed in one slot its EEPROM address is, 0x50, in another its 0x51, etc. This allows multiple devices to have their EEPROMs present on the same I2C bus. Thus the I2C devices present for an XMC or CPCIe card depend on if and where other cards are installed in the same system. - Some cards have optional I2C devices. Eg one hardware build configuration has different I2C devices than another and software can't determine if the optional device should be present or not. - Some cards have optional daughtercards with I2C devices on them. - I2C EEPROMs address range depends on their size. Its possible to support differently size EEPROMs by only probing the EEPROM's base address and ignoring the other addresses that are impacted by its size. A new CONFIG_SYS_POST_I2C_IGNORES define has been added which specifies a list of I2C addresses for the I2C POST to ignore. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-22post/i2c: Rename I2C_ADDR_LIST to CONFIG_SYS_POST_I2C_ADDRSPeter Tyser
Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-22post/i2c: Don't probe address 0Peter Tyser
According to the I2C specification device address 0 is the "general call address", ie a broadcast address. The I2C specification states that the format of a general call uses at least 2 bytes, which U-Boot's probing routine does not adhere to. Not probing device address 0 will prevent possible issues with devices that accept general calls. Additionally, this change shouldn't reduce POST coverage since each I2C device should still be accessed via its own, unique address. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-22post/i2c: Clean up detection logicPeter Tyser
The logic previously used in the I2C post was a bit convoluted. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-22post/i2c: General clean upPeter Tyser
- Clean up ifdeffery - Update coding style No functional change should have occurred. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20ppc4xx/POST: Add board specific UART POST test to lwmon5Stefan Roese
Add CONFIG_POST_UART to implement a board specific UART POST test. This is done since lwmon5 needs to set POST_ALWAYS to run this test on each reboot. And we don't want to change the default behavious of this this. Signed-off-by: Stefan Roese <sr@denx.de>