Skip to content

Add support for velocity network driver on platform devices

Tony Prisk lkml netdev 10 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest3 patches 1 replyIn review
  2. v83 patches 1 replySuperseded
  3. v73 patches 1 replySuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v6 posting 2/23 patches3 repliesSuperseded
v6 posting 1/23 patches0 repliesSuperseded
v53 patches1 replySuperseded
v43 patches2 repliesSuperseded
v33 patches2 repliesSuperseded
v23 patches2 repliesSuperseded
v14 patches3 repliesSuperseded

Changes in v9 from the cover letter

Code tidyup as requested by Francois Romieu.

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: velocity: Rename vptr->dev to vptr->netdevdrivers/net/ethernet/via/via-velocity.c drivers/net/ethernet/via/via-velocity.h+35 -350 replies
2/3net: velocity: Convert to generic dma functionsdrivers/net/ethernet/via/via-velocity.c drivers/net/ethernet/via/via-velocity.h+26 -260 replies
3/3net: velocity: Add platform device support to VIA velocity driverDocumentation/devicetree/bindings/net/via-velocity.txt drivers/net/ethernet/via/Kconfig drivers/net/ethernet/via/via-velocity.c +1 more+305 -1290 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v9 yet.

Read the v9 thread

Cover letter [PATCHv9 0/3] Add support for velocity network driver on platform devices

v9 changes:
Code tidyup as requested by Francois Romieu.

v8 changes:
Remove velocity_choose_state from via-velocity.h: unused function.

v7 changes:
Forgot to merge a patch to fix an error with the pm ops changes. Apologies Dave.

v6 changes:
Remove more bus specific code from velocity_probe()
Make velocity_(suspend/resume) accept a struct device * Simplify PM code to use velocity_(suspend/resume) - remove the individual pci and platform functions.
Add a struct pci_dev variable to velocity_get_pci_info() to reduce churn

v5 changes:
Remove velocity_info union. Change velocity_info->pdev back to struct pci_dev. Remove more 'if (pci)' sections.
Remove 'void *pdev' function parameters.
Pass correct variable to velocity_choose_state()

v4 changes:
Code tidyup as requested by Francois Romieu
Removed '#ifdef PCI' around PCI code. Compile tested on (!)PCI and (!)PM.

v3 changes:
Rebased against net-next.
Fix errors in pm code.

v2 changes:
Drop patch #1 as requested by David Miller.
Correct the PHYID_ICPLUS_IP101A MII bits - should be ON, rather than OFF. Read the platform rev_id from the correct register [regs->rev_id]. It's possible this would work for the PCI version as well and would remove the need for the 'if (pci)' test to set vptr->rev_id.

v1:
The first three patches are general tidyup.

[DROPPED] Patch ## just alphabetizes the #includes to make it easier to read.

Patch #1 replaces vptr->dev with vptr->netdev, in preparation of adding a struct device *dev in Patch #2

Patch #2 replaces the pci dma functions with the generic versions.

I have build tested these patches but don't have a PCI velocity to run-test it. I can't see that they should introduce any problems as it is all renames and function swapping.

Patch #3 adds support for the velocity driver on devicetree platform devices. Binding document included. This patch is compile-tested for PCI, and boot tested on a VIA APC8750.

I think it would be pertinent to get some tested-by's for PCI users.

Regards
Tony Prisk

Tony Prisk (3):
net: velocity: Rename vptr->dev to vptr->netdev
net: velocity: Convert to generic dma functions
net: velocity: Add platform device support to VIA velocity driver

 .../devicetree/bindings/net/via-velocity.txt       |   20 +
 drivers/net/ethernet/via/Kconfig                   |    3 +-
 drivers/net/ethernet/via/via-velocity.c            |  507 +++++++++++++-------
 drivers/net/ethernet/via/via-velocity.h            |    8 +-
 4 files changed, 357 insertions(+), 181 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/via-velocity.txt
Signature · 1 line
1.7.9.5