summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-18net: eepro100: Use PCI_DEVICE() to define PCI device compat listMarek Vasut
Use this macro to fully fill the PCI device ID table. This is mandatory for the DM PCI support, which checks all the fields. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Reorder functions in the driverMarek Vasut
Move the functions around in the driver to prepare it for DM conversion. Drop forward declarations which are not necessary anymore. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Remove volatile misuseMarek Vasut
Remove all the remaining use of the 'volatile' keyword, as this is no longer required. All the accesses which might have needed this use of 'volatile' have been repaired properly. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Add cache managementMarek Vasut
Add cache invalidation and flushes wherever the DMA descriptors are written or read, otherwise this driver cannot work reliably on any systems where caches are enabled. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Factor out tx_ring command issuingMarek Vasut
This code is replicated in the driver thrice almost verbatim, factor it out into a separate function and clean it up. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Replace purge_tx_ring() with memset()Marek Vasut
This function zeroes-out all the descriptors in the TX ring, use memset() instead. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Use standard I/O accessorsMarek Vasut
The current eepro100 driver accesses its memory mapped registers directly instead of using the standard I/O accessors. This can cause problems on some systems as the accesses can get out of order. So convert the direct volatile dereferences to use the normal in/out macros. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Fix camelcaseMarek Vasut
This is automated cleanup via checkpatch, no functional change. ./scripts/checkpatch.pl --show-types -f drivers/net/eepro100.c ./scripts/checkpatch.pl --types INDENTED_LABEL -f --fix --fix-inplace drivers/net/eepro100.c Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Fix remaining checkpatch issuesMarek Vasut
This is automated cleanup via checkpatch, no functional change. ./scripts/checkpatch.pl --show-types -f drivers/net/eepro100.c ./scripts/checkpatch.pl -f --fix --fix-inplace drivers/net/eepro100.c This fixes all the remaining errors except a couple of comments which are longer than 80 characters, all the volatile misuse and all the camelcase, that needs a separate patch. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Fix indented labelMarek Vasut
This is automated cleanup via checkpatch, no functional change. ./scripts/checkpatch.pl --show-types -f drivers/net/eepro100.c ./scripts/checkpatch.pl --types INDENTED_LABEL -f --fix --fix-inplace drivers/net/eepro100.c Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Fix pointer locationMarek Vasut
This is automated cleanup via checkpatch, no functional change. ./scripts/checkpatch.pl --show-types -f drivers/net/eepro100.c ./scripts/checkpatch.pl --types POINTER_LOCATION -f --fix --fix-inplace drivers/net/eepro100.c Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Fix parenthesis alignmentMarek Vasut
This is automated cleanup via checkpatch, no functional change. ./scripts/checkpatch.pl --show-types -f drivers/net/eepro100.c ./scripts/checkpatch.pl --types PARENTHESIS_ALIGNMENT -f --fix --fix-inplace drivers/net/eepro100.c Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Fix bracesMarek Vasut
This is automated cleanup via checkpatch, no functional change. ./scripts/checkpatch.pl --show-types -f drivers/net/eepro100.c ./scripts/checkpatch.pl --types BRACES -f --fix --fix-inplace drivers/net/eepro100.c Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Fix spacingMarek Vasut
This is automated cleanup via checkpatch, no functional change. ./scripts/checkpatch.pl --show-types -f drivers/net/eepro100.c ./scripts/checkpatch.pl --types SPACING -f --fix --fix-inplace drivers/net/eepro100.c Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Use plain debug()Marek Vasut
Convert all the ifdef DEBUG to plain debug(), no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Clean up commentsMarek Vasut
Clean the comments up to they trigger fewer checkpatch warnings, no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Remove EEPRO100_SROM_WRITEMarek Vasut
This code is never enabled, last board that used it was ELPPC which was removed some 5 years ago, so just remove this code altogether. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-16common: hash: Remove a debug printf statementHarald Seiler
Remove a left-over debug printf that was introduced with SHA512 support. Fixes: d16b38f42704 ("Add support for SHA384 and SHA512") Signed-off-by: Harald Seiler <hws@denx.de>
2020-06-13Merge tag 'dm-pull-12jun20' of git://git.denx.de/u-boot-dm into nextTom Rini
patman improvements to allow it to work with Zephyr change to how sequence numbers are assigned to devices minor fixes and improvements
2020-06-12Merge branch '2020-06-12-next-net' into nextTom Rini
- Merge tbs2910 distro boot support and associated clean-ups and size reduction. - Assorted networking corrections / bugfixes. - Drop smc911x standalone API example as it was likely non-functional for a long time. - Enhanced support for TI PHYs - rtl8139 DM conversion
2020-06-12net: move random_port() to dnsBaruch Siach
The random_port() routine is not used anywhere else. Make it local to dns.c to reduce code clutter, and shrink generated code a little. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2020-06-12net: tftp: fix option validation as per RFCsRavik Hasija
RFC2348, RFC2349: - Option string is case in-sensitive. - Client must generate ERR pkt in case option value mismatch in server OACK - Fix debug print for options Signed-off-by: Ravik Hasija <rahasij@linux.microsoft.com> Reviewed-By: Ramon Fried <rfried.dev@gmail.com>
2020-06-12net: rtl8139: Add DM supportMarek Vasut
Add support for driver model to the driver. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: rtl8139: Read HW address from EEPROM only on probeMarek Vasut
Do not re-read the HW address from the EEPROM on every start of transfer, otherwise the user will not be able to adjust ethaddr as needed. Read the address only once, when the card is detected. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: rtl8139: Use PCI_DEVICE() to define PCI device compat listMarek Vasut
Use this macro to fully fill the PCI device ID table. This is mandatory for the DM PCI support, which checks all the fields. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: rtl8139: Split out common and non-DM functionsMarek Vasut
Split the driver into common and non-DM functionality, so that the DM support can later re-use the common code, while we retain the non-DM code until all the platforms are converted. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: rtl8139: Pass private data into rtl8139_eeprom_delay()Marek Vasut
Instead of always calling rtl8139_eeprom_delay() with priv->ioaddr, call it with priv and let the function access priv->ioaddr. This reduces code duplication and has no impact, since the compiler will inline this as needed anyway. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: rtl8139: Introduce device private dataMarek Vasut
Introduce rtl8139_pdata, which is a super-structure around eth_device and tracks per-device state, here the device IO address, PCI BDF, RX and TX ring position. Pass this structure around instead of the old non-DM eth_device in preparation for DM conversion. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: rtl8139: Clean up bus_to_phys()/phys_to_bus() macrosMarek Vasut
These macros depended on the dev variable being declared wherever they were used. This is wrong and will not work with DM anyway, so pass only the PCI BFD into these macros, which fixes the dependency and prepares them for DM support as well. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: rtl8139: Use dev->iobase instead of custom ioaddrMarek Vasut
Replace the use of custom static ioaddr variable with common dev->iobase, no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: rtl8139: Switch from malloc()+memset() to calloc()Marek Vasut
Replace malloc()+memset() combination with calloc(), no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: rtl8139: Factor out device name assignmentMarek Vasut
Pull the device name setting into a separate function, as this will be shared between DM/non-DM variants. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: tftp: fix progress marker for file transferRavik Hasija
During packet sequence number wraparound the show_block_marker() API was not called, as a result the progress marker doesn't stay within column boundary. Use position in file instead of sequence number to align the marker. Signed-off-by: Ravik Hasija <rahasij@linux.microsoft.com> Reviewed-By: Ramon Fried <rfried.dev@gmail.com>
2020-06-12net: phy: Add DP8382x phy registration to TI PHY initDan Murphy
Add the DP8382X generic PHY registration to the TI PHY init file. Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Dan Murphy <dmurphy@ti.com>
2020-06-12net: phy: Add support for TI PHY initDan Murphy
ti_phy_init function was allocated to the DP83867 PHY. This function name is to generic for a specific PHY. The function can be moved to a TI specific file that can register all TI PHYs that are defined in the defconfig. The ti_phy_init file will contain all TI PHYs initialization so that only phy_ti_init can be called from the framework. In addition to the above the config flag for the DP83867 needs to be changed in the Kconfig and dependent defconfig files. The config flag that was used for the DP83867 was also generic in nature so a more specific config flag for the DP83867 was created. Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Dan Murphy <dmurphy@ti.com>
2020-06-12net: phy: Add helper routines to set and clear bitsDan Murphy
Add phy_set/clear_bit helper routines so that ported drivers from the kernel can use these functions. Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Dan Murphy <dmurphy@ti.com>
2020-06-12net: phy: Fix kernel doc issues in phy.hDan Murphy
Fix kernel doc warnings in phy.h. Mostly the warnings were due to the return missing the semi-colon. Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Dan Murphy <dmurphy@ti.com>
2020-06-12net: phy: Add missing kernel doc to phy functionsDan Murphy
Add kernel doc to the phy_read/write utility functions in phy.h Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Dan Murphy <dmurphy@ti.com>
2020-06-12net: phy: add phyid search in vendor specific spaceFlorin Chiculita
There are devices accesible through mdio clause-45, such as retimers, that do not have PMA or PCS blocks. This patch adds MDIO_MMD_VEND1 on the list of device addresses where phyid is searched. Previous order of devices was kept. Signed-off-by: Florin Chiculita <florinlaurentiu.chiculita@nxp.com> Reviewed-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
2020-06-12net: rt8169: WAR for DHCP not getting IP after kernel boot/rebootTom Warren
This is a WAR for DHCP failure after rebooting from the L4T kernel. The r8169.c kernel driver is setting bit 19 of the rt816x HW register 0xF0, which goes by FuncEvent and MISC in various driver source/datasheets. That bit is called RxDv_Gated_En in the r8169.c kernel driver. Clear it here at the end of probe to ensure that U-Boot can get an IP assigned via DHCP. Signed-off-by: Tom Warren <twarren@nvidia.com>
2020-06-12net: phy: micrel: ksz8061 implement errata 80000688A fixBryan O'Donoghue
Linux commit 232ba3a51cc2 ('net: phy: Micrel KSZ8061: link failure after cable connect') implements a fix for the above errata. This patch replicates that errata fix in an ksz8061 specific init routine. Signed-off-by: Bryan O'Donoghue <bod@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: smc911x: Drop the standalone EEPROM exampleMarek Vasut
Drop the example, for two reasons. First, it is tapping directly into the IO accessors of the SMC911x, while it should instead go through the net device API. Second, this makes conversion of the SMC911x driver to DM real hard. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Tom Rini <trini@konsulko.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12net: Fix error if some network features are disabledKrebs, Olaf
If 'CONFIG_CMD_TFTPBOOT' or 'CONFIG_CMD_BOOTP' are disabled, the usage must be disabled, too! Signed-off-by: Olaf Krebs <olaf.krebs@emh-metering.com> CC: Joe Hershberger <joe.hershberger@ni.com>
2020-06-12board: tbs2910: add documentationDenis 'GNUtoo' Carikli
This documents the u-boot installation procedure and the hardware in order to get started. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> [trini: Add MAINTAINERS entry for doc file per Soeren's request]
2020-06-12board: tbs2910: Enable distro_boot support.Denis 'GNUtoo' Carikli
This keeps the compatibility with the old bootcmd. The fdtfile environment variable also needed to be set to imx6q-tbs2910.dtb to enable booting mainline kernels otherwise with extlinux.conf it tries to load mx6-tbs2910.dtb instead. With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola GNU/Linux distribution, we have the following size differences: - text: +2041 bytes - data: 0 bytes - bss: 0 bytes - total: +2041 bytes Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Reviewed-by: Soeren Moch <smoch@web.de>
2020-06-12board: tbs2910_defconfig: Add support for booting general purpose distributionsDenis 'GNUtoo' Carikli
This is needed to enable distro_boot support later on. Adding the necessary configuration to enable booting general purpose distributions is typically done by enabling CONFIG_DISTRO_DEFAULTS. However the resulting image size is is already very close to the size limit and PXE isn't strictly needed, so instead we made sure that all the configuration selected by CONFIG_DISTRO_DEFAULTS were selected, with the exception of PXE related configuration (CONFIG_BOOTP_PXE and CONFIG_CMD_PXE) that are both disabled. With arm-linux-gnueabi-gcc 9.3.0-1 from the Parabola GNU/Linux distribution, we have the following size differences: - text: +7526 bytes - data: +28 bytes - bss: -12 bytes - total: +7542 bytes Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Reviewed-by: Soeren Moch <smoch@web.de>
2020-06-12board: tbs2910: move CONFIG_BOOTCOMMAND from header to defconfigDenis 'GNUtoo' Carikli
This doesn't affect the size of the image: with arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola GNU/Linux distribution, the text, data, bss and total sizes remain unchanged. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Reviewed-by: Soeren Moch <smoch@web.de>
2020-06-12board: tbs2910: disable CONFIG_GZIPDenis 'GNUtoo' Carikli
As that the resulting image is already very close to the size limit, and that CONFIG_GZIP is not strictly required, removing it shouldn't hurt. With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola GNU/Linux distribution we have the following size reduction: - text: 9752 - data: 0 - bss: 16 - total: 9768 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Soeren Moch <smoch@web.de>
2020-06-12board: tbs2910: disable loadb and loads commandsDenis 'GNUtoo' Carikli
The loadb and loads commands are not needed for booting. There are also more reliable and faster alternatives to loadb and loads that can be used with the current configuration. As that the resulting image is already very close to the size limit, removing the loadb and loads commands shouldn't hurt. With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola GNU/Linux distribution we have the following size reduction: - text: 6733 bytes - data: 116 bytes - bss: 1172 bytes - total: 8021 bytes Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Soeren Moch <smoch@web.de>
2020-06-12Add support for SHA384 and SHA512Reuben Dowle
The current recommendation for best security practice from the US government is to use SHA384 for TOP SECRET [1]. This patch adds support for SHA384 and SHA512 in the hash command, and also allows FIT images to be hashed with these algorithms, and signed with sha384,rsaXXXX and sha512,rsaXXXX The SHA implementation is adapted from the linux kernel implementation. [1] Commercial National Security Algorithm Suite http://www.iad.gov/iad/programs/iad-initiatives/cnsa-suite.cfm Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>