/linux/drivers/net/ethernet/ti/ |
H A D | cpts.c | 21 #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 …]
|
H A D | am65-cpts.c | 23 #include "am65-cpts.h" 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() [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 | 2 /* TI K3 AM65 CPTS driver interface 21 void am65_cpts_release(struct am65_cpts *cpts); 24 int am65_cpts_phc_index(struct am65_cpts *cpts); 25 void am65_cpts_rx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb); 26 void am65_cpts_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb); 27 void am65_cpts_prep_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb); 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); [all …]
|
H A D | Kconfig | 83 tristate "TI Common Platform Time Sync (CPTS) Support" 126 tristate "TI K3 AM65x CPTS" 130 Say y here to support the TI K3 AM65x CPTS with 1588 features such as 131 PTP hardware clock for each CPTS device and network packets 133 Depending on integration CPTS blocks enable compliance with 146 The EST scheduler runs on CPTS and the TAS/EST schedule is
|
H A D | am65-cpsw-qos.c | 19 #include "am65-cpts.h" 746 struct am65_cpts *cpts = common->cpts; in am65_cpsw_timer_set() local 752 return am65_cpts_estf_enable(cpts, port->port_id - 1, &cfg); in am65_cpsw_timer_set() 758 struct am65_cpts *cpts = port->common->cpts; in am65_cpsw_timer_stop() local 760 am65_cpts_estf_disable(cpts, port->port_id - 1); in am65_cpsw_timer_stop() 768 struct am65_cpts *cpts = port->common->cpts; in am65_cpsw_timer_act() local 794 cur_time = am65_cpts_ns_gettime(cpts); in am65_cpsw_timer_act() 839 struct am65_cpts *cpts = common->cpts; in am65_cpsw_taprio_replace() local 902 cur_time = am65_cpts_ns_gettime(cpts); in am65_cpsw_taprio_replace()
|
H A D | netcp_ethss.c | 26 #include "cpts.h" 754 struct cpts *cpts; member 2008 if (!gbe_intf || !gbe_intf->gbe_dev->cpts) in keystone_get_ts_info() 2016 info->phc_index = gbe_intf->gbe_dev->cpts->phc_index; in keystone_get_ts_info() 2534 cpts_tx_timestamp(gbe_dev->cpts, skb); in gbe_txtstamp() 2542 return cpts_can_timestamp(gbe_intf->gbe_dev->cpts, skb); in gbe_need_txtstamp() 2587 cpts_rx_timestamp(gbe_dev->cpts, p_info->skb); in gbe_rxtstamp() 2597 struct cpts *cpts = gbe_dev->cpts; in gbe_hwtstamp_get() local 2600 if (!cpts) in gbe_hwtstamp_get() 2643 struct cpts *cpts = gbe_dev->cpts; in gbe_hwtstamp_set() local [all …]
|
H A D | Makefile | 15 obj-$(CONFIG_TI_CPTS) += cpts.o 32 obj-$(CONFIG_TI_K3_AM65_CPTS) += am65-cpts.o
|
H A D | am65-cpsw-nuss.c | 43 #include "am65-cpts.h" 1358 am65_cpts_rx_timestamp(common->cpts, skb); in am65_cpsw_nuss_rx_packets() 1455 am65_cpts_tx_timestamp(tx_chn->common->cpts, skb); in am65_cpsw_nuss_tx_compl_packet_skb() 1702 am65_cpts_prep_tx_timestamp(common->cpts, skb); in am65_cpsw_nuss_ndo_slave_xmit() 2647 struct am65_cpts *cpts; in am65_cpsw_init_cpts() local 2653 node = of_get_child_by_name(dev->of_node, "cpts"); in am65_cpsw_init_cpts() 2655 dev_err(dev, "%s cpts not found\n", __func__); in am65_cpsw_init_cpts() 2660 cpts = am65_cpts_create(dev, reg_base, node); in am65_cpsw_init_cpts() 2661 if (IS_ERR(cpts)) { in am65_cpsw_init_cpts() 2662 int ret = PTR_ERR(cpts); in am65_cpsw_init_cpts() [all …]
|
H A D | cpsw_priv.c | 26 #include "cpts.h" 71 cpts_tx_timestamp(ndev_to_cpsw(ndev)->cpts, skb); in cpsw_tx_handler() 124 cpts_misc_interrupt(cpsw->cpts); in cpsw_misc_interrupt() 537 cpts_node = of_get_child_by_name(cpsw->dev->of_node, "cpts"); in cpsw_init_common() 541 cpsw->cpts = cpts_create(cpsw->dev, cpts_regs, cpts_node, in cpsw_init_common() 543 if (IS_ERR(cpsw->cpts)) { in cpsw_init_common() 544 ret = PTR_ERR(cpsw->cpts); in cpsw_init_common()
|
H A D | am65-cpsw-nuss.h | 172 struct am65_cpts *cpts; member
|
H A D | am65-cpsw-ethtool.c | 16 #include "am65-cpts.h" 717 info->phc_index = am65_cpts_phc_index(common->cpts); in am65_cpsw_get_ethtool_ts_info()
|
/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 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 …]
|
H A D | ti,cpsw-switch.yaml | 121 cpts: 125 The Common Platform Time Sync (CPTS) module 130 description: CPTS reference clock 134 - const: cpts 145 Mult and shift will be calculated basing on CPTS rftclk frequency if 238 cpts { 240 clock-names = "cpts";
|
H A D | cpsw.txt | 41 Mult and shift will be calculated basing on CPTS
|
/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 {
|
H A D | keystone-k2e-clocks.dtsi | 79 * (as cpts, for example) by configuring corresponding clock muxes.
|
/linux/arch/arm64/boot/dts/ti/ |
H A D | k3-am65-mcu.dtsi | 381 cpts@3d000 { 382 compatible = "ti,am65-cpts"; 385 clock-names = "cpts"; 387 interrupt-names = "cpts"; 388 ti,cpts-ext-ts-inputs = <4>; 389 ti,cpts-periodic-outputs = <2>;
|
H A D | k3-j721e-mcu-wakeup.dtsi | 577 cpts@3d000 { 578 compatible = "ti,am65-cpts"; 581 clock-names = "cpts"; 583 interrupt-names = "cpts"; 584 ti,cpts-ext-ts-inputs = <4>; 585 ti,cpts-periodic-outputs = <2>;
|
H A D | k3-j721s2-mcu-wakeup.dtsi | 578 cpts@3d000 { 579 compatible = "ti,am65-cpts"; 582 clock-names = "cpts"; 586 interrupt-names = "cpts"; 587 ti,cpts-ext-ts-inputs = <4>; 588 ti,cpts-periodic-outputs = <2>;
|
H A D | k3-am65-main.dtsi | 823 cpts@310d0000 { 824 compatible = "ti,am65-cpts"; 826 reg-names = "cpts"; 828 clock-names = "cpts"; 830 interrupt-names = "cpts"; 831 ti,cpts-periodic-outputs = <6>; 832 ti,cpts-ext-ts-inputs = <8>;
|
/linux/drivers/clk/ti/ |
H A D | clk-43xx.c | 290 * source the CPTS doesnot work properly. It gives clockcheck errors in am43xx_dt_clk_init()
|