mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
spi: nxp-fspi: reset the FLSHxCR1 registers
[ Upstream commit 18495676f7886e105133f1dc06c1d5e8d5436f32 ] Reset the FLSHxCR1 registers to default value. ROM may set the register value and it affects the SPI NAND normal functions. Signed-off-by: Han Xu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
3502dd8031
commit
db4afbc6c1
1 changed files with 7 additions and 0 deletions
|
|
@ -897,6 +897,13 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f)
|
|||
fspi_writel(f, FSPI_AHBCR_PREF_EN | FSPI_AHBCR_RDADDROPT,
|
||||
base + FSPI_AHBCR);
|
||||
|
||||
/* Reset the FLSHxCR1 registers. */
|
||||
reg = FSPI_FLSHXCR1_TCSH(0x3) | FSPI_FLSHXCR1_TCSS(0x3);
|
||||
fspi_writel(f, reg, base + FSPI_FLSHA1CR1);
|
||||
fspi_writel(f, reg, base + FSPI_FLSHA2CR1);
|
||||
fspi_writel(f, reg, base + FSPI_FLSHB1CR1);
|
||||
fspi_writel(f, reg, base + FSPI_FLSHB2CR1);
|
||||
|
||||
/* AHB Read - Set lut sequence ID for all CS. */
|
||||
fspi_writel(f, SEQID_LUT, base + FSPI_FLSHA1CR2);
|
||||
fspi_writel(f, SEQID_LUT, base + FSPI_FLSHA2CR2);
|
||||
|
|
|
|||
Loading…
Reference in a new issue