*** Initial Wiznet W5500 support ***
v5 cover *** Initial Wiznet W5500 support ***
From: Jean-Marie Verdun <[email protected]>
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
Return EAGAIN in case of failure during packet reception Remove all spi related functions call to pack the code and avoid redundancy
Use pointers to call xfer instead of straight data
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 | 9 + drivers/net/Makefile | 1 + drivers/net/w5500.c | 610 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 620 insertions(+) create mode 100644 drivers/net/w5500.c
Signature · 1 line
2.43.0
PATCH v5 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 | 9 + drivers/net/Makefile | 1 + drivers/net/w5500.c | 610 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 620 insertions(+) create mode 100644 drivers/net/w5500.c
drivers/net/Kconfig +9 -0
@@ -19,6 +19,15 @@ 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 +obj-$(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 +610 -0
610 lines not on this page · raw message
Signature · 1 line
2.43.0