summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: mxs: Get boot mode from OCRAMJörg Krause2015-04-221-23/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Reading the boot mode pins after power-up does not necessarily represent the boot mode used by the ROM loader. For example the state of a pin may have changed because a recovery switch which was pressed to enter USB mode is already released after plugging in USB. The ROM loader stores the value a fixed address in OCRAM. Use this value instead of reading the boot map pins. The GLOBAL_BOOT_MODE_ADDR for i.MX28 is taken from an U-Boot patch for the MX28EVK: http://repository.timesys.com/buildsources/u/u-boot/u-boot-2009.08/u-boot-2009.08-mx28-201012211513.patch Leave the boot mode detection for the i.MX23 untouched. Someone has to test whether the i.MX ROM loader does also store the boot mode in OCRAM and if the address match. This patch superseeds my incorrect patch: ARM: mxs: get boot mode from OTP http://patchwork.ozlabs.org/patch/454930/ Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> Cc: Stefano Babic <sbabic@denx.de>
* arm: mxs: Add 'Wait for JTAG user' if booted in JTAG modeGraeme Russ2015-02-101-0/+5
| | | | | | | | | | | When booting in JTAG mode, there is no way to use soft break-points, and no way of knowing when SPL has finished executing (so the user can issue a 'halt' command to load u-boot.bin for example) Add a debug output and simple loop to stop execution at the completion of the SPL initialisation as a pseudo break-point when booting in JTAG mode Signed-off-by: Graeme Russ <gruss@tss-engineering.com>
* arm: mxs: Add debug outputs and comments to mxs SPL source filesGraeme Russ2015-02-101-0/+1
| | | | | | | | | | | | | It is difficult to track down fail to boot issues in the mxs SPL. Implement the following to make it easier: - Add debug outputs to allow tracing of SPL progress in order to track where failure to boot occurs. DEUBUG and CONFIG_SPL_SERIAL_SUPPORT must be defined to enable debug output in SPL - Add TODO comments where it is not clear if the code is doing what it is meant to be doing, even tough the board boots properly (these comments refer to existing code, not to any code added by this patch) Signed-off-by: Graeme Russ <gruss@tss-engineering.com>
* cppcheck cleanup: fix nullPointer errorsWolfgang Denk2014-11-071-0/+2
| | | | | | | | | | | There are a number of places where U-Boot intentionally and legally accesses physical address 0x0000, for example when installing exception vectors on systems where these are located in low memory. Add "cppcheck-suppress nullPointer" comments to silence cppcheck where this is intentional and legal. Signed-off-by: Wolfgang Denk <wd@denx.de>
* mxs: fix warning in SPL with console supportStefano Babic2014-04-021-0/+2
| | | | Signed-off-by: Stefano Babic <sbabic@denx.de>
* arm: mxs: Add serial console support into SPLMarek Vasut2014-04-011-1/+14
| | | | | | | | | | | | | | | Add support for serial console into the i.MX23/i.MX28 SPL. A full, uncrippled serial console support comes very helpful when debugging various spectacular hardware bringup issues early in the process. Because we do not use SPL framework, but have our own minimalistic SPL, which is compatible with the i.MX23/i.MX28 BootROM, we do not use preloader_console_init(), but instead use a similar function to start the console. Nonetheless, to avoid blowing up the size of the SPL binary, this support is enabled only if CONFIG_SPL_SERIAL_SUPPORT is defined, which is disabled by default. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
* arm: mxs: Properly set GD pointer in SPLMarek Vasut2014-04-011-0/+5
| | | | | | | | Set the GD pointer in the SPL to a defined symbol so various functions from U-Boot can be used without adverse side effects. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
* arm: mxs: Adjust the load address of U-Boot and SPL for HABMarek Vasut2014-03-311-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | When using HAB, there are additional special requirements on the placement of U-Boot and the U-Boot SPL in memory. To fullfill these, this patch moves the U-Boot binary a little further from the begining of the DRAM, so the HAB CST and IVT can be placed in front of the U-Boot binary. This is necessary, since both the U-Boot and the IVT must be contained in single CST signature. To make things worse, the IVT must be concatenated with one more entry at it's end, that is the length of the entire CST signature, IVT and U-Boot binary in memory. By placing the blocks in this order -- CST, IVT, U-Boot, we can easily align them all and then produce the length field as needed. As for the SPL, on i.MX23/i.MX28, the SPL size is limited to 32 KiB, thus we place the IVT at 0x8000 offset, CST right past IVT and claim the size is correct. The HAB library accepts this setup. Finally, to make sure the vectoring in SPL still works even after moving the SPL from 0x0 to 0x1000, we add a small function which copies the vectoring code and tables to 0x0. This is fine, since the vectoring code is position independent. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
* ARM: mxs: Receive r0 and r1 passed from BootROMMarek Vasut2013-09-101-2/+3
| | | | | | | | | | | | | | | | | Make sure value in register r0 and r1 is preserved and passed to the board_init_ll() and mxs_common_spl_init() where it can be processed further. The value in r0 can be configured during the BootStream generation to arbitary value, r1 contains pointer to return value from CALL'd function. This patch also clears the value in r0 before returning to BootROM to make sure the BootROM is not confused by this value. Finally, this patch cleans up some comments in the start.S file. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Stefano Babic <sbabic@denx.de>
* 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>
* lib: consolidate hang()Andreas Bießmann2013-05-011-7/+0
| | | | | | | | | Delete all occurrences of hang() and provide a generic function. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net> [trini: Modify check around puts() in hang.c slightly] Signed-off-by: Tom Rini <trini@ti.com>
* mx23: SPL: Add boot mode supportOtavio Salvador2013-01-211-0/+25
| | | | | | | | | This adds the boot mode support for i.MX23 processors. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
* mxs: Staticize SPL functionsMarek Vasut2012-12-041-2/+2
| | | | | | | | | The MXS SPL didn't mark local functions "static". Fix it. This also makes the SPL smaller by roughly 300 bytes. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com>
* serial: mxs: spl: Remove empty serial_* functions from SPL codeMarek Vasut2012-10-151-4/+0
| | | | | | | | | | | | Remove the empty bodies from serial_* functions from MXS SPL code. These empty implementations are now in common/serial.c instead so declaring them also in the SPL code would cause a colision once serial multi is enabled unconditionally. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com> Cc: Stefano Babic <sbabic@denx.de>
* MX28: Fixup the ad-hoc use of DIGCTL_MICROSECONDSMarek Vasut2012-09-041-3/+5
| | | | | | | | | | Use proper struct-based access for this register in the SPL code. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <festevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
* mxs: Convert sys_proto.h prefixes to 'mxs'Otavio Salvador2012-09-011-3/+3
| | | | | | | The sys_proto.h functions (except the boot modes) are compatible with i.MX233 and i.MX28 so we use 'mxs' prefix for its methods. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
* mxs: Remove not required explicit iomux-mx28.h includeOtavio Salvador2012-09-011-1/+0
| | | | | | | | The iomux header is included on sys_proto.h so to avoid SoC specific header inclusion. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Acked-by: Marek Vasut <marex@denx.de>
* mxs: Reowork SPL to use 'mxs' prefix for methodsOtavio Salvador2012-09-011-10/+10
| | | | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
* mxs: reorganize source directory for easy sharing of code in i.MXS SoCsOtavio Salvador2012-09-011-0/+135
Most code can be shared between i.MX23 and i.MX28 as both are from i.MXS family; this source directory structure makes easy to share code among them. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Acked-by: Stefano Babic <sbabic@denx.de>
OpenPOWER on IntegriCloud