]> git.baikalelectronics.ru Git - kernel.git/commit
can: m_can: add missing delay after setting CCCR_INIT bit
authorDong Aisheng <b29396@freescale.com>
Wed, 29 Oct 2014 10:45:24 +0000 (18:45 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 18 Nov 2014 20:35:05 +0000 (21:35 +0100)
commit8a0ac5537b6d65112eea7f7afba8030e68101009
treef28d7b59ee88fac428a96e2e321727de42b2185b
parentea1b4b3d9f193bd96e7bf310b905088af59e3d71
can: m_can: add missing delay after setting CCCR_INIT bit

The spec mentions there may be a delay until the value written to INIT can be
read back due to the synchronization mechanism between the two clock domains.
But it does not indicate the exact clock cycles needed. The 5us delay is a
test value and seems ok.

Without the delay, CCCR.CCE bit may fail to be set and then the initialization
fail sometimes when do repeatly up and down.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c