summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dtoc: Fix some minor errorsSimon Glass2018-07-093-4/+5
| | | | | | Fix some comments and a printf string which is incorrect. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Fix properties with a single zero-arg phandleSimon Glass2018-07-094-5/+27
| | | | | | | | | At present a property with a single phandle looks like an integer value to dtoc. Correct this by adjusting it in the phandle-processing code. Add a test for this. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Fix Fdt.GetNode() to handle a missing nodeSimon Glass2018-07-092-1/+7
| | | | | | | | At present the algortihm is not correct since it will return the root node if the requested node is not found and there are no slashes in the requested node name. Fix this and add a test. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Keep track of property offsetsSimon Glass2018-07-092-7/+78
| | | | | | | | At present the Fdt class does not keep track of property offsets if they change due to removal of properties. Update the code to handle this, and add a test. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Update fdt tests to increase code coverageSimon Glass2018-07-095-24/+150
| | | | | | | | At present only some of the fdt functionality is tested. Add more tests to cover the rest of it. Also turn on test coverage, which is now 100% with a small exclusion for a Python 3 feature. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Drop use of a local dtb bufferSimon Glass2018-07-092-10/+10
| | | | | | | | | | | At present the Fdt class has its own copy of the device tree. This is confusing an unnecessary now that pylibfdt has its own. Drop it and provide access functions to the buffer. This allows us to move the rest of the implementation to use pylibfdt methods instead of directly calling libfdt stubs. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Make use of the new pylibfdt methodsSimon Glass2018-07-091-12/+14
| | | | | | | | | | Now that pylibfdt supports a fuller API we don't need to directly call the libfdt stubs. Update the code to use the Fdt methods instead. Some other cases remain which will be tidied up in a later commit, since they need larger changes. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Update tests to write failures to /tmpSimon Glass2018-07-091-14/+42
| | | | | | | | | | | | When a test fails due to an output mismatch (e.g. due to a new property being adding to a test file) it is currently hard to update the test to the new output. In particular the tabs in the file are written as \t in the Python tests. To make this easier, write both the expected and actual results to /tmp to allow use of meld, and copying into the test. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Add some tests for the fdt moduleSimon Glass2018-07-093-2/+257
| | | | | | | | | | At present this module is tested via the dtoc tests. This is a bit painful since the tests are at a higher level and so failures are more difficult to diagnose. Add some tests that exercise the fdt module directly. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Move coverage logic into a new test_util fileSimon Glass2018-07-092-25/+68
| | | | | | | | At present only binman has the logic for determining Python test coverage but this is useful for other tools also. Move it out into a separate file so it can be used by other tools. Signed-off-by: Simon Glass <sjg@chromium.org>
* libfdt: Add get_property() and del_node()Simon Glass2018-07-091-0/+32
| | | | | | | Add support for these functions in the Python binding. This patch stands in for a pending upstream change. Signed-off-by: Simon Glass <sjg@chromium.org>
* libfdt: Fix the Python pack() functionSimon Glass2018-07-091-1/+5
| | | | | | | | This currently fails to reduce the device-tree bytearray size. Fix this. This stands in for a pending upstream change. Signed-off-by: Simon Glass <sjg@chromium.org>
* libfdt: Bring in proposed pylibfdt changesSimon Glass2018-07-095-71/+663
| | | | | | | | | | | | | | | 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>
* binman: Tidy up setting of entry contentsSimon Glass2018-07-097-6/+62
| | | | | | | | | | | 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>
* binman: Tidy up execution of testsSimon Glass2018-07-091-5/+3
| | | | | | | | 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>
* binman: Correct operation of ObtainContents()Simon Glass2018-07-098-14/+114
| | | | | | | | | | | | | | 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>
* binman: Tidy up variables in _RunMicrocodeTest()Simon Glass2018-07-091-7/+18
| | | | | | | 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>
* binman: Make the operation of Entry__testing explicitSimon Glass2018-07-092-4/+11
| | | | | | | | | | | | | | 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>
* binman: Switch to 'python-coverage'Tom Rini2018-07-093-8/+7
| | | | | | | | | 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>
* dm: core: Add logging of some common errorsSimon Glass2018-07-091-2/+12
| | | | | | | 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>
* dm: core: Add a function to decode a memory regionSimon Glass2018-07-092-0/+126
| | | | | | | 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>
* dm: core: Update of_read_fmap_entry() for livetreeSimon Glass2018-07-093-10/+8
| | | | | | Update this function to take an ofnode so that it can work with livetree. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: spi: Update sandbox SPI emulation driver to use ofnodeSimon Glass2018-07-093-9/+10
| | | | | | Update the parameters sandbox_sf_bind_emul to support livetree. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Add a way to bind a device by ofnodeSimon Glass2018-07-092-0/+12
| | | | | | | 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>
* log: Add a way to log a return value with a messageSimon Glass2018-07-091-0/+8
| | | | | | | | 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>
* dm: core: Add a way to find an ofnode by compatible stringSimon Glass2018-07-092-0/+23
| | | | | | | Add an ofnode_by_compatible() to allow iterating through ofnodes with a given compatible string. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Add comments to ofnode_read_resource() functoinsSimon Glass2018-07-091-0/+23
| | | | | | These functions are missing comments. Add some. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Fix a few ofnode function commentsSimon Glass2018-07-091-1/+3
| | | | | | Tidy up three return-value errors. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Add ofnode function to read a 64-bit intSimon Glass2018-07-094-0/+78
| | | | | | | 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>
* fdt: Add device tree memory bindingsMichael Pratt2018-07-095-1/+224
| | | | | | | | | | | | | | 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>
* Prepare v2018.07v2018.07Tom Rini2018-07-091-1/+1
| | | | Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2018-07-081-0/+1
|\
| * video: arm: rpi: Add brcm,bcm2708-fb compatibleEmmanuel Vadot2018-07-021-0/+1
| | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'master' of git://git.denx.de/u-boot-tegraTom Rini2018-07-062-21/+8
|\ \
| * | tegra: nyan-big: Update CONFIG_SYS_TEXT to the default in README.chromiumPeter Robinson2018-07-062-21/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2018-07-062-1/+19
|\ \ \ | |/ / |/| |
| * | sunxi: A64: OHCI: prevent turning off shared USB clockAndre Przywara2018-07-051-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | usb: dwc2: Add brcm,bcm2708-usb compatibleEmmanuel Vadot2018-07-051-0/+1
|/ / | | | | | | | | | | | | | | | | 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>
* | Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini2018-07-038-6/+343
|\ \
| * | arm: timer: sunxi: add Allwinner timer erratum workaroundAndre Przywara2018-07-032-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | arm: timer: factor out FSL arch timer erratum workaroundAndre Przywara2018-07-031-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | sun50i: h5: Add initial Orange Pi Zero Plus supportHauke Mehrtens2018-06-164-0/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Orange Pi Zero Plus is an open-source single-board computer using the Allwinner H5 SOC. H5 Orangepi Zero Plus has - Quad-core Cortex-A53 - 512MB DDR3 - micrSD slot - 16MBit SPI Nor flash - Debug TTL UART - 1GBit/s Ethernet (RTL8211E) - Wifi (RTL8189FTV) - USB 2.0 Host - USB 2.0 OTG + power supply The device tree file is copied from the Linux kernel 4.17. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
| * | sun8i: h2: Add initial Orange Pi R1 supportHauke Mehrtens2018-06-164-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Orange Pi R1 is an open-source single-board computer using the Allwinner H2+ SOC. H2+ Orange Pi R1 has - Quad-core Cortex-A7 - 256MB DDR3 - micrSD slot - 128MBit SPI Nor flash - Debug TTL UART - 100MBit/s Ethernet (H2+) - 100MBit/s Ethernet (RTL8152B) - Wifi (RTL8189ETV) - USB 2.0 OTG + power supply This board is very similar to the Orange Pi Zero. The device tree file is copied from the Linux kernel 4.17. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
* | | Prepare v2018.07-rc3v2018.07-rc3Tom Rini2018-07-021-1/+1
| | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com>
* | | Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini2018-07-0216-11/+266
|\ \ \
| * | | ax25: Switch to CONFIG_BOOTP_PREFER_SERVERIPAlexander Graf2018-07-022-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | net: Add option to prefer bootp/dhcp serveripAlexander Graf2018-07-022-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | net: Prefer command line argumentsAlexander Graf2018-07-024-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | net: Add new wol command - Wake on LANLothar Felten2018-07-029-1/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | net: mvneta: zero Tx descriptors on initRabeeh Khoury2018-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>