summaryrefslogtreecommitdiff
path: root/board/CZ.NIC
AgeCommit message (Collapse)Author
2026-01-28board: nxp: Rename board directory from board/freescale to board/nxpAlice Guo
This patch renames the board directory from board/freescale to board/nxp because NXP now provides Board Support Packages (BSPs) and tools for the former Freescale i.MX and other i.MX products. All relevant references have been updated accordingly. This change does not affect functionality. Signed-off-by: Alice Guo <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2025-06-02global: Cleanup usage of "ETH_ALEN"Tom Rini
The value of "ETH_ALEN" is defined to 6 in <linux/if_ether.h>. This file is included in <net.h>. In the places where we had ETH_ALEN but no direct include of <net.h>, add <linux/if_ether.h>. In the places where we had a custom name used, make use of ETH_ALEN instead. Signed-off-by: Tom Rini <[email protected]>
2024-10-11board: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILDSimon Glass
Use the new symbol to refer to any 'SPL' build, including TPL and VPL Signed-off-by: Simon Glass <[email protected]>
2024-09-03arm: mvebu: turris_omnia: Switch DDR speed to 1333H when reset 9 is selectedMarek Behún
Users experiencing random kernel crashes due to new versions of Marvell's DDR training algorithm can solve the issue by setting DDR speed to 1333H. But if kernel crashes, it has to be done in U-Boot, which is impossible without UART connection. In order to make it easier for users, use the rescue button mechanism: when rescue mode 9 is selected (that is when 10 LEDs are ON), U-Boot will train DDR in 1333H mode and also update EEPROM so that subsequent boot will use this mode. User has to use the `eeprom` command in U-Boot or `omnia-eeprom` command in OS to switch back to 1600K mode. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-09-03arm: mvebu: turris_omnia: Use the i2c_eeprom misc driver for EEPROM reading ↵Marek Behún
in U-Boot proper Use the i2c_eeprom miscellaneous driver for reading Turris Omnia EEPROM in U-Boot proper. Keep using dm_i2c_read() in SPL build, since adding the i2c_eeprom driver to SPL build increases the image by 1.5 KiB. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-09-03arm: mvebu: turris_omnia: Rename variable holding EEPROM udeviceMarek Behún
Rename the variable holding the EEPROM udevice from `chip` to `eeprom`. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-07-13turris_1x: Normalize Kconfig usageTom Rini
We don't set many options in the board Kconfig entry file but instead use defconfigs, select in some cases on the target itself, or update the "default" options of the main entries when needed. In this case we can remove most of the board Kconfig entries and just add them to the defconfig like other platforms. Signed-off-by: Tom Rini <[email protected]>
2024-07-12Merge patch series "Add Turris 1.x board"Tom Rini
Marek Mojík <[email protected]> says: Hello all, this is a continuation of previous work by Pali to add support for the Turris 1.x board. As the patches were based on u-boot v2022.04, a nontrivial rebasing was needed. Some notes: - Some options that are in SD defconfig are disabled in NOR defconfig because over the years u-boot grew and the old NOR defconfig will not fit into NOR memory. - SD boot with RAM larger than 2GB will only allocate 2GB of RAM (We were not able to fix this yet)
2024-07-12powerpc: Add support for CZ.NIC Turris 1.x routersPali Rohár
Add support for CZ.NIC Turris 1.x routers. CZ.NIC Turris 1.0 (RTRS01) and 1.1 (RTRS02) are open source routers, they have dual-core PowerPC Freescale P2020 CPU and are based on reference Freescale P2020RDB-PC-A board design. Hardware design is fully open source, all firmware and hardware design files are available at Turris project website: https://docs.turris.cz/hw/turris-1x/turris-1x/ https://project.turris.cz/en/hardware.html The P2020 BootROM can load U-Boot either from NOR flash or from SD card. We add the new defconfigs, turris_1x_nor_defconfig, which configures U-Boot for building the NOR image, and turris_1x_sdcard_defconfig, which configures U-Boot for building an image suitable for SD card. The defconfig for NOR image is stripped-down a - many config options enabled in SD defconfig are disabled for NOR defconfig. This is because U-Boot grew non-trivially in the last two years and it would not fit into the space allocated for U-Boot in the NOR memory. In the future we may try to use LTO to reduce the size of the code and enable more options. The design of CZ.NIC Turris 1.x routers is based on Freescale P2020RDB-PC-A board, so some code from boards/freescale/p1_p2_rdb_pc is used and linked into Turris 1.x board code. Turris 1.x code in this patch uses modern distroboot and can boot Linux kernel from various locations, including NAND, SD card, USB flash disks, NVMe disks or SATA disks (connected to extra SATA/SCSI PCIe controllers). Via distroboot is implemented also rescue NOR boot for factory recovery, triggered by reset button, like on other existing Turris routers. SD boot with RAM larger than 2GB will only allocate 2GB of RAM (We were not able to fix this yet) [ Because various CONFIG_ macros were migrated to Kconfig since the last time this worked on upstream U-Boot (in 2022), a non-trivial rebasing was needed and some issues were solved. ] Signed-off-by: Pali Rohár <[email protected]> Signed-off-by: Marek Mojík <[email protected]> Reviewed-by: Marek Behún <[email protected]>
2024-07-08arm: mvebu: turris_omnia: Support old DDR3 trainingMarek Behún
Support old DDR3 training code on Turris Omnia, selectable via EEPROM field. Users experiencing DDR3 initialization failures or random crashes of the operating system due to incorrect DDR3 configuration can select the old DDR3 training implementation to fix those issues by setting the EEPROM field "Use old DDR training": eeprom update "Use old DDR training" 1 Signed-off-by: Marek Behún <[email protected]>
2024-07-08arm: mvebu: turris_omnia: Read DDR speed from EEPROMMarek Behún
Some Turris Omnia boards experience memory issues, and by experimentation we found that some of these issues can be solved by slowing DDR speed. Add a new field in the extended EEPROM information structure, ddr_speed. Support several values in this field (for now 1066F, 1333H, and the default, 1600K) and use it to overwrite the DDR topology parameters used by the DDR training algorithm. Signed-off-by: Marek Behún <[email protected]>
2024-07-08arm: mvebu: turris_omnia: Extend EEPROM info structureMarek Behún
Extend the Omnia EEPROM information structure in preparation for more variables to be stored there. Signed-off-by: Marek Behún <[email protected]>
2024-07-08arm: mvebu: turris_omnia: Implement EEPROM layout for the 'eeprom' commandMarek Behún
Implement Turris Omnia EEPROM layout for the 'eeprom' command. When the 'eeprom' command (with layout support) is enabled, we can now use the 'eeprom print' and 'eeprom update' commands, for example: => eeprom print Magic constant 34a04103 RAM size in GB 2 Wi-Fi Region CRC32 checksum cecbc2a1 Signed-off-by: Marek Behún <[email protected]>
2024-07-08arm: mvebu: turris_omnia: Fix ethernet PHY reset gpio FDT fixupMarek Behún
For board revisions where the WAN ethernet PHY reset GPIO is controllable via MCU we currently insert a phy-reset-gpios property into the ethernet controller node. The mvneta driver parses this property and uses the GPIO to reset the PHY. But this phy-reset-gpios property is not a valid DT binding in upstream kernel. Instead, a reset-gpios property should be inserted into the ethernet PHY node. This correct DT binding is supported by the DM ETH PHY U-Boot driver. Insert the reset-gpios property into the WAN PHY node instead the phy-reset-gpios property in WAN ETH node so that Linux will correctly use the reset GPIO. Enable the CONFIG_DM_ETH_PHY config option so that U-Boot will also use the correct DT property. Note: currently there are 4 ethernet controller drivers parsing the wrong DT property: dwc_eth_qos, fex_mxc, mvneta and mvpp2. We should convert all relevant device-trees to use reset-gpios so that we can get rid of these drivers parsing this property. Fixes: 1da53ae26afc ("arm: mvebu: turris_omnia: Add support for design with SW reset signals") Signed-off-by: Marek Behún <[email protected]>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-06board: CZ.NIC: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-04-22common: Convert *.c/h from UTF-8 to ASCII enconfingMichal Simek
Convert UTF-8 chars to ASCII in cases where make sense. No Copyright or names are converted. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Tom Rini <[email protected]> Acked-by: Marek Behún <[email protected]>
2024-04-04arm: mvebu: turris_omnia: Disable Atmel SHA node if not presentMarek Behún
If the FEAT_CRYPTO feature bit is present in MCU features, the board crypto is implemented by MCU and the Atmel SHA chip is not present. Disable Atmel SHA device-tree node in that case. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-04-04arm: mvebu: turris_omnia: Print board ECDSA public key if availableMarek Behún
If MCU supports the FEAT_CRYPTO feature, read board ECDSA public key from MCU and print it. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-04-04arm: mvebu: turris_omnia: Implement getting board information from MCUMarek Behún
Implement reading board serial number, first MAC address and board version from MCU. MCU supports board information if the FEAT_BOARD_INFO feature bit is set in MCU features. Prefer getting board information from MCU if supported, fallback to Atmel SHA chip. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-04-04arm: mvebu: turris_omnia: Update MCU status and features readingMarek Behún
Refactor MCU status word and MCU firmware features reading to make it simpler to use. Try reading 32 bits of features, if that fails, read 16 bits. Older MCU firmware supports only 16-bit wide features, and if more bytes are read, either 0xff is sent or I2C transaction fails. Handle both cases. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-04-04arm: mvebu: turris_{omnia, mox}: Don't print model two timesMarek Behún
Since commit 8cd4bf7dc9ba ("turris: Use checkboard() instead of show_board_info()") the model is show two times during boot: Model: Turris Omnia Model: Turris Omnia This is because the common function show_board_info() shows it, and Turris' checkboard() also does. Remove the second print. Fixes: 8cd4bf7dc9ba ("turris: Use checkboard() instead of show_board_info()") Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-04-04arm: mvebu: turris_omnia: Add header containing MCU command interface and use itMarek Behún
Add header containing all MCU command definitions and use it in board code and in MCU driver. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-12-21global: Drop common.h inclusionTom Rini
In order to make it easier to move on to dropping common.h from code directly, remove common.h inclusion from the rest of the header file which had been including it. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2023-11-28turris: Use checkboard() instead of show_board_info()Simon Glass
Boards can use a sysinfo driver if a particular model name is needed. Update this board to use checkboard() directly, rather than having a weak function laid on top of a weak function. Signed-off-by: Simon Glass <[email protected]>
2023-10-26arm: mvebu: turris_mox: Extend to support RIPE Atlas ProbeMarek Behún
Extend Turris Mox board code to support CZ.NIC's RIPE Atlas Probe. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-10-02Merge branch 'next'Tom Rini
Signed-off-by: Tom Rini <[email protected]>
2023-09-04MAINTAINERS: Drop Pali RohárTom Rini
Remove Pali from his listed maintainer entries due to his publicly visible actions on the mailing list. Signed-off-by: Tom Rini <[email protected]>
2023-08-31event: Use an event to replace last_stage_init()Simon Glass
Add a new event which handles this function. Convert existing use of the function to use the new event instead. Make sure that EVENT is enabled by affected boards, by selecting it from the LAST_STAGE_INIT option. For x86, enable it by default since all boards need it. For controlcenterdc, inline the get_tpm() function and make sure the event is not built in SPL. Signed-off-by: Simon Glass <[email protected]>
2022-12-05global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_SDRAM namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-09-18arm: mvebu: turris_omnia: Fix setting switch CONFIG pins on new board designMarek Behún
It seems that waiting only 10 ms after releasing LAN switch from reset is not enough for the strapping pins to latch the requested values. P6_MODE[0] is latched to 0 instead of 1. Increasing the delay to 50 ms fixes this issue. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-09-13arm: mvebu: turris_mox: Add support for distroboot $fdt_addrPali Rohár
$fdt_addr is mandatory for systems which provides DTB in HW (e.g. ROM) and wishes to pass that DTB to Linux. Turris Mox contains DTB binary in SPI NOR memory at "dtb" partition which starts at offset 0x7f0000 and is 0x10000 bytes long. Armada 3700 CPU does not allow mapping SPI NOR memory into physical address space like on other architectures and therefore set $fdt_addr variable to memory range in RAM and loads this DTB binary from SPI NOR in misc_init_r() function. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-09-13arm: mvebu: turris_{omnia, mox}: Reset bootdelay env for rescuePali Rohár
When rescue mode was activated reset also bootdelay env variable to its default value. This will ensure that reset button works and starts rescue mode also in the case when user changed bootdelay env variable to -1 (which has meaning to not start autoboot). Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-09-13board: turris: Initialize serial# envPali Rohár
Store serial number from atsha cryptochip into the serial# env variable. U-Boot automatically puts content of this variable into the root device tree property serial-number when booting Linux kernel. Refactor turris atsha code and from turris_atsha_otp_get_serial_number() function returns directly string suitable for printing or storing into device tree. Because during different boot stages is env storage read-only, it is not possible to always store serial number into env storage. So introduce a new function turris_atsha_otp_init_serial_number() which is called at later stage and which ensures that serial number is correctly stored into env. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-08-23arm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is ↵Pali Rohár
detected When Mox SFP module is connected after Topaz or Peridot module then port DT node already contains "sfp" label. But Mox SFP module can be connected also without Topaz or Peridot module in which case it is connected directly into he eth1 DT node, which is without any label. So add "sfp" label into eth1 DT node in this case. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-08-23arm: mvebu: turris_omnia: Show MCU versionPali Rohár
There are already more MCU firmware versions for Turris Omnia in production, so display git commit (version) of the MCU firmware during U-Boot startup. It will help to identify what version of MCU firmware is Turris Omnia using. MCU firmware for Turris Omnia is open source and available at website: https://gitlab.nic.cz/turris/hw/omnia_hw_ctrl It can be updated from running system via i2c bus with this tool: https://gitlab.nic.cz/turris/omnia-mcutool Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-08-23arm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPLPali Rohár
SPI0 CS0 Flash is mapped to address range 0xD4000000 - 0xD7FFFFFF by BootROM. Proper U-Boot removes this direct mapping. So it is available only in SPL. This applies for all 32-bit Armada BootROMs. SPL mvebu code is used only on 32-bit Armada SoCs. So move env_sf_get_env_addr() function from Turris Omnia board to common SPL mvebu code and add proper checks for SPI0 CS0. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-08-09arm: mvebu: turris_omnia: Remove hardcoded spi-nor device tree pathPali Rohár
Linux kernel DTS files renamed spi-nor@0 node to flash@0 which effectively broke U-Boot to boot new Linux kernel versions correctly. So remove hardcoded spi-nor device tree path from Turris Omnia board code and replace it by searching for mtd node by compatible string. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-08-09arm: mvebu: turris_omnia: Increase fdt size in fixup_mtd_partitionsPali Rohár
Sometimes fixup_mtd_partitions() prints during booting kernel error "Failed fixing SPI NOR partitions!" because it does not have enough space for creating all paritions nodes. So increase fdt size. Fixes: 92f36c8e74c1 ("arm: mvebu: turris_omnia: fixup MTD partitions in Linux' DTB") Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Marek Behún <[email protected]>
2022-08-09arm: mvebu: turris_omnia: Do not fail in fixup_mtd_partitions when ↵Pali Rohár
partitions do not exist All partitions are created by fixup_mtd_partitions() function, so they do not have to exist just for their removal need. Fixes: 92f36c8e74c1 ("arm: mvebu: turris_omnia: fixup MTD partitions in Linux' DTB") Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Marek Behún <[email protected]>
2022-08-09arm: mvebu: turris_omnia: Add support for design with SW reset signalsPali Rohár
New Turris Omnia HW board revision requires that software controls peripheral reset signals, namely PERST# signals on mPCIe slots, ethernet phy reset and lan switch reset. Those pins are connected to MCU controlled by MCU i2c API as GPIOs. On new HW board revision those pins stay in reset after board reset and software has to release these peripherals from reset manually. MCU announce this requirement by FEAT_PERIPH_MCU bit in CMD_GET_FEATURES command. On older HW board revisions when FEAT_PERIPH_MCU is not announced, all those reset signals are automatically released after board finish reset. Detect FEAT_PERIPH_MCU bit in board_fix_fdt() and ft_board_setup() functions and insert into device tree blob pcie "reset-gpios" and eth phy "phy-reset-gpios" properties with corresponding MCU gpio definitions. PCIe and eth PHY drivers then automatically release resets during device initialization. Both U-Boot and Linux kernel drivers support those device tree reset properties. Initialization of lan switch on new HW board revision is more complicated. Switch strapping pins are shared with switch RGMII pins. And strapping pins must be in specific configuration after releasing switch reset. Due to pin sharing, it is first required to switch A385 side of switch pins into GPIO mode, set strapping configuration, release switch from reset and after that switch A385 pins back to RGMII mode. Because this complicated setup is not supported by switch DSA drivers and cannot be expressed easily in device tree, implement it manually in SPL function spl_board_init(). So in proper U-Boot and OS/kernel would be lan switch initialized and be in same configuration like it was on old HW board revisions (where reset sequence did those steps at hardware level). Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Marek Behún <[email protected]>
2022-08-09arm: mvebu: turris_omnia: Show MCU type in show_board_info()Pali Rohár
Different Turris Omnia HW board revisions contains different MCU. Show type in show_board_info() to easily identify which MCU is populated. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Marek Behún <[email protected]>
2022-07-29gpio: Add Turris Omnia MCU driverPali Rohár
This driver registers GPIO controller and allows U-Boot to control GPIO pins on MCU which is connected to Turris Omnia via i2c. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-07-21treewide: Fix Marek's name and change my e-mail addressMarek Behún
Fix diacritics in some instances of my name and change my e-mail address to [email protected]. Add corresponding .mailmap entries. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-07-21board: turris: Fix MAINTAINERS and add PaliMarek Behún
Fix MAINTAINERS files for Turris devices, add missing files and add Pali as maintainer. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-07-21board: turris: Find atsha device by atsha driverPali Rohár
It does not matter what is DT node name of atsha device. So find it via atsha driver and not by DT node name. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-05-23spi: spi-uclass: Add new spi_get_bus_and_cs() implementationPatrice Chotard
Move legacy spi_get_bus_and_cs() code to _spi_get_bus_and_cs(). Add new spi_get_bus_and_cs() implementation which rely on DT for speed and mode and don't need any drv_name nor dev_name parameters. This will prepare the ground for next patch. Update all callers to use _spi_get_bus_and_cs() to keep the same behavior. Signed-off-by: Patrice Chotard <[email protected]> Cc: Marek Behun <[email protected]> Cc: Jagan Teki <[email protected]> Cc: Vignesh R <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]> Cc: Lukasz Majewski <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Wolfgang Denk <[email protected]> Cc: Simon Glass <[email protected]> Cc: Stefan Roese <[email protected]> Cc: "Pali Rohár" <[email protected]> Cc: Konstantin Porotchkin <[email protected]> Cc: Igal Liberman <[email protected]> Cc: Bin Meng <[email protected]> Cc: Pratyush Yadav <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Anji J <[email protected]> Cc: Biwen Li <[email protected]> Cc: Priyanka Jain <[email protected]> Cc: Chaitanya Sakinam <[email protected]>
2022-05-04arm: mvebu: turris_mox: Use DM registered MDIOMarek Behún
In order to be able to get rid of the non-DM MDIO bus registered in mvneta driver, start using the DM registered one in Turris MOX board code. This also allows us to drop the hack introduced in MOX' -u-boot.dtsi file. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-05-02arm: mvebu: turris_omnia: Fix SYS_RSTOUT_* macro namesPali Rohár
This is A385 register. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>