OSDN Git Service

mtd: spi-nor: fsl-quadspi: i.MX6SX: fixed the random QSPI access failed issue
authorAllen Xu <b45815@freescale.com>
Tue, 4 Aug 2015 15:25:58 +0000 (10:25 -0500)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 6 Aug 2015 17:07:43 +0000 (10:07 -0700)
commitcacbef40aac478fb25fb7d18ac22d41a11ce06e2
tree6c6f7889982209b5ccb5e2ffe5b76501c1f06865
parentcb94d0bb41e43b4fdd219ad930686397814bcd8d
mtd: spi-nor: fsl-quadspi: i.MX6SX: fixed the random QSPI access failed issue

We found there is a low probability(5%) QSPI access timeout issue,
usually it happened on kernel boot stage, the first time kernel tried to
access QSPI chip. The READ_ID command was sent but not executed,
consequently the probe function failed.

The root cause is that the divider is not glitchless in i.MX6SX chip.
If qspi clock enabled then change clock frequency by call clk_set_rate,
there will be glitch at low possiblity rate and pass to qspi controller.
The controler will be hang by this glitch.

Based on the new clock flag(CLK_SET_RATE_GATE) and new framework, we
need to change the approach of seting clock rate.
1. Disable clock.
2. call clk_set_rate.
3. Enable clock again.

Signed-off-by: Han Xu <han.xu@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/spi-nor/fsl-quadspi.c