Skip to content

net: axienet: allow instantiation without a device tree

Sagi Maimon linux-arm-kernel lkml netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesApplied 2/2
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- 1/2: convert only the four lookups a software node provides:
xlnx,rxmem, phy-mode, the MAC address and the PHY connection. xlnx,switch-x-sgmii and the deprecated xlnx,phy-type stay OF only, as Andrew asked, and so do xlnx,txcsum, xlnx,rxcsum and the "dmas" test, which the X2 does not use either.
- 1/2: v1's hardware test was not re-run. The X2's software node sets none of the lookups that went back to OF, so each finds nothing with either version.
- 2/2: unchanged.
- v1: https://lore.kernel.org/netdev/[email protected]/

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: axienet: use device_property and fwnode APIs for probe-time configdrivers/net/ethernet/xilinx/xilinx_axienet_main.c+7 -52 repliesApplied
2/2net: axienet: add a MODULE_ALIAS for platform instantiationdrivers/net/ethernet/xilinx/xilinx_axienet_main.c+9 -10 repliesApplied

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchAndrew LunnSuraj Gupta
1/2R-b T-b R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/2] net: axienet: allow instantiation without a device tree

The ADVA TimeCard X2 is a PCIe timing card driven by ptp_ocp. Its FPGA contains an AXI Ethernet MAC with an AXI DMA engine. The plan discussed on netdev [1] is for ptp_ocp to register the MAC as a child platform device described by a software node, so that this driver runs it rather than a copy in ptp_ocp; Vadim Fedorenko agreed that a platform device is the way to go.

These two patches are what axienet needs for that, apart from one more change - letting the DMA device differ from the platform device - which has no user without ptp_ocp and will be posted together with the ptp_ocp patches:

1/2 reads the probe-time configuration through the device_property and
fwnode APIs, so it can come from a software node. No change for device tree users.
2/2 adds a MODULE_ALIAS, so a device registered by name autoloads the
module.

Both were tested on the X2 with a local ptp_ocp change.

[1] https://lore.kernel.org/netdev/CAMuE1bHr84n5LKcj02HmMR5XefPtvQ-UEJAx7+UKfYvRgS0eDg@mail.gmail.com/

Changes in v2:
- 1/2: convert only the four lookups a software node provides:
xlnx,rxmem, phy-mode, the MAC address and the PHY connection. xlnx,switch-x-sgmii and the deprecated xlnx,phy-type stay OF only, as Andrew asked, and so do xlnx,txcsum, xlnx,rxcsum and the "dmas" test, which the X2 does not use either.
- 1/2: v1's hardware test was not re-run. The X2's software node sets none of the lookups that went back to OF, so each finds nothing with either version.
- 2/2: unchanged.
- v1: https://lore.kernel.org/netdev/[email protected]/

Sagi Maimon (2):
net: axienet: use device_property and fwnode APIs for probe-time
config
net: axienet: add a MODULE_ALIAS for platform instantiation

 .../net/ethernet/xilinx/xilinx_axienet_main.c | 22 ++++++++++++++-----
 1 file changed, 16 insertions(+), 6 deletions(-)

base-commit: 014d795c73837ea2339a4ea8e8f82c6e959b845d

Signature · 1 line
2.47.0