mtd: rawnand: gpmi: fix controller timings setting
stable inclusion from stable-v5.10.110 commit d99e7feaed4c715e7ac974866905b6919cfda8cd bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d99e7feaed4c715e7ac974866905b6919cfda8cd -------------------------------- [ Upstream commit 2970bf5a ] Set the controller registers according to the real clock rate. The controller registers configuration (setup, hold, timeout, ... cycles) depends on the clock rate of the GPMI. Using the real rate instead of the ideal one, avoids that this inaccuracy (required_rate - real_rate) affects the registers setting. This patch has been tested on two custom boards with i.MX28 and i.MX6 SOCs: - i.MX28: required rate 100MHz, real rate 99.3MHz - i.MX6 required rate 100MHz, real rate 99MHz Fixes: b1206122 ("mtd: rawnand: gpmi: use core timings instead of an empirical derivation") Co-developed-by: NMichael Trimarchi <michael@amarulasolutions.com> Signed-off-by: NMichael Trimarchi <michael@amarulasolutions.com> Signed-off-by: NDario Binacchi <dario.binacchi@amarulasolutions.com> Tested-by: NSascha Hauer <s.hauer@pengutronix.de> Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220118095434.35081-3-dario.binacchi@amarulasolutions.comSigned-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NYu Liao <liaoyu15@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录