summaryrefslogtreecommitdiff
path: root/post
Commit message (Collapse)AuthorAgeLines
* arm, post: add missing post_time_ms for armHeiko Schocher2011-10-27-1/+1
| | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
* cosmetic, post: Codingstyle cleanupHeiko Schocher2011-10-27-68/+59
| | | | Signed-off-by: Heiko Schocher <hs@denx.de>
* arm, post, memory: fix bug if sdram base != 0x00000000Heiko Schocher2011-10-23-3/+4
| | | | | | | | | | 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>
* POST: add new memory regions testValentin Longchamp2011-10-05-19/+72
| | | | | | | | | | | | | | | 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>
* POST: drivers/memory.c coding style cleanupValentin Longchamp2011-10-05-56/+57
| | | | | | | 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>
* POST: make env test flags fetching optionalValentin Longchamp2011-10-05-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-05-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>
* Blackfin: post: generalize led/button tests with GPIOsMike Frysinger2011-09-29-0/+2
| | | | | | Make it easy for any Blackfin board to enable led/push button tests. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* post, memorytest: add support for none powerpc archsHeiko Schocher2011-07-27-2/+6
| | | | | | | | | | 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>
* post, memorytest: fix if vstart is not = 0x0Heiko Schocher2011-07-27-2/+3
| | | | Signed-off-by: Heiko Schocher <hs@denx.de>
* post: fix indendation/brace confusionJames Kosin2011-07-26-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: new nor flash testMike Frysinger2011-07-26-2/+122
| | | | | | | | 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>
* post: use ARRAY_SIZEMike Frysinger2011-07-26-52/+28
| | | | | | | 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-26-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>
* powerpc: Fix FPU post related link warningsKumar Gala2011-01-25-16/+16
| | | | | | | | | | | | | | | | | | | | | | 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>
* ppc4xx/POST: Change ethernet test loop count to a default of 10Stefan Roese2010-12-17-15/+20
| | | | | | | | | | | | | | | | | | 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>
* ppc4xx/POST: Handle cached SDRAM correctly in Denali (440EPx) ECC POSTStefan Roese2010-11-28-0/+4
| | | | | | | | | | | 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>
* Merge branch 'master' of git://git.denx.de/u-boot-i2cWolfgang Denk2010-11-19-1/+2
|\
| * post, i2c: add missing curly bracket in i2c_post_testHeiko Schocher2010-11-17-1/+2
| | | | | | | | | | | | | | | | 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>
* | Switch from archive libraries to partial linkingSebastien Carlier2010-11-17-22/+20
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOCWolfgang Denk2010-10-29-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>
* Coding Style cleanupWolfgang Denk2010-10-27-2/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* post/drivers/i2c.c: fix compile errorWolfgang Denk2010-10-27-1/+1
| | | | | | | | | | | | | | | | | 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>
* post/i2c: Add ability to ignore I2C devicesPeter Tyser2010-10-22-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* post/i2c: Rename I2C_ADDR_LIST to CONFIG_SYS_POST_I2C_ADDRSPeter Tyser2010-10-22-4/+4
| | | | | | | 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>
* post/i2c: Don't probe address 0Peter Tyser2010-10-22-2/+4
| | | | | | | | | | | | | | | | | 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>
* post/i2c: Clean up detection logicPeter Tyser2010-10-22-16/+13
| | | | | | | | | 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>
* post/i2c: General clean upPeter Tyser2010-10-22-25/+23
| | | | | | | | | | | | - 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>
* ppc4xx/POST: Add board specific UART POST test to lwmon5Stefan Roese2010-10-20-0/+4
| | | | | | | | | 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>
* Expand POST memory test to support arch-depended implementation.York Sun2010-10-19-16/+52
| | | | | | | | | | | | | Add weak functions to enable architecture depended preparation, address advancing, cleaning up and error handling. These weak functions provides the framwork to implemente arch/platform dependent code for initializing/maintenance/restore the start address, size, physical address as well as memory mapping before/between/after memory test. arch_memory_failure_handle can also be implemented in case more care is needed for arch/platform. Signed-off-by: York Sun <yorksun@freescale.com>
* ppc4xx: Use common ns16550 functions in 4xx UART POST driverStefan Roese2010-10-04-280/+22
| | | | | | | | | | | | | | | | | This patch changes the PPC4xx POST UART driver to use the common NS16550 functions for receiving and sending. Additionally the local function for SoC divisor setup are removed. Instead the functions from arch/powerpc/cpu/ppc4xx/4xx_uart.c are used. This removes code duplication. Also the common CONFIG_SYS_NS16550_COMx defines are now used to describe the POST UART's. And a compile breakage is fixed, introduced by a git merge of the ppc4xx/next branch into master. Now "ppc4xx.h" is moved to "asm/ppc4xx.h". Fixed as well with this patch. Signed-off-by: Stefan Roese <sr@denx.de>
* ppc4xx: Big lwmon5 board support rework/updateSascha Laue2010-10-04-145/+727
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch brings the lwmon5 board support up-to-date. Here a summary of the changes: lwmon5 board port related: - GPIO's changed to control the LSB transmitter - Reset USB PHY's upon power-up - Enable CAN upon power-up - USB init error workaround (errata CHIP_6) - EBC: Enable burstmode and modify the timings for the GDC memory - EBC: Speed up NOR flash timings lwmon5 board POST related: - Add FPGA memory test - Add GDC memory test - DSP POST reworked - SYSMON POST: Fix handling of negative temperatures - Add output for sysmon1 POST - HW-watchdog min. time test reworked Additionally some coding-style changes were done. Signed-off-by: Sascha Laue <sascha.laue@liebherr.com> Signed-off-by: Stefan Roese <sr@denx.de>
* Merge branch 'next' of /home/wd/git/u-boot/nextWolfgang Denk2010-09-28-5/+5
|\ | | | | | | | | | | | | Conflicts: include/ppc4xx.h Signed-off-by: Wolfgang Denk <wd@denx.de>
| * ppc4xx: Move gpio.h to ppc4xx-gpio.h since its ppc4xx specificStefan Roese2010-09-23-1/+1
| | | | | | | | Signed-off-by: Stefan Roese <sr@denx.de>
| * ppc4xx: Move ppc4xx headers to powerpc include directoryStefan Roese2010-09-23-4/+4
| | | | | | | | | | | | | | | | | | This patch moves some ppc4xx related headers from the common include directory (include/) to the powerpc specific one (arch/powerpc/include/asm/). This way to common include directory is not so cluttered with files. Signed-off-by: Stefan Roese <sr@denx.de>
* | ppc4xx: POST UART: Use in/out_8() io-accessor functionsStefan Roese2010-09-23-64/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a problem in the PPC4xx POST UART driver. This driver incorrectly used the in/out8() io-accessor functions. This could lead to problems since these functions don't guarantee execution ordering. This patch now replaces these functions with the correct ones. Additionally the driver is converted to using the NS16550 struct instead of macros for the register offsets. And some common code is factored out for better maintainability. Signed-off-by: Stefan Roese <sr@denx.de>
* | POST cleanup.Michael Zaidman2010-09-21-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | - Revives POST for blackfin arch; - Removes redundant code: arch/blackfin/lib/post.c arch/powerpc/cpu/ppc4xx/commproc.c arch/powerpc/cpu/mpc512x/common.c - fixes up the post_word_{load|store} usage. Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com> Acked-by: Detlev Zundel <dzu@denx.de> Tested-by: Anatolij Gustschin <agust@denx.de> List of the maintainers of the affected by patch boards: Cc: Stephan Linz <linz@li-pro.net> Cc: Denis Peter <d.peter@mpl.ch> Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Stefan Roese <sr@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Niklaus Giger <niklaus.giger@netstal.com> Cc: Larry Johnson <lrj@acm.org> Cc: Feng Kan <fkan@amcc.com>
* Rename getenv_r() into getenv_f()Wolfgang Denk2010-08-04-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: Added ECC memory test for mpc83xx.Michael Zaidman2010-05-06-0/+196
| | | | | | | Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com> Fixed minor coding style issue. Signed-off-by: Wolfgang Denk <wd@denx.de>
* mpc5121: pdm360ng: add coprocessor POSTAnatolij Gustschin2010-04-24-0/+139
| | | | | | Adds coprocessor communication POST code Signed-off-by: Anatolij Gustschin <agust@denx.de>
* Move arch/ppc to arch/powerpcStefan Roese2010-04-21-3/+3
| | | | | | | | | | | | | | | | | As discussed on the list, move "arch/ppc" to "arch/powerpc" to better match the Linux directory structure. Please note that this patch also changes the "ppc" target in MAKEALL to "powerpc" to match this new infrastructure. But "ppc" is kept as an alias for now, to not break compatibility with scripts using this name. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de> Acked-by: Kim Phillips <kim.phillips@freescale.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Anatolij Gustschin <agust@denx.de>
* ppc: Move cpu/$CPU to arch/ppc/cpu/$CPUPeter Tyser2010-04-13-1/+1
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* POST: add progress APIMichael Zaidman2010-03-21-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-07-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>
* Merge branch 'reloc'Wolfgang Denk2009-10-09-32/+4
|\
| * Conditionally perform common relocation fixupsPeter Tyser2009-10-03-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>
| * lwmon, lwmon5: Remove sysmon POST relocation fixupsPeter Tyser2009-10-03-32/+2
| | | | | | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* | ppc_4xx: Apply new HW register namesNiklaus Giger2009-10-07-25/+25
|/ | | | | | | | Modify all existing *.c files to use the new register names as seen in the AMCC manuals. Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org> Signed-off-by: Stefan Roese <sr@denx.de>
* ppc4xx: Big cleanup of PPC4xx definesStefan Roese2009-09-11-36/+36
| | | | | | | | | | | | | | | | This patch cleans up multiple issues of the 4xx register (mostly DCR, SDR, CPR, etc) definitions: - Change lower case defines to upper case (plb4_acr -> PLB4_ACR) - Change the defines to better match the names from the user's manuals (e.g. cprpllc -> CPR0_PLLC) - Removal of some unused defines Please test this patch intensive on your PPC4xx platform. Even though I tried not to break anything and tested successfully on multiple 4xx AMCC platforms, testing on custom platforms is recommended. Signed-off-by: Stefan Roese <sr@denx.de>
* ppc4xx: Replace 4xx lowercase SPR referencesMatthias Fuchs2009-07-24-3/+3
| | | | | Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Signed-off-by: Stefan Roese <sr@denx.de>