aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)AuthorFilesLines
2019-10-29spl: spl_mmc: fix getting raw_sect when boot from emmc boot partitionPeng Fan1-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>
2019-10-24common: command: Fix manual relocation for repeatable commandMichal Simek1-0/+5
All platforms which are using MANUAL_RELOC are jumping back to origin location when repeatable command is called. The reason is that cmd_rep link is not updated properly. Issue can be reproduced by rewriting origin U-Boot location through (for example) file download by tftp command. Fixes: 80a48dd47e3b ("common: command: Rework the 'cmd is repeatable' logic") Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-10-24common: image-sig.c: Add manual relocationT Karthik Reddy1-0/+29
This patch adds manual relocation for struct checksum_algo & struct crypto_algo structures. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-10-24common: hash: Manually relocate struct hash_algoT Karthik Reddy1-0/+29
This patch adds manual relocation for struct hash_algo if CONFIG_NEEDS_MANUAL_RELOC is enabled. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-10-18spl: mmc: make eMMC HW boot partition configuration optionalAnatolij Gustschin1-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>
2019-10-15image: android: Support boot image v1 and v2Sam Protsenko1-11/+33
In new versions of Android Boot Image next fields are added to the header (and corresponding payloads are added to the image itself): - v1: Recovery DTBO - v2: DTB Account for these new fields in next functions: 1. android_image_get_end(): as v1 and v2 have new payloads in the image, the calculation of image end address should be extended correspondingly; this is used e.g. by "bootm" command when booting the kernel from Android Boot Image 2. android_print_contents(): new fields values in v1 and v2 should be printed; the result of this function can be seen e.g. in "iminfo" command This commit doesn't add the means for working with new payloads in v1 and v2 images (it will be done in further commits), it only updates existing functions w.r.t. changes in boot image v1/v2. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2019-10-14Merge tag 'mmc-10-10-2019' of ↵Tom Rini1-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
2019-10-12Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86Tom Rini1-3/+3
- Remember the device being emulated for Sandbox PCI - Update Kconfig options for FSP 1.0 - Drop RESET_BASE and RESET_SEG_SIZE that are no longer used
2019-10-12Merge branch '2019-10-11-master-imports'Tom Rini3-20/+64
- Assorted cleanups - FAT bugfixes - mediatek platform updates
2019-10-11spl: Introduce SPL_DM_SPI Kconfig defineLukasz Majewski1-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>
2019-10-11spl: mmc: Add option to set eMMC HW boot partitionMans Rullgard2-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>
2019-10-11spl: mmc: Fix indentation in spl_mmc.c fileMans Rullgard1-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>
2019-10-11spl: add a generic function board_init_fPhilippe Reynes2-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>
2019-10-11spl: ymodem: Make SPL Y-Modem loader framework accessibleAndreas Dannenberg1-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>
2019-10-11spl: ymodem: Fix FIT loading termination handlingAndreas Dannenberg1-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>
2019-10-11trace: Remove the const from write functionsSimon Glass1-3/+3
The write functions do actually change the contents of memory so it is not correct to use 'const'. Remove it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-10spl: dm_mmc: Initialize only the required mmc deviceLokesh Vutla1-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>
2019-10-09Merge tag 'xilinx-for-v2020.01' of ↵Tom Rini2-2/+4
https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze Xilinx/FPGA changes for v2020.01 FPGA: - Enable fpga loading on Versal - Minor fix Microblaze: - Fix LMB configurations to support initrds - Some other cleanups Zynq: - Minor config/dt changes - Add distro boot support for usb1 and mmc1 - Remove Xilinx private boot commands and use only distro boot ZynqMP: - Kconfig cleanups, defconfig updates - Update some dt files - Add firmware driver for talking to PMUFW - Extend distro boot support for jtag - Add new IDs - Add system controller configurations - Convert code to talk firmware via mailbox or SMCs Versal: - Add board_late_init() - Add run time DT memory setup - Add DFU support - Extend distro boot support for jtag and dfu - Add clock driver - Tune mini configurations Xilinx: - Improve documentation (boot scripts, dt binding) - Enable run time initrd_high calculation - Define default SYS_PROMPT - Add zynq/zynqmp virtual defconfig Drivers: - Add Xilinx mailbox driver for talking to firmware - Clean zynq_gem for Versal - Move ZYNQ_HISPD_BROKEN to Kconfig - Wire genphy_init() in phy.c - Add Xilinx gii2rgmii bridge - Cleanup zynq_sdhci - dwc3 fix - zynq_gpio fix - axi_emac fix Others: - apalis-tk1 - clean config file
2019-10-09Merge tag 'u-boot-imx-20191009' of ↵Tom Rini8-17/+93
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20191009 ------------------- Travis : https://travis-ci.org/sbabic/u-boot-imx/builds/595148532 - MX6UL / ULZ - Toradex board - Allow to set OCRAM for MX6Q/D - MX7ULP - MX8: (container image, imx8mq_mek), SCU API - fix several board booting from SD/EMMC (cubox-i for example) - pico boards [trini: display5 merged manually] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-08imx: replace CONFIG_SECURE_BOOT with CONFIG_IMX_HABStefano Babic1-1/+1
CONFIG_SECURE_BOOT is too generic and forbids to use it for cross architecture purposes. If Secure Boot is required for imx, this means to enable and use the HAB processor in the soc. Signed-off-by: Stefano Babic <sbabic@denx.de>
2019-10-08spl: nor: support loading i.MX container format filePeng Fan1-2/+7
i.MX8 only support AHAB secure boot with Container format image, we could not use FIT to support secure boot, so introduce container support to let SPL could load container images. Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Cc: York Sun <york.sun@nxp.com> Cc: Marek Vasut <marex@denx.de> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-10-08spl: spi: support loading i.MX container format filePeng Fan1-0/+11
i.MX8 only support AHAB secure boot with Container format image, we could not use FIT to support secure boot, so introduce container support to let SPL could load container images. Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Cc: York Sun <york.sun@nxp.com> Cc: Marek Vasut <marex@denx.de> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-10-08spl: nand: support loading i.MX container format filePeng Fan1-0/+9
i.MX8 only support AHAB secure boot with Container format image, we could not use FIT to support secure boot, so introduce container support to let SPL could load container images. Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Cc: York Sun <york.sun@nxp.com> Cc: Marek Vasut <marex@denx.de> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-10-08spl: nand: Introduce spl_nand_get_uboot_raw_pagePeng Fan1-2/+7
Introduce weak spl_nand_get_uboot_raw_page, then platform could have their own implementation. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Cc: Marek Vasut <marex@denx.de> Cc: Andreas Dannenberg <dannenberg@ti.com> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Stefan Roese <sr@denx.de> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Michal Simek <michal.simek@xilinx.com>
2019-10-08spl: nor: introduce spl_nor_get_uboot_basePeng Fan1-4/+9
Introduce weak spl_nor_get_uboot_base, then platform have their own implementation. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Cc: Marek Vasut <marex@denx.de> Cc: Andreas Dannenberg <dannenberg@ti.com> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Stefan Roese <sr@denx.de> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Michal Simek <michal.simek@xilinx.com>
2019-10-08spl: spi: introduce spl_spi_get_uboot_offsPeng Fan1-1/+9
Introduce a weak function spl_spi_get_uboot_offs, then platform could have their own implementation. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Cc: Marek Vasut <marex@denx.de> Cc: Andreas Dannenberg <dannenberg@ti.com> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Stefan Roese <sr@denx.de> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Michal Simek <michal.simek@xilinx.com>
2019-10-08spl: mmc: introduce spl_mmc_get_uboot_raw_sectorPeng Fan1-0/+11
Introduce a weak function spl_mmc_get_uboot_raw_sector, then platform could have their own implementation. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Cc: Marek Vasut <marex@denx.de> Cc: Andreas Dannenberg <dannenberg@ti.com> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Stefan Roese <sr@denx.de> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Michal Simek <michal.simek@xilinx.com>
2019-10-08imx: Kconfig: Reduce default CONFIG_CSF_SIZEBreno Matheus Lima1-3/+4
The default CSF_SIZE defined in Kconfig is too high and SPL cannot fit into the OCRAM in certain cases. The CSF cannot achieve 0x2000 length when using RSA 4K key which is the largest key size supported by HABv4. According to AN12056 "Encrypted Boot on HABv4 and CAAM Enabled Devices" it's recommended to pad CSF binary to 0x2000 and append DEK blob to deploy encrypted boot images. As the maximum DEK blob size is 0x58 we can reduce CSF_SIZE to 0x2060 which should cover both CSF and DEK blob length. Update default_image.c and image.c to align with this change and avoid a U-Boot proper authentication failure in HAB closed devices: Authenticate image from DDR location 0x877fffc0... bad magic magic=0x32 length=0x6131 version=0x38 bad length magic=0x32 length=0x6131 version=0x38 bad version magic=0x32 length=0x6131 version=0x38 spl: ERROR: image authentication fail Fixes: 96d27fb218 (Revert "habv4: tools: Avoid hardcoded CSF size for SPL targets") Reported-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Breno Lima <breno.lima@nxp.com>
2019-10-08imx: Introduce CONFIG_SPL_FORCE_MMC_BOOT to force MMC boot on falcon modeLukasz Majewski1-0/+9
This change tries to fix the following problem: - The board boots (to be more precise - ROM loads SPL) from a slow SPI-NOR memory. As a result the spl_boot_device() will return SPI-NOR as a boot device (which is correct). - The problem is that in 'falcon boot' the eMMC is used as a boot medium to load kernel from its partition. Calling spl_boot_device() will break things as it returns SPI-NOR device. To fix this issue the new CONFIG_SPL_FORCE_MMC_BOOT Kconfig flag is introduced to handle this special use case. By default it is not defined, so there is no change in the legacy code flow. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-10-08Revert "habv4: tools: Avoid hardcoded CSF size for SPL targets"Stefano Babic1-5/+3
This reverts commit 62a52f3f85bf33e286632e99f0d39b2c166af0c4.
2019-10-08habv4: tools: Avoid hardcoded CSF size for SPL targetsBreno Matheus Lima1-3/+5
Currently it's not possible to authenticate the U-Boot proper of mx6ul_14x14_evk_defconfig target: Authenticate image from DDR location 0x877fffc0... bad magic magic=0x0 length=0x00 version=0x3 bad length magic=0x0 length=0x00 version=0x3 bad version magic=0x0 length=0x00 version=0x3 spl: ERROR: image authentication fail Commit 0633e134784a ("imx: hab: Increase CSF_SIZE for i.MX6 and i.MX7 devices") has increased CSF_SIZE to avoid a possible issue when booting encrypted boot images. Commit d21bd69b6e95 ("tools: mkimage: add firmware-ivt image type for HAB verification") is hardcoding the CSF and IVT sizes, the new CSF size is not being considered and u-boot-ivt.img fails to boot. Avoid hardcoded CSF and IVT size to fix this issue. Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-10-08spl: mmc: support loading i.MX container format filePeng Fan1-0/+10
i.MX8 only support AHAB secure boot with Container format image, we could not use FIT to support secure boot, so introduce container support to let SPL could load container images. Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Cc: York Sun <york.sun@nxp.com> Cc: Marek Vasut <marex@denx.de> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-10-08ARM: imx: Support larger SPL size on IMX6DQRobert Hancock1-1/+2
Previously the SPL size on all iMX6 platforms was restricted to 68KB because the OCRAM size on iMX6SL/DL parts is only 128KB. However, the other iMX6 variants have 256KB of OCRAM. Add an option CONFIG_MX6_OCRAM_256KB which allows using the full size on boards which don't need to support the SL/DL variants. This allows for an SPL size of 196KB, which makes it much easier to use configurations such as SPL with driver model and FDT control. Signed-off-by: Robert Hancock <hancock@sedsystems.ca> Tested-by: Adam Ford <aford173@gmail.com> #imx6q_logic
2019-10-08spl: pass args to board_return_to_bootromPeng Fan1-3/+4
Pass spl_image and bootdev to board_return_bootrom. i.MX8MN needs the args to let ROM to load images Cc: Simon Glass <sjg@chromium.org> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-10-08microblaze: Fix lmb memory initializationMichal Simek1-2/+3
Microblaze as Arm is using multiple memory banks which are read from DT that's why there is a need to initialized LMB based on bd->bi_dram[]. Without this fix memory base/size is all the time 0 and image relocation is not possible. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-10-08arm64: zynqmp: Define default SPL_TEXT_BASE address in KconfigMichal Simek1-0/+1
Define default address via Kconfig. There is no need to change this address for most of the boards but it is also possible. This one line save a lot of lines in defconfigs that's why make sense to do it. The similar change has been done by commit 9340d8fe8beb ("sunxi: move CONFIG_SPL_TEXT_BASE from *_defconfig to Kconfig") Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
2019-10-08spl: Convert CONFIG_SPL_SIZE_LIMIT to hexSimon Glass1-1/+1
This is currently a decimal value which is not as convenient or meaningful. Also U-Boot tends to use hex everywhere. Convert this option to hex and add a comment for the size_check macro. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Acked-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: correct the typo in the commit title] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-08spl: Allow tiny printf() to be controlled in SPL and TPLSimon Glass2-2/+2
At present there is only one control for this and it is used for both SPL and TPL. But SPL might have a lot more space than TPL so the extra cost of a full printf() might be acceptable. Split the option into two, providing separate SPL and TPL controls. The TPL setting defaults to the same as SPL. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-08spl: Set up the bloblist in board_init_r()Simon Glass1-17/+18
At present the bloblist is set up in spl_common_init() which can be called from spl_early_init(), i.e. before SDRAM is ready. This prevents the bloblist from being located in SDRAM, which is useful on some platforms where SRAM is inaccessible after U-Boot relocates (e.g. x86 CAR region). It doesn't serve much purpose to have the bloblist available early, since very little is known about the platform then, and the handoff info is written when SPL is about to jump to U-Boot. Move the code to board_init_r() to avoid any restrictions. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-08spl: Add an arch-specific hook for writing to SPL handoffSimon Glass1-3/+9
At present there is an arch-specific area in the SPL handoff area intended for use by arch-specific code, but there is no explicit call to fill in this data. Add a hook for this. Also use the hook to remove the sandbox-specific test code from write_spl_handoff(). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-08spl: handoff: Correct Kconfig condition for SPL and TPLSimon Glass1-2/+2
At present these options can be enabled when bloblist is not enabled for SPL or TPL. This is incorrect as SPL handoff requires bloblist. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-09-21splash: fix splash banner outputAnatolij Gustschin1-1/+45
Old splash code in cfb_console driver displayed U-Boot version string by default. Restore this behaviour for DM_VIDEO enabled configurations. Signed-off-by: Anatolij Gustschin <agust@denx.de> Reported-by: Fabio Estevam <festevam@gmail.com>
2019-09-21splash: fix logo drawing if CONFIG_VIDEO_LOGO enabledAnatolij Gustschin1-2/+33
After mxc_ipuv3 DM_VIDEO conversion board configs with enabled CONFIG_VIDEO_LOGO do not show splash screen (previosly drawing splash screen worked via cfb_console driver with CONFIG_VIDEO_LOGO enabled). Use splash_source library for loading splash images when CONFIG_SPLASH_SOURCE is selected, otherwise prepare built-in video logo for drawing. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2019-09-11usb: Add nonblock argument to submit_int_msgMichal Suchanek3-6/+9
This will be used to implement non-blocking keyboard polling in case of errors. Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2019-09-11usb: storage: submit_int_msg -> usb_int_msgMichal Suchanek1-2/+2
Use the wrapper as other callers do. Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2019-09-11usb: usb_submit_int_msg -> usb_int_msgMichal Suchanek2-6/+6
This aligns naming with usb_bulk_msg and usb_control_msg. Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2019-09-11usb_kdb: only process events successfully receivedMichal Suchanek1-4/+3
Causes unbound key repeat on error otherwise. Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2019-08-30board_f: fix noncached reservation calculationStephen Warren2-3/+16
The current code in reserve_noncached() has two issues: 1) The first update of gd->start_addr_sp always rounds down to a section start. However, the equivalent calculation in cache.c:noncached_init() always first rounds up to a section start, then subtracts a section size. These two calculations differ if the initial value is already rounded to section alignment. 2) The second update of gd->start_addr_sp subtracts exactly CONFIG_SYS_NONCACHED_MEMORY, whereas the equivalent calculation in cache.c:noncached_init() rounds the noncached size up to section alignment before subtracting it. The two calculations differ if the noncached region size is not a multiple of the MMU section size. In practice, one/both of those issues causes a practical problem on Jetson TX1; U-Boot triggers a synchronous abort during initialization, likely due to overlapping use of some memory region. This change fixes both these issues by duplicating the exact calculations from noncached_init() into reserve_noncached(). However, this fix assumes that gd->start_addr_sp on entry to reserve_noncached() exactly matches mem_malloc_start on entry to noncached_init(). I haven't traced the code to see whether it absolutely guarantees this in all (or indeed any!) cases. Consequently, I added some comments in the hope that this condition will continue to be true. Fixes: 5f7adb5b1c02 ("board_f: reserve noncached space below malloc area") Cc: Vikas Manocha <vikas.manocha@st.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
2019-08-27image: add new "copro" image typePatrick Delaunay1-0/+1
Define new image type for coprocessor images. It is used in FIT to identify the files loaded with remoteproc command (elf or bin). Signed-off-by: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-08-26Merge branch '2019-08-26-master-imports'Tom Rini2-0/+18
- Assorted minor bugfixes