aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-18display5: Add missing environment.h include to avoid warningLukasz Majewski
Without this change the following warning shows up when building: board/liebherr/display5/display5.c:270:3: warning: implicit declaration of function ‘eth_env_set_enetaddr’ [-Wimplicit-function-declaration] This commit fixes this issue. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: Add GPT verification and restoration code on SWUpdate entryLukasz Majewski
If GPT gets broken, then after N boot attempts we will run the SWUpdate restoration image. On its enter we will check GPT and restore it if needed. To test it: display5 > mmc write 0x12000000 4 8 It will overwrite the primary GPT table. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: display5_defconfig: Enable support for gpt command (CMD_GPT) in ↵Lukasz Majewski
production u-boot After this change one can run 'gpt' command on production u-boot. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: Reduce rootfs2 (BACKUP) size from 1528M to 512MLukasz Majewski
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: Add cma=256M to command line argumentsLukasz Majewski
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: net: Add function to read ethaddr from iMX6 fusesLukasz Majewski
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: ddr: Enable support for DDR3 auto calibrationLukasz Majewski
This code performs DDR3 memory calibration for display5 board. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: Update swupdate initramfs file name (now supporting ext4)Lukasz Majewski
After moving to swupdate 2017.07, the default fs for swupdate rootfs is ext4, not ext3. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: factory: Update BACKUP rootfs in factory modeLukasz Majewski
After splitting rootfs images to BACKUP and ACTIVE, the "factory" u-boot also needs to update the former. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: Provide 'tftp_mmc_rootfs_bkp' command to write BACKUP rootfsLukasz Majewski
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: wdt: Enable WDT support (both SPL and u-boot)Lukasz Majewski
Test case: The fitImage gets corrupted: truncate -c -s 3M fitImage run tftp_mmc_fitImg setenv boot_os y reset [board shall hang in SPL with "Trying to boot from MMC1" information] Then after X seconds WDT is causing board to reset. After N boot attempts we enter recovery mode. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: Support for the emergency PAD pressingLukasz Majewski
To enter the special mode, one needs to short cut two pads with e.g. screw driver. After power up the SPL will execute u-boot in which proper actions will be taken. It is worth noting that we do not alter envs (even the BOOT_FROM variable) and unconditionally go to recovery. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: factory: Extend mtdparts to support LEG factory partitionLukasz Majewski
This special partition has been added solely for production purpose. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: Update SPI-NOR partition for larger swupdate-initramfsLukasz Majewski
The SPI-NOR partition information has been updated to store swupdate-kernel-FIT just after envs as well as two times larger swupdate-initramfs image. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: Remove support for Linux initramfs recovery image bootLukasz Majewski
This is a prerequisite patch to combine SWUpdate and Linux recovery initramfs images. It removes the support for it. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: Reset the board when bootm failsLukasz Majewski
Since display5 is now supporting boot counting, we can just reset the board when bootm fails (i.e. it doesn't boot the fitImage kernel for any reason). Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: spl: Check return code of the env_* functionsLukasz Majewski
Force booting through u-boot proper when environment error encountered (as a result of either broken SPI-NOR or erased envs). Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: Provide command to flash the whole SPI-NOR memoryLukasz Majewski
It may be necessary to update the content of the whole SPI-NOR memory at once with using a single command (tftp_sf_img). Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: Add "factory" (1MiB) SPI-NOR partition in u-bootLukasz Majewski
To test if this partition is present - one needs to write: display5 > sf probe; mtdparts display5 > sf erase factory +0x100000 Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: config: factory: Setup IP config data according to LEG production ↵Lukasz Majewski
setup Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-18display5: factory: Add support for BOOT_FROM = FACTORY switchLukasz Majewski
When BOOT_FROM = FACTORY, then the LEG's factory setup is performed. This code relies on boot_nfs u-boot command, so it shall be adjusted appropriately (e.g. provide proper fitImage file). Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-06-16Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
2018-06-15Merge tag 'arc-updates-for-2018.07-rc2' of git://git.denx.de/u-boot-arcTom Rini
Here we just add a tool for HSDK flashable images preparation together with extensive documentation for HSDK board. This will help real-life users to update U-Boot on the board.
2018-06-15Merge tag 'xilinx-for-v2018.07-rc2' of git://git.denx.de/u-boot-microblazeTom Rini
Xilinx fixes for v2018.07-rc2 Zynq: - Fix missing watchdog header - DT fixes ZynqMP: - emmc configuration split - Enable SPD - Fix PMUFW_INIT_FILE logic - Coverity fixes in SoC code timer - Add timer_get_boot_us mmc: - Fix MMC HS200 tuning command serial: - Fix scrabled chars with OF_LIVE
2018-06-15ARC: HSDK: Add readmeAlexey Brodkin
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-06-15ARC: HSDK: Add tool and make target to generate bspEugeniy Paltsev
HSDK board has preloader that reads SPI flash pages and searches for a special image header to fetch and load binary. Add tool, make target (bsp-generate) to generate update script and u-boot binary image with header for preloader. Also add script to default environment to apply updates. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-06-15serial: zynq: Make zynq_serial_setbrg staticMichal Simek
This function is used only inside this driver that's why should be static. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-15serial: zynq: Initialize uart only before relocationMichal Simek
This issue was found when OF_LIVE was enabled that there are scrambled chars on the console like this: Chip ID: zu3eg Watchdog: Started��j� sdhci@ff160000: 0, sdhci@ff170000: 1 In: serial@ff010000 I found a solution for this problem exactly the same as I found later in serial_msm fixed by: "serial: serial_msm: initialize uart only before relocation" (sha1: 7e5ad796bcd65772a87da236ae21cd536ae3a4d2) What it is happening is that output TX fifo still contains chars to be sent and _uart_zynq_serial_init() resets TX fifo even in the middle of transfer. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-15serial: zynq: Write chars till output fifo is fullMichal Simek
Change logic and put char to fifo till there is a space in output fifo. Origin logic was that output fifo needs to be empty. It means only one char was in output queue. Also remove unused ZYNQ_UART_SR_TXEMPTY macro. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-15serial: zynq: Use BIT macros instead of shifts and full hex numbersMichal Simek
Coding style is checking to use BIT macros instead of shifts. The patch is also fixing the rest of macros which should be BITs instead of hex numbers. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-15gpio: zynq_gpio: bank description should use unsigned typeMichal Simek
Use u32 instead of int for max_bank, bank_min and bank_max. These values can't be negative that's why no reason to use signed type. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15arm64: zynqmp: Check return value in zynqmp_mmio_rawwrite()Michal Simek
There should be return value check from zynqmp_mmio_read() in zynqmp_mmio_rawwrite() to make sure that errors are propagated properly. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15arm64: zynqmp: Check return value from callocMichal Simek
calloc() can fail and return NULL. The patch is checking return value and return in case of error. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15mmc: zynq: Fix tuning_loop_counter type in arasan_sdhci_execute_tuning()Michal Simek
Code around tuning_loop_counter variable expects to go below zero. That's why this variable can't use unsigned type. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15gpio: zynq: Do not check unsigned type that is >= 0Michal Simek
There is no reason to check that unsigned type that is >= 0. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15mmc: sdhci: Fix MMC HS200 tuning command failuresSiva Durga Prasad Paladugu
This patch fixes the mmc tuning command failures when tuning pattern data needs to read back for comparision against the expected bit pattern. Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-15arm64: zynqmp: accept an absolute path for PMUFW_INIT_FILELuca Ceresoli
The value of PMUFW_INIT_FILE is prefixed with "$(srctree)/", thus forcing it to be a relative path inside the U-Boot source tree. Since the PMUFW is a binary file generated outside of U-Boot, the PMUFW binary must be copied inside the U-Boot source tree before the build. This generates a few problems: * if the source tree is shared among different out-of-tree builds, they will pollute (and potentially corrupt) each other * the source tree cannot be read-only * any buildsystem must add a command to copy the PMUFW binary * putting an externally-generated binary in the source tree is ugly as hell Avoid these problems by accepting an absolute path for PMUFW_INIT_FILE. This would be as simple as removing the "$(srctree)/" prefix, but in order to keep backward compatibility we rather use the shell and readlink to get the absolute path even when starting from a relative path. Since 'readlink -f' produces an empty string if the file does not exist, we also add a check to ensure the file configured in PMUFW_INIT_FILE exists. Otherwise the build would exit successfully, but produce a boot.bin without PMUFW as if PMUFW_INIT_FILE were empty. Tested in the 12 possible combinations of: - PMUFW_INIT_FILE empty, relative, absolute, non-existing - building in-tree, in subdir, in other directory Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Simon Glass <sjg@chromium.org> Cc: Emmanuel Vadot <manu@bidouilliste.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15arm64: zynqmp: Enable SPD ddr support for zcu102 targetsMichal Simek
zcu102 contains DIMM with SPD on it at 0x51 address. For example: i2c dev 13 i2c sdram 51 Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15timer: cadence: Implement timer_get_boot_usMichal Simek
This function is required for adding bootstage support. Also enable it directly for ZynqMP R5 configuration. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15arm: zynq: Drop #address-cells and #size-cells from gpio-keysMichal Simek
dtc is showing some warnings and this change was also done in the Linux kernel as "Input: gpio-keys - clean up device tree binding example" with this fragment in commit message "Drop #address-cells and #size-cells, which are not required by the gpio-keys binding documentation, as button sub-nodes are not devices." Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15arm64: zynqmp: Split emmc configuration into emmc0 and emmc1Siva Durga Prasad Paladugu
This patch splits the current mini emmc configuration into emmc0 and emmc1 configurations because emmc is probed at boot time and on systems which have only one interface mini configuration is failing on unused interface. This patch also adds required clock node in dts and enables CONFIG_MMC_SDHCI_ZYNQ through defconfig. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-15arm: zynq: Add missing watchdog headerMichal Simek
Add missing header detected by sparse. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-14Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini
Patch queue for efi - 2018-06-14 A few minor fixes for the release: - Compile fixes - HI20 relocations for RISC-V - Fix bootefi without load path - Fix Runtime Services with certain compilers
2018-06-14Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini
2018-06-14usb: sunxi: access ahb_reset0_cfg in CCM using its offsetVasily Khoruzhick
struct sunxi_ccm_reg doesn't have ahb_reset0_cfg on sun4i and sun5i, thus compilation fails with: drivers/usb/host/ohci-sunxi.c:96:26: error: 'struct sunxi_ccm_reg' has no member named 'ahb_reset0_cfg' Access this reg using its offset to fix this issue. Fixes commit 1ed9c1118 ("usb: sunxi: ehci: get rid of ifdefs") and commit 56830cee3 ("usb: sunxi: ohci: get rid of ifdefs") Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2018-06-14efi_loader: Allocate memory handle for mem dpAlexander Graf
When we boot using memdp (bootefi on an address without previous load that populates the device path) then the memory device path we pass in is not backed by any handle. That can result in weird effects. For example grub gets very grumpy about this inside the efi_net module and just loops endlessly. So let's expose a simple handle that the memory device path is backed on. That way any code that looks for the device the dp is on, finds one. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-06-14efi_loader: avoid make race conditionHeinrich Schuchardt
When U-Boot is built with 'make -j' there is not guarantee that targets in directory arch/ are built before targets in directory lib/. The current build instruction for EFI binaries in lib/ rely on dependencies in arch/. If $(EFI_CRT0) or $(EFI_RELOC) is not yet built before trying to build %.efi an error *** No rule to make target '%.efi' occurs. With the patch separate copies of $(EFI_CRT0) and $(EFI_RELOC) named efi_crt0.o and efi_reloc.o are built in lib/efi_loader and lib/efi_selftest. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-06-14efi_loader: avoid initializer element is not constantHeinrich Schuchardt
When building with -pedantic the current definition of EFI_GUID() causes an error 'initializer element is not constant'. Currently EFI_GUID() is used both as an anonymous constant and as an intializer. A conversion to efi_guid_t is not allowable when using EFI_GUID() as an initializer. But it is needed when using it as an anonymous constant. We should not use EFI_GUID() for anything but an initializer. So let's introduce a variable where needed and remove the conversion. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-06-14efi: Add a comment about duplicated ELF constantsSimon Glass
These constants are defined in arch-specific code but redefined here. Add a TODO to clean this up. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-06-14efi_loader: Convert runtime reset from switch to if statementsAlexander Graf
We currently handle the UEFI runtime reset / power off case handling via a switch statement. Compilers (gcc in my case) may opt to handle these via jump tables which they may conveniently put into .rodata which is not part of the runtime section, so it will be unreachable when executed. Fix this by just converting the switch statement into an if/else statement. It produces smaller code that is faster and also correct because we no longer refer .rodata from efi runtime code. Reported-by: Andreas Färber <aferber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>