summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-09libfdt: Bring in proposed pylibfdt changesSimon Glass
This provides various patches sent to the devicetree-compiler mailing list to enhance the Python bindings. A final version of this patch may be created once upstreaming is complete, but if it takes too long, this can act as a placeholder. New pylibfdt features: - Support for most remaining, relevant libfdt functions - Support for sequential-write functions Changes are applied to existing U-Boot tools as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09binman: Tidy up setting of entry contentsSimon Glass
At present the contents of an entry are set in subclasses simply by assigning to the data and content_size properties. Add some methods to do this, so that we have more control. In particular, add a method to set the contents without changing its size, so we can validate that case. Add a test case for trying to change the size when this is not allowed. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09binman: Tidy up execution of testsSimon Glass
Move all the test execution into the same mechanism so that we can request a particular test (from any suite) by passing it as an argument to 'binman -t'. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09binman: Correct operation of ObtainContents()Simon Glass
This method is supposed to return the contents of an entry. However at present there is no check that it actually does. Also some implementations do not return 'True' to indicate success, as required. Add a check for things working as expected, and correct the implementations. This requires some additional test cases to cover things which were missed originally. Add these at the same time. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09binman: Tidy up variables in _RunMicrocodeTest()Simon Glass
At present we call the three entries first, second and third. Rename them to reflect their contents instead, for clarity. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09binman: Make the operation of Entry__testing explicitSimon Glass
This fake entry is used for testing. At present it only has one behaviour which is to return an invalid set of entry positions, to cause an error. The fake entry will need to be used for other things too. Allow the test .dts file to specify the behaviour of the fake entry, so we can control its behaviour easily. While we are here, drop the ReadContents() method, since this only applies to subclasses of Entry_blob, which Entry__testing is not. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09binman: Switch to 'python-coverage'Tom Rini
The most portable way to get access to coverage is to invoke it as 'python-coverage'. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09dm: core: Add logging of some common errorsSimon Glass
Add additional logging so that common errors when finding a device by ofnode are easier to debug. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09dm: core: Add a function to decode a memory regionSimon Glass
Add a way to decode a memory region, including the memory type (sram or sdram) and its start address and size. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09dm: core: Update of_read_fmap_entry() for livetreeSimon Glass
Update this function to take an ofnode so that it can work with livetree. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09dm: spi: Update sandbox SPI emulation driver to use ofnodeSimon Glass
Update the parameters sandbox_sf_bind_emul to support livetree. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09dm: core: Add a way to bind a device by ofnodeSimon Glass
Add a new device_bind_ofnode() function which can bind a device given its ofnode. This allows binding devices more easily with livetree nodes. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09log: Add a way to log a return value with a messageSimon Glass
It is sometimes useful to show a message when logging an error return value, perhaps to add a few details about the problem. Add a function to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09dm: core: Add a way to find an ofnode by compatible stringSimon Glass
Add an ofnode_by_compatible() to allow iterating through ofnodes with a given compatible string. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09dm: core: Add comments to ofnode_read_resource() functoinsSimon Glass
These functions are missing comments. Add some. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09dm: core: Fix a few ofnode function commentsSimon Glass
Tidy up three return-value errors. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09dm: core: Add ofnode function to read a 64-bit intSimon Glass
We have a 32-bit version of this function. Add a 64-bit version as well so we can easily read 64-bit ints from the device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09fdt: Add device tree memory bindingsMichael Pratt
Support a default memory bank, specified in reg, as well as board-specific memory banks in subtree board-id nodes. This allows memory information to be provided in the device tree, rather than hard-coded in, which will make it simpler to handle similar devices with different memory banks, as the board-id values or masks can be used to match devices. Signed-off-by: Michael Pratt <mpratt@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2018-07-09Prepare v2018.07Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-08Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini
2018-07-06Merge branch 'master' of git://git.denx.de/u-boot-tegraTom Rini
2018-07-06tegra: nyan-big: Update CONFIG_SYS_TEXT to the default in README.chromiumPeter Robinson
To build U-Boot on a Nyan Big Chromebook the docs outline adjusting the Tegra124 defined CONFIG_SYS_TEXT_BASE but this has since been moved to individual config files. We should have the default required for U-Boot chain loading on the chromebook as the default CONFIG_SYS_TEXT_BASE and update the docs to remove this now non required step. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2018-07-06Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
2018-07-05sunxi: A64: OHCI: prevent turning off shared USB clockAndre Przywara
On the A64 the clock for the first USB controller is actually the parent of the clock for the second controller, so turning them off in that order makes the system hang. Fix this by only turning off *both* clocks when the *last* OHCI controller is brought down. This covers the case when only one controller is used. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2018-07-05usb: dwc2: Add brcm,bcm2708-usb compatibleEmmanuel Vadot
When using CONFIG_OF_BOARD on rpi to use the dtb provided by the RaspberryPi Fundation, the compatible string isn't the same, resulting in not-functional usb from u-boot. Signed-off-by: Oleksandr Tymoshenko <gonzo@FreeBSD.org> Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
2018-07-03Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini
2018-07-03arm: timer: sunxi: add Allwinner timer erratum workaroundAndre Przywara
The Allwinner A64 SoCs suffers from an arch timer implementation erratum, where sometimes the lower 11 bits of the counter value erroneously become all 0's or all 1's [1]. This leads to sudden jumps, both forwards and backwards, with the latter one often showing weird behaviour. Port the workaround proposed for Linux to U-Boot and activate it for all A64 boards. This fixes crashes when accessing MMC devices (SD cards), caused by a recent change to actually use the counter value for timeout checks. Fixes: 5ff8e54888e4d26a352453564f7f599d29696dc9 ("sunxi: improve throughput in the sunxi_mmc driver") [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-May/576886.html Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Andreas Färber <afaerber@suse.de> Tested-by: Guillaume Gardet <guillaume.gardet@free.fr>
2018-07-03arm: timer: factor out FSL arch timer erratum workaroundAndre Przywara
At the moment we have the workaround for the Freescale arch timer erratum A-008585 merged into the generic timer_read_counter() routine. Split those two up, so that we can add other errata workaround more easily. Also add an explaining comment on the way. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Andreas Färber <afaerber@suse.de> Tested-by: Guillaume Gardet <guillaume.gardet@free.fr>
2018-07-02Prepare v2018.07-rc3Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-02Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini
2018-07-02board/aries: RemoveTom Rini
The various Aries Embedded boards have been orphaned for a year and no one has come forward to take care of them. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-02ax25: Switch to CONFIG_BOOTP_PREFER_SERVERIPAlexander Graf
The ax25-ae350 target currently uses CONFIG_BOOTP_SERVERIP which means we ignore the DHCP provided TFTP ip address. This breaks every case where we do now provide a serverip environment variable. Instead, let's use the new CONFIG_BOOT_PREFER_SERVERIP option to fall back to the DHCP provided TFTP IP if no serverip environment variable is set. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Rick Chen <rick@andestech.com>
2018-07-02net: Add option to prefer bootp/dhcp serveripAlexander Graf
Currently we can choose between 2 different types of behavior for the serverip variable: 1) Always overwrite it with the DHCP server IP address (default) 2) Ignore what the DHCP server says (CONFIG_BOOTP_SERVERIP) This patch adds a 3rd option: 3) Use serverip from DHCP if no serverip is given (CONFIG_BOOTP_PREFER_SERVERIP) With this new option, we can have the default case that a boot file gets loaded from the DHCP provided TFTP server work while allowing users to specify their own serverip variable to explicitly use a different tftp server. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-02net: Prefer command line argumentsAlexander Graf
We can call commands like dhcp and bootp without arguments or with explicit command line arguments that really should tell the code where to look for files instead. Unfortunately, the current code simply overwrites command line arguments in the dhcp case with dhcp values. This patch allows the code to preserve the command line values if they were set on the command line. That way the semantics are slightly more intuitive. The reason this patch does that by introducing a new variable is that we can not rely on net_boot_file_name[0] being unset, as today it's completely legal to call "dhcp" and afterwards run "tftp" and expect the latter to repeat the same query as before. I would prefer not to break that behavior in case anyone relies on it. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-02net: Add new wol command - Wake on LANLothar Felten
Add a new command 'wol': Wait for an incoming Wake-on-LAN packet or time out if no WoL packed is received. If the WoL packet contains a password, it is saved in the environment variable 'wolpassword' using the etherwake format (dot or colon separated decimals). Intended use case: a networked device should boot an alternate image. It's attached to a network on a client site, modifying the DHCP server configuration or setup of a tftp server is not allowed. After power on the device waits a few seconds for a WoL packet. If a packet is received, the device boots the alternate image. Otherwise it boots the default image. This method is a simple way to interact with a system via network even if only the MAC address is known. Tools to send WoL packets are available on all common platforms. Some Ethernet drivers seem to pad the incoming packet. The additional padding bytes might be recognized as Wake-on-LAN password bytes. By default enabled in pengwyn_defconfig. Signed-off-by: Lothar Felten <lothar.felten@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-02net: mvneta: zero Tx descriptors on initRabeeh Khoury
Make the initialization sequence consistent with the Linux kernel driver. Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2018-07-02net: mvneta: dcache flush TX descriptors at initRabeeh Khoury
This fixes sporadic timeout on initial packet Tx (usually ARP), with an error message like: timeout: packet not sent Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Chris Packham <judge.packham@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2018-07-02net: fastboot: Fix build when FASTBOOT_FLASH is disabledAlex Kiernan
When building without FASTBOOT_FLASH we don't include the intermediate update callback to keep the client alive, so ensure we don't try setting it here. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-02net: zynq_gem: Initialize val variable in zynq_gem_miiphy_read()Michal Simek
phyread can timeout and val will contain random value. Initialize it to zero not to report random value in case of error. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-02Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini
2018-07-02video: arm: rpi: Add brcm,bcm2708-fb compatibleEmmanuel Vadot
When using CONFIG_OF_BOARD on rpi to use the dtb provided by the RaspberryPi Fundation, the compatible string isn't the same, resulting in not-functional video in u-boot. Signed-off-by: Oleksandr Tymoshenko <gonzo@FreeBSD.org> Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
2018-07-01Merge git://git.denx.de/u-boot-x86Tom Rini
2018-07-01Revert "fw_printenv: Don't bail out directly after one env read error"Tom Rini
As pointed out by Wolfgang Denk, the problem with this fix is that while interactive users will see that we have found one part of the environment failed and are using the other, progmatic use will not see this and can lead to problems. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-02doc: vxworks: Mention chain-loading an x86 kernel via 'bootefi'Bin Meng
This updates the doc to mention chain-loading an x86 kernel via 'bootefi' command, along with several typos fix. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexander Graf <agraf@suse.de>
2018-07-02x86: doc: Update EFI loader supportBin Meng
CONFIG_EFI_LOADER is fully supported on x86 now. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexander Graf <agraf@suse.de>
2018-07-02efi_loader: helloworld: Output ACPI configuration tableBin Meng
Output ACPI configuration table if it exists. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-07-02efi_loader: Install ACPI configuration tablesBin Meng
ACPI tables can be passed via EFI configuration table to an EFI application. This is only supported on x86 so far. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-02efi_loader: Increase number of configuration tables to 16Bin Meng
At present the number of configuration tables is set to 2. By looking at which tables the Linux EFI stub or iPXE can process, it looks 16 is a reasonable number. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-07-02x86: efi_loader: Build EFI memory map per E820 tableBin Meng
On x86 traditional E820 table is used to pass the memory information to kernel. With EFI loader we can build the EFI memory map from it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-02x86: Use microcode update from device tree for all processorsIvan Gorinov
Built without a ROM image with FSP (u-boot.rom), the U-Boot loader applies the microcode update data block encoded in Device Tree to the bootstrap processor but not passed to the other CPUs when multiprocessing is enabled. If the bootstrap processor successfully performs a microcode update from Device Tree, use the same data block for the other processors. Signed-off-by: Ivan Gorinov <ivan.gorinov@intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: fixed build errors on edison and qemu-x86] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>