MLK-21410 can: flexcan: add CAN wakeup function for MX8
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Mon, 8 Apr 2019 04:50:28 +0000 (12:50 +0800)
committerJoakim Zhang <qiangqing.zhang@nxp.com>
Thu, 18 Apr 2019 09:16:19 +0000 (17:16 +0800)
commitea1037c1959531e21a4f418798409dbdfd352029
treeaa26959c6bcf83d2c00af1adf474265058bb319a
parent8b7cff63ad17e03ddb95206f4767c6b472a00e9b
MLK-21410 can: flexcan: add CAN wakeup function for MX8

This patch is to add CAN wakeup function on MX8 platforms and update the
binding file fsl-flexcan.txt.

For MX8, the function "flexcan_irq()" should not call "flexcan_exit_stop_mode()"
due to firmware(SCU) cannot make SC IPC calls from an interrupt context.
If not exit stop mode in ISR, it will continuously enter wakeup ISR for the reason
that system will respond IRQ before call CAN system resume.
To fix the issue, we can exit stop mode during noirq resume stage.

For wakeup case, it should not set pinctrl to sleep state by
pinctrl_pm_select_sleep_state.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
drivers/net/can/flexcan.c