From: Akinobu Mita <akinobu.mita@gmail.com>
To: netdev@vger.kernel.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
Mike Sinkovsky <msink@permonline.ru>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH v3 0/5] net: w5100: add support W5100/W5200 for SPI interface
Date: Fri, 15 Apr 2016 00:11:28 +0900 [thread overview]
Message-ID: <1460646693-25179-1-git-send-email-akinobu.mita@gmail.com> (raw)
This series add support for Wiznet W5100 and W5200 for SPI interface.
We can easily find the ethernet modules and shield for Arduino with
these chips for purchase. I've tested them with BeagleBone.
Wiznet W5100 for mmio access has already supported by w5100 driver.
In order to share the code between mmio mode and SPI mode, this series
firstly adds ability to support another register access interface to
the existing w5100 driver. This ground work also requires to introduce
workqueue and threaded irq because SPI transfers are callable only from
contexts that can sleep unlike mmio access.
The latter part of this series adds w5100-spi driver which actually
support W5100 and W5200 for SPI interface. Supporting W5100 is
straight forward because it only required to add a register access
interface by the SPI transfer. W5100 and W5200 have similar memory
map which justifies adding W5200 support to w5100 driver.
* Changes from v2 to v3
- Add comment for reg_lock
- Add ability to allocate ops specific data structure
- Allocate w5200 ops specific data structure to put DMA-safe buffer
- Add missing chip_id assignment for w5100_*_ops
* Changes from v1 to v2
- Use a plain single pointer instead of SKB queue, spotted by David S. Miller
- Correct timeout period in w5100_command
- Use spi_write_then_read instead of spi_write which needs DMA-safe buffer
- Support W5200
Akinobu Mita (5):
net: w5100: move mmiowb into register access callbacks
net: w5100: add ability to support other bus interface
net: w5100: enable to support sleepable register access interface
net: w5100: support SPI interface mode
net: w5100: support W5200
drivers/net/ethernet/wiznet/Kconfig | 14 +
drivers/net/ethernet/wiznet/Makefile | 1 +
drivers/net/ethernet/wiznet/w5100-spi.c | 300 ++++++++++
drivers/net/ethernet/wiznet/w5100.c | 935 ++++++++++++++++++++++----------
drivers/net/ethernet/wiznet/w5100.h | 35 ++
5 files changed, 1004 insertions(+), 281 deletions(-)
create mode 100644 drivers/net/ethernet/wiznet/w5100-spi.c
create mode 100644 drivers/net/ethernet/wiznet/w5100.h
Cc: Mike Sinkovsky <msink@permonline.ru>
Cc: David S. Miller <davem@davemloft.net>
--
2.5.0
next reply other threads:[~2016-04-14 15:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-14 15:11 Akinobu Mita [this message]
2016-04-14 15:11 ` [PATCH v3 1/5] net: w5100: move mmiowb into register access callbacks Akinobu Mita
2016-04-14 15:11 ` [PATCH v3 2/5] net: w5100: add ability to support other bus interface Akinobu Mita
2016-04-14 15:11 ` [PATCH v3 3/5] net: w5100: enable to support sleepable register access interface Akinobu Mita
2016-04-14 15:11 ` [PATCH v3 4/5] net: w5100: support SPI interface mode Akinobu Mita
2016-04-14 15:11 ` [PATCH v3 5/5] net: w5100: support W5200 Akinobu Mita
2016-04-16 22:32 ` [PATCH v3 0/5] net: w5100: add support W5100/W5200 for SPI interface David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460646693-25179-1-git-send-email-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=davem@davemloft.net \
--cc=msink@permonline.ru \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).