*** Initial Wiznet W5500 support ***
v9 cover *** Initial Wiznet W5500 support ***
From: Jean-Marie Verdun <[email protected]>
v9
Fix compilation issue from a missing parenthesis in v8. Fix unused variable from v8 (check)
Fix a crash when using transfer bigger then 1500 bytes identified with http transfer instead of tftp. The device merge multiple packets and the local buffer into the driver must be at least 16kB
v8
Fix error propagation from dm_spi_xfer calls and successors Fix memory allocation check into probe
v7
Fix bug exposed by using LWIP TCP/IP as primary network backend
v6
Switch all log to dev_dbg call
v5
Remove of_to_plat init
Remove unused cmd variable from probe
Remove socket open command from hw mac setup code Remove read back mac address command from hw mac setup code Improve comment about RX_RSR register usage
Check error code of spi_write calls
Check error code from spi_command
Enhance some if statement
Order variable definition per line length
Return ENOMEM in case malloc fail
v4
Fix some comment typos
Remove unnecessary IFDEF
Drop w5500_eth_tx_hand_f definition and struct element as they are unused Reorder function to avoid predefinition
Reorder variable definition per data size in functions
Fix return value with spi_read and spi_read16
Drop return value definition into spi_write16
Define MAX_PACKET_SZ to 9000 bytes
Use dynamic allocation for readbulk
Realign readpoll_timeout call
Add comment to enhance loop clarity on receive buffer length Remove mode variable into write_hwaddr
Invert some direct if loop for indirect as to reduce code complexity Remove imr variable into w5500_socket_intr_mask function
Drop rtr variable into probe function
v3
Remove Global definition
Replace polling by read_poll_timeout
Remove unused function
Add empty lines before returns statement
Remove declaration and code mix
Switch to dev_dbg
Relocate read/write helpers to top of file
Remove include and incorporate it into the code
v2
Rebase source tree to create patch against top of tree and avoid issues with Kconfig and Makefile
Recheck checkpatch.pl output as to minimize issues to CHECK state
CHECK issues reported are coming from copy/paste section from the linux kernel driver, and aren't processed as being strong issues.
command ran scripts/checkpatch.pl --no-tree v2-0001-Initial-support-for-Wiznet-W5500.patch
Jean-Marie Verdun (1):
Initial support for Wiznet W5500
drivers/net/Kconfig | 10 + drivers/net/Makefile | 1 + drivers/net/w5500.c | 619 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 630 insertions(+) create mode 100644 drivers/net/w5500.c
Signature · 1 line
2.43.0
PATCH v9 1/1 Initial support for Wiznet W5500
From: Jean-Marie Verdun <[email protected]>
Add support for the Wiznet W5500 spi to ethernet controller
--- drivers/net/Kconfig | 10 + drivers/net/Makefile | 1 + drivers/net/w5500.c | 619 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 630 insertions(+) create mode 100644 drivers/net/w5500.c
drivers/net/Kconfig +10 -0
@@ -15,10 +15,20 @@ config DM_ETH This is currently implemented in net/eth-uclass.c Look in include/net.h for details. + config SPL_DM_ETH depends on SPL_NET def_bool y +config W5500 + bool "W5500 device driver" + depends on SPI + help + Enable w5500 driver + + Adds support for Wiznet W5500 device. The device must be attached + to a SPI bus. + config DM_MDIO bool "Enable Driver Model for MDIO devices" depends on PHYLIB
drivers/net/Makefile +1 -0
@@ -103,6 +103,7 @@ obj-$(CONFIG_SUN8I_EMAC) += sun8i_emac.o obj-$(CONFIG_TSEC_ENET) += tsec.o fsl_mdio.o obj-$(CONFIG_TULIP) += dc2114x.o obj-$(CONFIG_VSC7385_ENET) += vsc7385.o +bj-$(CONFIG_W5500) += w5500.o obj-$(CONFIG_XILINX_AXIEMAC) += xilinx_axi_emac.o obj-$(CONFIG_XILINX_AXIMRMAC) += xilinx_axi_mrmac.o obj-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
drivers/net/w5500.c new file +619 -0
619 lines not on this page · raw message
Signature · 1 line
2.43.0