summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* autoboot: add CONFIG_AUTOBOOT to allow to not compile autoboot.cMasahiro Yamada2016-06-20-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit bb597c0eeb7e ("common: bootdelay: move CONFIG_BOOTDELAY into a Kconfig option"), CONFIG_BOOTDELAY is defined for all boards. Prior to that commit, it was allowed to unset CONFIG_BOOTDELAY to not compile common/autoboot.c, as described in common/Makefile: # This option is not just y/n - it can have a numeric value ifdef CONFIG_BOOTDELAY obj-y += autoboot.o endif It was a bit odd to enable/disable code with an integer type option, but it was how this option worked before that commit, and several boards actually unset it to opt out of the autoboot feature. This commit adds a new bool option, CONFIG_AUTOBOOT, and makes CONFIG_BOOTDELAY depend on it. I chose "default y" for this option because most boards use the autoboot. I added "# CONFIG_AUTOBOOT is not set" for the boards that had not set CONFIG_BOOTDELAY prior to the bad commit. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Merge git://git.denx.de/u-boot-nand-flashTom Rini2016-06-20-1/+8
|\
| * common: fb_nand: won't compileSergey Kubushyn2016-06-19-1/+1
| | | | | | | | | | | | | | | | | | Somehow this got overlooked when getting rid of nand_info. Small patch, won't affect anything else, no reason to wait for the next cycle. Signed-off-by: Sergey Kubushyn <ksi@koi8.net>
| * spl: nand: support redundant u-boot imageBoris Brezillon2016-06-19-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On modern NAND it's more than recommended to have a backup copy of the u-boot binary to recover from corruption: bitflips are quite common on MLC NANDs, and the read-disturbance will corrupt your u-boot partitition more quickly than what you would see on an SLC NAND. Add an extra Kconfig option to specify the offset of the redundant u-boot image. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Hans de Goede <hdegoede@redhat.com> [scottwood: added ifdef to fix build break] Signed-off-by: Scott Wood <oss@buserror.net>
* | SPL ext: cosmetic: correct error message in spl_load_image_ext()Petr Kulhavy2016-06-19-1/+1
| | | | | | | | | | | | | | | | | | | | Correct the error message in spl_load_image_ext() when image parsing fails. Instead of "ext4fs_read failed" print "failed to parse image header". Signed-off-by: Petr Kulhavy <brain@jikos.cz> CC: Guillaume GARDET <guillaume.gardet@free.fr> CC: Tom Rini <trini@konsulko.com>
* | SPL: ext: remove redundant ifdef statementPetr Kulhavy2016-06-17-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant #if defined(CONFIG_SPL_OS_BOOT) statement around getenv() calls in spl_load_image_ext_os(). The whole function is surrounded by #ifdef CONFIG_SPL_OS_BOOT. No functional change. Signed-off-by: Petr Kulhavy <brain@jikos.cz> CC: Guillaume GARDET <guillaume.gardet@free.fr> Acked-by: Guillaume GARDET <guillaume.gardet@free.fr>
* | common: image-fit: Cleanup spelling mistakesAndreas Dannenberg2016-06-17-15/+15
| | | | | | | | | | | | | | | | | | The comments in the source file are riddled with spelling mistakes. Be a good citizen and take a stab at cleaning up some of the more obvious ones. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | common/Kconfig: Change the default BOOTDELAY to 2Tom Rini2016-06-17-1/+1
| | | | | | | | | | | | | | The value of 0 is fairly uncommon while 2 is one of the more common ones so switch. Signed-off-by: Tom Rini <trini@konsulko.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-ubiTom Rini2016-06-17-4/+55
|\ \
| * | splash_source: add support for ubifs formatted nandEran Matityahu2016-06-14-4/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for loading splash image from NAND Flash formatted with a (UBI) filesystem. Signed-off-by: Eran Matityahu <eran.m@variscite.com> Cc: Heiko Schocher <hs@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Cc: Nikita Kiryanov <nikita@compulab.co.il> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
* | | Merge branch 'master' of git://git.denx.de/u-boot-ubiTom Rini2016-06-13-0/+21
|\ \ \ | |/ /
| * | common: env_ubi: Clear environment buffer before readingMarcin Niestroj2016-06-13-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case we have restarted u-boot there is a chance that environment buffer contains old environment (from the previous boot). If UBI volume is zero size, ubi_volume_read() doesn't modify the buffer and exits successfully. We need to clear buffer manually before reading it from UBI, so the invalid CRC will cause setting default environment in case that the UBI volume is zero size. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
* | | Merge branch 'master' of git://git.denx.de/u-boot-atmelTom Rini2016-06-13-1/+1
|\ \ \
| * | | bootm: Align cache flush end address correctlySimon Glass2016-06-12-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flushing part of the cache should be done on cache boundaries. Trying to flush part of a cache line is not supported and the request may be ignored or print warnings. Adjust the bootm code to align the end address to prevent this problem. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de> Tested-on: smartweb, corvus, taurus, axm Tested-by: Heiko Schocher <hs@denx.de> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
* | | verified-boot: Minimal support for booting U-Boot proper from SPLTeddy Reed2016-06-12-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows a board to configure verified boot within the SPL using a FIT or FIT with external data. It also allows the SPL to perform signature verification without needing relocation. The board configuration will need to add the following feature defines: CONFIG_SPL_CRYPTO_SUPPORT CONFIG_SPL_HASH_SUPPORT CONFIG_SPL_SHA256 In this example, SHA256 is the only selected hashing algorithm. And the following booleans: CONFIG_SPL=y CONFIG_SPL_DM=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_FIT=y CONFIG_SPL_OF_CONTROL=y CONFIG_SPL_OF_LIBFDT=y CONFIG_SPL_FIT_SIGNATURE=y Signed-off-by: Teddy Reed <teddy.reed@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Andreas Dannenberg <dannenberg@ti.com> Acked-by: Sumit Garg <sumit.garg@nxp.com>
* | bootstage: call show_boot_progress also in SPLHeiko Schocher2016-06-09-0/+10
| | | | | | | | | | | | show_boot_progress() is now called from SPL also. Signed-off-by: Heiko Schocher <hs@denx.de>
* | common: bootdelay: move CONFIG_BOOTDELAY into a Kconfig optionHeiko Schocher2016-06-09-0/+9
| | | | | | | | | | | | | | | | | | | | | | move CONFIG_BOOTDELAY into a Kconfig option. Used for this purpose the moveconfig.py tool in tools. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
* | dm: scsi: if_typename should be scsiEd Swarthout2016-06-06-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: => ext2ls scsi 0:1 ** Bad device scsi 0:1 ** for boards which use the scsi legacy driver (such as ls1043ardb). Signed-off-by: Ed Swarthout <Ed.Swarthout@nxp.com> Tested-by: George McCollister <george.mccollister@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2016-06-06-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modified: configs/ls1012afrdm_qspi_defconfig configs/ls1012aqds_qspi_defconfig configs/ls1012ardb_qspi_defconfig include/configs/ls1012afrdm.h include/configs/ls1012aqds.h include/configs/ls1012ardb.h Signed-off-by: Tom Rini <trini@konsulko.com>
| * | usb: move CONFIG_USB_XHCI to Kconfig with renamingMasahiro Yamada2016-06-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move CONFIG_USB_XHCI to defconfig files for all boards, renaming it into CONFIG_USB_XHCI_HCD. As commented in the help of "config USB_XHCI" entry, this has been a TODO for a long time; now CONFIG_USB_XHCI_HCD and CONFIG_USB_XHCI have been unified in favor of the former. Note: Some boards define CONFIG_USB_XHCI in their headers without CONFIG_USB, which does not meet the "depends on" in Kconfig. I added CONFIG_USB=y for those boards when converting. Otherwise, they would fail to build. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | | Merge branch 'master' of git://www.denx.de/git/u-boot-microblazeTom Rini2016-06-06-0/+1
|\ \ \
| * | | env: Setup GD_FLG_ENV_DEFAULT flag when default environment are usedMichal Simek2016-06-06-0/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | Setup flag when default environment are used to be able to rewrite default distro boot variables based on SoC boot mode. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Alexander Graf <agraf@suse.de>
* | | spl: fit: Fix non-matching DT names console outputAndreas Dannenberg2016-06-04-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | When no DTB can be matched successfully to the board that's being used a list of available FIT-embedded DTBs will be output to the console for diagnostic purposes. But rather than the contents of the "description" FDT property a non-existent property was accessed and as a result "NULL" was output instead of the actual name(s) of the DTB(s). Fix this issue by using the correct property which is also the exact same property that's used earlier during the actual board matching process. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
* | nand: Embed mtd_info in struct nand_chipScott Wood2016-06-03-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | nand_info[] is now an array of pointers, with the actual mtd_info instance embedded in struct nand_chip. This is in preparation for syncing the NAND code with Linux 4.6, which makes the same change to struct nand_chip. It's in a separate commit due to the large amount of changes required to accommodate the change to nand_info[]. Signed-off-by: Scott Wood <oss@buserror.net>
* | mtd: nand: Remove nand_info_t typedefScott Wood2016-06-03-19/+19
|/ | | | | | | This typedef serves no purpose other than causing confusion with struct nand_chip. Signed-off-by: Scott Wood <oss@buserror.net>
* Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini2016-06-02-3/+0
|\
| * spl: Remove bogus GD_FLG_SPL_INIT checkMarek Vasut2016-06-01-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the check for GD_FLG_SPL_INIT in spl_relocate_stack_gd(). The check will always fail. This is because spl_relocate_stack_gd() is called from ARM's crt0.S and it is called before board_init_r(). The board_init_r() calls spl_init(), which sets the GD_FLG_SPL_INIT flag. Note that reserving the malloc area in RAM is not a problem even if the GD_FLG_SPL_INIT flag is not set. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Pavel Machek <pavel@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Stephen Warren <swarren@nvidia.com>
* | spl: Allow settings malloc_f base addressMarek Vasut2016-06-02-0/+3
|/ | | | | | | | | | Allow configuring the begining of the malloc_f area in SPL. This patch uses the same CONFIG_MALLOC_F_ADDR established by the sandbox. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org>
* spl: fit: Fix load address of fit headerLokesh Vutla2016-06-01-2/+2
| | | | | | | When loading fit header, it should be loaded to a previous address aligned to ARCH_DMA_MINALIGN and not 8. Fixing the same. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-05-27-9/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | For odroid-c2 (arch-meson) for now disable designware eth as meson now needs to do some harder GPIO work. Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: lib/efi_loader/efi_disk.c Modified: configs/odroid-c2_defconfig
| * dm: mmc: spl: Add support for CONFIG_BLKSimon Glass2016-05-27-5/+4
| | | | | | | | | | | | Allow driver model to be used for block devices in SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: env: mmc: Convert env_mmc to support CONFIG_BLKSimon Glass2016-05-27-4/+4
| | | | | | | | | | | | | | Update the MMC environment code so that it works with driver-model enabled for block devices. Signed-off-by: Simon Glass <sjg@chromium.org>
* | spl: Add an option to load a FIT containing U-Boot from UARTLokesh Vutla2016-05-27-14/+84
| | | | | | | | | | | | | | | | This provides a way to load a FIT containing U-Boot and a selection of device tree files from UART. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* | spl: fit: Do not print selected dtb during fit loadLokesh Vutla2016-05-27-3/+1
| | | | | | | | | | | | | | No prints should be allowed during UART load. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* | spl: Support loading a FIT from NANDLokesh Vutla2016-05-27-5/+32
| | | | | | | | | | | | | | | | | | | | | | Detect a FIT when loading from NAND and handle it using the new FIT SPL support. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> [trini: Make sure we continue to use (void *)(unsigned long) for load_addr]. Signed-off-by: Tom Rini <trini@konsulko.com>
* | spl: Support loading a FIT from FAT FSLokesh Vutla2016-05-27-4/+32
| | | | | | | | | | | | | | | | | | | | Detect a FIT when loading from a FAT File system and handle it using the new FIT SPL support. Tested-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* | spl: Allow to load a FIT containing U-Boot from FSLokesh Vutla2016-05-27-14/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | This provides a way to load a FIT containing U-Boot and a selection of device tree files from a File system. Making sure that all the reads and writes are aligned to their respective needs. Tested-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> [trini: Make this still apply with Michal's alignment change for 'fit'] Signed-off-by: Tom Rini <trini@konsulko.com>
* | spl: fit: Fix the number of bytes read when reading fdt from fitLokesh Vutla2016-05-27-0/+1
| | | | | | | | | | | | | | | | | | | | | | sectors field is not being updated when reading fdt from fit image. Because of this size_of(u-boot.bin) is being read when reading fdt. Fixing it by updating the sectors field properly. Tested-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* | Drop use of CONFIG_SYS_GENERIC_BOARD in U-BootSimon Glass2016-05-27-8/+2
| | | | | | | | | | | | | | | | This option is always enabled and is about to be removed. Drop references to it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
* | board_f: Don't require CONFIG_SYS_MONITOR_BASESimon Glass2016-05-27-1/+1
| | | | | | | | | | | | | | Allow this to be unset, such that gd->mon_len is invalid. This seems to be what the sh architecture does. Signed-off-by: Simon Glass <sjg@chromium.org>
* | cosmetic: debug: Replace #ifdef DEBUG with debug() macroLukasz Majewski2016-05-27-3/+2
| | | | | | | | | | | | Replace #ifdef DEBUG with dedicated debug() macro. Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
* | SPL: FIT: Align loading address for headerMichal Simek2016-05-27-0/+1
|/ | | | | | | | If bl_len is not aligned it can caused a problem because another code expects that start is aligned. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* fdt: Document the rest of struct of_busPaul Burton2016-05-25-0/+19
| | | | | | | | Provide some documentation for the fields of struct of_bus, for consistency with that provided for the new match field. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* fdt: Support for ISA bussesPaul Burton2016-05-25-3/+98
| | | | | | | | | | Support ISA busses in much the same way as Linux does. This allows for ISA bus addresses to be translated, and only if CONFIG_OF_ISA_BUS is selected in order to avoid including the code in builds which won't need it. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* image: Add boot_get_fpga() to load fpga with bootmMichal Simek2016-05-24-2/+107
| | | | | | | | | | Add function boot_get_fpga() which find and load bitstream to programmable logic if fpga entry is present. Function is supported on Xilinx devices for full and partial bitstreams in BIN and BIT format. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Remove additional blankline in image.h
* mkimage: Report information about fpgaMichal Simek2016-05-24-0/+5
| | | | | | | | Add FIT_FPGA_PROP that user can identify an optional entry for fpga. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* tools: zynqmpimage: Add Xilinx ZynqMP boot header generationMichal Simek2016-05-24-0/+1
| | | | | | | | | | Add support for the zynqmpimage to mkimage. Only basic functionality is supported without encryption and register initialization with one partition which is filled by U-Boot SPL. For more detail information look at Xilinx ZynqMP TRM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* SPL: FIT: Enable SPL_FIT_LOAD in RAM based boot modeMichal Simek2016-05-24-9/+36
| | | | | | | | | | Support loading FIT in SPL for RAM bootmode. CONFIG_SPL_LOAD_FIT_ADRESS points to address where FIT image is stored in memory. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
* spl: Introduce new function spl_board_prepare_for_bootMichal Simek2016-05-24-0/+6
| | | | | | | | | Call this function before passing control from SPL. For fpga case it is necessary to enable for example level shifters when bitstream is programmed. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* SPL: fat: Fix spl_parse_image_header() return value handlingTom Rini2016-05-23-1/+1
| | | | | | | | | | | The spl_parse_image_header() can return 0 and it is not an error. Only treat non-zero return value as an error. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Peng Fan <van.freenix@gmail.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>