* [net] can: m_can: fix nominal bitiming tseg2 min for version >= 3.1 @ 2020-11-24 19:07 ` Marc Kleine-Budde 2020-11-25 8:55 ` Sriram Dash 0 siblings, 1 reply; 2+ messages in thread From: Marc Kleine-Budde @ 2020-11-24 19:07 UTC (permalink / raw) To: linux-can Cc: Marc Kleine-Budde, Dan Murphy, Sriram Dash, Mario Huettel, Quentin Schulz 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: Sriram Dash <sriram.dash@samsung.com> Cc: Mario Huettel <mario.huettel@gmx.net> Cc: Quentin Schulz <quentin.schulz@free-electrons.com> Fixes: b03cfc5bb0e1 ("can: m_can: Enable M_CAN version dependent initialization") Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> --- drivers/net/can/m_can/m_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index f3fc37e96b08..86bbbfa2d743 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -1033,7 +1033,7 @@ static const struct can_bittiming_const m_can_bittiming_const_31X = { .name = KBUILD_MODNAME, .tseg1_min = 2, /* Time segment 1 = prop_seg + phase_seg1 */ .tseg1_max = 256, - .tseg2_min = 1, /* Time segment 2 = phase_seg2 */ + .tseg2_min = 2, /* Time segment 2 = phase_seg2 */ .tseg2_max = 128, .sjw_max = 128, .brp_min = 1, -- 2.29.2 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [net] can: m_can: fix nominal bitiming tseg2 min for version >= 3.1 2020-11-24 19:07 ` [net] can: m_can: fix nominal bitiming tseg2 min for version >= 3.1 Marc Kleine-Budde @ 2020-11-25 8:55 ` Sriram Dash 0 siblings, 0 replies; 2+ messages in thread From: Sriram Dash @ 2020-11-25 8:55 UTC (permalink / raw) To: 'Marc Kleine-Budde', linux-can Cc: 'Dan Murphy', 'Mario Huettel', 'Quentin Schulz' > From: Marc Kleine-Budde <mkl@pengutronix.de> > Subject: [net] 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. > Acked-by: Sriram Dash <sriram.dash@samsung.com> > Cc: Dan Murphy <dmurphy@ti.com> > Cc: Sriram Dash <sriram.dash@samsung.com> > Cc: Mario Huettel <mario.huettel@gmx.net> > Cc: Quentin Schulz <quentin.schulz@free-electrons.com> > Fixes: b03cfc5bb0e1 ("can: m_can: Enable M_CAN version dependent > initialization") > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> > --- > drivers/net/can/m_can/m_can.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/can/m_can/m_can.c > b/drivers/net/can/m_can/m_can.c index f3fc37e96b08..86bbbfa2d743 > 100644 > --- a/drivers/net/can/m_can/m_can.c > +++ b/drivers/net/can/m_can/m_can.c > @@ -1033,7 +1033,7 @@ static const struct can_bittiming_const > m_can_bittiming_const_31X = { > .name = KBUILD_MODNAME, > .tseg1_min = 2, /* Time segment 1 = prop_seg + phase_seg1 > */ > .tseg1_max = 256, > - .tseg2_min = 1, /* Time segment 2 = phase_seg2 */ > + .tseg2_min = 2, /* Time segment 2 = phase_seg2 */ > .tseg2_max = 128, > .sjw_max = 128, > .brp_min = 1, > -- > 2.29.2 > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-25 9:35 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20201124190800epcas5p4d5b22f8411d818ec422f24497e78328e@epcas5p4.samsung.com> 2020-11-24 19:07 ` [net] can: m_can: fix nominal bitiming tseg2 min for version >= 3.1 Marc Kleine-Budde 2020-11-25 8:55 ` Sriram Dash
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).