* [U-Boot] [PATCH v2 1/2] nitrogen6x: Fix RAM size variable
@ 2013-03-13 22:59 Fabio Estevam
2013-03-13 22:59 ` [U-Boot] [PATCH v2 2/2] nitrogen: Use unsigned long to specify the total RAM size Fabio Estevam
2013-03-14 7:36 ` [U-Boot] [PATCH v2 1/2] nitrogen6x: Fix RAM size variable Stefano Babic
0 siblings, 2 replies; 12+ messages in thread
From: Fabio Estevam @ 2013-03-13 22:59 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
Fix the following build error when buildig nitrogen6s1g:
nitrogen6x.c:89:17: error: 'CONFIG_DDR_MB' undeclared (first use in
this function)
nitrogen6x.c:89:17: note: each undeclared identifier is reported only
once for each function it appears in
Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Rebased against u-boot-imx tree
boards.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boards.cfg b/boards.cfg
index fb3b197..84f96e0 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -260,7 +260,7 @@ nitrogen6dl2g arm armv7 nitrogen6x boundar
nitrogen6q arm armv7 nitrogen6x boundary mx6 nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024
nitrogen6q2g arm armv7 nitrogen6x boundary mx6 nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q2g.cfg,MX6Q,DDR_MB=2048
nitrogen6s arm armv7 nitrogen6x boundary mx6 nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s.cfg,MX6S,DDR_MB=512
-nitrogen6s1g arm armv7 nitrogen6x boundary mx6 nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s1g.cfg,MX6S,SDRAM_MB=1024
+nitrogen6s1g arm armv7 nitrogen6x boundary mx6 nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s1g.cfg,MX6S,DDR_MB=1024
cm_t35 arm armv7 cm_t35 - omap3
omap3_overo arm armv7 overo - omap3
omap3_pandora arm armv7 pandora - omap3
--
1.7.9.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH v2 2/2] nitrogen: Use unsigned long to specify the total RAM size
2013-03-13 22:59 [U-Boot] [PATCH v2 1/2] nitrogen6x: Fix RAM size variable Fabio Estevam
@ 2013-03-13 22:59 ` Fabio Estevam
2013-03-14 7:42 ` Stefano Babic
` (2 more replies)
2013-03-14 7:36 ` [U-Boot] [PATCH v2 1/2] nitrogen6x: Fix RAM size variable Stefano Babic
1 sibling, 3 replies; 12+ messages in thread
From: Fabio Estevam @ 2013-03-13 22:59 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>>
When building for the nitrogen boards with 2GB the following warning happens:
nitrogen6x.c:89:38: warning: integer overflow in expression [-Woverflow]
2GB can not fit in 32-bits, so use ulong instead.
Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- No changes
board/boundary/nitrogen6x/nitrogen6x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 0dbb6d2..e5634d8 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -86,7 +86,7 @@ DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
{
- gd->ram_size = CONFIG_DDR_MB * 1024 * 1024;
+ gd->ram_size = (ulong)(CONFIG_DDR_MB * 1024 * 1024);
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 12+ messages in thread* [U-Boot] [PATCH v2 2/2] nitrogen: Use unsigned long to specify the total RAM size
2013-03-13 22:59 ` [U-Boot] [PATCH v2 2/2] nitrogen: Use unsigned long to specify the total RAM size Fabio Estevam
@ 2013-03-14 7:42 ` Stefano Babic
2013-03-14 8:03 ` [U-Boot] [PATCH V3] " Stefano Babic
2013-03-14 8:09 ` [U-Boot] [PATCH V4] " Stefano Babic
2 siblings, 0 replies; 12+ messages in thread
From: Stefano Babic @ 2013-03-14 7:42 UTC (permalink / raw)
To: u-boot
On 13/03/2013 23:59, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>>
>
> When building for the nitrogen boards with 2GB the following warning happens:
>
> nitrogen6x.c:89:38: warning: integer overflow in expression [-Woverflow]
>
> 2GB can not fit in 32-bits, so use ulong instead.
>
> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Hi Fabio,
> Changes since v1:
> - No changes
> board/boundary/nitrogen6x/nitrogen6x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
> index 0dbb6d2..e5634d8 100644
> --- a/board/boundary/nitrogen6x/nitrogen6x.c
> +++ b/board/boundary/nitrogen6x/nitrogen6x.c
> @@ -86,7 +86,7 @@ DECLARE_GLOBAL_DATA_PTR;
>
> int dram_init(void)
> {
> - gd->ram_size = CONFIG_DDR_MB * 1024 * 1024;
> + gd->ram_size = (ulong)(CONFIG_DDR_MB * 1024 * 1024);
This does not fix the issue. You're casting, but the value does not fit
in 32 bit and the warning still remains.
I am afraid that 32 bit for gd->ram_size are not enough anymore...
We can fix the warning setting maybe a lower amout of memory (I am
expecting that now the value is truncated and a wrong output is shown on
the console), but for the future gd->ram_size should move to 64 bit.
Best regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 12+ messages in thread* [U-Boot] [PATCH V3] nitrogen: Use unsigned long to specify the total RAM size
2013-03-13 22:59 ` [U-Boot] [PATCH v2 2/2] nitrogen: Use unsigned long to specify the total RAM size Fabio Estevam
2013-03-14 7:42 ` Stefano Babic
@ 2013-03-14 8:03 ` Stefano Babic
2013-03-14 8:08 ` Stefano Babic
2013-03-14 8:09 ` [U-Boot] [PATCH V4] " Stefano Babic
2 siblings, 1 reply; 12+ messages in thread
From: Stefano Babic @ 2013-03-14 8:03 UTC (permalink / raw)
To: u-boot
From: "fabio.estevam@freescale.com" <fabio.estevam@freescale.com>
When building for the nitrogen boards with 2GB the following warning happens:
nitrogen6x.c:89:38: warning: integer overflow in expression [-Woverflow]
2GB can not fit in 32-bits, so use ulong instead.
Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
Changes since V1:
- move casting inside expression to force using unsigned long
board/boundary/nitrogen6x/nitrogen6x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 0dbb6d2..e5634d8 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -86,7 +86,7 @@ DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
{
- gd->ram_size = CONFIG_DDR_MB * 1024 * 1024;
+ gd->ram_size = (ulong)(CONFIG_DDR_MB * 1024 * 1024);
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 12+ messages in thread* [U-Boot] [PATCH V3] nitrogen: Use unsigned long to specify the total RAM size
2013-03-14 8:03 ` [U-Boot] [PATCH V3] " Stefano Babic
@ 2013-03-14 8:08 ` Stefano Babic
0 siblings, 0 replies; 12+ messages in thread
From: Stefano Babic @ 2013-03-14 8:08 UTC (permalink / raw)
To: u-boot
On 14/03/2013 09:03, Stefano Babic wrote:
> From: "fabio.estevam at freescale.com" <fabio.estevam@freescale.com>
>
> When building for the nitrogen boards with 2GB the following warning happens:
>
> nitrogen6x.c:89:38: warning: integer overflow in expression [-Woverflow]
>
> 2GB can not fit in 32-bits, so use ulong instead.
>
> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> ---
>
Sorry, discharge this - it is identical to the previous one. I will send
the right one in few minutes.
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH V4] nitrogen: Use unsigned long to specify the total RAM size
2013-03-13 22:59 ` [U-Boot] [PATCH v2 2/2] nitrogen: Use unsigned long to specify the total RAM size Fabio Estevam
2013-03-14 7:42 ` Stefano Babic
2013-03-14 8:03 ` [U-Boot] [PATCH V3] " Stefano Babic
@ 2013-03-14 8:09 ` Stefano Babic
2013-03-14 11:38 ` Wolfgang Denk
2013-03-14 13:15 ` Albert ARIBAUD
2 siblings, 2 replies; 12+ messages in thread
From: Stefano Babic @ 2013-03-14 8:09 UTC (permalink / raw)
To: u-boot
From: "fabio.estevam@freescale.com" <fabio.estevam@freescale.com>
When building for the nitrogen boards with 2GB the following warning happens:
nitrogen6x.c:89:38: warning: integer overflow in expression [-Woverflow]
2GB can not fit in 32-bits, so use ulong instead.
Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
Changes since V2:
- move casting inside expression to force using unsigned long
board/boundary/nitrogen6x/nitrogen6x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 0dbb6d2..229c237 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -86,7 +86,7 @@ DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
{
- gd->ram_size = CONFIG_DDR_MB * 1024 * 1024;
+ gd->ram_size = ((ulong)CONFIG_DDR_MB * 1024 * 1024);
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 12+ messages in thread* [U-Boot] [PATCH V4] nitrogen: Use unsigned long to specify the total RAM size
2013-03-14 8:09 ` [U-Boot] [PATCH V4] " Stefano Babic
@ 2013-03-14 11:38 ` Wolfgang Denk
2013-03-14 12:25 ` Fabio Estevam
2013-03-14 13:15 ` Albert ARIBAUD
1 sibling, 1 reply; 12+ messages in thread
From: Wolfgang Denk @ 2013-03-14 11:38 UTC (permalink / raw)
To: u-boot
Dear Stefano Babic,
In message <1363248561-11974-1-git-send-email-sbabic@denx.de> you wrote:
>
> 2GB can not fit in 32-bits, so use ulong instead.
<nitpick>
unsigned long is 32 bits, too.
And, strictly speaking, GB is a decimal unit, so 2 GB = 2e9 = 0x77359400
which fits nicely into a signed 32 bit number.
What you actually mean is:
2 GiB cannot be expressed as a 32 bit signed number.
</nitpick>
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Of all the things I've lost, I miss my mind the most.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH V4] nitrogen: Use unsigned long to specify the total RAM size
2013-03-14 8:09 ` [U-Boot] [PATCH V4] " Stefano Babic
2013-03-14 11:38 ` Wolfgang Denk
@ 2013-03-14 13:15 ` Albert ARIBAUD
2013-03-14 14:09 ` Stefano Babic
1 sibling, 1 reply; 12+ messages in thread
From: Albert ARIBAUD @ 2013-03-14 13:15 UTC (permalink / raw)
To: u-boot
Hi Stefano,
On Thu, 14 Mar 2013 09:09:21 +0100, Stefano Babic <sbabic@denx.de>
wrote:
> From: "fabio.estevam at freescale.com" <fabio.estevam@freescale.com>
>
> When building for the nitrogen boards with 2GB the following warning happens:
>
> nitrogen6x.c:89:38: warning: integer overflow in expression [-Woverflow]
>
> 2GB can not fit in 32-bits, so use ulong instead.
>
> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Signed-off-by: Stefano Babic <sbabic@denx.de>
This somehow is redundant with Fabio's patch 2/2 with the same summary,
right?
Stefano: once Fabio's series is OK,
- either you rollback your ToT, apply Fabio's series before it, and
then send out an amended PR, which is more work but makes your tree
build-clean;
- or I apply Fabio's series then your existing PR, which is less
work but leaves your current ToT non-build-clean until you merge back
from ARM (or mainline once I do my own PR).
What do you prefer? I would favor the first option, FWIW.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH V4] nitrogen: Use unsigned long to specify the total RAM size
2013-03-14 13:15 ` Albert ARIBAUD
@ 2013-03-14 14:09 ` Stefano Babic
2013-03-14 15:18 ` Albert ARIBAUD
0 siblings, 1 reply; 12+ messages in thread
From: Stefano Babic @ 2013-03-14 14:09 UTC (permalink / raw)
To: u-boot
On 14/03/2013 14:15, Albert ARIBAUD wrote:
> Hi Stefano,
>
> On Thu, 14 Mar 2013 09:09:21 +0100, Stefano Babic <sbabic@denx.de>
> wrote:
>
>> From: "fabio.estevam at freescale.com" <fabio.estevam@freescale.com>
>>
>> When building for the nitrogen boards with 2GB the following warning happens:
>>
>> nitrogen6x.c:89:38: warning: integer overflow in expression [-Woverflow]
>>
>> 2GB can not fit in 32-bits, so use ulong instead.
>>
>> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>> Signed-off-by: Stefano Babic <sbabic@denx.de>
>
> This somehow is redundant with Fabio's patch 2/2 with the same summary,
> right?
>
We sent quite at the same time - I will discharge mine.
> Stefano: once Fabio's series is OK,
>
> - either you rollback your ToT, apply Fabio's series before it, and
> then send out an amended PR, which is more work but makes your tree
> build-clean;
>
> - or I apply Fabio's series then your existing PR, which is less
> work but leaves your current ToT non-build-clean until you merge back
> from ARM (or mainline once I do my own PR).
>
> What do you prefer? I would favor the first option, FWIW.
I prefer to apply Fabio's patches on top of u-boot-imx and send an
amended PR. This is also my favorite option. What do you mean with
rollback the ToT ? As I have already pushed on the server, I do not like
to rebase it or things like that. My idea is only to apply the patches
and send after that a new PR to you.
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH V4] nitrogen: Use unsigned long to specify the total RAM size
2013-03-14 14:09 ` Stefano Babic
@ 2013-03-14 15:18 ` Albert ARIBAUD
0 siblings, 0 replies; 12+ messages in thread
From: Albert ARIBAUD @ 2013-03-14 15:18 UTC (permalink / raw)
To: u-boot
Hi Stefano,
On Thu, 14 Mar 2013 15:09:15 +0100, Stefano Babic <sbabic@denx.de>
wrote:
> On 14/03/2013 14:15, Albert ARIBAUD wrote:
> > Hi Stefano,
> >
> > On Thu, 14 Mar 2013 09:09:21 +0100, Stefano Babic <sbabic@denx.de>
> > wrote:
> >
> >> From: "fabio.estevam at freescale.com" <fabio.estevam@freescale.com>
> >>
> >> When building for the nitrogen boards with 2GB the following warning happens:
> >>
> >> nitrogen6x.c:89:38: warning: integer overflow in expression [-Woverflow]
> >>
> >> 2GB can not fit in 32-bits, so use ulong instead.
> >>
> >> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
> >> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> >> Signed-off-by: Stefano Babic <sbabic@denx.de>
> >
> > This somehow is redundant with Fabio's patch 2/2 with the same summary,
> > right?
> >
>
> We sent quite at the same time - I will discharge mine.
>
> > Stefano: once Fabio's series is OK,
> >
> > - either you rollback your ToT, apply Fabio's series before it, and
> > then send out an amended PR, which is more work but makes your tree
> > build-clean;
> >
> > - or I apply Fabio's series then your existing PR, which is less
> > work but leaves your current ToT non-build-clean until you merge back
> > from ARM (or mainline once I do my own PR).
> >
> > What do you prefer? I would favor the first option, FWIW.
>
> I prefer to apply Fabio's patches on top of u-boot-imx and send an
> amended PR. This is also my favorite option. What do you mean with
> rollback the ToT ? As I have already pushed on the server, I do not like
> to rebase it or things like that. My idea is only to apply the patches
> and send after that a new PR to you.
That's fine. :)
> Stefano
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] [PATCH v2 1/2] nitrogen6x: Fix RAM size variable
2013-03-13 22:59 [U-Boot] [PATCH v2 1/2] nitrogen6x: Fix RAM size variable Fabio Estevam
2013-03-13 22:59 ` [U-Boot] [PATCH v2 2/2] nitrogen: Use unsigned long to specify the total RAM size Fabio Estevam
@ 2013-03-14 7:36 ` Stefano Babic
1 sibling, 0 replies; 12+ messages in thread
From: Stefano Babic @ 2013-03-14 7:36 UTC (permalink / raw)
To: u-boot
On 13/03/2013 23:59, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Fix the following build error when buildig nitrogen6s1g:
>
> nitrogen6x.c:89:17: error: 'CONFIG_DDR_MB' undeclared (first use in
> this function)
> nitrogen6x.c:89:17: note: each undeclared identifier is reported only
> once for each function it appears in
>
> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Hi Fabio,
> Changes since v1:
> - Rebased against u-boot-imx tree
>
> boards.cfg | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
You're very fast ! Thanks for fixing it !
Regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-03-14 15:18 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 22:59 [U-Boot] [PATCH v2 1/2] nitrogen6x: Fix RAM size variable Fabio Estevam
2013-03-13 22:59 ` [U-Boot] [PATCH v2 2/2] nitrogen: Use unsigned long to specify the total RAM size Fabio Estevam
2013-03-14 7:42 ` Stefano Babic
2013-03-14 8:03 ` [U-Boot] [PATCH V3] " Stefano Babic
2013-03-14 8:08 ` Stefano Babic
2013-03-14 8:09 ` [U-Boot] [PATCH V4] " Stefano Babic
2013-03-14 11:38 ` Wolfgang Denk
2013-03-14 12:25 ` Fabio Estevam
2013-03-14 13:15 ` Albert ARIBAUD
2013-03-14 14:09 ` Stefano Babic
2013-03-14 15:18 ` Albert ARIBAUD
2013-03-14 7:36 ` [U-Boot] [PATCH v2 1/2] nitrogen6x: Fix RAM size variable Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox