/Linux-v4.19/drivers/net/can/ |
D | dev.c | 96 unsigned int tseg1, tseg2; in can_update_sample_point() local 100 tseg2 = tseg + CAN_CALC_SYNC_SEG - (sample_point_nominal * (tseg + CAN_CALC_SYNC_SEG)) / 1000 - i; in can_update_sample_point() 101 tseg2 = clamp(tseg2, btc->tseg2_min, btc->tseg2_max); in can_update_sample_point() 102 tseg1 = tseg - tseg2; in can_update_sample_point() 105 tseg2 = tseg - tseg1; in can_update_sample_point() 108 sample_point = 1000 * (tseg + CAN_CALC_SYNC_SEG - tseg2) / (tseg + CAN_CALC_SYNC_SEG); in can_update_sample_point() 115 *tseg2_ptr = tseg2; in can_update_sample_point() 137 unsigned int brp, tsegall, tseg, tseg1 = 0, tseg2 = 0; in can_calc_bittiming() local 176 can_update_sample_point(btc, sample_point_nominal, tseg / 2, &tseg1, &tseg2, &sample_point_error); in can_calc_bittiming() 206 &tseg1, &tseg2, NULL); in can_calc_bittiming() [all …]
|
/Linux-v4.19/drivers/net/can/mscan/ |
D | mscan.h | 265 #define BTR1_SET_TSEG2(tseg2) ((((tseg2) - 1) << BTR1_TSEG2_SHIFT) & \ argument
|
/Linux-v4.19/include/linux/can/dev/ |
D | peak_canfd.h | 81 u8 tseg2; /* Timing SEGment 2 */ member 108 u8 tseg2; /* Timing SEGment 2 */ member
|
/Linux-v4.19/drivers/net/can/peak_canfd/ |
D | peak_canfd.c | 135 cmd->tseg2 = PUCAN_TSLOW_TSEG2(pbt->phase_seg2 - 1); in pucan_set_timing_slow() 142 le16_to_cpu(cmd->brp), cmd->tseg1, cmd->tseg2, cmd->sjw_t); in pucan_set_timing_slow() 156 cmd->tseg2 = PUCAN_TFAST_TSEG2(pbt->phase_seg2 - 1); in pucan_set_timing_fast() 161 le16_to_cpu(cmd->brp), cmd->tseg1, cmd->tseg2, cmd->sjw); in pucan_set_timing_fast()
|
/Linux-v4.19/drivers/net/can/ifi_canfd/ |
D | ifi_canfd.c | 660 u16 brp, sjw, tseg1, tseg2, tdc; in ifi_canfd_set_bittiming() local 666 tseg2 = bt->phase_seg2 - 2; in ifi_canfd_set_bittiming() 667 writel((tseg2 << IFI_CANFD_TIME_TIMEB_OFF) | in ifi_canfd_set_bittiming() 677 tseg2 = dbt->phase_seg2 - 2; in ifi_canfd_set_bittiming() 678 writel((tseg2 << IFI_CANFD_TIME_TIMEB_OFF) | in ifi_canfd_set_bittiming()
|
/Linux-v4.19/drivers/net/can/rcar/ |
D | rcar_canfd.c | 1186 u16 brp, sjw, tseg1, tseg2; in rcar_canfd_set_bittiming() local 1194 tseg2 = bt->phase_seg2 - 1; in rcar_canfd_set_bittiming() 1199 RCANFD_NCFG_NSJW(sjw) | RCANFD_NCFG_NTSEG2(tseg2)); in rcar_canfd_set_bittiming() 1203 brp, sjw, tseg1, tseg2); in rcar_canfd_set_bittiming() 1209 tseg2 = dbt->phase_seg2 - 1; in rcar_canfd_set_bittiming() 1212 RCANFD_DCFG_DSJW(sjw) | RCANFD_DCFG_DTSEG2(tseg2)); in rcar_canfd_set_bittiming() 1216 brp, sjw, tseg1, tseg2); in rcar_canfd_set_bittiming() 1220 RCANFD_CFG_SJW(sjw) | RCANFD_CFG_TSEG2(tseg2)); in rcar_canfd_set_bittiming() 1225 brp, sjw, tseg1, tseg2); in rcar_canfd_set_bittiming()
|
/Linux-v4.19/drivers/net/can/usb/kvaser_usb/ |
D | kvaser_usb_hydra.c | 198 u8 tseg2; member 1500 int tseg2 = bt->phase_seg2; in kvaser_usb_hydra_set_bittiming() local 1512 cmd->set_busparams_req.tseg2 = (u8)tseg2; in kvaser_usb_hydra_set_bittiming() 1534 int tseg2 = dbt->phase_seg2; in kvaser_usb_hydra_set_data_bittiming() local 1546 cmd->set_busparams_req.tseg2_d = (u8)tseg2; in kvaser_usb_hydra_set_data_bittiming()
|
D | kvaser_usb_leaf.c | 169 u8 tseg2; member 1265 cmd->u.busparams.tseg2 = bt->phase_seg2; in kvaser_usb_leaf_set_bittiming()
|
/Linux-v4.19/drivers/net/can/m_can/ |
D | m_can.c | 983 u16 brp, sjw, tseg1, tseg2; in m_can_set_bittiming() local 989 tseg2 = bt->phase_seg2 - 1; in m_can_set_bittiming() 991 (tseg1 << NBTP_NTSEG1_SHIFT) | (tseg2 << NBTP_NTSEG2_SHIFT); in m_can_set_bittiming() 999 tseg2 = dbt->phase_seg2 - 1; in m_can_set_bittiming() 1034 (tseg2 << DBTP_DTSEG2_SHIFT); in m_can_set_bittiming()
|
/Linux-v4.19/drivers/net/can/c_can/ |
D | c_can.c | 512 u8 brp, brpe, sjw, tseg1, tseg2; in c_can_set_bittiming() local 525 tseg2 = bt->phase_seg2 - 1; in c_can_set_bittiming() 527 (tseg2 << BTR_TSEG2_SHIFT); in c_can_set_bittiming()
|
/Linux-v4.19/drivers/net/can/usb/peak_usb/ |
D | pcan_usb_fd.c | 406 cmd->tseg2 = PUCAN_TSLOW_TSEG2(bt->phase_seg2 - 1); in pcan_usb_fd_set_bittiming_slow() 425 cmd->tseg2 = PUCAN_TFAST_TSEG2(bt->phase_seg2 - 1); in pcan_usb_fd_set_bittiming_fast()
|
/Linux-v4.19/Documentation/networking/ |
D | can.rst | 1208 sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1 1248 "sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1 clock 8000000" 1289 sja1000: clock 8000000 tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1 1385 pcan_usb_pro_fd: tseg1 1..64 tseg2 1..16 sjw 1..16 brp 1..1024 \
|