1. 13 Apr, 2021 36 commits
  2. 12 Apr, 2021 4 commits
    • Adam Ford's avatar
      net: ethernet: ravb: Enable optional refclk · 8ef7adc6
      Adam Ford authored
      For devices that use a programmable clock for the AVB reference clock,
      the driver may need to enable them.  Add code to find the optional clock
      and enable it when available.
      Signed-off-by: default avatarAdam Ford <aford173@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ef7adc6
    • Adam Ford's avatar
      dt-bindings: net: renesas,etheravb: Add additional clocks · 6f43735b
      Adam Ford authored
      The AVB driver assumes there is an external crystal, but it could
      be clocked by other means.  In order to enable a programmable
      clock, it needs to be added to the clocks list and enabled in the
      driver.  Since there currently only one clock, there is no
      clock-names list either.
      
      Update bindings to add the additional optional clock, and explicitly
      name both of them.
      Signed-off-by: default avatarAdam Ford <aford173@gmail.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarSergei Shtylyov <sergei.shtylyov@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6f43735b
    • David S. Miller's avatar
      Merge branch 'enetc-ptp' · d27139c5
      David S. Miller authored
      Yangbo Lu says:
      
      ====================
      enetc: support PTP Sync packet one-step timestamping
      
      This patch-set is to add support for PTP Sync packet one-step timestamping.
      Since ENETC single-step register has to be configured dynamically per
      packet for correctionField offeset and UDP checksum update, current
      one-step timestamping packet has to be sent only when the last one
      completes transmitting on hardware. So, on the TX, this patch handles
      one-step timestamping packet as below:
      
      - Trasmit packet immediately if no other one in transfer, or queue to
        skb queue if there is already one in transfer.
        The test_and_set_bit_lock() is used here to lock and check state.
      - Start a work when complete transfer on hardware, to release the bit
        lock and to send one skb in skb queue if has.
      
      Changes for v2:
      	- Rebased.
      	- Fixed issues from patchwork checks.
      	- netif_tx_lock for one-step timestamping packet sending.
      Changes for v3:
      	- Used system workqueue.
      	- Set bit lock when transmitted one-step packet, and scheduled
      	  work when completed. The worker cleared the bit lock, and
      	  transmitted one skb in skb queue if has, instead of a loop.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d27139c5
    • Yangbo Lu's avatar
      enetc: support PTP Sync packet one-step timestamping · 7294380c
      Yangbo Lu authored
      This patch is to add support for PTP Sync packet one-step timestamping.
      Since ENETC single-step register has to be configured dynamically per
      packet for correctionField offeset and UDP checksum update, current
      one-step timestamping packet has to be sent only when the last one
      completes transmitting on hardware. So, on the TX, this patch handles
      one-step timestamping packet as below:
      
      - Trasmit packet immediately if no other one in transfer, or queue to
        skb queue if there is already one in transfer.
        The test_and_set_bit_lock() is used here to lock and check state.
      - Start a work when complete transfer on hardware, to release the bit
        lock and to send one skb in skb queue if has.
      
      And the configuration for one-step timestamping on ENETC before
      transmitting is,
      
      - Set one-step timestamping flag in extension BD.
      - Write 30 bits current timestamp in tstamp field of extension BD.
      - Update PTP Sync packet originTimestamp field with current timestamp.
      - Configure single-step register for correctionField offeset and UDP
        checksum update.
      Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
      Reviewed-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7294380c