summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-18net: eepro100: Add Kconfig entriesMarek Vasut
Add Kconfig entries for the eepro100 driver and convert various boards. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Add DM supportMarek Vasut
Add support for driver model to the driver. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Split common parts of non-DM functions outMarek Vasut
Split the common code from the non-DM code, so it can be reused by the DM code later. As always, the recv() function had to be split into the actual receiving part and free_pkt part to fit with the DM. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Drop bd_t pointer from read_hw_addr()Marek Vasut
The pointer is unused, so drop it. Rename the function to start with the eepro100_ prefix. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Add RX/TX rings into the private dataMarek Vasut
The RX/TX DMA descriptor rings are per-device-instance private data, so move them into the private data. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Pass device private data into mdiobusMarek Vasut
Instead of doing ethernet device lookup by name every time there is an MDIO access, pass the driver private data via mdiobus priv to the MDIO bus accessors. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Pass device private data aroundMarek Vasut
This patch replaces the various uses of struct eth_device for accessing device private data with struct eepro100_priv, which is compatible both with DM and non-DM operation. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Introduce device private dataMarek Vasut
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Pass PCI BDF into bus_to_phys()/phys_to_bus()Marek Vasut
This is a trick in preparation for adding DM support. By passing in the PCI BDF into the bus_to_phys()/phys_to_bus() macros and calling that dev, we can substitute dev with udevice when DM support lands and do minor adjustment to the macros to support both DM and non-DM operation. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Drop inline keywordMarek Vasut
Drop the inline keyword from the static functions, the compiler has a much better overview and can decide how to inline those functions much better. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Fix EE_*_CMD macrosMarek Vasut
Those macros depended on specific variable names to be declared at their usage sites, fix this by adding an argument to those macros and also protect the argument with braces. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: Factor out MII registrationMarek Vasut
Pull the MII registration code into a separate function. Moreover, properly free memory in case any of the registration or allocation functions fail, so this fixes an existing memleak. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2020-06-18net: eepro100: 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>
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>