Home
last modified time | relevance | path

Searched refs:dbt (Results 1 – 11 of 11) sorted by relevance

/drivers/net/can/dev/
Dnetlink.c162 struct can_bittiming dbt; in can_changelink() local
177 memcpy(&dbt, nla_data(data[IFLA_CAN_DATA_BITTIMING]), in can_changelink()
178 sizeof(dbt)); in can_changelink()
179 err = can_get_bittiming(dev, &dbt, in can_changelink()
186 if (priv->bitrate_max && dbt.bitrate > priv->bitrate_max) { in can_changelink()
192 memcpy(&priv->data_bittiming, &dbt, sizeof(dbt)); in can_changelink()
Dbittiming.c181 const struct can_bittiming *dbt = &priv->data_bittiming; in can_calc_tdco() local
192 if (dbt->brp == 1 || dbt->brp == 2) { in can_calc_tdco()
194 u32 sample_point_in_tq = can_bit_time(dbt) * dbt->sample_point / 1000; in can_calc_tdco()
/drivers/net/can/usb/
Dgs_usb.c426 struct gs_device_bittiming *dbt; in gs_usb_set_bittiming() local
428 dbt = kmalloc(sizeof(*dbt), GFP_KERNEL); in gs_usb_set_bittiming()
429 if (!dbt) in gs_usb_set_bittiming()
432 dbt->prop_seg = cpu_to_le32(bt->prop_seg); in gs_usb_set_bittiming()
433 dbt->phase_seg1 = cpu_to_le32(bt->phase_seg1); in gs_usb_set_bittiming()
434 dbt->phase_seg2 = cpu_to_le32(bt->phase_seg2); in gs_usb_set_bittiming()
435 dbt->sjw = cpu_to_le32(bt->sjw); in gs_usb_set_bittiming()
436 dbt->brp = cpu_to_le32(bt->brp); in gs_usb_set_bittiming()
445 dbt, in gs_usb_set_bittiming()
446 sizeof(*dbt), in gs_usb_set_bittiming()
[all …]
/drivers/net/can/ifi_canfd/
Difi_canfd.c659 const struct can_bittiming *dbt = &priv->can.data_bittiming; in ifi_canfd_set_bittiming() local
674 brp = dbt->brp - 2; in ifi_canfd_set_bittiming()
675 sjw = dbt->sjw - 1; in ifi_canfd_set_bittiming()
676 tseg1 = dbt->prop_seg + dbt->phase_seg1 - 1; in ifi_canfd_set_bittiming()
677 tseg2 = dbt->phase_seg2 - 2; in ifi_canfd_set_bittiming()
685 tdc = dbt->brp * (dbt->prop_seg + dbt->phase_seg1); in ifi_canfd_set_bittiming()
/drivers/net/can/
Dflexcan.c1282 struct can_bittiming *dbt = &priv->can.data_bittiming; in flexcan_set_bittiming_cbt() local
1311 if (bt->brp != dbt->brp) in flexcan_set_bittiming_cbt()
1313 dbt->brp, bt->brp); in flexcan_set_bittiming_cbt()
1323 if (dbt->phase_seg1 > 0x8) { in flexcan_set_bittiming_cbt()
1324 dbt->prop_seg += (dbt->phase_seg1 - 0x8); in flexcan_set_bittiming_cbt()
1325 dbt->phase_seg1 = 0x8; in flexcan_set_bittiming_cbt()
1335 reg_fdcbt |= FIELD_PREP(FLEXCAN_FDCBT_FPRESDIV_MASK, dbt->brp - 1) | in flexcan_set_bittiming_cbt()
1336 FIELD_PREP(FLEXCAN_FDCBT_FRJW_MASK, dbt->sjw - 1) | in flexcan_set_bittiming_cbt()
1337 FIELD_PREP(FLEXCAN_FDCBT_FPROPSEG_MASK, dbt->prop_seg) | in flexcan_set_bittiming_cbt()
1338 FIELD_PREP(FLEXCAN_FDCBT_FPSEG1_MASK, dbt->phase_seg1 - 1) | in flexcan_set_bittiming_cbt()
[all …]
Dxilinx_can.c394 struct can_bittiming *dbt = &priv->can.data_bittiming; in xcan_set_bittiming() local
427 btr0 = dbt->brp - 1; in xcan_set_bittiming()
430 btr1 = dbt->prop_seg + dbt->phase_seg1 - 1; in xcan_set_bittiming()
433 btr1 |= (dbt->phase_seg2 - 1) << priv->devtype.btr_ts2_shift; in xcan_set_bittiming()
436 btr1 |= (dbt->sjw - 1) << priv->devtype.btr_sjw_shift; in xcan_set_bittiming()
/drivers/net/can/usb/kvaser_usb/
Dkvaser_usb_core.c586 struct can_bittiming *dbt = &priv->can.data_bittiming; in kvaser_usb_set_data_bittiming() local
589 int tseg1 = dbt->prop_seg + dbt->phase_seg1; in kvaser_usb_set_data_bittiming()
590 int tseg2 = dbt->phase_seg2; in kvaser_usb_set_data_bittiming()
591 int sjw = dbt->sjw; in kvaser_usb_set_data_bittiming()
598 busparams.bitrate = cpu_to_le32(dbt->bitrate); in kvaser_usb_set_data_bittiming()
/drivers/dma/
Dsa11x0-dma.c113 u32 dbt[2]; member
1022 p->dbt[0] = readl_relaxed(p->base + DMA_DBTB); in sa11x0_dma_suspend()
1024 p->dbt[1] = readl_relaxed(p->base + DMA_DBTA); in sa11x0_dma_suspend()
1029 p->dbt[0] = readl_relaxed(p->base + DMA_DBTA); in sa11x0_dma_suspend()
1031 p->dbt[1] = readl_relaxed(p->base + DMA_DBTB); in sa11x0_dma_suspend()
1065 writel_relaxed(p->dbt[0], p->base + DMA_DBTA); in sa11x0_dma_resume()
1067 writel_relaxed(p->dbt[1], p->base + DMA_DBTB); in sa11x0_dma_resume()
/drivers/net/can/m_can/
Dm_can.c1179 const struct can_bittiming *dbt = &cdev->can.data_bittiming; in m_can_set_bittiming() local
1195 brp = dbt->brp - 1; in m_can_set_bittiming()
1196 sjw = dbt->sjw - 1; in m_can_set_bittiming()
1197 tseg1 = dbt->prop_seg + dbt->phase_seg1 - 1; in m_can_set_bittiming()
1198 tseg2 = dbt->phase_seg2 - 1; in m_can_set_bittiming()
1204 if (dbt->bitrate > 2500000) { in m_can_set_bittiming()
1210 ssp = dbt->sample_point; in m_can_set_bittiming()
1216 ssp / dbt->bitrate; in m_can_set_bittiming()
/drivers/net/can/spi/mcp251xfd/
Dmcp251xfd-core.c729 const struct can_bittiming *dbt = &priv->can.data_bittiming; in mcp251xfd_set_bittiming() local
783 val = FIELD_PREP(MCP251XFD_REG_DBTCFG_BRP_MASK, dbt->brp - 1) | in mcp251xfd_set_bittiming()
785 dbt->prop_seg + dbt->phase_seg1 - 1) | in mcp251xfd_set_bittiming()
787 dbt->phase_seg2 - 1) | in mcp251xfd_set_bittiming()
788 FIELD_PREP(MCP251XFD_REG_DBTCFG_SJW_MASK, dbt->sjw - 1); in mcp251xfd_set_bittiming()
795 tdco = clamp_t(int, dbt->brp * (dbt->prop_seg + dbt->phase_seg1), in mcp251xfd_set_bittiming()
/drivers/net/can/rcar/
Drcar_canfd.c1255 const struct can_bittiming *dbt = &priv->can.data_bittiming; in rcar_canfd_set_bittiming() local
1276 brp = dbt->brp - 1; in rcar_canfd_set_bittiming()
1277 sjw = dbt->sjw - 1; in rcar_canfd_set_bittiming()
1278 tseg1 = dbt->prop_seg + dbt->phase_seg1 - 1; in rcar_canfd_set_bittiming()
1279 tseg2 = dbt->phase_seg2 - 1; in rcar_canfd_set_bittiming()