* [PATCH] mtd: rawnand: ingenic: Fix build error
@ 2019-06-15 13:44 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2019-06-15 13:44 UTC (permalink / raw)
To: miquel.raynal, richard, dwmw2, computersforpeace, marek.vasut,
vigneshr, paul, gregkh
Cc: linux-kernel, linux-mtd, YueHaibing
If MTD_NAND_JZ4780 is y and MTD_NAND_JZ4780_BCH is m,
which select CONFIG_MTD_NAND_INGENIC_ECC to m, building fails:
drivers/mtd/nand/raw/ingenic/ingenic_nand.o: In function `ingenic_nand_remove':
ingenic_nand.c:(.text+0x177): undefined reference to `ingenic_ecc_release'
drivers/mtd/nand/raw/ingenic/ingenic_nand.o: In function `ingenic_nand_ecc_correct':
ingenic_nand.c:(.text+0x2ee): undefined reference to `ingenic_ecc_correct'
Select MTD_NAND_INGENIC_ECC if MTD_NAND_JZ4780 is set
Reported-by: Hulk Robot <hulkci@huawei.com>
Fiexes: 15de8c6efd0e ("mtd: rawnand: ingenic: Separate top-level and SoC specific code")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/mtd/nand/raw/ingenic/Kconfig | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/raw/ingenic/Kconfig b/drivers/mtd/nand/raw/ingenic/Kconfig
index 19a96ce..d0b1909 100644
--- a/drivers/mtd/nand/raw/ingenic/Kconfig
+++ b/drivers/mtd/nand/raw/ingenic/Kconfig
@@ -9,6 +9,7 @@ config MTD_NAND_JZ4740
config MTD_NAND_JZ4780
tristate "JZ4780 NAND controller"
depends on JZ4780_NEMC
+ select MTD_NAND_INGENIC_ECC
help
Enables support for NAND Flash connected to the NEMC on JZ4780 SoC
based boards, using the BCH controller for hardware error correction.
@@ -20,7 +21,6 @@ config MTD_NAND_INGENIC_ECC
config MTD_NAND_JZ4740_ECC
tristate "Hardware BCH support for JZ4740 SoC"
- select MTD_NAND_INGENIC_ECC
help
Enable this driver to support the Reed-Solomon error-correction
hardware present on the JZ4740 SoC from Ingenic.
@@ -30,7 +30,6 @@ config MTD_NAND_JZ4740_ECC
config MTD_NAND_JZ4725B_BCH
tristate "Hardware BCH support for JZ4725B SoC"
- select MTD_NAND_INGENIC_ECC
help
Enable this driver to support the BCH error-correction hardware
present on the JZ4725B SoC from Ingenic.
@@ -40,7 +39,6 @@ config MTD_NAND_JZ4725B_BCH
config MTD_NAND_JZ4780_BCH
tristate "Hardware BCH support for JZ4780 SoC"
- select MTD_NAND_INGENIC_ECC
help
Enable this driver to support the BCH error-correction hardware
present on the JZ4780 SoC from Ingenic.
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] mtd: rawnand: ingenic: Fix build error
@ 2019-06-15 13:44 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2019-06-15 13:44 UTC (permalink / raw)
To: miquel.raynal, richard, dwmw2, computersforpeace, marek.vasut,
vigneshr, paul, gregkh
Cc: YueHaibing, linux-mtd, linux-kernel
If MTD_NAND_JZ4780 is y and MTD_NAND_JZ4780_BCH is m,
which select CONFIG_MTD_NAND_INGENIC_ECC to m, building fails:
drivers/mtd/nand/raw/ingenic/ingenic_nand.o: In function `ingenic_nand_remove':
ingenic_nand.c:(.text+0x177): undefined reference to `ingenic_ecc_release'
drivers/mtd/nand/raw/ingenic/ingenic_nand.o: In function `ingenic_nand_ecc_correct':
ingenic_nand.c:(.text+0x2ee): undefined reference to `ingenic_ecc_correct'
Select MTD_NAND_INGENIC_ECC if MTD_NAND_JZ4780 is set
Reported-by: Hulk Robot <hulkci@huawei.com>
Fiexes: 15de8c6efd0e ("mtd: rawnand: ingenic: Separate top-level and SoC specific code")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/mtd/nand/raw/ingenic/Kconfig | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/raw/ingenic/Kconfig b/drivers/mtd/nand/raw/ingenic/Kconfig
index 19a96ce..d0b1909 100644
--- a/drivers/mtd/nand/raw/ingenic/Kconfig
+++ b/drivers/mtd/nand/raw/ingenic/Kconfig
@@ -9,6 +9,7 @@ config MTD_NAND_JZ4740
config MTD_NAND_JZ4780
tristate "JZ4780 NAND controller"
depends on JZ4780_NEMC
+ select MTD_NAND_INGENIC_ECC
help
Enables support for NAND Flash connected to the NEMC on JZ4780 SoC
based boards, using the BCH controller for hardware error correction.
@@ -20,7 +21,6 @@ config MTD_NAND_INGENIC_ECC
config MTD_NAND_JZ4740_ECC
tristate "Hardware BCH support for JZ4740 SoC"
- select MTD_NAND_INGENIC_ECC
help
Enable this driver to support the Reed-Solomon error-correction
hardware present on the JZ4740 SoC from Ingenic.
@@ -30,7 +30,6 @@ config MTD_NAND_JZ4740_ECC
config MTD_NAND_JZ4725B_BCH
tristate "Hardware BCH support for JZ4725B SoC"
- select MTD_NAND_INGENIC_ECC
help
Enable this driver to support the BCH error-correction hardware
present on the JZ4725B SoC from Ingenic.
@@ -40,7 +39,6 @@ config MTD_NAND_JZ4725B_BCH
config MTD_NAND_JZ4780_BCH
tristate "Hardware BCH support for JZ4780 SoC"
- select MTD_NAND_INGENIC_ECC
help
Enable this driver to support the BCH error-correction hardware
present on the JZ4780 SoC from Ingenic.
--
2.7.4
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: rawnand: ingenic: Fix build error
2019-06-15 13:44 ` YueHaibing
@ 2019-06-15 22:22 ` Paul Cercueil
-1 siblings, 0 replies; 4+ messages in thread
From: Paul Cercueil @ 2019-06-15 22:22 UTC (permalink / raw)
To: YueHaibing
Cc: miquel.raynal, richard, dwmw2, computersforpeace, marek.vasut,
vigneshr, gregkh, linux-kernel, linux-mtd
Hi,
I don't think the patch is correct. We want to be able to build
the ingenic_nand driver without the ingenic_ecc code.
The actual problem is that if the ingenic_nand driver is built-in,
then the ingenic_ecc driver must be built-in too (if enabled),
and we don't verify that constraint.
Something like that should work better:
config MTD_NAND_INGENIC_ECC
def_tristate m if MTD_NAND_JZ4780=m
def_tristate y if MTD_NAND_JZ4780=y
Thanks,
-Paul
Le sam. 15 juin 2019 à 15:44, YueHaibing <yuehaibing@huawei.com> a
écrit :
> If MTD_NAND_JZ4780 is y and MTD_NAND_JZ4780_BCH is m,
> which select CONFIG_MTD_NAND_INGENIC_ECC to m, building fails:
>
> drivers/mtd/nand/raw/ingenic/ingenic_nand.o: In function
> `ingenic_nand_remove':
> ingenic_nand.c:(.text+0x177): undefined reference to
> `ingenic_ecc_release'
> drivers/mtd/nand/raw/ingenic/ingenic_nand.o: In function
> `ingenic_nand_ecc_correct':
> ingenic_nand.c:(.text+0x2ee): undefined reference to
> `ingenic_ecc_correct'
>
> Select MTD_NAND_INGENIC_ECC if MTD_NAND_JZ4780 is set
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fiexes: 15de8c6efd0e ("mtd: rawnand: ingenic: Separate top-level and
> SoC specific code")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/mtd/nand/raw/ingenic/Kconfig | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/ingenic/Kconfig
> b/drivers/mtd/nand/raw/ingenic/Kconfig
> index 19a96ce..d0b1909 100644
> --- a/drivers/mtd/nand/raw/ingenic/Kconfig
> +++ b/drivers/mtd/nand/raw/ingenic/Kconfig
> @@ -9,6 +9,7 @@ config MTD_NAND_JZ4740
> config MTD_NAND_JZ4780
> tristate "JZ4780 NAND controller"
> depends on JZ4780_NEMC
> + select MTD_NAND_INGENIC_ECC
> help
> Enables support for NAND Flash connected to the NEMC on JZ4780 SoC
> based boards, using the BCH controller for hardware error
> correction.
> @@ -20,7 +21,6 @@ config MTD_NAND_INGENIC_ECC
>
> config MTD_NAND_JZ4740_ECC
> tristate "Hardware BCH support for JZ4740 SoC"
> - select MTD_NAND_INGENIC_ECC
> help
> Enable this driver to support the Reed-Solomon error-correction
> hardware present on the JZ4740 SoC from Ingenic.
> @@ -30,7 +30,6 @@ config MTD_NAND_JZ4740_ECC
>
> config MTD_NAND_JZ4725B_BCH
> tristate "Hardware BCH support for JZ4725B SoC"
> - select MTD_NAND_INGENIC_ECC
> help
> Enable this driver to support the BCH error-correction hardware
> present on the JZ4725B SoC from Ingenic.
> @@ -40,7 +39,6 @@ config MTD_NAND_JZ4725B_BCH
>
> config MTD_NAND_JZ4780_BCH
> tristate "Hardware BCH support for JZ4780 SoC"
> - select MTD_NAND_INGENIC_ECC
> help
> Enable this driver to support the BCH error-correction hardware
> present on the JZ4780 SoC from Ingenic.
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: rawnand: ingenic: Fix build error
@ 2019-06-15 22:22 ` Paul Cercueil
0 siblings, 0 replies; 4+ messages in thread
From: Paul Cercueil @ 2019-06-15 22:22 UTC (permalink / raw)
To: YueHaibing
Cc: vigneshr, gregkh, richard, linux-kernel, marek.vasut, linux-mtd,
miquel.raynal, computersforpeace, dwmw2
Hi,
I don't think the patch is correct. We want to be able to build
the ingenic_nand driver without the ingenic_ecc code.
The actual problem is that if the ingenic_nand driver is built-in,
then the ingenic_ecc driver must be built-in too (if enabled),
and we don't verify that constraint.
Something like that should work better:
config MTD_NAND_INGENIC_ECC
def_tristate m if MTD_NAND_JZ4780=m
def_tristate y if MTD_NAND_JZ4780=y
Thanks,
-Paul
Le sam. 15 juin 2019 à 15:44, YueHaibing <yuehaibing@huawei.com> a
écrit :
> If MTD_NAND_JZ4780 is y and MTD_NAND_JZ4780_BCH is m,
> which select CONFIG_MTD_NAND_INGENIC_ECC to m, building fails:
>
> drivers/mtd/nand/raw/ingenic/ingenic_nand.o: In function
> `ingenic_nand_remove':
> ingenic_nand.c:(.text+0x177): undefined reference to
> `ingenic_ecc_release'
> drivers/mtd/nand/raw/ingenic/ingenic_nand.o: In function
> `ingenic_nand_ecc_correct':
> ingenic_nand.c:(.text+0x2ee): undefined reference to
> `ingenic_ecc_correct'
>
> Select MTD_NAND_INGENIC_ECC if MTD_NAND_JZ4780 is set
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fiexes: 15de8c6efd0e ("mtd: rawnand: ingenic: Separate top-level and
> SoC specific code")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/mtd/nand/raw/ingenic/Kconfig | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/ingenic/Kconfig
> b/drivers/mtd/nand/raw/ingenic/Kconfig
> index 19a96ce..d0b1909 100644
> --- a/drivers/mtd/nand/raw/ingenic/Kconfig
> +++ b/drivers/mtd/nand/raw/ingenic/Kconfig
> @@ -9,6 +9,7 @@ config MTD_NAND_JZ4740
> config MTD_NAND_JZ4780
> tristate "JZ4780 NAND controller"
> depends on JZ4780_NEMC
> + select MTD_NAND_INGENIC_ECC
> help
> Enables support for NAND Flash connected to the NEMC on JZ4780 SoC
> based boards, using the BCH controller for hardware error
> correction.
> @@ -20,7 +21,6 @@ config MTD_NAND_INGENIC_ECC
>
> config MTD_NAND_JZ4740_ECC
> tristate "Hardware BCH support for JZ4740 SoC"
> - select MTD_NAND_INGENIC_ECC
> help
> Enable this driver to support the Reed-Solomon error-correction
> hardware present on the JZ4740 SoC from Ingenic.
> @@ -30,7 +30,6 @@ config MTD_NAND_JZ4740_ECC
>
> config MTD_NAND_JZ4725B_BCH
> tristate "Hardware BCH support for JZ4725B SoC"
> - select MTD_NAND_INGENIC_ECC
> help
> Enable this driver to support the BCH error-correction hardware
> present on the JZ4725B SoC from Ingenic.
> @@ -40,7 +39,6 @@ config MTD_NAND_JZ4725B_BCH
>
> config MTD_NAND_JZ4780_BCH
> tristate "Hardware BCH support for JZ4780 SoC"
> - select MTD_NAND_INGENIC_ECC
> help
> Enable this driver to support the BCH error-correction hardware
> present on the JZ4780 SoC from Ingenic.
> --
> 2.7.4
>
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-15 22:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-15 13:44 [PATCH] mtd: rawnand: ingenic: Fix build error YueHaibing
2019-06-15 13:44 ` YueHaibing
2019-06-15 22:22 ` Paul Cercueil
2019-06-15 22:22 ` Paul Cercueil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.