can: m_can: m_can_set_bittiming(): fix setting M_CAN_DBTP register
authorHussein Alasadi <alasadi@arecs.eu>
Mon, 9 Aug 2021 17:36:52 +0000 (17:36 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 10 Aug 2021 06:10:27 +0000 (08:10 +0200)
commitaae32b784ebdbda6f6055a8021c9fb8a0ab5bcba
tree32eecd7bfcebf9a20a6a23962beef0d3765714f7
parent7b637cd52f02c6d7ff0580143a438940978fc719
can: m_can: m_can_set_bittiming(): fix setting M_CAN_DBTP register

This patch fixes the setting of the M_CAN_DBTP register contents:
- use DBTP_ (the data bitrate macros) instead of NBTP_ which area used
  for the nominal bitrate
- do not overwrite possibly-existing DBTP_TDC flag by ORing reg_btp
  instead of overwriting

Link: https://lore.kernel.org/r/FRYP281MB06140984ABD9994C0AAF7433D1F69@FRYP281MB0614.DEUP281.PROD.OUTLOOK.COM
Fixes: 20779943a080 ("can: m_can: use bits.h macros for all regmasks")
Cc: Torin Cooper-Bennun <torin@maxiluxsystems.com>
Cc: Chandrasekar Ramakrishnan <rcsekar@samsung.com>
Signed-off-by: Hussein Alasadi <alasadi@arecs.eu>
[mkl: update patch description, update indention]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c