Skip to content

Commit 6f3c1d4

Browse files
committed
spi: spi-nxp-fspi: extract function nxp_fspi_dll_override()
JIRA: https://issues.redhat.com/browse/RHEL-104570 commit 614180a Author: Haibo Chen <haibo.chen@nxp.com> Date: Wed Sep 17 15:27:06 2025 +0800 spi: spi-nxp-fspi: extract function nxp_fspi_dll_override() Extract function nxp_fspi_dll_override(), this is the suggested setting when clock rate < 100MHz. Just the preparation of supportting DTR mode. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20250917-flexspi-ddr-v2-1-bb9fe2a01889@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Mattijs Korpershoek <mkorpershoek@redhat.com>
1 parent c80dd7d commit 6f3c1d4

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

drivers/spi/spi-nxp-fspi.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,17 @@ static void nxp_fspi_dll_calibration(struct nxp_fspi *f)
674674
dev_warn(f->dev, "DLL lock failed, please fix it!\n");
675675
}
676676

677+
/*
678+
* Config the DLL register to default value, enable the target clock delay
679+
* line delay cell override mode, and use 1 fixed delay cell in DLL delay
680+
* chain, this is the suggested setting when clock rate < 100MHz.
681+
*/
682+
static void nxp_fspi_dll_override(struct nxp_fspi *f)
683+
{
684+
fspi_writel(f, FSPI_DLLACR_OVRDEN, f->iobase + FSPI_DLLACR);
685+
fspi_writel(f, FSPI_DLLBCR_OVRDEN, f->iobase + FSPI_DLLBCR);
686+
}
687+
677688
/*
678689
* In FlexSPI controller, flash access is based on value of FSPI_FLSHXXCR0
679690
* register and start base address of the target device.
@@ -1072,13 +1083,7 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f)
10721083
/* Disable the module */
10731084
fspi_writel(f, FSPI_MCR0_MDIS, base + FSPI_MCR0);
10741085

1075-
/*
1076-
* Config the DLL register to default value, enable the target clock delay
1077-
* line delay cell override mode, and use 1 fixed delay cell in DLL delay
1078-
* chain, this is the suggested setting when clock rate < 100MHz.
1079-
*/
1080-
fspi_writel(f, FSPI_DLLACR_OVRDEN, base + FSPI_DLLACR);
1081-
fspi_writel(f, FSPI_DLLBCR_OVRDEN, base + FSPI_DLLBCR);
1086+
nxp_fspi_dll_override(f);
10821087

10831088
/* enable module */
10841089
fspi_writel(f, FSPI_MCR0_AHB_TIMEOUT(0xFF) |

0 commit comments

Comments
 (0)