Home
last modified time | relevance | path

Searched full:cpts (Results 1 – 25 of 39) sorted by relevance

12

/Linux-v5.15/drivers/net/ethernet/ti/
Dcpts.c21 #include "cpts.h"
50 static int cpts_fifo_pop(struct cpts *cpts, u32 *high, u32 *low) in cpts_fifo_pop() argument
52 u32 r = cpts_read32(cpts, intstat_raw); in cpts_fifo_pop()
55 *high = cpts_read32(cpts, event_high); in cpts_fifo_pop()
56 *low = cpts_read32(cpts, event_low); in cpts_fifo_pop()
57 cpts_write32(cpts, EVENT_POP, event_pop); in cpts_fifo_pop()
63 static int cpts_purge_events(struct cpts *cpts) in cpts_purge_events() argument
69 list_for_each_safe(this, next, &cpts->events) { in cpts_purge_events()
73 list_add(&event->list, &cpts->pool); in cpts_purge_events()
79 dev_dbg(cpts->dev, "cpts: event pool cleaned up %d\n", removed); in cpts_purge_events()
[all …]
Dam65-cpts.c23 #include "am65-cpts.h"
189 static void am65_cpts_settime(struct am65_cpts *cpts, u64 start_tstamp) in am65_cpts_settime() argument
194 am65_cpts_write32(cpts, val, ts_load_val_hi); in am65_cpts_settime()
196 am65_cpts_write32(cpts, val, ts_load_val_lo); in am65_cpts_settime()
198 am65_cpts_write32(cpts, AM65_CPTS_TS_LOAD_EN, ts_load_en); in am65_cpts_settime()
201 static void am65_cpts_set_add_val(struct am65_cpts *cpts) in am65_cpts_set_add_val() argument
204 cpts->ts_add_val = (NSEC_PER_SEC / cpts->refclk_freq - 1) & 0x7; in am65_cpts_set_add_val()
206 am65_cpts_write32(cpts, cpts->ts_add_val, ts_add_val); in am65_cpts_set_add_val()
209 static void am65_cpts_disable(struct am65_cpts *cpts) in am65_cpts_disable() argument
211 am65_cpts_write32(cpts, 0, control); in am65_cpts_disable()
[all …]
Dcpts.h100 struct cpts { struct
126 void cpts_rx_timestamp(struct cpts *cpts, struct sk_buff *skb); argument
127 void cpts_tx_timestamp(struct cpts *cpts, struct sk_buff *skb);
128 int cpts_register(struct cpts *cpts);
129 void cpts_unregister(struct cpts *cpts);
130 struct cpts *cpts_create(struct device *dev, void __iomem *regs,
132 void cpts_release(struct cpts *cpts);
133 void cpts_misc_interrupt(struct cpts *cpts);
135 static inline bool cpts_can_timestamp(struct cpts *cpts, struct sk_buff *skb) in cpts_can_timestamp() argument
145 static inline void cpts_set_irqpoll(struct cpts *cpts, bool en) in cpts_set_irqpoll() argument
[all …]
Dam65-cpts.h2 /* TI K3 AM65 CPTS driver interface
23 int am65_cpts_phc_index(struct am65_cpts *cpts);
24 void am65_cpts_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb);
25 void am65_cpts_prep_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb);
26 void am65_cpts_rx_enable(struct am65_cpts *cpts, bool en);
27 u64 am65_cpts_ns_gettime(struct am65_cpts *cpts);
28 int am65_cpts_estf_enable(struct am65_cpts *cpts, int idx,
30 void am65_cpts_estf_disable(struct am65_cpts *cpts, int idx);
39 static inline int am65_cpts_phc_index(struct am65_cpts *cpts) in am65_cpts_phc_index() argument
44 static inline void am65_cpts_tx_timestamp(struct am65_cpts *cpts, in am65_cpts_tx_timestamp() argument
[all …]
DKconfig82 tristate "TI Common Platform Time Sync (CPTS) Support"
119 tristate "TI K3 AM65x CPTS"
123 Say y here to support the TI K3 AM65x CPTS with 1588 features such as
124 PTP hardware clock for each CPTS device and network packets
126 Depending on integration CPTS blocks enable compliance with
137 defined in IEEE 802.1Q 2018. The EST scheduler runs on CPTS and the
Dam65-cpsw-qos.c14 #include "am65-cpts.h"
367 struct am65_cpts *cpts = common->cpts; in am65_cpsw_timer_set() local
373 return am65_cpts_estf_enable(cpts, port->port_id - 1, &cfg); in am65_cpsw_timer_set()
379 struct am65_cpts *cpts = port->common->cpts; in am65_cpsw_timer_stop() local
381 am65_cpts_estf_disable(cpts, port->port_id - 1); in am65_cpsw_timer_stop()
389 struct am65_cpts *cpts = port->common->cpts; in am65_cpsw_timer_act() local
415 cur_time = am65_cpts_ns_gettime(cpts); in am65_cpsw_timer_act()
449 struct am65_cpts *cpts = common->cpts; in am65_cpsw_configure_taprio() local
474 est_new->taprio.base_time = am65_cpts_ns_gettime(cpts); in am65_cpsw_configure_taprio()
DMakefile16 obj-$(CONFIG_TI_CPTS) += cpts.o
30 obj-$(CONFIG_TI_K3_AM65_CPTS) += am65-cpts.o
Dcpsw.c45 #include "cpts.h"
430 cpts_rx_timestamp(cpsw->cpts, skb); in cpsw_rx_handler()
833 if (cpsw->cpts) { in cpsw_ndo_open()
834 if (cpts_register(cpsw->cpts)) in cpsw_ndo_open()
835 dev_err(priv->dev, "error registering cpts device\n"); in cpsw_ndo_open()
882 cpts_unregister(cpsw->cpts); in cpsw_ndo_stop()
903 struct cpts *cpts = cpsw->cpts; in cpsw_ndo_start_xmit() local
915 priv->tx_ts_enabled && cpts_can_timestamp(cpts, skb)) in cpsw_ndo_start_xmit()
1697 if (!cpsw->cpts) in cpsw_probe()
1707 /* Enable misc CPTS evnt_pend IRQ */ in cpsw_probe()
[all …]
Dnetcp_ethss.c26 #include "cpts.h"
754 struct cpts *cpts; member
2008 if (!gbe_intf || !gbe_intf->gbe_dev->cpts) in keystone_get_ts_info()
2018 info->phc_index = gbe_intf->gbe_dev->cpts->phc_index; in keystone_get_ts_info()
2539 cpts_tx_timestamp(gbe_dev->cpts, skb); in gbe_txtstamp()
2547 return cpts_can_timestamp(gbe_intf->gbe_dev->cpts, skb); in gbe_need_txtstamp()
2592 cpts_rx_timestamp(gbe_dev->cpts, p_info->skb); in gbe_rxtstamp()
2602 struct cpts *cpts = gbe_dev->cpts; in gbe_hwtstamp_get() local
2605 if (!cpts) in gbe_hwtstamp_get()
2648 struct cpts *cpts = gbe_dev->cpts; in gbe_hwtstamp_set() local
[all …]
Dcpsw_new.c41 #include "cpts.h"
374 cpts_rx_timestamp(cpsw->cpts, skb); in cpsw_rx_handler()
809 cpts_unregister(cpsw->cpts); in cpsw_ndo_stop()
869 if (cpsw->cpts) { in cpsw_ndo_open()
870 if (cpts_register(cpsw->cpts)) in cpsw_ndo_open()
871 dev_err(priv->dev, "error registering cpts device\n"); in cpsw_ndo_open()
919 struct cpts *cpts = cpsw->cpts; in cpsw_ndo_start_xmit() local
931 priv->tx_ts_enabled && cpts_can_timestamp(cpts, skb)) in cpsw_ndo_start_xmit()
2002 if (!cpsw->cpts) in cpsw_probe()
2012 /* Enable misc CPTS evnt_pend IRQ */ in cpsw_probe()
[all …]
Dam65-cpsw-nuss.c37 #include "am65-cpts.h"
958 am65_cpts_tx_timestamp(tx_chn->common->cpts, skb); in am65_cpsw_nuss_tx_compl_packet()
1139 am65_cpts_prep_tx_timestamp(common->cpts, skb); in am65_cpsw_nuss_ndo_slave_xmit()
1396 am65_cpts_rx_enable(common->cpts, port->rx_ts_enabled); in am65_cpsw_nuss_hwtstamp_set()
1788 struct am65_cpts *cpts; in am65_cpsw_init_cpts() local
1794 node = of_get_child_by_name(dev->of_node, "cpts"); in am65_cpsw_init_cpts()
1796 dev_err(dev, "%s cpts not found\n", __func__); in am65_cpsw_init_cpts()
1801 cpts = am65_cpts_create(dev, reg_base, node); in am65_cpsw_init_cpts()
1802 if (IS_ERR(cpts)) { in am65_cpsw_init_cpts()
1803 int ret = PTR_ERR(cpts); in am65_cpsw_init_cpts()
[all …]
Dcpsw_priv.c25 #include "cpts.h"
70 cpts_tx_timestamp(ndev_to_cpsw(ndev)->cpts, skb); in cpsw_tx_handler()
123 cpts_misc_interrupt(cpsw->cpts); in cpsw_misc_interrupt()
535 cpts_node = of_get_child_by_name(cpsw->dev->of_node, "cpts"); in cpsw_init_common()
539 cpsw->cpts = cpts_create(cpsw->dev, cpts_regs, cpts_node, in cpsw_init_common()
541 if (IS_ERR(cpsw->cpts)) { in cpsw_init_common()
542 ret = PTR_ERR(cpsw->cpts); in cpsw_init_common()
/Linux-v5.15/Documentation/devicetree/bindings/net/
Dti,k3-am654-cpts.yaml4 $id: http://devicetree.org/schemas/net/ti,k3-am654-cpts.yaml#
7 title: The TI AM654x/J721E Common Platform Time Sync (CPTS) module Device Tree Bindings
14 The TI AM654x/J721E CPTS module is used to facilitate host control of time
16 Main features of CPTS module are
32 TI AM654x/J721E SoCs has several similar CPTS modules integrated into the
34 - Main CPTS
35 - MCU CPSW CPTS with IEEE 1588-2008 support
36 - PCIe subsystem CPTS for PTM support
38 Depending on CPTS module integration and when CPTS is integral part of
40 be omitted - parent module is fully responsible for CPTS enabling and
[all …]
Dkeystone-netcp.txt107 - cpts: sub-node time synchronization (CPTS) submodule configuration
108 -- clocks: CPTS reference clock. Should point on cpts-refclk-mux clock.
109 -- clock-names: should be "cpts"
110 -- cpts-refclk-mux: multiplexer clock definition sub-node for CPTS reference (RFTCLK) clock
112 --- clocks: list of CPTS reference (RFTCLK) clock's parents as defined in Data manual
114 --- assigned-clocks: should point on cpts-refclk-mux clock
120 Mult and shift will be calculated basing on CPTS
188 cpts {
190 clock-names = "cpts";
192 cpts_refclk_mux: cpts-refclk-mux {
[all …]
Dti,k3-am654-cpsw-nuss.yaml40 new version of Common Platform Time Sync (CPTS)
157 "^cpts@[0-9a-f]+":
159 $ref: "ti,k3-am654-cpts.yaml#"
161 CPSW Common Platform Time Sync (CPTS) module.
249 cpts@3d000 {
250 compatible = "ti,am65-cpts";
253 clock-names = "cpts";
255 interrupt-names = "cpts";
256 ti,cpts-ext-ts-inputs = <4>;
257 ti,cpts-periodic-outputs = <2>;
Dti,cpsw-switch.yaml119 cpts:
122 The Common Platform Time Sync (CPTS) module
127 description: CPTS reference clock
131 - const: cpts
142 Mult and shift will be calculated basing on CPTS rftclk frequency if
235 cpts {
237 clock-names = "cpts";
/Linux-v5.15/arch/arm64/boot/dts/ti/
Dk3-am65-mcu.dtsi248 cpts@3d000 {
249 compatible = "ti,am65-cpts";
252 clock-names = "cpts";
254 interrupt-names = "cpts";
255 ti,cpts-ext-ts-inputs = <4>;
256 ti,cpts-periodic-outputs = <2>;
Dk3-j721e-mcu-wakeup.dtsi342 cpts@3d000 {
343 compatible = "ti,am65-cpts";
346 clock-names = "cpts";
348 interrupt-names = "cpts";
349 ti,cpts-ext-ts-inputs = <4>;
350 ti,cpts-periodic-outputs = <2>;
Dk3-j7200-mcu-wakeup.dtsi231 cpts@3d000 {
232 compatible = "ti,am65-cpts";
235 clock-names = "cpts";
237 interrupt-names = "cpts";
238 ti,cpts-ext-ts-inputs = <4>;
239 ti,cpts-periodic-outputs = <2>;
Dk3-am64-main.dtsi540 cpts@3d000 {
541 compatible = "ti,j721e-cpts";
544 clock-names = "cpts";
546 interrupt-names = "cpts";
547 ti,cpts-ext-ts-inputs = <4>;
548 ti,cpts-periodic-outputs = <2>;
552 cpts@39000000 {
553 compatible = "ti,j721e-cpts";
555 reg-names = "cpts";
558 clock-names = "cpts";
[all …]
Dk3-j7200-main.dtsi279 cpts@310d0000 {
280 compatible = "ti,j721e-cpts";
282 reg-names = "cpts";
284 clock-names = "cpts";
286 interrupt-names = "cpts";
287 ti,cpts-periodic-outputs = <6>;
288 ti,cpts-ext-ts-inputs = <8>;
/Linux-v5.15/arch/arm/boot/dts/
Dkeystone-k2g-netcp.dtsi101 clock-names = "ethss_clk", "cpts";
122 cpts-rftclk-sel = <0>;
123 cpts-ext-ts-inputs = <8>;
Dkeystone-k2e-netcp.dtsi159 cpts {
161 clock-names = "cpts";
163 cpts_refclk_mux: cpts-refclk-mux {
Dkeystone-k2l-netcp.dtsi158 cpts {
160 clock-names = "cpts";
162 cpts_refclk_mux: cpts-refclk-mux {
Dkeystone-k2hk-netcp.dtsi178 cpts {
180 clock-names = "cpts";
182 cpts_refclk_mux: cpts-refclk-mux {

12