[PATCH 0/3] ocelot_ace: fix and improve the driver

2019-08-12 Thread Yangbo Lu
This patch-set is to fix some issues and improve the ocelot_ace driver for using. Yangbo Lu (3): ocelot_ace: drop member port from ocelot_ace_rule structure ocelot_ace: fix ingress ports setting for rule ocelot_ace: fix action of trap drivers/net/ethernet/mscc/ocelot_ace.c| 20

[PATCH 3/3] ocelot_ace: fix action of trap

2019-08-12 Thread Yangbo Lu
The trap action should be copying the frame to CPU and dropping it for forwarding, but current setting was just copying frame to CPU. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/mscc/ocelot_ace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net

[PATCH 1/3] ocelot_ace: drop member port from ocelot_ace_rule structure

2019-08-12 Thread Yangbo Lu
The ocelot_ace_rule is not port specific. We don't need a member port in ocelot_ace_rule structure. Drop it and use member ocelot instead. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/mscc/ocelot_ace.c| 12 ++-- drivers/net/ethernet/mscc/ocelot_ace.h| 2 +- driver

[PATCH 2/3] ocelot_ace: fix ingress ports setting for rule

2019-08-12 Thread Yangbo Lu
The ingress ports setting of rule should support covering all ports. This patch is to use u16 ingress_port for ingress port mask setting for ace rule. One bit corresponds one port. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/mscc/ocelot_ace.c| 2 +- drivers/net/ethernet/mscc

[v2, 0/4] ocelot: support PTP Ethernet frames trapping

2019-08-12 Thread Yangbo Lu
This patch-set is to support PTP Ethernet frames trapping. Before that, fix some issues and improve the ocelot_ace driver for using. --- Changes for v2: - Added PTP Ethernet frames trapping support patch. Yangbo Lu (4): ocelot_ace: drop member port from ocelot_ace_rule structure

[v2, 3/4] ocelot_ace: fix action of trap

2019-08-12 Thread Yangbo Lu
The trap action should be copying the frame to CPU and dropping it for forwarding, but current setting was just copying frame to CPU. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/net/ethernet/mscc/ocelot_ace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[v2, 1/4] ocelot_ace: drop member port from ocelot_ace_rule structure

2019-08-12 Thread Yangbo Lu
The ocelot_ace_rule is not port specific. We don't need a member port in ocelot_ace_rule structure. Drop it and use member ocelot instead. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/net/ethernet/mscc/ocelot_ace.c| 12 ++-- drivers/net/ethernet

[v2, 4/4] ocelot: add VCAP IS2 rule to trap PTP Ethernet frames

2019-08-12 Thread Yangbo Lu
All the PTP messages over Ethernet have etype 0x88f7 on them. Use etype as the key to trap PTP messages. Signed-off-by: Yangbo Lu --- Changes for v2: - Added this patch. --- drivers/net/ethernet/mscc/ocelot.c | 28 1 file changed, 28 insertions(+) diff

[v2, 2/4] ocelot_ace: fix ingress ports setting for rule

2019-08-12 Thread Yangbo Lu
The ingress ports setting of rule should support covering all ports. This patch is to use u16 ingress_port for ingress port mask setting for ace rule. One bit corresponds one port. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/net/ethernet/mscc/ocelot_ace.c| 2

[PATCH] dpaa_eth: copy timestamp fields to new skb in A-050385 workaround

2020-11-30 Thread Yangbo Lu
The timestamp fields should be copied to new skb too in A-050385 workaround for later TX timestamping handling. Fixes: 3c68b8fffb48 ("dpaa_eth: FMan erratum A050385 workaround") Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 10 +- 1 file

[PATCH 0/2] enetc: support PTP Sync packet one-step timestamping

2021-03-26 Thread Yangbo Lu
transmitted on hardware before transmitting current one. Yangbo Lu (2): enetc: mark TX timestamp type per skb enetc: support PTP Sync packet one-step timestamping drivers/net/ethernet/freescale/enetc/enetc.c | 206 -- drivers/net/ethernet/freescale/enetc/enetc.h | 24

[PATCH 2/2] enetc: support PTP Sync packet one-step timestamping

2021-03-26 Thread Yangbo Lu
current timestamp. - Configure single-step register for correctionField offeset and UDP checksum update. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/enetc/enetc.c | 204 -- drivers/net/ethernet/freescale/enetc/enetc.h | 21 +- .../ethernet/freescale/enetc

[PATCH 1/2] enetc: mark TX timestamp type per skb

2021-03-26 Thread Yangbo Lu
ges making sure start to send current message only after the last one completed on hardware. (ENETC single-step register has to be dynamically configured per message.) So, marking TX timestamp type per skb is required. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/enetc/enetc.c |

[net-next, v2, 0/2] enetc: support PTP Sync packet one-step timestamping

2021-04-08 Thread Yangbo Lu
transmitted on hardware before transmitting current one. Changes for v2: - Rebased. - Fixed issues from patchwork checks. - netif_tx_lock for one-step timestamping packet sending. Yangbo Lu (2): enetc: mark TX timestamp type per skb enetc: support PTP Sync packet one-step

[net-next, v2, 1/2] enetc: mark TX timestamp type per skb

2021-04-08 Thread Yangbo Lu
ges making sure start to send current message only after the last one completed on hardware. (ENETC single-step register has to be dynamically configured per message.) So, marking TX timestamp type per skb is required. Signed-off-by: Yangbo Lu --- Changes for v2: - Rebased. --- drivers/

[net-next, v2, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-08 Thread Yangbo Lu
current timestamp. - Configure single-step register for correctionField offeset and UDP checksum update. Signed-off-by: Yangbo Lu --- Changes for v2: - Rebased. - Fixed issues from patchwork checks. - netif_tx_lock for one-step timestamping packet sending. --- drivers/net

[net-next, v3, 0/2] enetc: support PTP Sync packet one-step timestamping

2021-04-12 Thread Yangbo Lu
. - 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. Yangbo Lu (2): enetc: mark TX timestamp type per skb enetc: support PTP Sync packet one

[net-next, v3, 1/2] enetc: mark TX timestamp type per skb

2021-04-12 Thread Yangbo Lu
ges making sure start to send current message only after the last one completed on hardware. (ENETC single-step register has to be dynamically configured per message.) So, marking TX timestamp type per skb is required. Signed-off-by: Yangbo Lu --- Changes for v2: - Rebased. Changes for

[net-next, v3, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-12 Thread Yangbo Lu
. - Update PTP Sync packet originTimestamp field with current timestamp. - Configure single-step register for correctionField offeset and UDP checksum update. Signed-off-by: Yangbo Lu --- Changes for v2: - Rebased. - Fixed issues from patchwork checks. - netif_tx_lock for one

[net-next] enetc: fix locking for one-step timestamping packet transfer

2021-04-12 Thread Yangbo Lu
enetc_start_xmit() which may be called by worker, rather than in enetc_xmit(). Otherwise, the worker calling enetc_start_xmit() after bit lock released is not able to lock again for transfer. Fixes: 7294380c5211 ("enetc: support PTP Sync packet one-step timestamping") Signed-off-by:

[net-next] enetc: convert to schedule_work()

2021-04-14 Thread Yangbo Lu
Convert system_wq queue_work() to schedule_work() which is a wrapper around it, since the former is a rare construct. Fixes: 7294380c5211 ("enetc: support PTP Sync packet one-step timestamping") Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- 1 file

[net-next 1/3] net: dsa: optimize tx timestamp request handling

2021-04-16 Thread Yangbo Lu
put skb cloning into port_txtstamp where it really needs. Signed-off-by: Yangbo Lu --- Documentation/networking/timestamping.rst | 7 +-- .../net/dsa/hirschmann/hellcreek_hwtstamp.c | 20 -- .../net/dsa/hirschmann/hellcreek_hwtstamp.h | 2 +- drivers/net/dsa/mv88e6xxx

[net-next 0/3] Support ocelot PTP Sync one-step timestamping

2021-04-16 Thread Yangbo Lu
This patch-set is to support ocelot PTP Sync one-step timestamping. Actually before that, this patch-set cleans up and optimizes the DSA slave tx timestamp request handling process. Yangbo Lu (3): net: dsa: optimize tx timestamp request handling net: mscc: ocelot: convert to

[net-next 2/3] net: mscc: ocelot: convert to ocelot_port_txtstamp_request()

2021-04-16 Thread Yangbo Lu
Convert to a common ocelot_port_txtstamp_request() for TX timestamp request handling. Signed-off-by: Yangbo Lu --- drivers/net/dsa/ocelot/felix.c | 14 +- drivers/net/ethernet/mscc/ocelot.c | 24 +--- drivers/net/ethernet/mscc/ocelot_net.c | 18

[net-next 3/3] net: mscc: ocelot: support PTP Sync one-step timestamping

2021-04-16 Thread Yangbo Lu
configuration could be done during transmitting. Non-onestep-Sync packet with one-step timestamp request should fall back to use two-step timestamp. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/mscc/ocelot.c | 57 ++ drivers/net/ethernet/mscc/ocelot_net.c | 5

[PATCH] ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation

2021-03-23 Thread Yangbo Lu
Current calculation for diff of TMR_ADD register value may have 64-bit overflow in this code line, when long type scaled_ppm is large. adj *= scaled_ppm; This patch is to resolve it by using mul_u64_u64_div_u64(). Signed-off-by: Yangbo Lu --- drivers/ptp/ptp_qoriq.c | 13 +++-- 1 file

[v3] ocelot_ace: fix action of trap

2019-08-19 Thread Yangbo Lu
The trap action should be copying the frame to CPU and dropping it for forwarding, but current setting was just copying frame to CPU. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/mscc/ocelot_ace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mscc

[v4] ocelot_ace: fix action of trap

2019-08-20 Thread Yangbo Lu
The trap action should be copying the frame to CPU and dropping it for forwarding, but current setting was just copying frame to CPU. Fixes: b596229448dd ("net: mscc: ocelot: Add support for tcam") Signed-off-by: Yangbo Lu Acked-by: Allan W. Nielsen --- Changes for v4: - Add

[PATCH] net: gianfar_ptp: move set_fipers() to spinlock protecting area

2018-01-08 Thread Yangbo Lu
set_fipers() calling should be protected by spinlock. This patch is to move set_fipers() to spinlock protecting area in ptp_gianfar_adjtime() function. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/gianfar_ptp.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff

[v2] net: gianfar_ptp: move set_fipers() to spinlock protecting area

2018-01-08 Thread Yangbo Lu
set_fipers() calling should be protected by spinlock in case that any interrupt breaks related registers setting and the function we expect. This patch is to move set_fipers() to spinlock protecting area in ptp_gianfar_adjtime(). Signed-off-by: Yangbo Lu --- Changes for v2: - explained

[PATCH 5/5] MAINTAINERS: add myself as maintainer for QorIQ PTP clock driver

2018-05-24 Thread Yangbo Lu
Added myself as maintainer for QorIQ PTP clock driver. Since gianfar_ptp.c was renamed to ptp_qoriq.c, let's also maintain it under QorIQ PTP clock driver. Signed-off-by: Yangbo Lu --- MAINTAINERS | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) diff --

[PATCH 4/5] dt-bindings: ptp: add ptp-qoriq.txt

2018-05-24 Thread Yangbo Lu
This patch is to add a documentation for ptp_qoriq dt-bindings. The description for ptp_qoriq dt-bindings was actually moved from Documentation/devicetree/bindings/net/fsl-tsec-phy.txt, since gianfar_ptp driver was moved to ptp_qoriq driver. Signed-off-by: Yangbo Lu --- .../devicetree/bindings

[PATCH 2/5] ptp_qoriq: move some definitions to header file

2018-05-24 Thread Yangbo Lu
This patch is to move some definitions in ptp_qoriq.c to the header file. Signed-off-by: Yangbo Lu --- drivers/ptp/ptp_qoriq.c | 132 +-- include/linux/fsl/ptp_qoriq.h | 141 + 2 files changed, 142 insertions

[PATCH 1/5] ptp: rework gianfar_ptp as QorIQ common PTP driver

2018-05-24 Thread Yangbo Lu
as QorIQ common PTP driver to support both DPAA and eTSEC. Moved gianfar_ptp.c to drivers/ptp/, renamed it as ptp_qoriq.c, and renamed many variables. There were not any function changes. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/Makefile|1 - drivers/ptp/Kconfig

[PATCH 3/5] net: ethernet: gianfar_ethtool: get phc index through drvdata

2018-05-24 Thread Yangbo Lu
g phc index through ptp_qoriq drvdata. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/gianfar.h |3 -- drivers/net/ethernet/freescale/gianfar_ethtool.c | 23 + 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/free

[v2] MAINTAINERS: add myself as maintainer for QorIQ PTP clock driver

2018-05-28 Thread Yangbo Lu
Added myself as maintainer for QorIQ PTP clock driver. Since gianfar_ptp.c was renamed to ptp_qoriq.c, let's maintain it under QorIQ PTP clock driver. Signed-off-by: Yangbo Lu --- Changes for v2: - Dropped dpaa2/rtc part. --- MAINTAINERS | 10 -- 1 files changed, 8 inser

[PATCH 0/5] dpaa2_eth: support 1588 one-step timestamping

2020-09-10 Thread Yangbo Lu
not, transmit immediately. - Schedule a work to transmit skbs in skb queue. - mutex lock is used to ensure the last one-step timestamping packet has already been transmitted on hardware through TX confirmation queue before transmitting current packet. Yangbo Lu (5): dpaa2-eth: add APIs of 1588 sin

[PATCH 4/5] dpaa2-eth: utilize skb->cb[0] for hardware timestamping

2020-09-10 Thread Yangbo Lu
s use skb->cb[0] to mark the timestamping request for each skb. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 25 +++- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 13 ++-- 2 files changed, 23 insertions(+), 15 deletions(

[PATCH 2/5] dpaa2-eth: define a global ptp_qoriq structure pointer

2020-09-10 Thread Yangbo Lu
sending. So in driver, at least clock gettime operation will be needed to make sure right time is written to hardware frame annotation for one step timestamping. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 drivers/net/ethernet/freescale/dpaa2/dpaa2

[PATCH 5/5] dpaa2-eth: support PTP Sync packet one-step timestamping

2020-09-10 Thread Yangbo Lu
skb queue. - mutex lock is used to ensure the last one-step timestamping packet has already been transmitted on hardware through TX confirmation queue before transmitting current packet. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c |

[PATCH 3/5] dpaa2-eth: invoke dpaa2_eth_enable_tx_tstamp() once in code

2020-09-10 Thread Yangbo Lu
Invoke dpaa2_eth_enable_tx_tstamp() once in code after building FD, rather than calling it in dpaa2_eth_build_single_fd(), dpaa2_eth_build_sg_fd_single_buf(), and dpaa2_eth_build_sg_fd(). Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 31

[PATCH 1/5] dpaa2-eth: add APIs of 1588 single step timestamping

2020-09-10 Thread Yangbo Lu
This patch is to add APIs of 1588 single step timestamping. - dpni_set_single_step_cfg - dpni_get_single_step_cfg Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h | 21 +++ drivers/net/ethernet/freescale/dpaa2/dpni.c | 73 + drivers

[v2, 1/5] dpaa2-eth: add APIs of 1588 single step timestamping

2020-09-10 Thread Yangbo Lu
This patch is to add APIs of 1588 single step timestamping. - dpni_set_single_step_cfg - dpni_get_single_step_cfg Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h | 21 +++ drivers/net/ethernet/freescale/dpaa2/dpni.c | 73

[v2, 5/5] dpaa2-eth: support PTP Sync packet one-step timestamping

2020-09-10 Thread Yangbo Lu
skb queue. - mutex lock is used to ensure the last one-step timestamping packet has already been transmitted on hardware through TX confirmation queue before transmitting current packet. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/net/ethernet/freescale/dpaa2/dp

[v2, 0/5] dpaa2_eth: support 1588 one-step timestamping

2020-09-10 Thread Yangbo Lu
ble priv in dpaa2_eth_xdp_create_fd(). Yangbo Lu (5): dpaa2-eth: add APIs of 1588 single step timestamping dpaa2-eth: define a global ptp_qoriq structure pointer dpaa2-eth: invoke dpaa2_eth_enable_tx_tstamp() once in code dpaa2-eth: utilize skb->cb[0] for hardware timestamping dpaa2-eth: s

[v2, 4/5] dpaa2-eth: utilize skb->cb[0] for hardware timestamping

2020-09-10 Thread Yangbo Lu
s use skb->cb[0] to mark the timestamping request for each skb. Signed-off-by: Yangbo Lu --- Change for v2: - Removed unused variable priv in dpaa2_eth_xdp_create_fd(). --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 26 +++- drivers/net/ethernet/freesca

[v2, 2/5] dpaa2-eth: define a global ptp_qoriq structure pointer

2020-09-10 Thread Yangbo Lu
sending. So in driver, at least clock gettime operation will be needed to make sure right time is written to hardware frame annotation for one step timestamping. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 drivers/net

[v2, 3/5] dpaa2-eth: invoke dpaa2_eth_enable_tx_tstamp() once in code

2020-09-10 Thread Yangbo Lu
Invoke dpaa2_eth_enable_tx_tstamp() once in code after building FD, rather than calling it in dpaa2_eth_build_single_fd(), dpaa2_eth_build_sg_fd_single_buf(), and dpaa2_eth_build_sg_fd(). Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/net/ethernet/freescale/dpaa2/dpaa2

[PATCH 2/2] ptp_qoriq: support FIPER3

2020-09-11 Thread Yangbo Lu
The FIPER3 (fixed interval period pulse generator) is supported on DPAA2 and ENETC network controller hardware. This patch is to support it in ptp_qoriq driver. Signed-off-by: Yangbo Lu --- drivers/ptp/ptp_qoriq.c | 23 ++- include/linux/fsl/ptp_qoriq.h | 3 +++ 2

[PATCH 1/2] dt-binding: ptp_qoriq: support fsl,tmr-fiper3 property

2020-09-11 Thread Yangbo Lu
Add fsl,tmr-fiper3 property definition which is supported only on DPAA2 and ENETC network controller hardware. Signed-off-by: Yangbo Lu --- Documentation/devicetree/bindings/ptp/ptp-qoriq.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/ptp/ptp

[PATCH 0/2] ptp_qoriq: support FIPER3

2020-09-11 Thread Yangbo Lu
The FIPER3 (fixed interval period pulse generator) is supported on DPAA2 and ENETC network controller hardware. This patch-set is to support it in ptp_qoriq driver and dt-binding. Yangbo Lu (2): dt-binding: ptp_qoriq: support fsl,tmr-fiper3 property ptp_qoriq: support FIPER3 .../devicetree

[v3, 5/6] dpaa2-eth: support PTP Sync packet one-step timestamping

2020-09-16 Thread Yangbo Lu
skb queue. - mutex lock is used to ensure the last one-step timestamping packet has already been transmitted on hardware through TX confirmation queue before transmitting current packet. Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - Fixed build issue on

[v3, 0/6] dpaa2_eth: support 1588 one-step timestamping

2020-09-16 Thread Yangbo Lu
ble priv in dpaa2_eth_xdp_create_fd(). Changes for v3: - Fixed sparse warnings. - Fix build issue on 32-bit. - Converted to use ptp_parse_header. Yangbo Lu (6): dpaa2-eth: add APIs of 1588 single step timestamping dpaa2-eth: define a global ptp_qoriq structure pointer dp

[v3, 1/6] dpaa2-eth: add APIs of 1588 single step timestamping

2020-09-16 Thread Yangbo Lu
This patch is to add APIs of 1588 single step timestamping. - dpni_set_single_step_cfg - dpni_get_single_step_cfg Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - Fixed sparse warnings. --- drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h | 21

[PATCH] net: mscc: ocelot: fix hardware timestamp dequeue logic

2020-07-27 Thread Yangbo Lu
-by: Vladimir Oltean Signed-off-by: Yangbo Lu --- drivers/net/ethernet/mscc/ocelot.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c index e05a48c..82bde07 100644 --- a/drivers/net/ethernet

[v3, 6/6] dpaa2-eth: fix a build warning in dpmac.c

2020-09-16 Thread Yangbo Lu
Fix below sparse warning in dpmac.c. warning: cast to restricted __le64 Signed-off-by: Yangbo Lu --- Changes for v3: - Added this patch. --- drivers/net/ethernet/freescale/dpaa2/dpmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale

[v3, 4/6] dpaa2-eth: utilize skb->cb[0] for hardware timestamping

2020-09-16 Thread Yangbo Lu
s use skb->cb[0] to mark the timestamping request for each skb. Signed-off-by: Yangbo Lu --- Changes for v2: - Removed unused variable priv in dpaa2_eth_xdp_create_fd(). Changes for v3: - None. --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 26 +++-

[v3, 3/6] dpaa2-eth: invoke dpaa2_eth_enable_tx_tstamp() once in code

2020-09-16 Thread Yangbo Lu
Invoke dpaa2_eth_enable_tx_tstamp() once in code after building FD, rather than calling it in dpaa2_eth_build_single_fd(), dpaa2_eth_build_sg_fd_single_buf(), and dpaa2_eth_build_sg_fd(). Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - None. --- drivers

[v3, 2/6] dpaa2-eth: define a global ptp_qoriq structure pointer

2020-09-16 Thread Yangbo Lu
sending. So in driver, at least clock gettime operation will be needed to make sure right time is written to hardware frame annotation for one step timestamping. Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - Fixed sparse warning. --- drivers/net/ethernet

[v4, 4/5] dpaa2-eth: utilize skb->cb[0] for hardware timestamping

2020-09-18 Thread Yangbo Lu
s use skb->cb[0] to mark the timestamping request for each skb. Signed-off-by: Yangbo Lu --- Changes for v2: - Removed unused variable priv in dpaa2_eth_xdp_create_fd(). Changes for v3: - None. Changes for v4: - None. --- drivers/net/ethernet/freescale/dpaa2/dpaa2-et

[v4, 1/5] dpaa2-eth: add APIs of 1588 single step timestamping

2020-09-18 Thread Yangbo Lu
This patch is to add APIs of 1588 single step timestamping. - dpni_set_single_step_cfg - dpni_get_single_step_cfg Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - Fixed sparse warnings. Changes for v4: - None. --- drivers/net/ethernet/freescale

[v4, 2/5] dpaa2-eth: define a global ptp_qoriq structure pointer

2020-09-18 Thread Yangbo Lu
sending. So in driver, at least clock gettime operation will be needed to make sure right time is written to hardware frame annotation for one step timestamping. Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - Fixed sparse warning. Changes for v4

[v4, 3/5] dpaa2-eth: invoke dpaa2_eth_enable_tx_tstamp() once in code

2020-09-18 Thread Yangbo Lu
Invoke dpaa2_eth_enable_tx_tstamp() once in code after building FD, rather than calling it in dpaa2_eth_build_single_fd(), dpaa2_eth_build_sg_fd_single_buf(), and dpaa2_eth_build_sg_fd(). Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - None. Changes for v4

[v4, 0/5] dpaa2_eth: support 1588 one-step timestamping

2020-09-18 Thread Yangbo Lu
is ready. - Added comments in using onestep_tstamp_lock. - Dropped dpmac.c sparse warning fix-up patch. Yangbo Lu (5): dpaa2-eth: add APIs of 1588 single step timestamping dpaa2-eth: define a global ptp_qoriq structure pointer dpaa2-eth: invoke dpaa2_eth_enable_tx_tstamp() once

[v4, 5/5] dpaa2-eth: support PTP Sync packet one-step timestamping

2020-09-18 Thread Yangbo Lu
skb queue. - mutex lock is used to ensure the last one-step timestamping packet has already been transmitted on hardware through TX confirmation queue before transmitting current packet. Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - Fixed build issue on

[v2] dpaa2-eth: fix a build warning in dpmac.c

2020-09-18 Thread Yangbo Lu
Fix below sparse warning in dpmac.c. warning: cast to restricted __le64 Signed-off-by: Yangbo Lu --- Changes for v2: - Fixed in right way. --- drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet

[v2, 0/2] ptp_qoriq: support FIPER3

2020-09-18 Thread Yangbo Lu
The FIPER3 (fixed interval period pulse generator) is supported on DPAA2 and ENETC network controller hardware. This patch-set is to support it in ptp_qoriq driver and dt-binding. Changes for v2: - Some improvement in code. - Added ACK from Vladimir. Yangbo Lu (2): dt-binding: ptp_qoriq

[v2, 2/2] ptp_qoriq: support FIPER3

2020-09-18 Thread Yangbo Lu
The FIPER3 (fixed interval period pulse generator) is supported on DPAA2 and ENETC network controller hardware. This patch is to support it in ptp_qoriq driver. Signed-off-by: Yangbo Lu Acked-by: Vladimir Oltean --- Changes for v2: - Some improvement in code. - Added ACK from

[v2, 1/2] dt-binding: ptp_qoriq: support fsl,tmr-fiper3 property

2020-09-18 Thread Yangbo Lu
Add fsl,tmr-fiper3 property definition which is supported only on DPAA2 and ENETC network controller hardware. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- Documentation/devicetree/bindings/ptp/ptp-qoriq.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation

[PATCH] ptp: add stub function for ptp_get_msgtype()

2020-09-27 Thread Yangbo Lu
Added the missing stub function for ptp_get_msgtype(). Reported-by: Randy Dunlap Fixes: 036c508ba95e ("ptp: Add generic ptp message type function") Signed-off-by: Yangbo Lu --- include/linux/ptp_classify.h | 8 1 file changed, 8 insertions(+) diff --git a/include/linux/ptp_

[PATCH] net: dpaa2: build ptp clock driver in default

2019-01-14 Thread Yangbo Lu
This patch is to set "default y" for dpaa2 ptp driver building. It will provide user an available ptp clock in default. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/dpaa2/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/ne

[v2, 5/5] ptp_qoriq: add fiper pulse loopback support

2019-01-16 Thread Yangbo Lu
This patch is to add Kconfig options to support fiper pulse loopback mode. This is very useful for validating hardware and driver without external hardware. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/ptp/Kconfig | 18 ++ drivers/ptp

[v2, 1/5] ptp_qoriq: fix interrupt enabling and handling

2019-01-16 Thread Yangbo Lu
The tmr_tevent register would update event bits no matter tmr_temask bits were set or not. So we should get interrupts by tmr_tevent & tmr_temask, and clean up interrupts in tmr_tevent before enabling them. Signed-off-by: Yangbo Lu --- Changes for v2: - Remove useless lock/regi

[v2, 3/5] dt-binding: ptp_qoriq: document "fsl,extts-fifo" property

2019-01-16 Thread Yangbo Lu
Documented "fsl,extts-fifo" property. Signed-off-by: Yangbo Lu --- Changes for v2: - Modified binding description. --- .../devicetree/bindings/ptp/ptp-qoriq.txt |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Documentation/devicetree/bindin

[v2, 0/5] External trigger stamp fifo support for ptp_qoriq

2019-01-16 Thread Yangbo Lu
required to be added into 1588 timer dts node whose hardware uses it. The work will be done for some QorIQ platforms dts in the near future. Yangbo Lu (5): ptp_qoriq: fix interrupt enabling and handling ptp_qoriq: support external trigger stamp FIFO dt-binding: ptp_qoriq: document "fsl,e

[v2, 2/5] ptp_qoriq: support external trigger stamp FIFO

2019-01-16 Thread Yangbo Lu
should be cleaned up before enabling external trigger interrupts. Otherwise, there will be interrupts immediately just after enabling external trigger interrupts. Signed-off-by: Yangbo Lu Signed-off-by: Vladimir Oltean --- Changes for v2: - Converted to use extts_clean_up instead. --- d

[v2, 4/5] ARM: dts: ls1021a: add 1588 external trigger stamp fifo support

2019-01-16 Thread Yangbo Lu
This patch is to add external trigger stamp fifo support for 1588 timer. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- arch/arm/boot/dts/ls1021a.dtsi |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts

[v2] net: dpaa2: improve PTP Kconfig option

2019-01-20 Thread Yangbo Lu
clock in default. Signed-off-by: Yangbo Lu --- Changes for v2: - Converted to use imply for PTP_1588_CLOCK. - Modified commit message. --- drivers/net/ethernet/freescale/dpaa2/Kconfig |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ether

[v3, 4/6] ARM: dts: ls1021a: add 1588 external trigger stamp fifo support

2019-01-21 Thread Yangbo Lu
This patch is to add external trigger stamp fifo support for 1588 timer. Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - None. --- arch/arm/boot/dts/ls1021a.dtsi |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts

[v3, 2/6] ptp_qoriq: support external trigger stamp FIFO

2019-01-21 Thread Yangbo Lu
should be cleaned up before enabling external trigger interrupts. Otherwise, there will be interrupts immediately just after enabling external trigger interrupts. Signed-off-by: Yangbo Lu Signed-off-by: Vladimir Oltean --- Changes for v2: - Converted to use extts_clean_up instead. Chan

[v3, 5/6] ptp: add debugfs support for ptp_qoriq

2019-01-21 Thread Yangbo Lu
hardware. Below is an example to enable fiper1 loopback. echo 1 > /sys/kernel/debug/2d10e00.ptp_clock/fiper1-loopback Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - Converted to use debugfs. --- drivers/ptp/Kconfig |2 +- drivers/ptp/Makef

[v3, 3/6] dt-binding: ptp_qoriq: document "fsl,extts-fifo" property

2019-01-21 Thread Yangbo Lu
Documented "fsl,extts-fifo" property. Signed-off-by: Yangbo Lu --- Changes for v2: - Modified binding description. Changes for v3: - Rephrased fsl,extts-fifo. --- .../devicetree/bindings/ptp/ptp-qoriq.txt |2 ++ 1 files changed, 2 insertions(+), 0 deletion

[v3, 1/6] ptp_qoriq: fix interrupt enabling and handling

2019-01-21 Thread Yangbo Lu
The tmr_tevent register would update event bits no matter tmr_temask bits were set or not. So we should get interrupts by tmr_tevent & tmr_temask, and clean up interrupts in tmr_tevent before enabling them. Signed-off-by: Yangbo Lu --- Changes for v2: - Remove useless lock/regi

[v3, 6/6] MAINTAINERS: add drivers/ptp/ptp_qoriq_debugfs.c into QorIQ PTP list

2019-01-21 Thread Yangbo Lu
Added drivers/ptp/ptp_qoriq_debugfs.c into QorIQ PTP clock driver list. Signed-off-by: Yangbo Lu --- Changes for v3: - Added this patch. --- MAINTAINERS |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index a592b99..098d0eb 100644 --- a

[v3, 0/6] External trigger stamp fifo support for ptp_qoriq

2019-01-21 Thread Yangbo Lu
required to be added into 1588 timer dts node whose hardware supports it. The work will be done for some QorIQ platforms dts in the near future. Yangbo Lu (6): ptp_qoriq: fix interrupt enabling and handling ptp_qoriq: support external trigger stamp FIFO dt-binding: ptp_qoriq: document "

[PATCH 1/9] ptp_qoriq: make structure/function names more consistent

2019-01-30 Thread Yangbo Lu
hasn't changed any functions. Signed-off-by: Yangbo Lu --- drivers/ptp/ptp_qoriq.c | 288 +++--- drivers/ptp/ptp_qoriq_debugfs.c | 36 +++--- include/linux/fsl/ptp_qoriq.h | 14 +- 3 files changed, 169 insertions(+), 169 deletions(-)

[PATCH 4/9] ptp_qoriq: add little enadian support

2019-01-30 Thread Yangbo Lu
There is QorIQ 1588 timer IP block on the new ENETC Ethernet controller. However it uses little endian mode which is different with before. This patch is to add little endian support for the driver by using "little-endian" dts node property. Signed-off-by: Yangbo Lu --- drivers/ptp/p

[PATCH 9/9] MAINTAINERS: add enetc_ptp driver into QorIQ PTP list

2019-01-30 Thread Yangbo Lu
This patch to add enetc_ptp driver into QorIQ PTP list for maintaining. Signed-off-by: Yangbo Lu --- MAINTAINERS |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 019a2bc..f0b50f8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6093,6

[PATCH 0/9] Add ENETC PTP clock driver

2019-01-30 Thread Yangbo Lu
there is still dependency for ENETC PTP node upstreaming. This will be done in the near future. The hardware timestamping support for ENETC is done but needs to be reworked with new method in internal git tree, and will be sent out soon. Yangbo Lu (9): ptp_qoriq: make structure/function names

[PATCH 8/9] enetc: add PTP clock driver

2019-01-30 Thread Yangbo Lu
This patch is to add PTP clock driver for ENETC. The driver reused QorIQ PTP clock driver. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/enetc/Kconfig | 12 ++ drivers/net/ethernet/freescale/enetc/Makefile|3 + drivers/net/ethernet/freescale/enetc/enetc_hw.h |5

[PATCH 6/9] ptp_qoriq: fix register memory map

2019-01-30 Thread Yangbo Lu
The 1588 timer on eTSEC Ethernet controller uses different register memory map with DPAA Ethernet controller. Now the new ENETC Ethernet controller uses same reigster memory map with DPAA. To support ENETC, let's use register memory map of DPAA/ENETC in default. Signed-off-by: Yang

[PATCH 5/9] dt-binding: ptp_qoriq: add little-endian support

2019-01-30 Thread Yangbo Lu
Specify "little-endian" property if the 1588 timer IP block is little-endian mode. The default endian mode is big-endian. Signed-off-by: Yangbo Lu --- .../devicetree/bindings/ptp/ptp-qoriq.txt |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/Doc

[PATCH 2/9] ptp_qoriq: make ptp operations global

2019-01-30 Thread Yangbo Lu
This patch is to make functions of ptp operations global, so that ENETC PTP driver which is a PCI driver for same 1588 timer IP block could reuse them. Signed-off-by: Yangbo Lu --- drivers/ptp/ptp_qoriq.c | 27 --- include/linux/fsl/ptp_qoriq.h |9

[PATCH 7/9] ptp: add QorIQ PTP support for ENETC

2019-01-30 Thread Yangbo Lu
This patch is to add QorIQ PTP support for ENETC. ENETC PTP driver which is a PCI driver for same 1588 timer IP block will reuse QorIQ PTP driver. Signed-off-by: Yangbo Lu --- drivers/ptp/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ptp/Kconfig b

[PATCH 3/9] ptp_qoriq: convert to use ptp_qoriq_init()

2019-01-30 Thread Yangbo Lu
Moved QorIQ PTP clock initialization into new function qoriq_ptp_init(). This function could also be reused by ENETC PTP drvier which is a PCI driver for same 1588 timer IP block. Signed-off-by: Yangbo Lu --- drivers/ptp/ptp_qoriq.c | 120

[v2, 0/9] Add ENETC PTP clock driver

2019-02-01 Thread Yangbo Lu
there is still dependency for ENETC PTP node upstreaming. This will be done in the near future. The hardware timestamping support for ENETC is done but needs to be reworked with new method in internal git tree, and will be sent out soon. Yangbo Lu (9): ptp_qoriq: make structure/function names

[v2, 2/9] ptp_qoriq: make ptp operations global

2019-02-01 Thread Yangbo Lu
This patch is to make functions of ptp operations global, so that ENETC PTP driver which is a PCI driver for same 1588 timer IP block could reuse them. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- drivers/ptp/ptp_qoriq.c | 27 --- include

[v2, 6/9] ptp_qoriq: fix register memory map

2019-02-01 Thread Yangbo Lu
The 1588 timer on eTSEC Ethernet controller uses different register memory map with DPAA Ethernet controller. Now the new ENETC Ethernet controller uses same reigster memory map with DPAA. To support ENETC, let's use register memory map of DPAA/ENETC in default. Signed-off-by: Yang

[v2, 5/9] dt-binding: ptp_qoriq: add little-endian support

2019-02-01 Thread Yangbo Lu
Specify "little-endian" property if the 1588 timer IP block is little-endian mode. The default endian mode is big-endian. Signed-off-by: Yangbo Lu --- Changes for v2: - None. --- .../devicetree/bindings/ptp/ptp-qoriq.txt |3 +++ 1 files changed, 3 insertions(+), 0

[v2, 4/9] ptp_qoriq: add little enadian support

2019-02-01 Thread Yangbo Lu
There is QorIQ 1588 timer IP block on the new ENETC Ethernet controller. However it uses little endian mode which is different with before. This patch is to add little endian support for the driver by using "little-endian" dts node property. Signed-off-by: Yangbo Lu --- Chan

  1   2   3   >