* [u-boot][PATCH] mtd: nand: Fix SPL build after migration of CONFIG_SYS_NAND_SELF_INIT to Kconfig
@ 2022-09-28 11:42 Roger Quadros
2022-09-29 6:08 ` Michael Nazzareno Trimarchi
2022-10-09 8:36 ` Dario Binacchi
0 siblings, 2 replies; 5+ messages in thread
From: Roger Quadros @ 2022-09-28 11:42 UTC (permalink / raw)
To: trini, dario.binacchi, michael; +Cc: gadiyar, u-boot, Roger Quadros
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 <rogerq@kernel.org>
---
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
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [u-boot][PATCH] mtd: nand: Fix SPL build after migration of CONFIG_SYS_NAND_SELF_INIT to Kconfig
2022-09-28 11:42 [u-boot][PATCH] mtd: nand: Fix SPL build after migration of CONFIG_SYS_NAND_SELF_INIT to Kconfig Roger Quadros
@ 2022-09-29 6:08 ` Michael Nazzareno Trimarchi
2022-10-06 13:29 ` Roger Quadros
2022-10-09 8:36 ` Dario Binacchi
1 sibling, 1 reply; 5+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-09-29 6:08 UTC (permalink / raw)
To: Roger Quadros; +Cc: Tom Rini, Dario Binacchi, gadiyar, U-Boot-Denx
Hi
Il mer 28 set 2022, 13:42 Roger Quadros <rogerq@kernel.org> 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 <rogerq@kernel.org>
> ---
> 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
>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
--
> 2.17.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [u-boot][PATCH] mtd: nand: Fix SPL build after migration of CONFIG_SYS_NAND_SELF_INIT to Kconfig
2022-09-29 6:08 ` Michael Nazzareno Trimarchi
@ 2022-10-06 13:29 ` Roger Quadros
2022-10-06 13:42 ` Michael Nazzareno Trimarchi
0 siblings, 1 reply; 5+ messages in thread
From: Roger Quadros @ 2022-10-06 13:29 UTC (permalink / raw)
To: Michael Nazzareno Trimarchi
Cc: Tom Rini, Dario Binacchi, gadiyar, U-Boot-Denx
Hello Michael,
On 29/09/2022 09:08, Michael Nazzareno Trimarchi wrote:
> Hi
>
> Il mer 28 set 2022, 13:42 Roger Quadros <rogerq@kernel.org <mailto:rogerq@kernel.org>> 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 <rogerq@kernel.org <mailto:rogerq@kernel.org>>
> ---
> 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
>
>
> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com <mailto:michael@amarulasolutions.com>>
Thanks.
Could you please fix your email client to use plain text format
when responding on u-boot mailing list? ;)
>
> --
> 2.17.1
>
cheers,
-roger
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [u-boot][PATCH] mtd: nand: Fix SPL build after migration of CONFIG_SYS_NAND_SELF_INIT to Kconfig
2022-10-06 13:29 ` Roger Quadros
@ 2022-10-06 13:42 ` Michael Nazzareno Trimarchi
0 siblings, 0 replies; 5+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-10-06 13:42 UTC (permalink / raw)
To: Roger Quadros; +Cc: Tom Rini, Dario Binacchi, gadiyar, U-Boot-Denx
Hi
On Thu, Oct 6, 2022 at 3:29 PM Roger Quadros <rogerq@kernel.org> wrote:
>
> Hello Michael,
>
> On 29/09/2022 09:08, Michael Nazzareno Trimarchi wrote:
> > Hi
> >
> > Il mer 28 set 2022, 13:42 Roger Quadros <rogerq@kernel.org <mailto:rogerq@kernel.org>> 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 <rogerq@kernel.org <mailto:rogerq@kernel.org>>
> > ---
> > 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
> >
> >
> > Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com <mailto:michael@amarulasolutions.com>>
>
> 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
> >
> > --
> > 2.17.1
> >
>
> cheers,
> -roger
--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________
Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [u-boot][PATCH] mtd: nand: Fix SPL build after migration of CONFIG_SYS_NAND_SELF_INIT to Kconfig
2022-09-28 11:42 [u-boot][PATCH] mtd: nand: Fix SPL build after migration of CONFIG_SYS_NAND_SELF_INIT to Kconfig Roger Quadros
2022-09-29 6:08 ` Michael Nazzareno Trimarchi
@ 2022-10-09 8:36 ` Dario Binacchi
1 sibling, 0 replies; 5+ messages in thread
From: Dario Binacchi @ 2022-10-09 8:36 UTC (permalink / raw)
To: Roger Quadros; +Cc: trini, michael, gadiyar, u-boot
Hi Roger,
On Wed, Sep 28, 2022 at 1:42 PM Roger Quadros <rogerq@kernel.org> wrote:
> 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 <rogerq@kernel.org>
> ---
> 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
> --
> 2.17.1
>
> Applied to nand-next, thanks!
Dario
--
*Dario Binacchi*
Embedded Linux Developer
dario.binacchi@amarulasolutions.com
__________________________________
*Amarula Solutions SRL*
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info@amarulasolutions.com
www.amarulasolutions.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-10-09 8:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-28 11:42 [u-boot][PATCH] mtd: nand: Fix SPL build after migration of CONFIG_SYS_NAND_SELF_INIT to Kconfig Roger Quadros
2022-09-29 6:08 ` Michael Nazzareno Trimarchi
2022-10-06 13:29 ` Roger Quadros
2022-10-06 13:42 ` Michael Nazzareno Trimarchi
2022-10-09 8:36 ` Dario Binacchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox