summaryrefslogtreecommitdiffstats
path: root/common/spl
Commit message (Collapse)AuthorAgeFilesLines
* Kconfig: Rename CONFIG_SPL_DMA_SUPPORT to CONFIG_SPL_DMAVignesh Raghavendra2020-01-151-1/+1
| | | | | | | | | Rename CONFIG_SPL_DMA_SUPPORT to CONFIG_SPL_DMA. This allows to use macros such as CONFIG_IS_ENABLED() that allow conditional compilation of code for SPL and U-Boot. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* spl: fix entry_point equal to load_addrGiulio Benetti2020-01-141-2/+2
| | | | | | | | | | | | | At the moment entry_point is set to image_get_load(header) that sets it to "load address" instead of "entry point", assuming entry_point is equal to load_addr, but it's not true. Then load_addr is set to "entry_point - header_size", but this is wrong too since load_addr is not an entry point. So use image_get_ep() for entry_point assignment and image_get_load() for load_addr assignment. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
* Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini2020-01-081-0/+6
|\
| * spl: Allow cache drivers to be used in SPLLey Foon Tan2020-01-071-0/+6
| | | | | | | | | | | | | | | | Add an option for building cache drivers in SPL. Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* | spl: fit: Allow the board to tell if more images must be loaded from FITJean-Jacques Hiblot2020-01-071-3/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spl_fit_get_image_name() is used to get the names of the images that the SPL must load from the FIT. It relies on the content of a property present in the FIT. The list of images is thus statically defined in the FIT. With this scheme, it quickly becomes hard to manage combinations of more than a handful of images. To address this problem, give the board driver code the opportunity to add to the list of images. The images from the FIT property are loaded first, and then the board_get_fit_loadable() is called to get more image names. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | spl: fit: constify the output parameter of spl_fit_get_image_name()Jean-Jacques Hiblot2020-01-071-3/+3
| | | | | | | | | | | | | | | | There is no need for it to be non-constant. Making it constant, allows to return constant string without warning. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | spl: fit: be more verbose when an error occurs when applying the overlaysJean-Jacques Hiblot2020-01-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many ways the overlay application can fail. 2 of them are probably the most common: - the application itself failed. Usually this is comes from an unresolved reference - DTBO not available in FIT (could be because of a typo) In both case it is good to be more explicit about the error and at least show which overlay is failing. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | spl: fit: Do not fail immediately if an overlay is not availableJean-Jacques Hiblot2020-01-071-1/+5
| | | | | | | | | | | | | | | | | | If one overlay that must be applied cannot be found in the FIT, the current implementation stops applying the overlays. Let's make it skip only the failing overlay instead. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | spl: fit: allocate a temporary buffer to load the overlaysJean-Jacques Hiblot2020-01-071-5/+29
| | | | | | | | | | | | | | | | | | | | | | If the node describing an overlay does not specify a load address, it will be loaded at the address previously used. Fixing it by allocating a temporary buffer that will be used as a default load address. By default, the size of the buffer is 64kB which should be plenty for most use cases. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | spl: fit: Make room in the FDT before applying overlaysJean-Jacques Hiblot2020-01-071-5/+12
| | | | | | | | | | | | | | | | | | | | | | Make room in the FDT before applying the overlay, otherwise it may fail if the overlay is big. As the exact added size is not known in advance, just add the size of the overlay. Move after the end of the application of the overlays, the resize of the FDT for the injection of the details on the loadables. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | spl: fit: Add support for applying DT overlayMichal Simek2020-01-071-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | doc/uImage.FIT/overlay-fdt-boot.txt is describing how to create FIT image with DT overlays in it. Add support for this feature to SPL. Here is the ZynqMP fragment where dtb points to full DT and dtbo is overlay which should be applied on the top of dtb. config { description = "ATF with full u-boot overlay"; firmware = "atf"; loadables = "uboot"; fdt = "dtb", "dtbo"; }; The whole feature depends on OF_LIBFDT_OVERLAY which is adding +4kB code and 0 for platforms which are not enabling this feature. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | spl: fit: don't load the firmware twiceJean-Jacques Hiblot2020-01-071-0/+10
|/ | | | | | | | | | | | | | | | | | | | | When u-boot.img is a FIT image generated automatically by mkimage, the configuration node has the following structure: conf-1 { description = "k3-am654-base-board"; firmware = "firmware-1"; loadables = "firmware-1"; fdt = "fdt-1"; }; The firmware is referenced twice. Once by the 'firmware' property and once by the 'loadables' property. Currently this result in the firmware being loaded twice. This is not a big problem but has an impact on the boot time. Fixing it by not loading a loadable image if it is also the firmware image. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Andreas Dannenberg <dannenberg@ti.com>
* configs: Enable SPL_FSL_PBL for some LayerScape platformsAlison Wang2019-12-261-2/+6
| | | | | | | | | | | In commit <db4080d56dec>, SPL_FSL_PBL is removed from the configs of some LayerScape platforms. Actually, SPL_FSL_PBL is needed for SD/NAND boot on LS1021A/LS1043A/LS1046A to create boot binary having SPL binary in PBI format concatenated with u-boot binary. SPL_FRAMEWORK is used on these platforms too. Signed-off-by: Alison Wang <alison.wang@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* spl: Add methods to find the position/size of next phaseSimon Glass2019-12-151-0/+20
| | | | | | | | | | | | Binman supports writing the position and size of U-Boot proper and SPL into the previous phase of U-Boot. This allows the next phase to be easily located and loaded. Add functions to return these useful values, along with symbols to allow TPL to load SPL. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* spl: opensbi: wait for ack from secondary harts before entering OpenSBILukas Auer2019-12-101-1/+11
| | | | | | | | | | | | | | | | | | | | | | At the start, OpenSBI relocates itself to its link address. If the link address ranges of U-Boot SPL and OpenSBI overlap, the relocation can lead to code corruption if a hart is still running U-Boot SPL during relocation. To avoid this problem, the main hart is specified as the preferred boot hart to perform the relocation. This fixes the code corruption problems based on the assumption that since the main hart schedules the secondary harts to enter OpenSBI, it will be the last to enter OpenSBI. However it was reported that this assumption is not always correct. To make sure the assumption always holds true, wait for all secondary harts to acknowledge the call-function request before entering OpenSBI on the main hart. Reported-by: Rick Chen <rick@andestech.com> Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Rick Chen <rick@andestech.com> Tested-by: Rick Chen <rick@andestech.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
* riscv: add option to wait for ack from secondary harts in smp functionsLukas Auer2019-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | Add a wait option to smp_call_function() to wait for the secondary harts to acknowledge the call-function request. The request is considered to be acknowledged once each secondary hart has cleared the corresponding IPI. As part of the call-function request, the secondary harts invalidate the instruction cache after clearing the IPI. This adds a delay between acknowledgment (clear IPI) and fulfillment (call function) of the request. We want to use the acknowledgment to be able to judge when the request has been completed. Remove the delay by clearing the IPI after cache invalidation and just before calling the function from the request. Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Rick Chen <rick@andestech.com> Tested-by: Rick Chen <rick@andestech.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
* spl: opensbi: specify main hart as preferred boot hartLukas Auer2019-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSBI uses a relocation lottery to determine the hart to relocate OpenSBI to its link address. In the U-Boot SPL boot flow, the main hart schedules the secondary harts to enter OpenSBI before doing so itself. One of the secondary harts will therefore always be the winner of the relocation lottery. This is problematic if the link address ranges of OpenSBI and U-Boot SPL overlap. OpenSBI will be relocated and therefore overwrite U-Boot SPL while some harts may still run it, leading to code corruption. Avoid this problem by specifying the main hart as the preferred boot hart to perform the OpenSBI relocation. The main hart will be the last hart to enter OpenSBI, relocation can therefore occur safely. The boot hart field was added to version 2 of the OpenSBI FW_DYNAMIC info structure. The header file include/opensbi.h is synchronized with include/sbi/fw_dynamic.h from the OpenSBI project to update the info structure. The header file is recent as of commit 7a13beb21326 ("firmware: Add preferred boot HART field in struct fw_dynamic_info"). Reported-by: Rick Chen <rick@andestech.com> Suggested-by: Anup Patel <Anup.Patel@wdc.com> Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Rick Chen <rick@andestech.com> Tested-by: Rick Chen <rick@andestech.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
* spl: cache: Allow cache drivers in SPLRick Chen2019-12-101-0/+7
| | | | | | | | | | When ax25-ae350 try to enable v5l2 cache driver in SPL configuration, it need this option for cache support in SPL. Signed-off-by: Rick Chen <rick@andestech.com> Cc: KC Lin <kclin@andestech.com> Cc: Alan Kao <alankao@andestech.com>
* Revert "spl: fix entry_point equal to load_addr"Tom Rini2019-12-061-2/+2
| | | | | | | | | | | Due to the (seemingly bogus) assumption of a default CONFIG_SYS_UBOOT_START value we will revert this change for now and evaluate it again for the next release along with changes to CONFIG_SYS_UBOOT_START. This reverts commit d3e97b53c1f2464f4898226de7d89abf242e4aa8. Signed-off-by: Tom Rini <trini@konsulko.com>
* spl: fix entry_point equal to load_addrGiulio Benetti2019-12-051-2/+2
| | | | | | | | | | | | | At the moment entry_point is set to image_get_load(header) that sets it to "load address" instead of "entry point", assuming entry_point is equal to load_addr, but it's not true. Then load_addr is set to "entry_point - header_size", but this is wrong too since load_addr is not an entry point. So use image_get_ep() for entry_point assignment and image_get_load() for load_addr assignment. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
* spl: Introduce SPL_DM_GPIO Kconfig defineLukasz Majewski2019-12-051-0/+6
| | | | | | | | This define indicates if DM_GPIO shall be supported in SPL. This allows proper operation of DM converted GPIO drivers in SPL, which use boards. Signed-off-by: Lukasz Majewski <lukma@denx.de>
* spl: ymodem: Fix loading of fit imageLokesh Vutla2019-12-031-2/+6
| | | | | | | | | spl ymodem driver always assumes that 1 BUF_SIZE is read in one stream. This might not be true when image is not padded to BUF_SIZE and the last sector that gets loaded will be < BUF_SIZE. Drop this assumption and use the actual size that is loaded. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* cosmetic: Fix spelling and whitespace errorsThomas Hebb2019-12-031-3/+3
| | | | Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
* common: Move interrupt functions into a new headerSimon Glass2019-12-021-0/+1
| | | | | | | | | | | | These functions do not use driver model but are fairly widely used in U-Boot. But it is not clear that they will use driver model anytime soon, so we don't want to label them as 'legacy'. Move them to a new irq_func.h header file. Avoid the name 'irq.h' since it is widely used in U-Boot already. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move ARM cache operations out of common.hSimon Glass2019-12-021-0/+1
| | | | | | | | | These functions are CPU-related and do not use driver model. Move them to cpu_func.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move some cache and MMU functions out of common.hSimon Glass2019-12-021-0/+1
| | | | | | | | | | | | These functions belong in cpu_func.h. Another option would be cache.h but that code uses driver model and we have not moved these cache functions to use driver model. Since they are CPU-related it seems reasonable to put them here. Move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move serial functions out of common.hSimon Glass2019-12-021-0/+1
| | | | | | | These functions belong in serial.h so move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: bootcount: Move code out of header fileSimon Glass2019-12-021-0/+11
| | | | | | | | | | | | | It is not good practice to write code in a header file. If it is included multiple times then the code can cause duplicate functions. Move the bootcount_store() and bootcount_load() functions into SPL. Note: bootcount is a bit strange in that it uses driver model but does not define proper drivers. This should be fixed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* crc32: Use the crc.h header for crc functionsSimon Glass2019-12-021-0/+1
| | | | | | | | | | | Drop inclusion of crc.h in common.h and use the correct header directly instead. With this we can drop the conflicting definition in fw_env.h and rely on the crc.h header, which is already included. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: separate SPL_FRAMEWORK config for spl and tplHeiko Stuebner2019-11-172-1/+9
| | | | | | | | | | | | | | Right now enabling SPL_FRAMEWORK will also enable it for the TPL in all cases, making the TPL bigger. There may be cases where the TPL is really size constrained due to its underlying ram size. Therefore introduce a new TPL_FRAMEWORK option and make the relevant conditionals check for both. The default is set to "y if SPL_FRAMEWORK" to mimic the previous behaviour where the TPL would always get the SPL framework if it was enabled in SPL. Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* Merge tag 'u-boot-rockchip-20191110' of ↵Tom Rini2019-11-111-14/+34
|\ | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip - Add support for rockchip pmic rk805,rk809, rk816, rk817 - Add rk3399 board Leez support - Fix bug in rk3328 ram driver - Adapt SPL to support ATF bl31 with entry at 0x40000 - Fix the u8 type comparision with '-1'. - Fix checkpatch warning for multi blank line and review signature.
| * common: spl: atf: support booting bl32 imageJoseph Chen2019-11-101-14/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trusted-Firmware can also initialize a secure payload to use as a trusted execution environment. In general for the arm64 case this is provided as separate image and uboot is supposed to also place it in a predetermined location in memory and add the necessary parameters to the ATF boot params. So add the possibility to get this tee payload from the provided FIT image and setup things as necessary. Tested on a Rockchip PX30 with mainline TF-A, mainline OP-Tee (with pending PX30 support) and mainline 5.4-rc1 Linux kernel. Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* | spl: fix SPI config dependenciesSimon Goldschmidt2019-11-071-10/+11
|/ | | | | | | | | As SPL_SPI_FLASH_SUPPORT cannot work without SPL_SPI_SUPPORT, fix dependencies to prevent enabling SPI flash support without basic SPI support. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
* Merge tag 'u-boot-imx-20191104' of ↵Tom Rini2019-11-041-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20191104 ------------------- - i.MX NAND: nandbcb support for MX6UL / i.MX7 - i.MX8: support for HAB - Convert to DM (opos6ul, mccmon6) - Toradex i.MX6ull colibri - sync DTS with kernel Travis : https://travis-ci.org/sbabic/u-boot-imx/builds/606853416
| * spl: nor: Provide falcon boot support for NOR memoriesLukasz Majewski2019-11-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | This commit adds falcon boot support (by also copying args necessary for booting) to the SPL NOR memory driver. After this change it is possible to use the falcon boot in the same way as on NAND memories. The necessary configs (i.e. CONFIG_CMD_SPL_NOR_OFS) are now defined in Kconfig. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
* | spl: Add a size check for TPLSimon Glass2019-11-031-0/+8
|/ | | | | | | | | | We have the ability to enforce a maximum size for SPL but not yet for TPL. Add a new option for this. Document the size check macro while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Merge tag 'dm-pull-29oct19' of git://git.denx.de/u-boot-dmTom Rini2019-11-011-4/+19
|\ | | | | | | | | | | - Fix for patman with email addresses containing commas - Bootstage improvements for TPL, SPL - Various sandbox and dm improvements and fixes
| * bootstage: Allow SPL to obtain bootstage info from TPLSimon Glass2019-10-271-1/+13
| | | | | | | | | | | | | | | | | | It is possible to enable bootstage in TPL. TPL can stash the info for SPL. But at present this information is then lost because SPL does not read from the stash. Add support for SPL not being the first phase to enable bootstage. Signed-off-by: Simon Glass <sjg@chromium.org>
| * bootstage: Mark the start/end of TPL and SPL separatelySimon Glass2019-10-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present bootstage in TPL and SPL use the same ID so it is not possible to see the timing of each. Separate out the IDs and use the correct one depending on which phase we are at. Example output: Timer summary in microseconds (14 records): Mark Elapsed Stage 0 0 reset 224,787 224,787 TPL 282,248 57,461 end TPL 341,067 58,819 SPL 925,436 584,369 end SPL 931,710 6,274 board_init_f 1,035,482 103,772 board_init_r 1,387,852 352,370 main_loop 1,387,911 59 id=175 Accumulated time: 196 dm_r 8,300 dm_spl 14,139 dm_f 229,121 fsp-m 262,992 fsp-s Signed-off-by: Simon Glass <sjg@chromium.org>
* | spl: spl_mmc: fix getting raw_sect when boot from emmc boot partitionPeng Fan2019-10-291-2/+3
|/ | | | | | | | | | | | | | | | | | | | On i.MX8, when booting from eMMC boot partition, the whole flash.bin is stored in boot partition, however SPL switches to user partition during the init of mmc driver: spl_mmc_load() -> mmc_init() Then it tries to load the container image in spl_mmc_get_uboot_raw_sector(), but here it reads the data from user partition and the header is not recognized as a valid header. So we move spl_mmc_get_uboot_raw_sector after eMMC partition switch to address this issue. Anyway put spl_mmc_get_uboot_raw_sector before eMMC partition switch is not correct, so let's move it after eMMC partition switch. Reported-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* spl: mmc: make eMMC HW boot partition configuration optionalAnatolij Gustschin2019-10-181-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Loading U-Boot on i.MX8QXP MEK board is broken since recent changes in spl_mmc: U-Boot SPL 2019.10-00162-gff5bd397e4 (Oct 18 2019 - 15:50:45 +0200) Normal Boot WDT: Not found! Trying to boot from MMC2_2 Load image from MMC/SD 0x46400 spl: mmc partition switch failed SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### The newly added CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION option is selected automatically and overrides the EXT_CSC_PART_CONFIG configurations with default value, always selecting the eMMC boot partition 1. Boards which place U-Boot image in other partitions became not bootable. Fix this by making the eMMC HW boot partition selection optional. Fixes: 17241ea0543a (spl: mmc: Add option to set eMMC HW boot partition) Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* Merge tag 'mmc-10-10-2019' of ↵Tom Rini2019-10-141-10/+4
|\ | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-mmc - Add sdhci driver for Broadcom iProc platform - Add a driver callback for power-cycle for mmc - Implement host_power_cycle callback for stm32_sdmmc2 - spl: dm_mmc: Initialize only the required mmc device
| * spl: dm_mmc: Initialize only the required mmc deviceLokesh Vutla2019-10-101-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In SPL, all the available mmc devices gets initialized during boot. This might not work in cases where clocks are not available for certain mmc devices(other than boot device) and the support for enabling device might not be ready. Texas Instruments' K3 J721E device having a central system controller (dmsc) is one such example falling in this category. Below is the sequence for the failing scenario: - ROM comes up in SD mode and loads SPL by just initialing SD card. - SPL loads dmsc firmware from SD Card. Since ROM has enabled SD, SPL need not enable the SD, just need to re initialize the card. But SPL is trying to initialize other MMC instances which are in disabled state. Since dmsc firmware is not yet available, devices cannot be enabled. So in SPL, initialize only the mmc device that is needed. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
* | Merge branch '2019-10-11-master-imports'Tom Rini2019-10-123-20/+64
|\ \ | | | | | | | | | | | | | | | - Assorted cleanups - FAT bugfixes - mediatek platform updates
| * | spl: Introduce SPL_DM_SPI Kconfig defineLukasz Majewski2019-10-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This define indicates if DM_SPI shall be supported in SPL. This allows proper operation of DM converted SPI drivers in SPL, which use #if !CONFIG_IS_ENABLED(DM_SPI) to also support not yet DM/DTS converted boards. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * | spl: mmc: Add option to set eMMC HW boot partitionMans Rullgard2019-10-112-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows setting pre-defined eMMC boot partition for SPL eMMC booting. It is necessary in the case when one wants to boot (through falcon boot) from eMMC after loading SPL from other memory (like SPI-NOR). Signed-off-by: Mans Rullgard <mans@mansr.com> [lukma: Edit the commit message] Signed-off-by: Lukasz Majewski <lukma@denx.de> Acked-by: Andreas Dannenberg <dannenberg@ti.com>
| * | spl: mmc: Fix indentation in spl_mmc.c fileMans Rullgard2019-10-111-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a wrongly indented block of code. Signed-off-by: Mans Rullgard <mans@mansr.com> [lukma: Make the commit message more verbose] Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * | spl: add a generic function board_init_fPhilippe Reynes2019-10-112-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit add a generic function board_init_f that only initialize some device (for example serial). It avoid to define a board function only to launch the serial configuration. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* | | spl: ymodem: Make SPL Y-Modem loader framework accessibleAndreas Dannenberg2019-10-111-2/+2
| | | | | | | | | | | | | | | | | | | | | Expose SPL's Y-Modem core loader function via the common SPL header file so it can be re-used for purposes other than loading U-Boot itself. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
* | | spl: ymodem: Fix FIT loading termination handlingAndreas Dannenberg2019-10-111-2/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During FIT reading through ymodem_read_fit() the function xyzModem_stream_read() is being used which returns zero once the end of a stream has been reached. This could lead to an premature exit from ymodem_read_fit() with certain-sized FIT images reporting that zero bytes overall were read. Such a premature exit would then result in an -EIO failure being triggered within the spl_load_simple_fit() caller function and ultimately lead to a boot failure. Fix this logic by simply aborting the stream read loops and continuing with the regular code flow which ultimately would lead to returning the number of bytes to be read ('size') as expected by the callers of ymodem_read_fit(). Fixes: fa715193c083 ("spl: Add an option to load a FIT containing U-Boot from UART") Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>