drivers: can: stm32: enable can1 clock also for can2

For devices with more than one CAN peripherals, CAN1 is the master and
its clock has to be enabled also if only CAN2 is used.

Signed-off-by: Martin Jäger <martin@libre.solar>
This commit is contained in:
Martin Jäger 2022-06-14 11:55:36 +02:00 committed by Carles Cufí
parent ec286d0227
commit 8ab81b02dd

View file

@ -1248,7 +1248,9 @@ static const struct can_stm32_config can_stm32_cfg_2 = {
.ts2 = DT_PROP_OR(DT_NODELABEL(can2), phase_seg2, 0),
.one_shot = DT_PROP(DT_NODELABEL(can2), one_shot),
.pclken = {
.enr = DT_CLOCKS_CELL(DT_NODELABEL(can2), bits),
/* can1 (master) clock must be enabled for can2 as well */
.enr = DT_CLOCKS_CELL(DT_NODELABEL(can1), bits) |
DT_CLOCKS_CELL(DT_NODELABEL(can2), bits),
.bus = DT_CLOCKS_CELL(DT_NODELABEL(can2), bus),
},
.config_irq = config_can_2_irq,