aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-12-11Merge tag 'u-boot-nand-20221211' of ↵WIP/11Dec2022Tom Rini10-50/+81
https://source.denx.de/u-boot/custodians/u-boot-nand-flash Merge tag 'u-boot-nand-20221211' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash - cmd: nand: Extend nand info to print ecc information - rawnand: omap_gpmc: driver model support (the first patches of the series) - mtd: nand: make Samsung SLC NAND usable again - cmd: mtd: check if a block has to be skipped or erased - spl: spl_legacy: fix invalid offset in SPL_COPY_PAYLOAD_ONLY
2022-12-10spl: spl_legacy: fix invalid offset in SPL_COPY_PAYLOAD_ONLYDai Okamura1-2/+2
This fixes the header offset calculation. This issue was found on uniphier v7 SoCs with SPL. Fixes: 06377c5a1f ("spl: spl_legacy: Fix NAND boot on OMAP3 BeagleBoard") Signed-off-by: Dai Okamura <okamura.dai@socionext.com> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com> Acked-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221209114021.3074978-1-okamura.dai@socionext.com Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: nand: mxs_nand_spl: don't read useless pagesDario Binacchi1-1/+1
The patch prevents pages beyond the last from being unnecessarily read. This occurs when the last page to be read is not the last page of the last block. Before this change we would have read all the pages up to the end of the last block. Suggested-by: Michael Trimarchi <michael@amarulasolutions.com> Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Acked-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221120095705.3019295-1-dario.binacchi@amarulasolutions.com
2022-12-10mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase()Dario Binacchi2-3/+1
This function is only used within this module, so it is no longer necessary to use EXPORT_SYMBOL_GPL(). This patch parallels the work done in the following patch: https://lore.kernel.org/linux-mtd/20221018170205.1733958-1-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221108090719.3631621-1-dario.binacchi@amarulasolutions.com
2022-12-10cmd: mtd: check if a block has to be skipped or erasedDario Binacchi1-8/+20
As reported by patch [1], the `mtd erase' command should not erase bad blocks. To force bad block erasing you have to use the `mtd erase.dontskipbad' command. This patch tries to fix the same issue without modifying code taken from the linux kernel, in order to make further upgrades easier. [1] https://lore.kernel.org/all/20221006031501.110290-2-mikhail.kshevetskiy@iopsys.eu/ Suggested-by: Michael Trimarchi <michael@amarulasolutions.com> Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Co-developed-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Tested-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: nand: make Samsung SLC NAND usable againMichael Trimarchi1-2/+5
Upstream linux commit 69fc01296c9281 commit a1286a1fc416 ("mtd: nand: Move Samsung specific init/detection logic in nand_samsung.c") introduced a regression for Samsung SLC NAND chips. Prior to this commit chip->bits_per_cell was initialized by calling nand_get_bits_per_cell() before using nand_is_slc(). With the offending commit this call is skipped, leaving chip->bits_per_cell cleared to zero when the manufacturer specific '.detect' function calls nand_is_slc() which in turn interprets bits_per_cell != 1 as indication for an MLC chip. The effect is that e.g. a K9F1G08U0F NAND chip is falsely detected as MLC NAND with 4KiB page size rather than SLC with 2KiB page size. Add a call to nand_get_bits_per_cell() before calling the .detect hook function in nand_manufacturer_detect(), so that the nand_is_slc() calls in the manufacturer specific code will return correct results. Reported-by: Marcin Gołaś <marcingol30@gmail.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/all/20221021060536.11747-1-michael@amarulasolutions.com Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: omap_gpmc: Reduce .bss usageRoger Quadros1-3/+4
Allocate omap_ecclayout on the heap as we have limited .bss space on AM64 R5 SPL configuration. Reduces .bss usage by 2984 bytes. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-9-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: nand_spl_loaders: Fix cast type build warningRoger Quadros1-1/+1
Fixes the below build warning on 64-bit platforms. drivers/mtd/nand/raw/nand_spl_loaders.c:26:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] dst = (void *)((int)dst - page_offset); Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-8-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: omap_gpmc: Optimize NAND readsRoger Quadros1-21/+28
Rename omap_nand_read() to omap_nand_read_buf() to reflect actual behaviour. Use FIFO read address instead of raw read address for reads. The GPMC automatically converts 32-bit/16-bit reads to NAND device specific reads (8/16 bit). Use the largest possible read granularity size for more efficient reads. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-5-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: omap_gpmc: Fix build warning on 64-bit platformsRoger Quadros1-2/+2
Pointer size cannot be assumed to be 32-bit, so use use uintptr_t instead of uint32_t. Fixes the below build warning on 64-bit builds. drivers/mtd/nand/raw/omap_gpmc.c:439:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] head = ((uint32_t) buf) % 4; Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-4-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: omap_gpmc: Enable build for K2/K3 platformsRoger Quadros1-1/+1
The GPMC module is present on some K2 and K3 SoCs. Enable building GPMC NAND driver for K2/K3 platforms. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-3-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: omap_gpmc: Deprecate asm/arch/mem.hRoger Quadros1-0/+8
We want to get rid of <asm/arch/mem.h> so don't enforce it for new platforms. This also means GPMC_MAX CS doesn't have to be defined by platform code. Define it locally here for now. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-2-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10cmd: nand: Extend nand info to print ecc informationMichael Trimarchi1-6/+8
Extract the information about ecc strength and ecc step size from mtd controller. This information is usefull to check if what we think as ecc is what we really configured. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/all/20220922133937.277463-1-michael@amarulasolutions.com Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-08Merge tag 'u-boot-stm32-20221207' of ↵WIP/08Dec2022Tom Rini20-100/+2175
https://source.denx.de/u-boot/custodians/u-boot-stm - Drop MMCI interrupt-names in STM32H743, STM32MP15 and STM322MP13 DT DHSOM: - Enable assorted ST specific commands - Add version variable - Add boot counter STM32MP13: - Add sdmmc cd-gpios for STM32MP135F-DK - Add clock & reset support STM32 ADC: - Split channel init into several routines - Add support of generic channels binding
2022-12-08Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini3-8/+11
- DFU and RNDIS fixes
2022-12-08usb: gadget: rndis: Prevent InformationBufferOffset manipulationSzymon Heidrich1-3/+6
Prevent access to arbitrary memory locations in gen_ndis_set_resp via manipulation of buf->InformationBufferOffset. Original implementation permits manipulation of InformationBufferOffset to exploit OID_GEN_CURRENT_PACKET_FILTER to set arbitrary memory contents within a 32byte offset as the devices packet filter. The packet filter value may be next retrieved using gen_ndis_query_resp so it is possible to extract specific memory regions two bytes a time. The rndis_query_response was not modified as neither the buffer offset nor length passed to gen_ndis_query_resp is used. Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
2022-12-08dfu: Make DFU virtual backend SPL friendlyPatrick Delaunay1-1/+1
Define stub for dfu_*_virt function in SPL, because CONFIG_SPL_DFU_VIRT is not defined. This patch avoids compilation issue in dfu_fill_entity() when CONFIG_SPL_DFU is activated because the dfu_fill_entity_virt() function is not available. Fixes: ec44cace4b8d2 ("dfu: add DFU virtual backend") Reported-by: Marek Vasut <marex@denx.de> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de>
2022-12-08usb: gadget: dfu: Fix check of transfer directionHugo SIMELIERE1-4/+4
Commit fbce985e28eaca3af82afecc11961aadaf971a7e to fix CVE-2022-2347 blocks DFU usb requests. The verification of the transfer direction was done by an equality but it is a bit mask. Signed-off-by: Hugo SIMELIERE <hsimeliere.opensource@witekio.com> Reviewed-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Sultan Qasim Khan <sultan.qasimkhan@nccgroup.com> Reviewed-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de>
2022-12-08Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini12-228/+301
- Kautuk's semihosting patch: move semihosting library from arm directory to common place and add RISC-V support - Zong's Kconfig patch: use "imply" instead of "select" to allow user to decide if SPL_SEPARATE_BSS should be selected
2022-12-08Merge tag 'u-boot-at91-fixes-2023.01-b' of ↵Tom Rini1-1/+1
https://source.denx.de/u-boot/custodians/u-boot-at91 Second set of u-boot-at91 fixes for the 2023.01 cycle: This is a single tiny fix that allows the correct name for one pin on sama7g5 device. People with DT coming from Linux will have build errors without this if they add NAND device.
2022-12-08riscv: use imply instead of select for SPL_SEPARATE_BSSZong Li1-1/+1
Use imply instead of select, then it can still be disabled by board-specific defconfig, or be set to n manually. Signed-off-by: Zong Li <zong.li@sifive.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Bin Meng <bmeng@tinylab.org>
2022-12-08common/spl/Kconfig: add dependency on SPL_SEMIHOSTING for SPL payloadKautuk Consul1-1/+1
When we enable CONFIG_SPL and CONFIG_SPL_SEMIHOSTING then the code in common/spl/spl_semihosting.c tries to use the CONFIG_SPL_FS_LOAD_PAYLOAD_NAME string which remains undeclared unless SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS are configured. Add a dependency of SPL_SEMIHOSTING in the depends for SPL_FS_LOAD_PAYLOAD_NAME so that the code compiles fine. Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-12-08arch/riscv: add semihosting support for RISC-VKautuk Consul5-5/+57
We add RISC-V semihosting based serial console for JTAG based early debugging. The RISC-V semihosting specification is available at: https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc Signed-off-by: Anup Patel <apatel@ventanamicro.com> Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-12-08lib: Add common semihosting libraryKautuk Consul6-226/+247
We factor out the arch-independent parts of the ARM semihosting implementation as a common library so that it can be shared with RISC-V. Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-12-07ARM: stm32: Increment WDT by default on DHSOMMarek Vasut2-0/+4
Enable watchdog timer on the DHSOM by default, both in U-Boot proper and in SPL. This can be used in combination with boot counter by either SPL or U-Boot proper to boot either copy of system software, e.g. in case of full A/B update strategy. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-12-07ARM: stm32: Increment boot counter in SPL on DHSOMMarek Vasut2-0/+2
Increment the boot counter already in U-Boot SPL instead of incrementing it only later in U-Boot proper. This can be used by SPL to boot either of two U-Boot copies and improve redundancy of software on the platform, e.g. in case of full A/B update strategy. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-12-07ARM: stm32: Enable assorted ST specific commands on DHSOMMarek Vasut2-0/+8
Enable the stm32prog, stm32key, stboard commands on DHSOM. Those can be used e.g. to implement verified boot. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-12-07ARM: stm32: Add version variable to DHSOMMarek Vasut2-0/+2
Enable insertion of version variable into U-Boot environment on DHSOM, to make it possible to check U-Boot version e.g. in U-Boot scripts. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07ARM: stm32: Add boot counter to DHSOMMarek Vasut2-0/+10
Add boot counter to STM32MP15xx DHSOM. This aligns the software with other upstream DHSOM products which already do enable boot counter. The boot counter on STM32MP15xx is placed in the TAMP block TAMP_BKPxR register 19, right past register 17 and 18 used for CM4 resource table and state by the Linux kernel. The TAMP_BKPxR register block is used because its contents survives warm reset, but not cold reset. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07ARM: dts: stm32: Drop MMCI interrupt-namesMarek Vasut3-7/+0
The pl18x MMCI driver does not use the interrupt-names property, the binding document has been updated to recommend this property be unused, remove it. Backport of Marek's Linux patch: https://lore.kernel.org/linux-arm-kernel/20221013221242.218808-3-marex@denx.de/ Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Yann Gautier <yann.gautier@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07ARM: dts: stm32: add sdmmc cd-gpios for STM32MP135F-DKYann Gautier1-1/+1
On STM32MP135F-DK, the SD card detect GPIO is GPIOH4. Backport of the Linux patch: https://lore.kernel.org/linux-arm-kernel/20220921160334.3227138-1-yann.gautier@foss.st.com/ Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-12-07adc: stm32mp15: add support of generic channels bindingOlivier Moysan1-6/+45
Add support of generic IIO channels binding: ./devicetree/bindings/iio/adc/adc.yaml Keep support of st,adc-channels for backward compatibility. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07adc: stm32mp15: split channel init into several routinesOlivier Moysan1-10/+34
Split stm32_adc_chan_of_init channel initialization function into several routines to increase readability and prepare channel generic binding handling. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07arm: dts: stm32mp13: add support of RCC driverGabriel Fernandez5-79/+54
Adds support of Clock and Reset drivers for STM32MP13 platform. Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07clk: stm32mp13: introduce STM32MP13 RCC driverGabriel Fernandez6-0/+1690
STM32MP13 RCC driver uses Common Clock Framework and also a 'clk-stm32-core' API. Then STM32MPx RCC driver will contain only data configuration (gates, mux, dividers and the way to check security) or some specific clocks. This API will be used by all new other generations of ST Socs. Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Tested-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07dt-bindings: stm32mp13: add clock & reset support for STM32MP13Gabriel Fernandez3-3/+331
Add support of stm32mp13 DT bindings of clock and reset. Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-06Merge tag 'sound-2023-01-rc4' of ↵WIP/06Dec2022Tom Rini8-8/+82
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for sound-2023-01-rc4 * Avoid endless loop and amend unit test * Add man-page for the sound command * Fix sandbox sound driver
2022-12-05Prepare v2023.01-rc3v2023.01-rc3Tom Rini2-2/+2
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-05Merge branch '2022-12-05-add-IPv6-support'Tom Rini20-16/+1852
To quote the author: This patch set adds basic IPv6 support to U-boot. It is based on Chris's Packham patches (https://lists.denx.de/pipermail/u-boot/2017-January/279366.html) Chris's patches were taken as base. There were efforts to launch it on HiFive SiFive Unmatched board but the board didn't work well. The code was refactored, fixed some bugs as CRC for little-endian, some parts were implemented in our own way, something was taken from Linux. Finally we did manual tests and the board worked well. Testing was done on HiFive SiFive Unmatched board (RISC-V)
2022-12-05configs: Add IPV6 config to sandbox_flattree_defconfigViacheslav Mitrofanov1-0/+1
Allow to use IPV6 tests in sandbox Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
2022-12-05configs: Add IPV6 config to sandbox64_defconfigViacheslav Mitrofanov1-0/+1
Allow to use IPV6 tests in sandbox Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
2022-12-05configs: Add IPV6 config to sandbox_defconfigViacheslav Mitrofanov1-0/+1
Allow to use IPV6 tests in sandbox Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
2022-12-05test: dm: eth: Add ip6_make_lladdr testViacheslav Mitrofanov1-0/+18
Add a test that checks generated Link Local Address. Use in sandbox Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05test: dm: eth: Add ip6_make_snma testViacheslav Mitrofanov1-0/+20
Add a test that checks generated Solicited Node Multicast Address from our ipv6 address. Use in sandbox Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05test: dm: eth: Add ip6_addr_in_subnet testViacheslav Mitrofanov1-0/+25
Add a test if two address are in the same subnet. Use in sandbox Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05test: dm: eth: Add csum_ipv6_magic testViacheslav Mitrofanov1-0/+29
Test checksum computation. csum_ipv6_magic() uses in upper layer protocols as TCP/UDP/ICMPv6/etc to calculate payload checksum. Series-changes: 3 - Fixed style problems Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05test: dm: eth: Add string_to_ip6 testViacheslav Mitrofanov1-0/+55
Add a test to check convertation from char* to struct in6_addr. Use in sandbox Series-changes: 3 - Fixed tests to use length param in string_to_ip6() Series-changes: 5 - Add test under #ifdef Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05net: ping6: Add ping6 commandViacheslav Mitrofanov8-2/+197
Implement ping6 command to ping hosts using IPv6. It works the same way as an ordinary ping command. There is no ICMP request so it is not possible to ping our host. This patch adds options in Kconfig and Makefile to build ping6 command. Series-changes: 3 - Added structures and functions descriptions - Added to ping6_receive() return value instead of void Series-changes: 4 - Fixed structures and functions description style Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05net: tftp: Add IPv6 support for tftpbootViacheslav Mitrofanov3-7/+103
The command tftpboot uses IPv4 by default. Add the possibility to use IPv6 instead. If an address in the command is an IPv6 address it will use IPv6 to boot or if there is a suffix -ipv6 in the end of the command it also force using IPv6. All other tftpboot features and parameters are left the same. Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05net: ipv6: Incorporate IPv6 support into u-boot net subsystemViacheslav Mitrofanov1-1/+22
Add net_ip6_handler (an IPv6 packet handler) into net_loop. Add neighbor discovery mechanism into network init process. That is the main step to run IPv6 in u-boot. Now u-boot is capable to use NDP and handle IPv6 packets. Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>