Skip to content

Commit

Permalink
imx9/flexcan: Add disable/enable cycle
Browse files Browse the repository at this point in the history
Add enable/disable cycle to initialize
function to speed up soft reset

Signed-off-by: Jouni Ukkonen <[email protected]>
  • Loading branch information
joukkone committed Oct 29, 2024
1 parent 289c3a8 commit c18f971
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm64/src/imx9/imx9_flexcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,12 @@ int imx9_caninitialize(int intf)
return -EAGAIN;
}

/* Disable - enable cycle */

modifyreg32(priv->base + IMX9_CAN_MCR_OFFSET, 0, CAN_MCR_MDIS);
up_udelay(100);
modifyreg32(priv->base + IMX9_CAN_MCR_OFFSET, CAN_MCR_MDIS, 0);

/* Initialize the driver structure */

priv->dev.d_ifup = imx9_ifup; /* I/F up (new IP address) callback */
Expand Down

0 comments on commit c18f971

Please sign in to comment.