mtd: nand: Fix SPL build after migration of CONFIG_SYS_NAND_SELF_INIT to Kconfig
Subsystems (2)
PATCH 1/1 mtd: nand: Fix SPL build after migration of CONFIG_SYS_NAND_SELF_INIT to Kconfig
This fixes the below build error if nand.c is included in an SPL build.
/work/u-boot/drivers/mtd/nand/raw/nand.c: In function ‘nand_init_chip’:
/work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: error: ‘nand_chip’ undeclared (first use in this function)
82 | struct nand_chip *nand = &nand_chip[i];
| ^~~~~~~~~
/work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: note: each undeclared identifier is reported only once for each function it appears in
/work/u-boot/drivers/mtd/nand/raw/nand.c:84:20: error: ‘base_address’ undeclared (first use in this function); did you mean ‘base_addr’?
84 | ulong base_addr = base_address[i];
| ^~~~~~~~~~~~
| base_addr--- drivers/mtd/nand/raw/nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/nand.c +1 -1
@@ -19,7 +19,7 @@ int nand_curr_device = -1;static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE ]; -#ifndef CONFIG_SYS_NAND_SELF_INIT +#if !CONFIG_IS_ENABLED (SYS_NAND_SELF_INIT )static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ];static ulong base_address[CONFIG_SYS_MAX_NAND_DEVICE ] =CONFIG_SYS_NAND_BASE_LIST ;#endif
Signature · 1 line
2.17.1
Hi
Il mer 28 set 2022, 13:42 Roger Quadros <[email protected]> ha scritto:
Quoted 36 lines
This fixes the below build error if
nand.cis included in an SPL build./work/u-boot/drivers/mtd/nand/raw/nand.c: In function ‘nand_init_chip’:
/work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: error: ‘nand_chip’ undeclared (first use in this function)82 | struct nand_chip *nand = &nand_chip[i]; | ^~~~~~~~~/work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: note: each undeclared identifier is reported only once for each function it appears in /work/u-boot/drivers/mtd/nand/raw/nand.c:84:20: error: ‘base_address’ undeclared (first use in this function); did you mean ‘base_addr’?
84 | ulong base_addr = base_address[i]; | ^~~~~~~~~~~~ | base_addrFixes 068c41f1cc77 ("Finish conversion CONFIG_SYS_NAND_SELF_INIT to
Kconfig")Signed-off-by Roger Quadros <[email protected]>--- drivers/mtd/nand/raw/nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mtd/nand/raw/nand.c +1
-1@@ -19,7 +19,7 @@ int nand_curr_device = -1;static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE ]; -#ifndef CONFIG_SYS_NAND_SELF_INIT +#if !CONFIG_IS_ENABLED (SYS_NAND_SELF_INIT )static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ];static ulong base_address[CONFIG_SYS_MAX_NAND_DEVICE ] =CONFIG_SYS_NAND_BASE_LIST ;
Quoted 2 lines
#endif
Quoted 3 lines
2.17.1
Hello Michael,
Quoted 38 lines · Michael Nazzareno Trimarchi
Hi
Il mer 28 set 2022, 13:42 Roger Quadros <[email protected] <mailto:[email protected]>> ha scritto:
This fixes the below build error if nand.c is included in an SPL build. /work/u-boot/drivers/mtd/nand/raw/nand.c: In function ‘nand_init_chip’: /work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: error: ‘nand_chip’ undeclared (first use in this function) 82 | struct nand_chip *nand = &nand_chip[i]; | ^~~~~~~~~ /work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: note: each undeclared identifier is reported only once for each function it appears in /work/u-boot/drivers/mtd/nand/raw/nand.c:84:20: error: ‘base_address’ undeclared (first use in this function); did you mean ‘base_addr’? 84 | ulong base_addr = base_address[i]; | ^~~~~~~~~~~~ | base_addr Fixes: 068c41f1cc77 ("Finish conversion CONFIG_SYS_NAND_SELF_INIT to Kconfig") Signed-off-by: Roger Quadros <[email protected] <mailto:[email protected]>> --- drivers/mtd/nand/raw/nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/nand.c b/drivers/mtd/nand/raw/nand.c index 4b5560dd24..14bca12024 100644 --- a/drivers/mtd/nand/raw/nand.c +++ b/drivers/mtd/nand/raw/nand.c @@ -19,7 +19,7 @@ int nand_curr_device = -1; static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE]; -#ifndef CONFIG_SYS_NAND_SELF_INIT +#if !CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT) static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE]; static ulong base_address[CONFIG_SYS_MAX_NAND_DEVICE] = CONFIG_SYS_NAND_BASE_LIST; #endif
Quoted 1 line
Reviewed-by Michael Trimarchi <[email protected] <mailto:[email protected]>>
Thanks.
Could you please fix your email client to use plain text format when responding on u-boot mailing list? ;)
Quoted 4 lines
--
2.17.1cheers,
-roger
Hi
Quoted 42 lines · Roger Quadros
Hello Michael,
Quoted 38 lines · Michael Nazzareno Trimarchi
Hi
Il mer 28 set 2022, 13:42 Roger Quadros <[email protected] <mailto:[email protected]>> ha scritto:
This fixes the below build error if nand.c is included in an SPL build. /work/u-boot/drivers/mtd/nand/raw/nand.c: In function ‘nand_init_chip’: /work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: error: ‘nand_chip’ undeclared (first use in this function) 82 | struct nand_chip *nand = &nand_chip[i]; | ^~~~~~~~~ /work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: note: each undeclared identifier is reported only once for each function it appears in /work/u-boot/drivers/mtd/nand/raw/nand.c:84:20: error: ‘base_address’ undeclared (first use in this function); did you mean ‘base_addr’? 84 | ulong base_addr = base_address[i]; | ^~~~~~~~~~~~ | base_addr Fixes: 068c41f1cc77 ("Finish conversion CONFIG_SYS_NAND_SELF_INIT to Kconfig") Signed-off-by: Roger Quadros <[email protected] <mailto:[email protected]>> --- drivers/mtd/nand/raw/nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/nand.c b/drivers/mtd/nand/raw/nand.c index 4b5560dd24..14bca12024 100644 --- a/drivers/mtd/nand/raw/nand.c +++ b/drivers/mtd/nand/raw/nand.c @@ -19,7 +19,7 @@ int nand_curr_device = -1; static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE]; -#ifndef CONFIG_SYS_NAND_SELF_INIT +#if !CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT) static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE]; static ulong base_address[CONFIG_SYS_MAX_NAND_DEVICE] = CONFIG_SYS_NAND_BASE_LIST; #endif
Quoted 6 lines
Quoted 1 line
Reviewed-by Michael Trimarchi <[email protected] <mailto:[email protected]>>Thanks.
Could you please fix your email client to use plain text format when responding on u-boot mailing list? ;)
Sorry, It's for no-obvious bad behavior to read from mobile phone, and forget about gmail
Michael
Quoted 7 lines
Quoted 4 lines
-- 2.17.1cheers,
-roger
Signature · 11 lines
Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 [email protected] __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 [email protected] www.amarulasolutions.com
Hi Roger,
Quoted 40 lines · Roger Quadros
This fixes the below build error if
nand.cis included in an SPL build./work/u-boot/drivers/mtd/nand/raw/nand.c: In function ‘nand_init_chip’:
/work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: error: ‘nand_chip’ undeclared (first use in this function)82 | struct nand_chip *nand = &nand_chip[i]; | ^~~~~~~~~/work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: note: each undeclared identifier is reported only once for each function it appears in /work/u-boot/drivers/mtd/nand/raw/nand.c:84:20: error: ‘base_address’ undeclared (first use in this function); did you mean ‘base_addr’?
84 | ulong base_addr = base_address[i]; | ^~~~~~~~~~~~ | base_addrFixes 068c41f1cc77 ("Finish conversion CONFIG_SYS_NAND_SELF_INIT to
Kconfig")Signed-off-by Roger Quadros <[email protected]>--- drivers/mtd/nand/raw/nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mtd/nand/raw/nand.c +1
-1@@ -19,7 +19,7 @@ int nand_curr_device = -1;static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE ]; -#ifndef CONFIG_SYS_NAND_SELF_INIT +#if !CONFIG_IS_ENABLED (SYS_NAND_SELF_INIT )static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ];static ulong base_address[CONFIG_SYS_MAX_NAND_DEVICE ] =CONFIG_SYS_NAND_BASE_LIST ;#endif
--
2.17.1
Quoted 1 line
Applied to nand-next, thanks!
Dario
Signature · 17 lines
*Dario Binacchi* Embedded Linux Developer [email protected] __________________________________ *Amarula Solutions SRL* Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 [email protected] www.amarulasolutions.com