Message ID | 20240528-fsl-ifc-config-v2-1-5fd7be76650d@geanix.com |
---|---|
State | New |
Headers | show |
Series | memory: fsl_ifc: Make FSL_IFC config visible and selectable | expand |
Hi Esben, esben@geanix.com wrote on Tue, 28 May 2024 14:28:52 +0200: > While use of fsl_ifc driver with NAND flash is fine, as the fsl_ifc_nand > driver selects FSL_IFC automatically, we need the CONFIG_FSL_IFC option to > be selectable for platforms using fsl_ifc with NOR flash. > > Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers") > Signed-off-by: Esben Haabendal <esben@geanix.com> Looks good to me. Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Thanks, Miquèl
Le 28/05/2024 à 14:28, Esben Haabendal a écrit : > [Vous ne recevez pas souvent de courriers de esben@geanix.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] > > While use of fsl_ifc driver with NAND flash is fine, as the fsl_ifc_nand > driver selects FSL_IFC automatically, we need the CONFIG_FSL_IFC option to > be selectable for platforms using fsl_ifc with NOR flash. I don't understand. Shall I understand : While use of fsl_ifc driver with NAND flash is fine as the fsl_ifc_nand driver selects FSL_IFC automatically, .... or ..., as the fsl_ifc_nand driver selects FSL_IFC automatically we need the CONFIG_FSL_IFC option to be selectable for platforms using fsl_ifc with NOR flash I'm fine with the fact that you want to be able to select it when you use NOR flashes, allthough I can't see why, but why do you need to change the "select" to a "depend" ? You should be able to leave it as a "select" in which case patch 2 wouldn't be necessary. Christophe > > Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers") > Signed-off-by: Esben Haabendal <esben@geanix.com> > --- > drivers/memory/Kconfig | 2 +- > drivers/mtd/nand/raw/Kconfig | 3 +-- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig > index 8efdd1f97139..c82d8d8a16ea 100644 > --- a/drivers/memory/Kconfig > +++ b/drivers/memory/Kconfig > @@ -167,7 +167,7 @@ config FSL_CORENET_CF > represents a coherency violation. > > config FSL_IFC > - bool "Freescale IFC driver" if COMPILE_TEST > + bool "Freescale IFC driver" > depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || COMPILE_TEST > depends on HAS_IOMEM > > diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig > index cbf8ae85e1ae..614257308516 100644 > --- a/drivers/mtd/nand/raw/Kconfig > +++ b/drivers/mtd/nand/raw/Kconfig > @@ -234,8 +234,7 @@ config MTD_NAND_FSL_IFC > tristate "Freescale IFC NAND controller" > depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || COMPILE_TEST > depends on HAS_IOMEM > - select FSL_IFC > - select MEMORY > + depends on FSL_IFC > help > Various Freescale chips e.g P1010, include a NAND Flash machine > with built-in hardware ECC capabilities. > > -- > 2.45.1 >
On 28/05/2024 15:15, Christophe Leroy wrote: > > > Le 28/05/2024 à 14:28, Esben Haabendal a écrit : >> [Vous ne recevez pas souvent de courriers de esben@geanix.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] >> >> While use of fsl_ifc driver with NAND flash is fine, as the fsl_ifc_nand >> driver selects FSL_IFC automatically, we need the CONFIG_FSL_IFC option to >> be selectable for platforms using fsl_ifc with NOR flash. > > I don't understand. > > Shall I understand : > > While use of fsl_ifc driver with NAND flash is fine as the fsl_ifc_nand > driver selects FSL_IFC automatically, .... > > or > > ..., as the fsl_ifc_nand driver selects FSL_IFC automatically we need > the CONFIG_FSL_IFC option to be selectable for platforms using fsl_ifc > with NOR flash > > > > I'm fine with the fact that you want to be able to select it when you > use NOR flashes, But users are not fine... their memory won't work if they cannot choose it (if you meant select=choose). > allthough I can't see why, but why do you need to > change the "select" to a "depend" ? You should be able to leave it as a As explained in v1: user-visible symbols should not be selected. Nothing odd here. > "select" in which case patch 2 wouldn't be necessary. Best regards, Krzysztof
Krzysztof Kozlowski <krzk@kernel.org> writes: > On 28/05/2024 15:15, Christophe Leroy wrote: >> Le 28/05/2024 à 14:28, Esben Haabendal a écrit : >>> [Vous ne recevez pas souvent de courriers de esben@geanix.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] >>> >>> While use of fsl_ifc driver with NAND flash is fine, as the fsl_ifc_nand >>> driver selects FSL_IFC automatically, we need the CONFIG_FSL_IFC option to >>> be selectable for platforms using fsl_ifc with NOR flash. >> >> I don't understand. >> >> Shall I understand : >> >> While use of fsl_ifc driver with NAND flash is fine as the fsl_ifc_nand >> driver selects FSL_IFC automatically, .... >> >> or >> >> ..., as the fsl_ifc_nand driver selects FSL_IFC automatically we need >> the CONFIG_FSL_IFC option to be selectable for platforms using fsl_ifc >> with NOR flash >> >> >> >> I'm fine with the fact that you want to be able to select it when you >> use NOR flashes, > > But users are not fine... their memory won't work if they cannot choose > it (if you meant select=choose). Exactly. The IFC controller supports both NAND and NOR flashes. Since commit ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers"), it has not been possible to use IFC controller for NOR flashes without selecting the IFC NAND driver (CONFIG_MTD_NAND_FSL_IFC), which is obviously not how it is supposed to be. /Esben
diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig index 8efdd1f97139..c82d8d8a16ea 100644 --- a/drivers/memory/Kconfig +++ b/drivers/memory/Kconfig @@ -167,7 +167,7 @@ config FSL_CORENET_CF represents a coherency violation. config FSL_IFC - bool "Freescale IFC driver" if COMPILE_TEST + bool "Freescale IFC driver" depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || COMPILE_TEST depends on HAS_IOMEM diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index cbf8ae85e1ae..614257308516 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -234,8 +234,7 @@ config MTD_NAND_FSL_IFC tristate "Freescale IFC NAND controller" depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || COMPILE_TEST depends on HAS_IOMEM - select FSL_IFC - select MEMORY + depends on FSL_IFC help Various Freescale chips e.g P1010, include a NAND Flash machine with built-in hardware ECC capabilities.
While use of fsl_ifc driver with NAND flash is fine, as the fsl_ifc_nand driver selects FSL_IFC automatically, we need the CONFIG_FSL_IFC option to be selectable for platforms using fsl_ifc with NOR flash. Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers") Signed-off-by: Esben Haabendal <esben@geanix.com> --- drivers/memory/Kconfig | 2 +- drivers/mtd/nand/raw/Kconfig | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)