Skip to content

Commit 6ce18c6

Browse files
Christoph Steigergalak
authored andcommitted
drivers: can: mcan: Fix DBTP sjw register writes
The data-sjw value was incorrectly written to the NBTP register when it should be written to the DBTP register. This fixes a regression introduced by 5e0ca9b. Signed-off-by: Christoph Steiger <[email protected]>
1 parent 95e359d commit 6ce18c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/can/can_mcan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ void can_mcan_configure_timing(struct can_mcan_reg *can,
127127
CAN_MCAN_DBTP_DBRP_POS;
128128

129129
if (timing_data->sjw == CAN_SJW_NO_CHANGE) {
130-
can->nbtp |= dbtp_sjw;
130+
can->dbtp |= dbtp_sjw;
131131
} else {
132-
can->nbtp |= (((uint32_t)timing_data->sjw - 1UL) & 0x0F) <<
132+
can->dbtp |= (((uint32_t)timing_data->sjw - 1UL) & 0x0F) <<
133133
CAN_MCAN_DBTP_DSJW_POS;
134134
}
135135
}

0 commit comments

Comments
 (0)