Skip to content

Commit e3409e4

Browse files
can: m_can: fix nominal bitiming tseg2 min for version >= 3.1
At lest the revision 3.3.0 of the bosch m_can IP core specifies that valid register values for "Nominal Time segment after sample point (NTSEG2)" are from 1 to 127. As the hardware uses a value of one more than the programmed value, mean tseg2_min is 2. This patch fixes the tseg2_min value accordingly. Cc: Dan Murphy <dmurphy@ti.com> Cc: Mario Huettel <mario.huettel@gmx.net> Acked-by: Sriram Dash <sriram.dash@samsung.com> Link: https://lore.kernel.org/r/20201124190751.3972238-1-mkl@pengutronix.de Fixes: b03cfc5 ("can: m_can: Enable M_CAN version dependent initialization") Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 865f5b6 commit e3409e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/can/m_can/m_can.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ static const struct can_bittiming_const m_can_bittiming_const_31X = {
10331033
.name = KBUILD_MODNAME,
10341034
.tseg1_min = 2, /* Time segment 1 = prop_seg + phase_seg1 */
10351035
.tseg1_max = 256,
1036-
.tseg2_min = 1, /* Time segment 2 = phase_seg2 */
1036+
.tseg2_min = 2, /* Time segment 2 = phase_seg2 */
10371037
.tseg2_max = 128,
10381038
.sjw_max = 128,
10391039
.brp_min = 1,

0 commit comments

Comments
 (0)