summaryrefslogtreecommitdiffstats
path: root/common/spl
Commit message (Collapse)AuthorAgeFilesLines
* env: Drop environment.h header file where not neededSimon Glass2019-08-111-1/+0
| | | | | | | | This header file is now only used by files that access internal environment features. Drop it from various places where it is not needed. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Move get/set_default_env() to env.hSimon Glass2019-08-111-1/+1
| | | | | | | | Move these functions to the new header file and rename set_default_env() to env_set_default() so that it has a consistent env_ prefix. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Move env_get() to env.hSimon Glass2019-08-112-0/+2
| | | | | | | Move env_get() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Move env_set() to env.hSimon Glass2019-08-111-0/+1
| | | | | | | Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Move env_init() to env.hSimon Glass2019-08-111-0/+1
| | | | | | | Move env_init() over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* common: Move gzip functions into a new gzip headerSimon Glass2019-08-112-0/+2
| | | | | | | | | As part of the effort to remove things from common.h, create a new header for the gzip functions. Move the function declarations to it and add missing documentation. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* spl: implement stack usage checkSimon Goldschmidt2019-08-112-0/+44
| | | | | | | | | | | | | | | | | | | | | This implements a stack usage check in SPL. Many boards start up SPL to run code + data from one common, rather small SRAM. To implement a sophisticated SPL binary size limit on such boards, the stack size (as well as malloc size and global data size) must be subtracted from this SRAM size. However, to do that properly, the stack size first needs to be known. This patch adds a new Kconfig option: - SPL_SYS_REPORT_STACK_F_USAGE: memset(0xaa) the whole area of the stack very early and check stack usage based on this constant later before the stack is switched to DRAM Initializing the stack and checking it is implemented in weak functions, in case a board does not use the stack as saved in gd->start_addr_sp. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* Merge tag 'u-boot-imx-20190719' of ↵Tom Rini2019-07-272-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20190719 - CCF for i.MX6 - nandbcb command to write SPL into NAND - Switch to DM (i.MX28) - Boards: Toradex, engicam, DH - Fixes for i.MX8 - Fixes for i.MX7ULP Travis: https://travis-ci.org/sbabic/u-boot-imx/builds/561147504
| * watchdog: Split WDT from SPL_WDTMarek Vasut2019-07-192-1/+2
| | | | | | | | | | | | | | | | | | | | | | Use CONFIG_IS_ENABLED(WDT) to permit use of WDT in SPL without DM, while the full U-Boot can use rich DM/DT WDT driver. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Peng Fan <Peng.Fan@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Suniel Mahesh <sunil.m@techveda.org>
* | spl: sata: support U-Boot load from raw sata diskBaruch Siach2019-07-242-0/+48
|/ | | | | | | Support load of the U-Boot image from raw SATA disk sector. This is equivalent to load from MMC raw sector. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
* spl: Make image loader infrastructure more universalAndreas Dannenberg2019-07-172-25/+65
| | | | | | | | | | | | | | | | | | | | | | | | | The current U-Boot SPL image loader infrastructure is very powerful, able to initialize and load from a variety of boot media however it is strongly geared towards loading specific types of images in a very specific way. To address the need being able to use this infrastructure to load arbitrary image files go ahead and refactor it as follows: - Refactor existing spl_mmc_load_image function into superset function, accepting additional arguments such as filenames and media load offset (same concept can also be applied toother spl_XXX_load_image functions) - Extend the loader function to "remember" their peripheral initialization status so that the init is only done once during the boot process, - Extend the FIT image loading function to allow skipping the parsing/ processing of the FIT contents (so that this can be done separately in a more customized fashion) - Populate the SPL_LOAD_IMAGE_METHOD() list with a trampoline function, invoking the newly refactored superset functions in a way to maintain compatibility with the existing behavior This refactoring initially covers MMC/SD card loading (RAW and FS-based). Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: Allow performing BSS init early before board_init_f()Andreas Dannenberg2019-07-171-0/+10
| | | | | | | | | | | | | | | On some platform we have sufficient memory available early on to allow setting up and using a basic BSS prior to entering board_init_f(). Doing so can for example be used to carry state over to board_init_r() without having to resort to extending U-Boot's global data structure. To support such scenarios add a Kconfig option called CONFIG_SPL_EARLY_BSS to allow moving the initialization of BSS prior to entering board_init_f(), if enabled. Note that using this option usually should go along with using CONFIG_SPL_SEPARATE_BSS and configuring BSS to be located in memory actually available prior to board_init_f(). Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
* sunxi: move CONFIG_SPL_TEXT_BASE from *_defconfig to KconfigAndre Przywara2019-07-151-0/+3
| | | | | | | | | | | | | | The choice of the SPL_TEXT_BASE is not really a decision that should be specified by each board's defconfig, as this setting is actually dictated by the SoC's memory map and the BootROM behaviour. To make this obvious and reduce the clutter in the defconfig files, let's specify the SoC constraints in the Kconfig stanza. This allows us to remove these lines from the defconfig files again. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
* spl: Move SPL_MMC_TINY option to appear under SPL menuEzequiel Garcia2019-07-131-0/+17
| | | | | | | | The SPL_MMC_TINY implements feature-reduced MMC support on SPL, and as such, it's more consistent and convenient to find it as part of the SPL configuration. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
* Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini2019-07-111-3/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | - SPL SATA enhancements to allow booting from RAW SATA device needed for Clearfog (Baruch) - Enable SATA booting on Clearfog (Baruch) - Misc changes to Turris Omnia (Marek) - Enable CMD_BOOTZ and increase SYS_BOOTM_LEN on crs305-1g-4s (Luka) - Enable FIT support for db-xc3-24g4xg (Chris) - Enable DM_SPI on Keymile Kirkwood board with necessary changes for this (Pascal) - Set 38x and 39x AVS on lower frequency (Baruch)
| * spl: sata: don't force FS_FAT supportBaruch Siach2019-07-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | Allow the code to build when FS_FAT is not enabled, and thus spl_load_image_fat() is not provided. A subsequent patch should add alternative raw access U-Boot main image load method. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
| * spl: sata: fix build with DM_SCSIBaruch Siach2019-07-111-1/+3
| | | | | | | | | | | | | | | | | | The init_sata() routine is only present when DM_SCSI is not enabled. Don't call init_sata() when DM_SCSI is enabled. The code will fall back to scsi_scan() in this case. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
| * spl: sata: add default partition and image nameBaruch Siach2019-07-111-0/+8
| | | | | | | | | | | | | | | | | | Add sensible defaults for the FAT partition selection and the main U-Boot image file name. This allows spl_sata to build when the board headers does not select them explicitly. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
* | SPL: Default to disabling legacy image support when using FITTom Rini2019-07-111-1/+1
| | | | | | | | | | | | | | | | When we have a FIT image being used by SPL by default that means the most common case is that we'll never run into a legacy image. Disable legacy image support by default in that case to reclaim space. Signed-off-by: Tom Rini <trini@konsulko.com>
* | spl: Fix typo in kernel docMiquel Raynal2019-07-111-1/+1
|/ | | | | | | Fix a tiny typo in boot_from_devices() kernel doc. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de>
* ubispl: introduce separate CONFIG_UBI_SPL_SILENCE_MSGMarkus Klotzbuecher2019-07-091-0/+6
| | | | | | | | This allows to silence ubi and ubispl individually. Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Reviewed-by: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org>
* ubispl: add support for loading volumes by nameHamish Guthrie2019-07-092-0/+20
| | | | | | | | | | | | | | | | | | | | | | | The motivation is to use the UBI atomic volume rename functionality to allow double copy software updates on UBI. To that end the SPL is configured to always load the same volume name (e.g. "u-boot"), whereas a software updater always installs into the secondary volume "u-boot_r". After successful installation, these two volume names are switched. This extension is protected by #ifdefs as it will somewhat slow down loading of volumes by id. This is because the code needs to disable the optimization of ignoring all volume ids which are not to-be-loaded, since these can only be resolved after attaching. This adds two vtbl related functions from Linux, which are taken from the same kernel version as the current main U-Boot UBI code (Linux 4.2 64291f7db5bd8). Signed-off-by: Hamish Guthrie <hamish.guthrie@kistler.com> Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Reviewed-by: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org>
* ubispl: migrate configuration to KconfigMarkus Klotzbuecher2019-07-091-0/+79
| | | | | | | | | | | Move the ubispl configuration to KConfig and drop them from the whitelist. Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Cc: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org> Cc: Javier Martínez Canillas <javier@dowhile0.org> Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
* spl: atf: Fix uninitialized pointer to bl31_image_infoFrieder Schrempf2019-07-021-0/+1
| | | | | | | | | | | The pointer to struct atf_image_info in bl31_params_mem.bl31_params.bl31_image_info is not initialized before being dereferenced. This can cause U-Boot to crash right before jumping to the BL31 ATF binary. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Fixes: bcc1726a7bdd ("spl: add support to booting with ATF") Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* Merge tag 'u-boot-imx-20190628' of ↵Tom Rini2019-06-281-4/+8
|\ | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-imx Fixes for 2019.07 - menlo board - allow SDB on Sabre - HAB for mx6sl - apalis board
| * usb: gadget: f_sdp: Allow SPL to load and boot FIT via SDPFrieder Schrempf2019-06-271-4/+8
| | | | | | | | | | | | | | | | | | | | | | Add support for loading u-boot FIT images over the USB SDP protocol in the SPL Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> [Various build fixes] Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Tested-by: Fabio Estevam <festevam@gmail.com> Tested-by: Lukasz Majewski <lukma@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2019-06-172-2/+6
|\ \ | |/ |/| | | - Assorted gadget fixes
| * usb: gadget: error out if g_dnl registration failsSjoerd Simons2019-06-141-1/+5
| | | | | | | | | | | | | | If g_dnl_register fails return an error rather then stubornly continuing onwards. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
| * spl: dfu: Fix printed variable nameMarek Vasut2019-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | The SPL DFU uses dfu_alt_info_N variable name to determine the DFU configuration, where N is the name of the media (e.g. ram). It does not use the plain dfu_alt_info. Print the name of the missing env variable in case of a failure instead of printing dfu_alt_info, which is just the name of the parameter passed to spl_dfu_cmd(). Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com>
* | configs: Migrate the various SPL_BOOT_xxx choices for PowerPCTom Rini2019-06-141-0/+20
|/ | | | | | | | The non-CONFIG_SPL_FRAMEWORK SPL used on some PowerPC platforms have a choice between CONFIG_SPL_NAND_BOOT, CONFIG_SPL_MMC_BOOT and CONFIG_SPL_SPI_BOOT. Migrate this to Kconfig Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge tag 'u-boot-imx-20190612' of git://git.denx.de/u-boot-imxTom Rini2019-06-111-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | u-boot-imx-20190612 -------------------- - Board fixes: - imx6logic - wandboard - mx6sabre boots again - imx8qm_mek - pico-* boards - Toradex apalis / colibri - engicam imx6 (environment) - KP MX53 - opos6ul - Switch to DM: - vining2000 - dh MX6 - Toradex colibri i.MX7 - Novena - Security : fix CSF size for HAB - Other: - imx: fix building for i.mx8 without spl - pcie and switch to DM mx6sabreauto: Enable SPL SDP support
| * spl: imx6: Provide a SPL_SIZE_LIMIT defaultFabio Estevam2019-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | As explained in include/configs/imx6_spl.h. the i.MX6 SPL size limit is 68KB (4KB header + 64KB max size). Provide such limit for all i.MX6 boards that use SPL to detect SPL size overflow in build time. Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
* | Merge tag 'u-boot-atmel-fixes-2019.07-a' of git://git.denx.de/u-boot-atmelTom Rini2019-06-101-0/+12
|\ \ | |/ |/| | | First set of u-boot-atmel fixes for 2019.07 cycle
| * spl: at91: add support for SPL_AT91_MCK_BYPASSEugen Hristev2019-06-061-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default the configuration of the PMC is to have an external crystal connected that requires driving on both XIN and XOUT pins. The bypass configuration means that only XIN will be used, the SoC will not do any driving, and the XIN needs to be provided with a proper signal. This is the MOSCXTBY bit in the PMC main clock generator register. The SPL needs to properly initialize the PMC registers before switching to external clock signal and raising the clock to the cruise speed. Also created Kconfig for this specific configuration. By default this is disabled. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
* | spl: Correct SPL_SIZE_LIMIT Kconfig optionTom Rini2019-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | When introduced this limit was an int but was then changed to hex without noting as much in the prompt nor changing existing users. Put this back to an int. Reported-by: Fabio Estevam <festevam@gmail.com> Tested-by: Fabio Estevam <festevam@gmail.com> Fixes: 2577015dc5c4 ("spl: add overall SPL size check") Signed-off-by: Tom Rini <trini@konsulko.com>
* | spl: add overall SPL size checkSimon Goldschmidt2019-06-071-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds a size check for SPL that can dynamically check generated SPL binaries (including devicetree) for a size limit that ensures this image plus global data, heap and stack fit in initial SRAM. Since some of these sizes are not available to make, a new host tool 'spl_size_limit' is added that dumps the resulting maximum size for an SPL binary to stdout. This tool is used in toplevel Makefile to implement the size check on SPL binaries. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* | spl: Set spl_image->fdt_addr pointer for full fitImage configurationMarek Vasut2019-05-181-1/+3
| | | | | | | | | | | | | | | | | | Set the spl_image->fdt_addr pointer both for simple fitImage configuration as well as full fitImage configuration, to let spl_perform_fixups() access the DT and perform modifications to it if necessary. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com>
* | Fix spelling of available.Vagrant Cascadian2019-05-091-1/+1
| | | | | | | | Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
* | spl: fit: Always enable tracking of os-type if SPL_OS_BOOT is enabledJean-Jacques Hiblot2019-05-051-1/+1
|/ | | | | | | | | | | | | | FIT_IMAGE_TINY is used to reduce the size of the SPL by removing os-type tracking and recording the loadables into the loaded FDT. When this option is enabled, it is assumed that the next stage firmware is u-boot. However this does not play well with the SPL_OS_BOOT option that enables loading different type of next stage firmware, like the OS itself. When SPL_OS_BOOT is used, do not disable os-tracking. The added footprint is about 300 Bytes. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
* configs: move CONFIG_SPL_TEXT_BASE to KconfigSimon Goldschmidt2019-04-291-0/+7
| | | | | | | | | Moved CONFIG_SPL_TEXT_BASE to common/spl/Kconfig and migrate existing values. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> [trini: Re-run migration] Signed-off-by: Tom Rini <trini@konsulko.com>
* watchdog: Implement generic watchdog_reset() versionStefan Roese2019-04-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch tries to implement a generic watchdog_reset() function that can be used by all boards that want to service the watchdog device in U-Boot. This watchdog servicing is enabled via CONFIG_WATCHDOG. Without this approach, new boards or platforms needed to implement a board specific version of this functionality, mostly copy'ing the same code over and over again into their board or platforms code base. With this new generic function, the scattered other functions are now removed to be replaced by the generic one. The new version also enables the configuration of the watchdog timeout via the DT "timeout-sec" property (if enabled via CONFIG_OF_CONTROL). This patch also adds a new flag to the GD flags, to flag that the watchdog is ready to use and adds the pointer to the watchdog device to the GD. This enables us to remove the global "watchdog_dev" variable, which was prone to cause problems because of its potentially very early use in watchdog_reset(), even before the BSS is cleared. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: "Marek Behún" <marek.behun@nic.cz> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Maxim Sloyko <maxims@google.com> Cc: Erik van Luijk <evanluijk@interact.nl> Cc: Ryder Lee <ryder.lee@mediatek.com> Cc: Weijie Gao <weijie.gao@mediatek.com> Cc: Simon Glass <sjg@chromium.org> Cc: "Álvaro Fernández Rojas" <noltari@gmail.com> Cc: Philippe Reynes <philippe.reynes@softathome.com> Cc: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu100)
* spl: spl_nand.c: Add NAND loading messageStefan Roese2019-04-231-0/+4
| | | | | | | | | | | | | | | | | This patch adds a short message to the SPL NAND loader, which displays the source and destinations addresses including the size of the loaded image, like this: U-Boot SPL 2019.04-rc3-00113-g486efd8aaf (Mar 15 2019 - 14:18:02 +0100) Trying to boot from NAND Loading U-Boot from 0x00040000 (size 0x000a0000) to 0x22900000 I find this message quite helpful - hopefully others do so as well. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: ymodem: Add support for loading full fitImagesMarek Vasut2019-04-221-1/+19
| | | | | | | | | Add support for loading fully featured fitImages over YModem in SPL. This is useful when various advanced features of full fitImages are needed in SPL. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com>
* dm: spi: Read default speed and mode values from DTPatrick Delaunay2019-04-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch update the behavior introduced by commit 96907c0fe50a ("dm: spi: Read default speed and mode values from DT") In case of DT boot, don't read default speed and mode for SPI from CONFIG_* but instead read from DT node. This will make sure that boards with multiple SPI/QSPI controllers can be probed at different bus frequencies and SPI modes. Remove also use in boards of the value speed=0 (no more supported) for ENV in SPI by using CONFIG_ENV_SPI_MAX_HZ=0. DT values will be always used when available (full DM support of SPI slave with available DT node) even if speed and mode are requested; for example in splash screen support (in splash_sf_read_raw) or in SPL boot (in spl_spi_load_image). The caller of spi_get_bus_and_cs() no more need to force speed=0. But the current behavior don't change if the SPI slave is not present (device with generic driver is created automatically) or if platdata is used (CONFIG_OF_PLATDATA). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Jagan Teki <jagan@amarulasolutions.com>
* spl: ymodem: Move GZ handling out of YModem sessionMarek Vasut2019-04-091-13/+15
| | | | | | | | | | In case the gunzip() call fails, it will print an error message. If that happens within the YModem session, the error message will not be displayed and would be useless. Move the gunzip() call out of the YModem session to make those possible error messages visible. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com>
* spl: ymodem: Terminate YModem session on errorMarek Vasut2019-04-091-2/+3
| | | | | | | | In case spl_parse_image_header() errors out, terminate the YModem session, otherwise we won't get any further output. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com>
* common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabledAbel Vesa2019-03-221-0/+4
| | | | | | | | If FIT_IMAGE_TINY is enabled, spl_fit_image_get_os returns -ENOTSUPP. In this case, we should default to IH_OS_U_BOOT not to IH_OS_INVALID. Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Tested-by: Fabio Estevam <festevam@gmail.com>
* spl: add debug print for early malloc usageSimon Goldschmidt2019-02-281-0/+2
| | | | | | | | To find out how big the early malloc heap must be in SPL, add a debug print statement that dumps its usage before switching to relocated heap in spl_relocate_stack_gd() via CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* spl: implement CRC check on U-Boot uImageSimon Goldschmidt2019-02-192-7/+45
| | | | | | | | | | | | | | | | | SPL currently does not check uImage CRCs when loading U-Boot. This patch adds checking the uImage CRC when SPL loads U-Boot. It does this by reusing the existing config option SPL_CRC32_SUPPORT to allow leaving out the CRC check on boards where the additional code size or boot time is a problem (adding the CRC check currently adds ~1.4 kByte to flash). The SPL_CRC32_SUPPORT config option now gets enabled by default if SPL support for legacy images is enabled to check the CRC on all boards that don't actively take countermeasures. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* usb: Rename SPL_USB_SUPPORT to SPL_USB_STORAGEAbel Vesa2019-02-153-7/+3
| | | | | | | | | | | | Since there is the SPL_USB_HOST_SUPPORT for enabling USB support in SPL, makes more sense to rename the SPL_USB_SUPPORT as SPL_USB_STORAGE. Everything that is not part of the usb storage support in SPL is now build under SPL_USB_HOST_SUPPORT. Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>