/openbmc/linux/drivers/net/ethernet/ti/ |
H A D | cpts.c | 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() 83 static void cpts_purge_txq(struct cpts *cpts) in cpts_purge_txq() argument [all …]
|
H A D | am65-cpts.c | 204 static void am65_cpts_settime(struct am65_cpts *cpts, u64 start_tstamp) in am65_cpts_settime() argument 209 am65_cpts_write32(cpts, val, ts_load_val_hi); in am65_cpts_settime() 211 am65_cpts_write32(cpts, val, ts_load_val_lo); in am65_cpts_settime() 213 am65_cpts_write32(cpts, AM65_CPTS_TS_LOAD_EN, ts_load_en); in am65_cpts_settime() 216 static void am65_cpts_set_add_val(struct am65_cpts *cpts) in am65_cpts_set_add_val() argument 219 cpts->ts_add_val = (NSEC_PER_SEC / cpts->refclk_freq - 1) & 0x7; in am65_cpts_set_add_val() 221 am65_cpts_write32(cpts, cpts->ts_add_val, ts_add_val); in am65_cpts_set_add_val() 224 static void am65_cpts_disable(struct am65_cpts *cpts) in am65_cpts_disable() argument 226 am65_cpts_write32(cpts, 0, control); in am65_cpts_disable() 227 am65_cpts_write32(cpts, 0, int_enable); in am65_cpts_disable() [all …]
|
H A D | cpts.h | 100 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 …]
|
H A D | am65-cpts.h | 21 void am65_cpts_release(struct am65_cpts *cpts); 24 int am65_cpts_phc_index(struct am65_cpts *cpts); 25 void am65_cpts_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb); 26 void am65_cpts_prep_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb); 27 void am65_cpts_rx_enable(struct am65_cpts *cpts, bool en); 28 u64 am65_cpts_ns_gettime(struct am65_cpts *cpts); 29 int am65_cpts_estf_enable(struct am65_cpts *cpts, int idx, 31 void am65_cpts_estf_disable(struct am65_cpts *cpts, int idx); 32 void am65_cpts_suspend(struct am65_cpts *cpts); 33 void am65_cpts_resume(struct am65_cpts *cpts); [all …]
|
H A D | am65-cpsw-qos.c | 369 struct am65_cpts *cpts = common->cpts; in am65_cpsw_timer_set() local 375 return am65_cpts_estf_enable(cpts, port->port_id - 1, &cfg); in am65_cpsw_timer_set() 381 struct am65_cpts *cpts = port->common->cpts; in am65_cpsw_timer_stop() local 383 am65_cpts_estf_disable(cpts, port->port_id - 1); in am65_cpsw_timer_stop() 391 struct am65_cpts *cpts = port->common->cpts; in am65_cpsw_timer_act() local 417 cur_time = am65_cpts_ns_gettime(cpts); in am65_cpsw_timer_act() 448 struct am65_cpts *cpts = common->cpts; in am65_cpsw_configure_taprio() local 473 est_new->taprio.base_time = am65_cpts_ns_gettime(cpts); in am65_cpsw_configure_taprio()
|
H A D | Makefile | 16 obj-$(CONFIG_TI_CPTS) += cpts.o 32 obj-$(CONFIG_TI_K3_AM65_CPTS) += am65-cpts.o
|
H A D | cpsw.c | 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() 884 cpts_unregister(cpsw->cpts); in cpsw_ndo_stop() 905 struct cpts *cpts = cpsw->cpts; in cpsw_ndo_start_xmit() local 917 priv->tx_ts_enabled && cpts_can_timestamp(cpts, skb)) in cpsw_ndo_start_xmit() 1692 if (!cpsw->cpts) in cpsw_probe() 1703 cpts_set_irqpoll(cpsw->cpts, false); in cpsw_probe() 1717 cpts_release(cpsw->cpts); in cpsw_probe() 1740 cpts_release(cpsw->cpts); in cpsw_remove()
|
H A D | cpsw_new.c | 375 cpts_rx_timestamp(cpsw->cpts, skb); in cpsw_rx_handler() 813 cpts_unregister(cpsw->cpts); in cpsw_ndo_stop() 871 if (cpsw->cpts) { in cpsw_ndo_open() 872 if (cpts_register(cpsw->cpts)) in cpsw_ndo_open() 921 struct cpts *cpts = cpsw->cpts; in cpsw_ndo_start_xmit() local 933 priv->tx_ts_enabled && cpts_can_timestamp(cpts, skb)) in cpsw_ndo_start_xmit() 1993 if (!cpsw->cpts) in cpsw_probe() 2004 cpts_set_irqpoll(cpsw->cpts, false); in cpsw_probe() 2034 cpts_release(cpsw->cpts); in cpsw_probe() 2056 cpts_release(cpsw->cpts); in cpsw_remove()
|
H A D | netcp_ethss.c | 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 2651 if (!cpts) in gbe_hwtstamp_set() [all …]
|
H A D | am65-cpsw-nuss.c | 912 am65_cpts_tx_timestamp(tx_chn->common->cpts, skb); in am65_cpsw_nuss_tx_compl_packet() 1093 am65_cpts_prep_tx_timestamp(common->cpts, skb); in am65_cpsw_nuss_ndo_slave_xmit() 1348 am65_cpts_rx_enable(common->cpts, port->rx_ts_enabled); in am65_cpsw_nuss_hwtstamp_set() 1971 struct am65_cpts *cpts; in am65_cpsw_init_cpts() local 1984 cpts = am65_cpts_create(dev, reg_base, node); in am65_cpsw_init_cpts() 1985 if (IS_ERR(cpts)) { in am65_cpsw_init_cpts() 1986 int ret = PTR_ERR(cpts); in am65_cpsw_init_cpts() 1992 common->cpts = cpts; in am65_cpsw_init_cpts() 3011 am65_cpts_release(common->cpts); in am65_cpsw_nuss_probe() 3041 am65_cpts_release(common->cpts); in am65_cpsw_nuss_remove() [all …]
|
/openbmc/linux/arch/arm/boot/dts/ti/keystone/ |
H A D | keystone-k2g-netcp.dtsi | 101 clock-names = "ethss_clk", "cpts"; 122 cpts-rftclk-sel = <0>; 123 cpts-ext-ts-inputs = <8>;
|
H A D | keystone-k2l-netcp.dtsi | 158 cpts { 160 clock-names = "cpts"; 162 cpts_refclk_mux: cpts-refclk-mux {
|
H A D | keystone-k2e-netcp.dtsi | 159 cpts { 161 clock-names = "cpts"; 163 cpts_refclk_mux: cpts-refclk-mux {
|
H A D | keystone-k2hk-netcp.dtsi | 178 cpts { 180 clock-names = "cpts"; 182 cpts_refclk_mux: cpts-refclk-mux {
|
/openbmc/linux/Documentation/devicetree/bindings/net/ |
H A D | keystone-netcp.txt | 107 - 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 114 --- assigned-clocks: should point on cpts-refclk-mux clock 188 cpts { 190 clock-names = "cpts"; 192 cpts_refclk_mux: cpts-refclk-mux {
|
/openbmc/linux/arch/arm64/boot/dts/ti/ |
H A D | k3-am65-mcu.dtsi | 370 cpts@3d000 { 371 compatible = "ti,am65-cpts"; 374 clock-names = "cpts"; 376 interrupt-names = "cpts"; 377 ti,cpts-ext-ts-inputs = <4>; 378 ti,cpts-periodic-outputs = <2>;
|
H A D | k3-j7200-main.dtsi | 302 cpts@310d0000 { 303 compatible = "ti,j721e-cpts"; 305 reg-names = "cpts"; 307 clock-names = "cpts"; 309 interrupt-names = "cpts"; 310 ti,cpts-periodic-outputs = <6>; 311 ti,cpts-ext-ts-inputs = <8>; 384 cpts@3d000 { 385 compatible = "ti,j721e-cpts"; 388 clock-names = "cpts"; [all …]
|
H A D | k3-j721s2-mcu-wakeup.dtsi | 553 cpts@3d000 { 554 compatible = "ti,am65-cpts"; 557 clock-names = "cpts"; 561 interrupt-names = "cpts"; 562 ti,cpts-ext-ts-inputs = <4>; 563 ti,cpts-periodic-outputs = <2>;
|
H A D | k3-j7200-mcu-wakeup.dtsi | 429 cpts@3d000 { 430 compatible = "ti,am65-cpts"; 433 clock-names = "cpts"; 435 interrupt-names = "cpts"; 436 ti,cpts-ext-ts-inputs = <4>; 437 ti,cpts-periodic-outputs = <2>;
|
H A D | k3-am64-main.dtsi | 702 cpts@3d000 { 703 compatible = "ti,j721e-cpts"; 706 clock-names = "cpts"; 708 interrupt-names = "cpts"; 709 ti,cpts-ext-ts-inputs = <4>; 710 ti,cpts-periodic-outputs = <2>; 714 main_cpts0: cpts@39000000 { 715 compatible = "ti,j721e-cpts"; 717 reg-names = "cpts"; 720 clock-names = "cpts"; [all …]
|
H A D | k3-j784s4-mcu-wakeup.dtsi | 561 cpts@3d000 { 562 compatible = "ti,am65-cpts"; 565 clock-names = "cpts"; 569 interrupt-names = "cpts"; 570 ti,cpts-ext-ts-inputs = <4>; 571 ti,cpts-periodic-outputs = <2>;
|
H A D | k3-j721e-mcu-wakeup.dtsi | 551 cpts@3d000 { 552 compatible = "ti,am65-cpts"; 555 clock-names = "cpts"; 557 interrupt-names = "cpts"; 558 ti,cpts-ext-ts-inputs = <4>; 559 ti,cpts-periodic-outputs = <2>;
|
H A D | k3-j721s2-main.dtsi | 1106 cpts@310d0000 { 1107 compatible = "ti,j721e-cpts"; 1109 reg-names = "cpts"; 1111 clock-names = "cpts"; 1115 interrupt-names = "cpts"; 1116 ti,cpts-periodic-outputs = <6>; 1117 ti,cpts-ext-ts-inputs = <8>; 1172 cpts@3d000 { 1173 compatible = "ti,am65-cpts"; 1176 clock-names = "cpts"; [all …]
|
H A D | k3-am62a-main.dtsi | 645 cpts@3d000 { 646 compatible = "ti,j721e-cpts"; 649 clock-names = "cpts"; 651 interrupt-names = "cpts"; 652 ti,cpts-ext-ts-inputs = <4>; 653 ti,cpts-periodic-outputs = <2>;
|
H A D | k3-am62-main.dtsi | 729 cpts@3d000 { 730 compatible = "ti,j721e-cpts"; 733 clock-names = "cpts"; 735 interrupt-names = "cpts"; 736 ti,cpts-ext-ts-inputs = <4>; 737 ti,cpts-periodic-outputs = <2>;
|