* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
@ 2011-10-22 0:16 ` Marek Vasut
2011-10-23 5:37 ` Mike Frysinger
2011-10-24 4:31 ` Simon Glass
2011-10-22 0:16 ` [U-Boot] [PATCH 02/39] GCC4.6: Squash warnings in common/usb.c Marek Vasut
` (39 subsequent siblings)
40 siblings, 2 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:16 UTC (permalink / raw)
To: u-boot
The current implementation of debug doesn't play well with GCC4.6.
This implementation also fixes GCC4.6 complaints about unused variables
while maintaining code size.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
---
include/common.h | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/include/common.h b/include/common.h
index eb19a44..c3b23551 100644
--- a/include/common.h
+++ b/include/common.h
@@ -116,20 +116,24 @@ typedef volatile unsigned char vu_char;
#include <flash.h>
#include <image.h>
-#ifdef DEBUG
-#define debug(fmt,args...) printf (fmt ,##args)
-#define debugX(level,fmt,args...) if (DEBUG>=level) printf(fmt,##args);
-#else
-#define debug(fmt,args...)
-#define debugX(level,fmt,args...)
-#endif /* DEBUG */
-
#ifdef DEBUG
# define _DEBUG 1
#else
# define _DEBUG 0
#endif
+#define debug_cond(cond, fmt, args...) \
+ do { \
+ if (cond) \
+ printf(fmt, ##args); \
+ } while (0)
+
+#define debug(fmt, args...) \
+ debug_cond(_DEBUG, fmt, ##args)
+
+#define debugX(level, fmt, args...) \
+ debug_cond((_DEBUG && DEBUG >= (level)), fmt, ##args)
+
/*
* An assertion is run-time check done in debug mode only. If DEBUG is not
* defined then it is skipped. If DEBUG is defined and the assertion fails,
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-22 0:16 ` [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros Marek Vasut
@ 2011-10-23 5:37 ` Mike Frysinger
2011-10-23 17:12 ` Wolfgang Denk
2011-10-24 4:31 ` Simon Glass
1 sibling, 1 reply; 73+ messages in thread
From: Mike Frysinger @ 2011-10-23 5:37 UTC (permalink / raw)
To: u-boot
On Fri, Oct 21, 2011 at 20:16, Marek Vasut wrote:
> The current implementation of debug doesn't play well with GCC4.6.
> This implementation also fixes GCC4.6 complaints about unused variables
> while maintaining code size.
i think this patch should come last rather than first that way you fix
all the warnings/failures *before* making the debug() code
unconditional
> +#define debug_cond(cond, fmt, args...) ? ? ? ? \
> + ? ? ? do { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> + ? ? ? ? ? ? ? if (cond) ? ? ? ? ? ? ? ? ? ? ? \
> + ? ? ? ? ? ? ? ? ? ? ? printf(fmt, ##args); ? ?\
> + ? ? ? } while (0)
> +
> +#define debug(fmt, args...) ? ? ? ? ? ? ? ? ? ?\
> + ? ? ? debug_cond(_DEBUG, fmt, ##args)
> +
> +#define debugX(level, fmt, args...) ? ? ? ? ? ?\
> + ? ? ? debug_cond((_DEBUG && DEBUG >= (level)), fmt, ##args)
i thought we were just going to punt debugX() ?
-mike
^ permalink raw reply [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-23 5:37 ` Mike Frysinger
@ 2011-10-23 17:12 ` Wolfgang Denk
2011-10-25 20:10 ` Joe Hershberger
0 siblings, 1 reply; 73+ messages in thread
From: Wolfgang Denk @ 2011-10-23 17:12 UTC (permalink / raw)
To: u-boot
Dear Mike Frysinger,
In message <CAJaTeTpwpO6Kd-q=bmbzqPJMoNz_YiOWGRks=zGkhes0vUA=mg@mail.gmail.com> you wrote:
>
> > +#define debugX(level, fmt, args...) \
> > + debug_cond((_DEBUG && DEBUG >=3D (level)), fmt, ##args)
>
> i thought we were just going to punt debugX() ?
Yes, please do!
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
I have never understood the female capacity to avoid a direct answer
to any question.
-- Spock, "This Side of Paradise", stardate 3417.3
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-23 17:12 ` Wolfgang Denk
@ 2011-10-25 20:10 ` Joe Hershberger
2011-10-25 20:40 ` 馬克泡
0 siblings, 1 reply; 73+ messages in thread
From: Joe Hershberger @ 2011-10-25 20:10 UTC (permalink / raw)
To: u-boot
On Sun, Oct 23, 2011 at 12:12 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Mike Frysinger,
>
> In message <CAJaTeTpwpO6Kd-q=bmbzqPJMoNz_YiOWGRks=zGkhes0vUA=mg@mail.gmail.com> you wrote:
>>
>> > +#define debugX(level, fmt, args...) ? ? ? ? ? ?\
>> > + ? ? ? debug_cond((_DEBUG && DEBUG >=3D (level)), fmt, ##args)
>>
>> i thought we were just going to punt debugX() ?
>
> Yes, please do!
I'm working on a patch for the net code that benefits from the debugX
macro. Especially for the net code, the debug traces can be
overwhelming depending on the issue you are looking at. I recommend
we keep it around.
Thanks
-Joe
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-25 20:10 ` Joe Hershberger
@ 2011-10-25 20:40 ` 馬克泡
2011-10-25 21:59 ` Wolfgang Denk
0 siblings, 1 reply; 73+ messages in thread
From: 馬克泡 @ 2011-10-25 20:40 UTC (permalink / raw)
To: u-boot
Hi all,
2011/10/26 Joe Hershberger <joe.hershberger@gmail.com>:
> On Sun, Oct 23, 2011 at 12:12 PM, Wolfgang Denk <wd@denx.de> wrote:
>> Dear Mike Frysinger,
>>
> I'm working on a patch for the net code that benefits from the debugX
> macro. ?Especially for the net code, the debug traces can be
> overwhelming depending on the issue you are looking at. ?I recommend
> we keep it around.
>
> Thanks
> -Joe
I agreed with Joe,
I feel some debug code is necessary to keep it into levels since some
you usually need to split debug level into 2 or 3 to help the debug work.
A device driver which has been commit into the mainline source should be
worked on most of platforms. However, it still might be need to do debug work
on several different platform since the hardware integration might be different
then introduce problem. Hence the debug codes in detail should not be removed
in the mainline code, and it should be labeled with some debug levels.
Those code will help the debug work in future.
Moreover, some device driver will need to be fixed when the hardware
will be fixed
or upgraded and introduce different versions. Those hardware still
follow a common
behaviors, a common set of registers, even the 50% usage of the driver
will be same.
Hence keep debug code in deep level will be help.
We can keep it until someone really have time to fix it.
--
Best regards,
Macpaul Lin
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-25 20:40 ` 馬克泡
@ 2011-10-25 21:59 ` Wolfgang Denk
2011-10-25 22:08 ` Joe Hershberger
0 siblings, 1 reply; 73+ messages in thread
From: Wolfgang Denk @ 2011-10-25 21:59 UTC (permalink / raw)
To: u-boot
Dear =?UTF-8?B?6aas5YWL5rOh?=,
In message <CACCg+XP8zoKGproJ4t=QEQU4ZFYccAPPjsGkz72BKBwowcUQng@mail.gmail.com> you wrote:
>
> > I'm working on a patch for the net code that benefits from the debugX
> > macro. ?Especially for the net code, the debug traces can be
> > overwhelming depending on the issue you are looking at. ?I recommend
> > we keep it around.
...
> I agreed with Joe,
And I disagree.
After 11 years of U-Boot development, after collecting 2,515 C files,
we have just 2 (in words: TWO) files that use this macro. And one of
them with a single level only, so it's even useless there.
> I feel some debug code is necessary to keep it into levels since some
> you usually need to split debug level into 2 or 3 to help the debug work.
Usually? In a single case out of 2.5k files? That's not usual,
that's a mistake.
I say: we get rid of this!
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
There is enough for the need of everyone in this world,
but not for the greed of everyone. - Mahatma Gandhi
^ permalink raw reply [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-25 21:59 ` Wolfgang Denk
@ 2011-10-25 22:08 ` Joe Hershberger
0 siblings, 0 replies; 73+ messages in thread
From: Joe Hershberger @ 2011-10-25 22:08 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
On Tue, Oct 25, 2011 at 4:59 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear =?UTF-8?B?6aas5YWL5rOh?=,
>
> In message <CACCg+XP8zoKGproJ4t=QEQU4ZFYccAPPjsGkz72BKBwowcUQng@mail.gmail.com> you wrote:
>>
>> > I'm working on a patch for the net code that benefits from the debugX
>> > macro. ?Especially for the net code, the debug traces can be
>> > overwhelming depending on the issue you are looking at. ?I recommend
>> > we keep it around.
> ...
>> I agreed with Joe,
>
> And I disagree.
In the net code, I separated out the debug prints based on
* internal state changes
* any traffic on the network
* packets targeted to the device
I found this very helpful in debugging to limit the volume of traces
depending on what I was looking for. How would you recommend getting
similar behavior without debugX?
Thanks,
Joe
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-22 0:16 ` [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros Marek Vasut
2011-10-23 5:37 ` Mike Frysinger
@ 2011-10-24 4:31 ` Simon Glass
2011-10-24 8:21 ` Marek Vasut
1 sibling, 1 reply; 73+ messages in thread
From: Simon Glass @ 2011-10-24 4:31 UTC (permalink / raw)
To: u-boot
Hi Marek,
On Fri, Oct 21, 2011 at 5:16 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> The current implementation of debug doesn't play well with GCC4.6.
> This implementation also fixes GCC4.6 complaints about unused variables
> while maintaining code size.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> ---
> ?include/common.h | ? 20 ++++++++++++--------
> ?1 files changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/include/common.h b/include/common.h
> index eb19a44..c3b23551 100644
> --- a/include/common.h
> +++ b/include/common.h
> @@ -116,20 +116,24 @@ typedef volatile unsigned char ? ?vu_char;
> ?#include <flash.h>
> ?#include <image.h>
>
> -#ifdef DEBUG
> -#define debug(fmt,args...) ? ? printf (fmt ,##args)
> -#define debugX(level,fmt,args...) if (DEBUG>=level) printf(fmt,##args);
> -#else
> -#define debug(fmt,args...)
> -#define debugX(level,fmt,args...)
> -#endif /* DEBUG */
> -
> ?#ifdef DEBUG
> ?# define _DEBUG 1
> ?#else
> ?# define _DEBUG 0
> ?#endif
>
> +#define debug_cond(cond, fmt, args...) ? ? ? ? \
Yes this is much nicer. Could perhaps add a little comment about how
to use this and to avoid putting debug() inside #ifdef?
> + ? ? ? do { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> + ? ? ? ? ? ? ? if (cond) ? ? ? ? ? ? ? ? ? ? ? \
> + ? ? ? ? ? ? ? ? ? ? ? printf(fmt, ##args); ? ?\
> + ? ? ? } while (0)
> +
> +#define debug(fmt, args...) ? ? ? ? ? ? ? ? ? ?\
> + ? ? ? debug_cond(_DEBUG, fmt, ##args)
> +
> +#define debugX(level, fmt, args...) ? ? ? ? ? ?\
> + ? ? ? debug_cond((_DEBUG && DEBUG >= (level)), fmt, ##args)
> +
> ?/*
> ?* An assertion is run-time check done in debug mode only. If DEBUG is not
> ?* defined then it is skipped. If DEBUG is defined and the assertion fails,
> --
> 1.7.6.3
>
>
^ permalink raw reply [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-24 4:31 ` Simon Glass
@ 2011-10-24 8:21 ` Marek Vasut
2011-10-24 19:21 ` Wolfgang Denk
0 siblings, 1 reply; 73+ messages in thread
From: Marek Vasut @ 2011-10-24 8:21 UTC (permalink / raw)
To: u-boot
On Monday, October 24, 2011 06:31:19 AM Simon Glass wrote:
> Hi Marek,
>
> On Fri, Oct 21, 2011 at 5:16 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > The current implementation of debug doesn't play well with GCC4.6.
> > This implementation also fixes GCC4.6 complaints about unused variables
> > while maintaining code size.
> >
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > Cc: Wolfgang Denk <wd@denx.de>
> > Cc: Simon Glass <sjg@chromium.org>
> > ---
> > include/common.h | 20 ++++++++++++--------
> > 1 files changed, 12 insertions(+), 8 deletions(-)
> >
> > diff --git a/include/common.h b/include/common.h
> > index eb19a44..c3b23551 100644
> > --- a/include/common.h
> > +++ b/include/common.h
> > @@ -116,20 +116,24 @@ typedef volatile unsigned char vu_char;
> > #include <flash.h>
> > #include <image.h>
> >
> > -#ifdef DEBUG
> > -#define debug(fmt,args...) printf (fmt ,##args)
> > -#define debugX(level,fmt,args...) if (DEBUG>=level) printf(fmt,##args);
> > -#else
> > -#define debug(fmt,args...)
> > -#define debugX(level,fmt,args...)
> > -#endif /* DEBUG */
> > -
> > #ifdef DEBUG
> > # define _DEBUG 1
> > #else
> > # define _DEBUG 0
> > #endif
> >
> > +#define debug_cond(cond, fmt, args...) \
>
> Yes this is much nicer. Could perhaps add a little comment about how
> to use this and to avoid putting debug() inside #ifdef?
>
> > + do { \
> > + if (cond) \
> > + printf(fmt, ##args); \
> > + } while (0)
> > +
> > +#define debug(fmt, args...) \
> > + debug_cond(_DEBUG, fmt, ##args)
> > +
> > +#define debugX(level, fmt, args...) \
> > + debug_cond((_DEBUG && DEBUG >= (level)), fmt, ##args)
> > +
> > /*
> > * An assertion is run-time check done in debug mode only. If DEBUG is
> > not * defined then it is skipped. If DEBUG is defined and the assertion
> > fails, --
> > 1.7.6.3
Done, I pushed new patchset right now to git://git.denx.de/u-boot-marex.git ,
"debug" branch. It's around 50 patches now.
^ permalink raw reply [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-24 8:21 ` Marek Vasut
@ 2011-10-24 19:21 ` Wolfgang Denk
2011-10-25 0:11 ` Marek Vasut
0 siblings, 1 reply; 73+ messages in thread
From: Wolfgang Denk @ 2011-10-24 19:21 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <201110241021.15442.marek.vasut@gmail.com> you wrote:
>
...
> Done, I pushed new patchset right now to git://git.denx.de/u-boot-marex.git ,
> "debug" branch. It's around 50 patches now.
Keep in mind that nobody cares about patches anywhere in any
repository. What has not been sent to the mailing list and thus is
captured in the list archives and patchwork simply does not exist.
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
You can observe a lot just by watchin'. - Yogi Berra
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-24 19:21 ` Wolfgang Denk
@ 2011-10-25 0:11 ` Marek Vasut
2011-10-25 7:37 ` Wolfgang Denk
0 siblings, 1 reply; 73+ messages in thread
From: Marek Vasut @ 2011-10-25 0:11 UTC (permalink / raw)
To: u-boot
> Dear Marek Vasut,
>
> In message <201110241021.15442.marek.vasut@gmail.com> you wrote:
>
> ...
>
> > Done, I pushed new patchset right now to
> > git://git.denx.de/u-boot-marex.git , "debug" branch. It's around 50
> > patches now.
>
> Keep in mind that nobody cares about patches anywhere in any
> repository. What has not been sent to the mailing list and thus is
> captured in the list archives and patchwork simply does not exist.
Hi Wolfgang,
I know this very well, I just need to feedback and the patchset is really huge.
I'd wait for you to merge some of the stuff from this patchset (you can merge
what you feel fitting but the 0001 patch ...) and then rebase and resubmit the
rest on top of that.
Cheers
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-25 0:11 ` Marek Vasut
@ 2011-10-25 7:37 ` Wolfgang Denk
2011-10-25 8:27 ` Marek Vasut
0 siblings, 1 reply; 73+ messages in thread
From: Wolfgang Denk @ 2011-10-25 7:37 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <201110250211.07058.marek.vasut@gmail.com> you wrote:
>
> I know this very well, I just need to feedback and the patchset is really huge.
What you attempt will not work.
You may get some feedback on patches posted on the list.
I will_never_ send any feedback to any stuff in some repository
anywhere. I will never even try to read it. And I m pretty sure many
others work like that, too.
If the patch set is huge, then do yourself a favour and break it down
into small, managable pieces. Don't try to do everything at once.
Send a short sub-set first - maybe some 4...8 patches or so. Maybe
even 10. Then let people digest these, and only when they are
scheduled for merging start and post the next of your batches.
_Nobody_ will review a 50 patch series. And nobdy will apply it
either.
> I'd wait for you to merge some of the stuff from this patchset (you can merge
> what you feel fitting but the 0001 patch ...) and then rebase and resubmit the
> rest on top of that.
I'd rather you split the series in smaller, digestable batches.
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
Severe culture shock results when experts from another protocol suite
[...] try to read OSI documents. The term "osified" is used to refer
to such documents. [...] Any relationship to the word "ossified" is
purely intentional. - Marshall T. Rose
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-25 7:37 ` Wolfgang Denk
@ 2011-10-25 8:27 ` Marek Vasut
2011-10-25 8:49 ` Graeme Russ
2011-10-25 18:34 ` Wolfgang Denk
0 siblings, 2 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-25 8:27 UTC (permalink / raw)
To: u-boot
> Dear Marek Vasut,
>
> In message <201110250211.07058.marek.vasut@gmail.com> you wrote:
> > I know this very well, I just need to feedback and the patchset is really
> > huge.
>
> What you attempt will not work.
>
> You may get some feedback on patches posted on the list.
>
> I will_never_ send any feedback to any stuff in some repository
> anywhere. I will never even try to read it. And I m pretty sure many
> others work like that, too.
I expect that, all right.
>
> If the patch set is huge, then do yourself a favour and break it down
> into small, managable pieces. Don't try to do everything at once.
Well I'm not quite sure how you'd like to break a set of patches like this one
into smaller chunks ... ?
>
> Send a short sub-set first - maybe some 4...8 patches or so. Maybe
> even 10. Then let people digest these, and only when they are
> scheduled for merging start and post the next of your batches.
Well ... it's insane. Can you start picking patches from this one series which
you feel are ok? I'll rebase the rest on that and submit it. The patches are
pretty much independent anyway.
>
> _Nobody_ will review a 50 patch series. And nobdy will apply it
> either.
>
> > I'd wait for you to merge some of the stuff from this patchset (you can
> > merge what you feel fitting but the 0001 patch ...) and then rebase and
> > resubmit the rest on top of that.
>
> I'd rather you split the series in smaller, digestable batches.
Well see above. Can you cherrypick something from this series already which you
feel fitting ? There's no dependency anyway.
>
> Best regards,
>
> Wolfgang Denk
Cheers
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-25 8:27 ` Marek Vasut
@ 2011-10-25 8:49 ` Graeme Russ
2011-10-25 9:03 ` Marek Vasut
2011-10-25 18:34 ` Wolfgang Denk
1 sibling, 1 reply; 73+ messages in thread
From: Graeme Russ @ 2011-10-25 8:49 UTC (permalink / raw)
To: u-boot
Hi Marek,
On 25/10/11 19:27, Marek Vasut wrote:
>> Dear Marek Vasut,
>>
>> In message <201110250211.07058.marek.vasut@gmail.com> you wrote:
>>> I know this very well, I just need to feedback and the patchset is really
>>> huge.
[snip]
>> I'd rather you split the series in smaller, digestable batches.
>
> Well see above. Can you cherrypick something from this series already which you
> feel fitting ? There's no dependency anyway.
Why not break it down into /common, /drivers, /arch etc - does that get it
down to less than ten per set? /drivers will probably by >10 so you can
then go /drivers/serial, /drivers/mtd until there are less than ten - put
these in a patchset called /drivers/various
Regards,
Graeme
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-25 8:49 ` Graeme Russ
@ 2011-10-25 9:03 ` Marek Vasut
0 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-25 9:03 UTC (permalink / raw)
To: u-boot
> Hi Marek,
>
> On 25/10/11 19:27, Marek Vasut wrote:
> >> Dear Marek Vasut,
> >>
> >> In message <201110250211.07058.marek.vasut@gmail.com> you wrote:
> >>> I know this very well, I just need to feedback and the patchset is
> >>> really huge.
>
> [snip]
>
> >> I'd rather you split the series in smaller, digestable batches.
> >
> > Well see above. Can you cherrypick something from this series already
> > which you feel fitting ? There's no dependency anyway.
>
> Why not break it down into /common, /drivers, /arch etc - does that get it
> down to less than ten per set? /drivers will probably by >10 so you can
> then go /drivers/serial, /drivers/mtd until there are less than ten - put
> these in a patchset called /drivers/various
This sounds good, yes. Roger that.
>
> Regards,
>
> Graeme
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros
2011-10-25 8:27 ` Marek Vasut
2011-10-25 8:49 ` Graeme Russ
@ 2011-10-25 18:34 ` Wolfgang Denk
1 sibling, 0 replies; 73+ messages in thread
From: Wolfgang Denk @ 2011-10-25 18:34 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <201110251027.10375.marek.vasut@gmail.com> you wrote:
>
> > If the patch set is huge, then do yourself a favour and break it down
> > into small, managable pieces. Don't try to do everything at once.
>
> Well I'm not quite sure how you'd like to break a set of patches like this one
> into smaller chunks ... ?
$ ls | split -l 8
? :-)
> Well ... it's insane. Can you start picking patches from this one series which
> you feel are ok? I'll rebase the rest on that and submit it. The patches are
> pretty much independent anyway.
No, I cannot. I don't have the time to review 50+ patches and pick
some that I "feel are ok".
> Well see above. Can you cherrypick something from this series already which you
> feel fitting ? There's no dependency anyway.
Technically I could do that, of course. But within the given
limitations of time and resources I will not be able to do that.
Sorry, but I ask again to provide small, managable pieces.
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
Punishment becomes ineffective after a certain point. Men become in-
sensitive.
-- Eneg, "Patterns of Force", stardate 2534.7
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 02/39] GCC4.6: Squash warnings in common/usb.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
2011-10-22 0:16 ` [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros Marek Vasut
@ 2011-10-22 0:16 ` Marek Vasut
2011-10-24 12:15 ` Stefano Babic
2011-10-22 0:16 ` [U-Boot] [PATCH 03/39] GCC4.6: Squash warning in cmd_ide.c Marek Vasut
` (38 subsequent siblings)
40 siblings, 1 reply; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:16 UTC (permalink / raw)
To: u-boot
usb.c: In function ?usb_parse_config?:
usb.c:331:17: warning: variable ?ch? set but not used
[-Wunused-but-set-variable]
usb.c: In function ?usb_hub_port_connect_change?:
usb.c:1123:29: warning: variable ?portchange? set but not used
[-Wunused-but-set-variable]
usb.c: In function ?usb_hub_configure?:
usb.c:1183:25: warning: variable ?hubsts? set but not used
[-Wunused-but-set-variable]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
common/usb.c | 21 +++++++--------------
1 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/common/usb.c b/common/usb.c
index 2cd50db..bed5116 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -56,16 +56,16 @@
#endif
#ifdef DEBUG
-#define USB_DEBUG
-#define USB_HUB_DEBUG
-#endif
-
-#ifdef USB_DEBUG
-#define USB_PRINTF(fmt, args...) printf(fmt , ##args)
+#define USB_DEBUG 1
+#define USB_HUB_DEBUG 1
#else
-#define USB_PRINTF(fmt, args...)
+#define USB_DEBUG 0
+#define USB_HUB_DEBUG 0
#endif
+#define USB_PRINTF(fmt, args...) debug_cond(USB_DEBUG, fmt, ##args)
+#define USB_HUB_PRINTF(fmt, args...) debug_cond(USB_HUB_DEBUG, fmt, ##args)
+
#define USB_BUFSIZ 512
static struct usb_device usb_dev[USB_MAX_DEVICE];
@@ -968,13 +968,6 @@ void usb_scan_devices(void)
* Probes device for being a hub and configurate it
*/
-#ifdef USB_HUB_DEBUG
-#define USB_HUB_PRINTF(fmt, args...) printf(fmt , ##args)
-#else
-#define USB_HUB_PRINTF(fmt, args...)
-#endif
-
-
static struct usb_hub_device hub_dev[USB_MAX_HUB];
static int usb_hub_index;
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 02/39] GCC4.6: Squash warnings in common/usb.c
2011-10-22 0:16 ` [U-Boot] [PATCH 02/39] GCC4.6: Squash warnings in common/usb.c Marek Vasut
@ 2011-10-24 12:15 ` Stefano Babic
2011-10-24 12:22 ` Marek Vasut
0 siblings, 1 reply; 73+ messages in thread
From: Stefano Babic @ 2011-10-24 12:15 UTC (permalink / raw)
To: u-boot
On 10/22/2011 02:16 AM, Marek Vasut wrote:
> usb.c: In function ?usb_parse_config?:
> usb.c:331:17: warning: variable ?ch? set but not used
> [-Wunused-but-set-variable]
> usb.c: In function ?usb_hub_port_connect_change?:
> usb.c:1123:29: warning: variable ?portchange? set but not used
> [-Wunused-but-set-variable]
> usb.c: In function ?usb_hub_configure?:
> usb.c:1183:25: warning: variable ?hubsts? set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
> common/usb.c | 21 +++++++--------------
> 1 files changed, 7 insertions(+), 14 deletions(-)
>
> diff --git a/common/usb.c b/common/usb.c
> index 2cd50db..bed5116 100644
> --- a/common/usb.c
> +++ b/common/usb.c
> @@ -56,16 +56,16 @@
> #endif
>
> #ifdef DEBUG
> -#define USB_DEBUG
> -#define USB_HUB_DEBUG
> -#endif
> -
> -#ifdef USB_DEBUG
> -#define USB_PRINTF(fmt, args...) printf(fmt , ##args)
> +#define USB_DEBUG 1
> +#define USB_HUB_DEBUG 1
Why do you nedd to set a value when then later to check only with #ifdef
if it is defined or not ?
> #else
> -#define USB_PRINTF(fmt, args...)
> +#define USB_DEBUG 0
> +#define USB_HUB_DEBUG 0
Maybe #undef ?
Best regards,
Stefano babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 02/39] GCC4.6: Squash warnings in common/usb.c
2011-10-24 12:15 ` Stefano Babic
@ 2011-10-24 12:22 ` Marek Vasut
2011-10-24 19:37 ` Wolfgang Denk
0 siblings, 1 reply; 73+ messages in thread
From: Marek Vasut @ 2011-10-24 12:22 UTC (permalink / raw)
To: u-boot
Hi Stefano,
actually the value is checked by debug_cond().
Cheers
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 02/39] GCC4.6: Squash warnings in common/usb.c
2011-10-24 12:22 ` Marek Vasut
@ 2011-10-24 19:37 ` Wolfgang Denk
2011-10-25 0:09 ` Marek Vasut
0 siblings, 1 reply; 73+ messages in thread
From: Wolfgang Denk @ 2011-10-24 19:37 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <201110241422.30837.marek.vasut@gmail.com> you wrote:
>
> actually the value is checked by debug_cond().
Consider prefixing these names with a double underscore to make more
visibale that these are internally used and not for plain mortal users
to mess with.
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
Tactical? TACTICAL!?!? Hey, buddy, we went from kilotons to megatons
several minutes ago. We don't need no stinkin' tactical nukes. (By
the way, do you have change for 10 million people?) - lwall
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 02/39] GCC4.6: Squash warnings in common/usb.c
2011-10-24 19:37 ` Wolfgang Denk
@ 2011-10-25 0:09 ` Marek Vasut
0 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-25 0:09 UTC (permalink / raw)
To: u-boot
> Dear Marek Vasut,
>
> In message <201110241422.30837.marek.vasut@gmail.com> you wrote:
> > actually the value is checked by debug_cond().
>
> Consider prefixing these names with a double underscore to make more
> visibale that these are internally used and not for plain mortal users
> to mess with.
>
> Best regards,
>
> Wolfgang Denk
Hi Wolfgang,
will do. Do you plan to start merging this stuff (or parts of it)?
Cheers
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [PATCH 03/39] GCC4.6: Squash warning in cmd_ide.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
2011-10-22 0:16 ` [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros Marek Vasut
2011-10-22 0:16 ` [U-Boot] [PATCH 02/39] GCC4.6: Squash warnings in common/usb.c Marek Vasut
@ 2011-10-22 0:16 ` Marek Vasut
2011-10-22 0:16 ` [U-Boot] [PATCH 04/39] GCC4.6: Squash warning in cmd_date.c Marek Vasut
` (37 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:16 UTC (permalink / raw)
To: u-boot
cmd_ide.c: In function ?ide_read?:
cmd_ide.c:1227:2: warning: format ?%LX? expects argument of type ?long long
unsigned int?, but argument 3 has type ?lbaint_t? [-Wformat]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
common/cmd_ide.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index da5189c..74e6504 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -1224,7 +1224,7 @@ ulong ide_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
lba48 = 1;
}
#endif
- debug ("ide_read dev %d start %LX, blocks %lX buffer at %lX\n",
+ debug("ide_read dev %d start %lX, blocks %lX buffer at %lX\n",
device, blknr, blkcnt, (ulong)buffer);
ide_led (DEVICE_LED(device), 1); /* LED on */
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 04/39] GCC4.6: Squash warning in cmd_date.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (2 preceding siblings ...)
2011-10-22 0:16 ` [U-Boot] [PATCH 03/39] GCC4.6: Squash warning in cmd_ide.c Marek Vasut
@ 2011-10-22 0:16 ` Marek Vasut
2011-10-30 19:59 ` Mike Frysinger
2011-10-22 0:17 ` [U-Boot] [PATCH 05/39] GCC4.6: Squash warning in usb_storage.c Marek Vasut
` (36 subsequent siblings)
40 siblings, 1 reply; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:16 UTC (permalink / raw)
To: u-boot
cmd_date.c: In function ?do_date?:
cmd_date.c:50:6: warning: variable ?old_bus? set but not used
[-Wunused-but-set-variable]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
include/i2c.h | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/include/i2c.h b/include/i2c.h
index 8ceb4c8..ee31034 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -46,16 +46,16 @@
*/
#define I2C_RXTX_LEN 128 /* maximum tx/rx buffer length */
-#if defined(CONFIG_I2C_MULTI_BUS)
-#if !defined(CONFIG_SYS_MAX_I2C_BUS)
-#define CONFIG_SYS_MAX_I2C_BUS 2
-#endif
-#define I2C_GET_BUS() i2c_get_bus_num()
-#define I2C_SET_BUS(a) i2c_set_bus_num(a)
+#ifdef CONFIG_I2C_MULTI_BUS
+#define MAX_I2C_BUS 2
+#define I2C_MULTI_BUS 1
#else
-#define CONFIG_SYS_MAX_I2C_BUS 1
-#define I2C_GET_BUS() 0
-#define I2C_SET_BUS(a)
+#define MAX_I2C_BUS 1
+#define I2C_MULTI_BUS 0
+#endif
+
+#if !defined(CONFIG_SYS_MAX_I2C_BUS)
+#define CONFIG_SYS_MAX_I2C_BUS MAX_I2C_BUS
#endif
/* define the I2C bus number for RTC and DTT if not already done */
@@ -236,4 +236,18 @@ int i2c_set_bus_speed(unsigned int);
unsigned int i2c_get_bus_speed(void);
+/* NOTE: These two functions MUST be always_inline to avoid code growth! */
+static inline unsigned int I2C_GET_BUS(void) __attribute__((always_inline));
+static inline unsigned int I2C_GET_BUS(void)
+{
+ return I2C_MULTI_BUS ? i2c_get_bus_num() : 0;
+}
+
+static inline void I2C_SET_BUS(unsigned int bus) __attribute__((always_inline));
+static inline void I2C_SET_BUS(unsigned int bus)
+{
+ if (I2C_MULTI_BUS)
+ i2c_set_bus_num(bus);
+}
+
#endif /* _I2C_H_ */
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 05/39] GCC4.6: Squash warning in usb_storage.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (3 preceding siblings ...)
2011-10-22 0:16 ` [U-Boot] [PATCH 04/39] GCC4.6: Squash warning in cmd_date.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-23 5:39 ` Mike Frysinger
2011-10-22 0:17 ` [U-Boot] [PATCH 06/39] GCC4.6: Squash subsequent warnings " Marek Vasut
` (35 subsequent siblings)
40 siblings, 1 reply; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
usb_storage.c: In function ?usb_stor_CB_reset?:
usb_storage.c:466:6: warning: variable ?result? set but not used
[-Wunused-but-set-variable]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
common/usb_storage.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 16667f3..eb9a30e 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -56,16 +56,17 @@
#include <part.h>
#include <usb.h>
-#undef USB_STOR_DEBUG
#undef BBB_COMDAT_TRACE
#undef BBB_XPORT_TRACE
#ifdef USB_STOR_DEBUG
-#define USB_STOR_PRINTF(fmt, args...) printf(fmt , ##args)
+#define USB_BLK_DEBUG 1
#else
-#define USB_STOR_PRINTF(fmt, args...)
+#define USB_BLK_DEBUG 0
#endif
+#define USB_STOR_PRINTF(fmt, args...) debug_cond(USB_BLK_DEBUG, fmt, ##args)
+
#include <scsi.h>
/* direction table -- this indicates the direction of the data
* transfer for each command code -- a 1 indicates input
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 06/39] GCC4.6: Squash subsequent warnings in usb_storage.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (4 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 05/39] GCC4.6: Squash warning in usb_storage.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 07/39] PowerPC: Squash warning in mpc512x serial.c Marek Vasut
` (34 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
usb_storage.c: In function ?us_one_transfer?:
usb_storage.c:377:7: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 2 has type ?long unsigned int? [-Wformat]
usb_storage.c:389:6: warning: format ?%d? expects argument of type ?int?, but
argument 2 has type ?long unsigned int? [-Wformat]
usb_storage.c:394:6: warning: format ?%d? expects argument of type ?int?, but
argument 2 has type ?long unsigned int? [-Wformat]
usb_storage.c: In function ?usb_stor_BBB_reset?:
usb_storage.c:442:2: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c:448:2: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c:454:2: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c: In function ?usb_stor_CB_reset?:
usb_storage.c:482:2: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c: In function ?usb_stor_CB_comdat?:
usb_storage.c:572:3: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c:584:4: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c: In function ?usb_stor_BBB_transport?:
usb_storage.c:782:3: warning: format ?%d? expects argument of type ?int?, but
argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c: In function ?usb_stor_CB_transport?:
usb_storage.c:807:2: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c:830:3: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 2 has type ?long unsigned int? [-Wformat]
usb_storage.c:857:3: warning: format ?%d? expects argument of type ?int?, but
argument 2 has type ?long unsigned int? [-Wformat]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Remy Bohmer <linux@bohmer.net>
---
common/usb_storage.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
NOTE: Checkpatch issue here would need much deeper rework of the usb_storage.c,
please bear with it.
Remy, can you take care of this please? ;-)
diff --git a/common/usb_storage.c b/common/usb_storage.c
index eb9a30e..d665a87 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -373,7 +373,7 @@ static int us_one_transfer(struct us_data *us, int pipe, char *buf, int length)
usb_clear_halt(us->pusb_dev, pipe);
us->pusb_dev->status = stat;
if (this_xfer == partial) {
- USB_STOR_PRINTF("bulk transferred with error %X, but data ok\n", us->pusb_dev->status);
+ USB_STOR_PRINTF("bulk transferred with error %lX, but data ok\n", us->pusb_dev->status);
return 0;
}
else
@@ -385,12 +385,12 @@ static int us_one_transfer(struct us_data *us, int pipe, char *buf, int length)
}
USB_STOR_PRINTF("bulk transferred with error");
if (this_xfer == partial) {
- USB_STOR_PRINTF(" %d, but data ok\n",
+ USB_STOR_PRINTF(" %ld, but data ok\n",
us->pusb_dev->status);
return 0;
}
/* if our try counter reaches 0, bail out */
- USB_STOR_PRINTF(" %d, data %d\n",
+ USB_STOR_PRINTF(" %ld, data %d\n",
us->pusb_dev->status, partial);
if (!maxtry--)
return result;
@@ -438,19 +438,19 @@ static int usb_stor_BBB_reset(struct us_data *us)
/* long wait for reset */
wait_ms(150);
- USB_STOR_PRINTF("BBB_reset result %d: status %X reset\n", result,
+ USB_STOR_PRINTF("BBB_reset result %d: status %lX reset\n", result,
us->pusb_dev->status);
pipe = usb_rcvbulkpipe(us->pusb_dev, us->ep_in);
result = usb_clear_halt(us->pusb_dev, pipe);
/* long wait for reset */
wait_ms(150);
- USB_STOR_PRINTF("BBB_reset result %d: status %X clearing IN endpoint\n",
+ USB_STOR_PRINTF("BBB_reset result %d: status %lX clearing IN endpoint\n",
result, us->pusb_dev->status);
/* long wait for reset */
pipe = usb_sndbulkpipe(us->pusb_dev, us->ep_out);
result = usb_clear_halt(us->pusb_dev, pipe);
wait_ms(150);
- USB_STOR_PRINTF("BBB_reset result %d: status %X"
+ USB_STOR_PRINTF("BBB_reset result %d: status %lX"
" clearing OUT endpoint\n", result,
us->pusb_dev->status);
USB_STOR_PRINTF("BBB_reset done\n");
@@ -478,7 +478,7 @@ static int usb_stor_CB_reset(struct us_data *us)
/* long wait for reset */
wait_ms(1500);
- USB_STOR_PRINTF("CB_reset result %d: status %X"
+ USB_STOR_PRINTF("CB_reset result %d: status %lX"
" clearing endpoint halt\n", result,
us->pusb_dev->status);
usb_clear_halt(us->pusb_dev, usb_rcvbulkpipe(us->pusb_dev, us->ep_in));
@@ -569,7 +569,7 @@ int usb_stor_CB_comdat(ccb *srb, struct us_data *us)
srb->cmd, srb->cmdlen,
USB_CNTL_TIMEOUT * 5);
USB_STOR_PRINTF("CB_transport: control msg returned %d,"
- " status %X\n", result, us->pusb_dev->status);
+ " status %lX\n", result, us->pusb_dev->status);
/* check the return code for the command */
if (result < 0) {
if (us->pusb_dev->status & USB_ST_STALLED) {
@@ -581,7 +581,7 @@ int usb_stor_CB_comdat(ccb *srb, struct us_data *us)
us->pusb_dev->status = status;
}
USB_STOR_PRINTF(" error during command %02X"
- " Stat = %X\n", srb->cmd[0],
+ " Stat = %lX\n", srb->cmd[0],
us->pusb_dev->status);
return result;
}
@@ -778,7 +778,7 @@ again:
usb_stor_BBB_reset(us);
return USB_STOR_TRANSPORT_FAILED;
} else if (data_actlen > srb->datalen) {
- USB_STOR_PRINTF("transferred %dB instead of %dB\n",
+ USB_STOR_PRINTF("transferred %dB instead of %ldB\n",
data_actlen, srb->datalen);
return USB_STOR_TRANSPORT_FAILED;
} else if (csw.bCSWStatus == CSWSTATUS_FAILED) {
@@ -803,7 +803,7 @@ int usb_stor_CB_transport(ccb *srb, struct us_data *us)
/* issue the command */
do_retry:
result = usb_stor_CB_comdat(srb, us);
- USB_STOR_PRINTF("command / Data returned %d, status %X\n",
+ USB_STOR_PRINTF("command / Data returned %d, status %lX\n",
result, us->pusb_dev->status);
/* if this is an CBI Protocol, get IRQ */
if (us->protocol == US_PR_CBI) {
@@ -826,7 +826,7 @@ do_retry:
/* do we have to issue an auto request? */
/* HERE we have to check the result */
if ((result < 0) && !(us->pusb_dev->status & USB_ST_STALLED)) {
- USB_STOR_PRINTF("ERROR %X\n", us->pusb_dev->status);
+ USB_STOR_PRINTF("ERROR %lX\n", us->pusb_dev->status);
us->transport_reset(us);
return USB_STOR_TRANSPORT_ERROR;
}
@@ -853,7 +853,7 @@ do_retry:
status = usb_stor_CBI_get_status(psrb, us);
if ((result < 0) && !(us->pusb_dev->status & USB_ST_STALLED)) {
- USB_STOR_PRINTF(" AUTO REQUEST ERROR %d\n",
+ USB_STOR_PRINTF(" AUTO REQUEST ERROR %ld\n",
us->pusb_dev->status);
return USB_STOR_TRANSPORT_ERROR;
}
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 07/39] PowerPC: Squash warning in mpc512x serial.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (5 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 06/39] GCC4.6: Squash subsequent warnings " Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 08/39] GCC4.6: Squash warning in mpc5121ads.c Marek Vasut
` (33 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
serial.c: In function 'serial_setbrg_dev':
serial.c:143: warning: format '%d' expects type 'int', but argument 4 has type
'long unsigned int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
arch/powerpc/cpu/mpc512x/serial.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/cpu/mpc512x/serial.c b/arch/powerpc/cpu/mpc512x/serial.c
index 5ee9cef..7c53346 100644
--- a/arch/powerpc/cpu/mpc512x/serial.c
+++ b/arch/powerpc/cpu/mpc512x/serial.c
@@ -140,7 +140,7 @@ void serial_setbrg_dev(unsigned int idx)
if (br_env)
baudrate = simple_strtoul(br_env, NULL, 10);
- debug("%s: idx %d, baudrate %d\n", __func__, idx, baudrate);
+ debug("%s: idx %d, baudrate %ld\n", __func__, idx, baudrate);
}
/* calculate divisor for setting PSC CTUR and CTLR registers */
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 08/39] GCC4.6: Squash warning in mpc5121ads.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (6 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 07/39] PowerPC: Squash warning in mpc512x serial.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 09/39] GCC4.6: Squash warning in cfb_console.c Marek Vasut
` (32 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
mpc5121ads.c: In function 'misc_init_r':
mpc5121ads.c:256: warning: format '%02lx' expects type 'long unsigned int', but
argument 2 has type 'int'
mpc5121ads.c:263: warning: format '%02lx' expects type 'long unsigned int', but
argument 2 has type 'int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
board/freescale/mpc5121ads/mpc5121ads.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/freescale/mpc5121ads/mpc5121ads.c b/board/freescale/mpc5121ads/mpc5121ads.c
index b356a47..97eeab3 100644
--- a/board/freescale/mpc5121ads/mpc5121ads.c
+++ b/board/freescale/mpc5121ads/mpc5121ads.c
@@ -253,14 +253,14 @@ int misc_init_r(void)
/* Verify if enabled */
tmp_val = 0;
i2c_read(0x38, 0x08, 1, &tmp_val, sizeof(tmp_val));
- debug("DVI Encoder Read: 0x%02lx\n", tmp_val);
+ debug("DVI Encoder Read: 0x%02x\n", tmp_val);
tmp_val = 0x10;
i2c_write(0x38, 0x0A, 1, &tmp_val, sizeof(tmp_val));
/* Verify if enabled */
tmp_val = 0;
i2c_read(0x38, 0x0A, 1, &tmp_val, sizeof(tmp_val));
- debug("DVI Encoder Read: 0x%02lx\n", tmp_val);
+ debug("DVI Encoder Read: 0x%02x\n", tmp_val);
return 0;
}
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 09/39] GCC4.6: Squash warning in cfb_console.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (7 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 08/39] GCC4.6: Squash warning in mpc5121ads.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 10/39] GCC4.6: Squash warning in cfi_flash.c Marek Vasut
` (31 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
cfb_console.c: In function 'video_display_bitmap':
cfb_console.c:1148: warning: format '%d' expects type 'int', but argument 2 has
type 'long unsigned int'
cfb_console.c:1148: warning: format '%d' expects type 'int', but argument 3 has
type 'long unsigned int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
drivers/video/cfb_console.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 3a93b64..f590250 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1145,7 +1145,7 @@ int video_display_bitmap(ulong bmp_image, int x, int y)
colors = le32_to_cpu(bmp->header.colors_used);
compression = le32_to_cpu(bmp->header.compression);
- debug("Display-bmp: %d x %d with %d colors\n",
+ debug("Display-bmp: %ld x %ld with %d colors\n",
width, height, colors);
if (compression != BMP_BI_RGB
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 10/39] GCC4.6: Squash warning in cfi_flash.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (8 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 09/39] GCC4.6: Squash warning in cfb_console.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 11/39] GCC4.6: Squash warnings in denali_data_eye.c Marek Vasut
` (30 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
cfi_flash.c: In function 'flash_protect_default':
cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'ulong'
cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but
argument 3 has type 'long unsigned int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Scott Wood <scottwood@freescale.com>
---
drivers/mtd/cfi_flash.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index ac91dfd..5494bcf 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -2149,7 +2149,7 @@ void flash_protect_default(void)
#if defined(CONFIG_SYS_FLASH_AUTOPROTECT_LIST)
for (i = 0; i < (sizeof(apl) / sizeof(struct apl_s)); i++) {
- debug("autoprotecting from %08x to %08x\n",
+ debug("autoprotecting from %08lx to %08lx\n",
apl[i].start, apl[i].start + apl[i].size - 1);
flash_protect(FLAG_PROTECT_SET,
apl[i].start,
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 11/39] GCC4.6: Squash warnings in denali_data_eye.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (9 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 10/39] GCC4.6: Squash warning in cfi_flash.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 12/39] GCC4.6: Squash warnings in denali_spd_ddr2.c Marek Vasut
` (29 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
denali_data_eye.c: In function
'denali_core_search_data_eye':denali_spd_ddr2.c:646: warning: format '%d'
expects type 'int', but argument 2 has type 'long unsigned int'
denali_data_eye.c:320: warning: format '%08lx' expects type 'long unsigned int',
but argument 2 has type 'u32'
denali_data_eye.c:330: warning: format '%08lx' expects type 'long unsigned int',
but argument 2 has type 'u32'
denali_spd_ddr2.c:676: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_data_eye.c:340: warning: format '%08lx' expects type 'long unsigned int',
but argument 2 has type 'u32'
denali_data_eye.c:350: warning: format '%08lx' expects type 'long unsigned int',
but argument 2 has type 'u32'
denali_data_eye.c:360: warning: format '%08lx' expects type 'long unsigned int',
but argument 2 has type 'u32'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
arch/powerpc/cpu/ppc4xx/denali_data_eye.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/cpu/ppc4xx/denali_data_eye.c b/arch/powerpc/cpu/ppc4xx/denali_data_eye.c
index 9bba0ca..19b65be 100644
--- a/arch/powerpc/cpu/ppc4xx/denali_data_eye.c
+++ b/arch/powerpc/cpu/ppc4xx/denali_data_eye.c
@@ -317,7 +317,7 @@ void denali_core_search_data_eye(void)
val = (mfdcr(ddrcfgd) & ~DDR0_09_WR_DQS_SHIFT_MASK)
| DDR0_09_WR_DQS_SHIFT_ENCODE(wr_dqs_shift);
mtdcr(ddrcfgd, val);
- debug("DDR0_09=0x%08lx\n", val);
+ debug("DDR0_09=0x%08x\n", val);
/* -----------------------------------------------------------+
* Set 'dqs_out_shift' = wr_dqs_shift + 32
@@ -327,7 +327,7 @@ void denali_core_search_data_eye(void)
val = (mfdcr(ddrcfgd) & ~DDR0_22_DQS_OUT_SHIFT_MASK)
| DDR0_22_DQS_OUT_SHIFT_ENCODE(dqs_out_shift);
mtdcr(ddrcfgd, val);
- debug("DDR0_22=0x%08lx\n", val);
+ debug("DDR0_22=0x%08x\n", val);
/* -----------------------------------------------------------+
* Set 'dll_dqs_delay_X'.
@@ -337,7 +337,7 @@ void denali_core_search_data_eye(void)
val = (mfdcr(ddrcfgd) & ~DDR0_17_DLL_DQS_DELAY_0_MASK)
| DDR0_17_DLL_DQS_DELAY_0_ENCODE(dll_dqs_delay_X);
mtdcr(ddrcfgd, val);
- debug("DDR0_17=0x%08lx\n", val);
+ debug("DDR0_17=0x%08x\n", val);
/* dll_dqs_delay_1 to dll_dqs_delay_4 */
mtdcr(ddrcfga, DDR0_18);
@@ -347,7 +347,7 @@ void denali_core_search_data_eye(void)
| DDR0_18_DLL_DQS_DELAY_2_ENCODE(dll_dqs_delay_X)
| DDR0_18_DLL_DQS_DELAY_1_ENCODE(dll_dqs_delay_X);
mtdcr(ddrcfgd, val);
- debug("DDR0_18=0x%08lx\n", val);
+ debug("DDR0_18=0x%08x\n", val);
/* dll_dqs_delay_5 to dll_dqs_delay_8 */
mtdcr(ddrcfga, DDR0_19);
@@ -357,7 +357,7 @@ void denali_core_search_data_eye(void)
| DDR0_19_DLL_DQS_DELAY_6_ENCODE(dll_dqs_delay_X)
| DDR0_19_DLL_DQS_DELAY_5_ENCODE(dll_dqs_delay_X);
mtdcr(ddrcfgd, val);
- debug("DDR0_19=0x%08lx\n", val);
+ debug("DDR0_19=0x%08x\n", val);
/* -----------------------------------------------------------+
* Assert 'start' parameter.
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 12/39] GCC4.6: Squash warnings in denali_spd_ddr2.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (10 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 11/39] GCC4.6: Squash warnings in denali_data_eye.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 13/39] GCC4.6: Squash warnings in diu.c Marek Vasut
` (28 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
denali_spd_ddr2.c: In function 'get_spd_info':
denali_spd_ddr2.c:363: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c: In function 'check_frequency':
denali_spd_ddr2.c:390: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c: In function 'get_dimm_size':
denali_spd_ddr2.c:473: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:474: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:475: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:476: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c: In function 'program_ddr0_03':
denali_spd_ddr2.c:571: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:604: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:604: warning: format '%d' expects type 'int', but argument 3
has type 'long unsigned int'
denali_spd_ddr2.c:643: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:644: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:645: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:646: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:676: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c: In function 'program_ddr0_04':
denali_spd_ddr2.c:731: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:733: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:735: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c: In function 'program_ddr0_05':
denali_spd_ddr2.c:772: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:774: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c: In function 'program_ddr0_06':
denali_spd_ddr2.c:831: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:833: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c: In function 'program_ddr0_11':
denali_spd_ddr2.c:860: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c: In function 'program_ddr0_26':
denali_spd_ddr2.c:931: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c:933: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c: In function 'program_ddr0_27':
denali_spd_ddr2.c:944: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c: In function 'program_ddr0_43':
denali_spd_ddr2.c:978: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
denali_spd_ddr2.c: In function 'program_ddr0_44':
denali_spd_ddr2.c:1006: warning: format '%d' expects type 'int', but argument 2
has type 'long unsigned int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c | 52 ++++++++++++++--------------
1 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c b/arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c
index c35b113..ce769a7 100644
--- a/arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c
+++ b/arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c
@@ -360,7 +360,7 @@ static void get_spd_info(unsigned long dimm_ranks[],
printf("Install at least one DDR2 DIMM.\n\n");
spd_ddr_init_hang();
}
- debug("Total number of ranks = %d\n", *ranks);
+ debug("Total number of ranks = %ld\n", *ranks);
}
/*------------------------------------------------------------------
@@ -387,7 +387,7 @@ static void check_frequency(unsigned long *dimm_ranks,
if (dimm_ranks[dimm_num]) {
cycle_time =
get_tcyc(spd_read(iic0_dimm_addr[dimm_num], 9));
- debug("cycle_time=%d ps\n", cycle_time);
+ debug("cycle_time=%ld ps\n", cycle_time);
if (cycle_time > (calc_cycle_time + 10)) {
/*
@@ -470,10 +470,10 @@ static void get_dimm_size(unsigned long dimm_ranks[],
}
}
}
- debug("Number of rows = %d\n", *rows);
- debug("Number of columns = %d\n", *cols);
- debug("Number of banks = %d\n", *banks);
- debug("Data width = %d\n", *width);
+ debug("Number of rows = %ld\n", *rows);
+ debug("Number of columns = %ld\n", *cols);
+ debug("Number of banks = %ld\n", *banks);
+ debug("Data width = %ld\n", *width);
if (*rows > 14) {
printf("ERROR: DRAM DIMM modules have %lu address rows.\n",
*rows);
@@ -568,7 +568,7 @@ static void program_ddr0_03(unsigned long dimm_ranks[],
/*------------------------------------------------------------------
* Get the board configuration info.
*-----------------------------------------------------------------*/
- debug("sdram_freq = %d\n", sdram_freq);
+ debug("sdram_freq = %ld\n", sdram_freq);
/*------------------------------------------------------------------
* Handle the timing. We need to find the worst case timing of all
@@ -601,7 +601,7 @@ static void program_ddr0_03(unsigned long dimm_ranks[],
get_tcyc(spd_read(iic0_dimm_addr[dimm_num],
tcyc_addr[cas_index]));
- debug("cas_index = %d: cycle_time_ps = %d\n",
+ debug("cas_index = %ld: cycle_time_ps = %ld\n",
cas_index, cycle_time_ps);
/*
* DDR2 devices use the following bitmask for CAS latency:
@@ -640,10 +640,10 @@ static void program_ddr0_03(unsigned long dimm_ranks[],
cycle_3_0_clk = MULDIV64(ONE_BILLION, 1000, max_3_0_tcyc_ps) + 10;
cycle_4_0_clk = MULDIV64(ONE_BILLION, 1000, max_4_0_tcyc_ps) + 10;
cycle_5_0_clk = MULDIV64(ONE_BILLION, 1000, max_5_0_tcyc_ps) + 10;
- debug("cycle_2_0_clk = %d\n", cycle_2_0_clk);
- debug("cycle_3_0_clk = %d\n", cycle_3_0_clk);
- debug("cycle_4_0_clk = %d\n", cycle_4_0_clk);
- debug("cycle_5_0_clk = %d\n", cycle_5_0_clk);
+ debug("cycle_2_0_clk = %ld\n", cycle_2_0_clk);
+ debug("cycle_3_0_clk = %ld\n", cycle_3_0_clk);
+ debug("cycle_4_0_clk = %ld\n", cycle_4_0_clk);
+ debug("cycle_5_0_clk = %ld\n", cycle_5_0_clk);
if ((cas_available & 0x04) && (sdram_freq <= cycle_2_0_clk)) {
*cas_latency = 2;
@@ -673,7 +673,7 @@ static void program_ddr0_03(unsigned long dimm_ranks[],
cycle_3_0_clk, cycle_4_0_clk, cycle_5_0_clk);
spd_ddr_init_hang();
}
- debug("CAS latency = %d\n", *cas_latency);
+ debug("CAS latency = %ld\n", *cas_latency);
mtsdram(DDR0_03, ddr0_03);
}
@@ -728,11 +728,11 @@ static void program_ddr0_04(unsigned long dimm_ranks[],
t_rtp_ps = max(t_rtp_ps, ps);
}
}
- debug("t_rc_ps = %d\n", t_rc_ps);
+ debug("t_rc_ps = %ld\n", t_rc_ps);
t_rc_clk = (MULDIV64(sdram_freq, t_rc_ps, ONE_BILLION) + 999) / 1000;
- debug("t_rrd_ps = %d\n", t_rrd_ps);
+ debug("t_rrd_ps = %ld\n", t_rrd_ps);
t_rrd_clk = (MULDIV64(sdram_freq, t_rrd_ps, ONE_BILLION) + 999) / 1000;
- debug("t_rtp_ps = %d\n", t_rtp_ps);
+ debug("t_rtp_ps = %ld\n", t_rtp_ps);
t_rtp_clk = (MULDIV64(sdram_freq, t_rtp_ps, ONE_BILLION) + 999) / 1000;
mtsdram(DDR0_04, DDR0_04_TRC_ENCODE(t_rc_clk) |
DDR0_04_TRRD_ENCODE(t_rrd_clk) |
@@ -769,9 +769,9 @@ static void program_ddr0_05(unsigned long dimm_ranks[],
t_ras_ps = max(t_ras_ps, ps);
}
}
- debug("t_rp_ps = %d\n", t_rp_ps);
+ debug("t_rp_ps = %ld\n", t_rp_ps);
t_rp_clk = (MULDIV64(sdram_freq, t_rp_ps, ONE_BILLION) + 999) / 1000;
- debug("t_ras_ps = %d\n", t_ras_ps);
+ debug("t_ras_ps = %ld\n", t_ras_ps);
t_ras_clk = (MULDIV64(sdram_freq, t_ras_ps, ONE_BILLION) + 999) / 1000;
mtsdram(DDR0_05, ddr0_05 | DDR0_05_TRP_ENCODE(t_rp_clk) |
DDR0_05_TRAS_MIN_ENCODE(t_ras_clk));
@@ -828,9 +828,9 @@ static void program_ddr0_06(unsigned long dimm_ranks[],
t_rfc_ps = max(t_rfc_ps, ps);
}
}
- debug("t_wtr_ps = %d\n", t_wtr_ps);
+ debug("t_wtr_ps = %ld\n", t_wtr_ps);
t_wtr_clk = (MULDIV64(sdram_freq, t_wtr_ps, ONE_BILLION) + 999) / 1000;
- debug("t_rfc_ps = %d\n", t_rfc_ps);
+ debug("t_rfc_ps = %ld\n", t_rfc_ps);
t_rfc_clk = (MULDIV64(sdram_freq, t_rfc_ps, ONE_BILLION) + 999) / 1000;
mtsdram(DDR0_06, ddr0_06 | DDR0_06_TWTR_ENCODE(t_wtr_clk) |
DDR0_06_TRFC_ENCODE(t_rfc_clk));
@@ -857,7 +857,7 @@ static void program_ddr0_11(unsigned long sdram_freq)
unsigned long const t_xsnr_ps = 200000; /* 200 ns */
unsigned long t_xsnr_clk;
- debug("t_xsnr_ps = %d\n", t_xsnr_ps);
+ debug("t_xsnr_ps = %ld\n", t_xsnr_ps);
t_xsnr_clk =
(MULDIV64(sdram_freq, t_xsnr_ps, ONE_BILLION) + 999) / 1000;
mtsdram(DDR0_11, DDR0_11_SREFRESH_ENCODE(0) |
@@ -928,9 +928,9 @@ static void program_ddr0_26(unsigned long sdram_freq)
unsigned long t_ref_clk;
/* Round down t_ras_max_clk and t_ref_clk */
- debug("t_ras_max_ps = %d\n", t_ras_max_ps);
+ debug("t_ras_max_ps = %ld\n", t_ras_max_ps);
t_ras_max_clk = MULDIV64(sdram_freq, t_ras_max_ps, ONE_BILLION) / 1000;
- debug("t_ref_ps = %d\n", t_ref_ps);
+ debug("t_ref_ps = %ld\n", t_ref_ps);
t_ref_clk = MULDIV64(sdram_freq, t_ref_ps, ONE_BILLION) / 1000;
mtsdram(DDR0_26, DDR0_26_TRAS_MAX_ENCODE(t_ras_max_clk) |
DDR0_26_TREF_ENCODE(t_ref_clk));
@@ -941,7 +941,7 @@ static void program_ddr0_27(unsigned long sdram_freq)
unsigned long const t_init_ps = 200000000; /* 200 us. init */
unsigned long t_init_clk;
- debug("t_init_ps = %d\n", t_init_ps);
+ debug("t_init_ps = %ld\n", t_init_ps);
t_init_clk =
(MULDIV64(sdram_freq, t_init_ps, ONE_BILLION) + 999) / 1000;
mtsdram(DDR0_27, DDR0_27_EMRS_DATA_ENCODE(0x0000) |
@@ -975,7 +975,7 @@ static void program_ddr0_43(unsigned long dimm_ranks[],
t_wr_ps = max(t_wr_ps, ps);
}
}
- debug("t_wr_ps = %d\n", t_wr_ps);
+ debug("t_wr_ps = %ld\n", t_wr_ps);
t_wr_clk = (MULDIV64(sdram_freq, t_wr_ps, ONE_BILLION) + 999) / 1000;
mtsdram(DDR0_43, ddr0_43 | DDR0_43_TWR_ENCODE(t_wr_clk));
}
@@ -1003,7 +1003,7 @@ static void program_ddr0_44(unsigned long dimm_ranks[],
t_rcd_ps = max(t_rcd_ps, ps);
}
}
- debug("t_rcd_ps = %d\n", t_rcd_ps);
+ debug("t_rcd_ps = %ld\n", t_rcd_ps);
t_rcd_clk = (MULDIV64(sdram_freq, t_rcd_ps, ONE_BILLION) + 999) / 1000;
mtsdram(DDR0_44, DDR0_44_TRCD_ENCODE(t_rcd_clk));
}
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 13/39] GCC4.6: Squash warnings in diu.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (11 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 12/39] GCC4.6: Squash warnings in denali_spd_ddr2.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 14/39] GCC4.6: Squash warnings in mpc8610hpcd.c Marek Vasut
` (27 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
diu.c: In function 'diu_set_pixel_clock':
diu.c:77: warning: format '%lu' expects type 'long unsigned int', but argument 2
has type 'u32'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
board/freescale/p1022ds/diu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/board/freescale/p1022ds/diu.c b/board/freescale/p1022ds/diu.c
index cef81ce..d5428ea 100644
--- a/board/freescale/p1022ds/diu.c
+++ b/board/freescale/p1022ds/diu.c
@@ -74,7 +74,7 @@ void diu_set_pixel_clock(unsigned int pixclock)
temp = 1000000000 / pixclock;
temp *= 1000;
pixval = speed_ccb / temp;
- debug("DIU pixval = %lu\n", pixval);
+ debug("DIU pixval = %u\n", pixval);
/* Modify PXCLK in GUTS CLKDVDR */
temp = in_be32(&gur->clkdvdr) & 0x2000FFFF;
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 14/39] GCC4.6: Squash warnings in mpc8610hpcd.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (12 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 13/39] GCC4.6: Squash warnings in diu.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 15/39] GCC4.6: Squash warnings in tqm834x.c Marek Vasut
` (26 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
mpc8610hpcd.c: In function 'misc_init_r':
mpc8610hpcd.c:79: warning: format '%02lx' expects type 'long unsigned int', but
argument 2 has type 'int'
mpc8610hpcd.c:86: warning: format '%02lx' expects type 'long unsigned int', but
argument 2 has type 'int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
board/freescale/mpc8610hpcd/mpc8610hpcd.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
index 1854e27..5b3b560 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
@@ -76,14 +76,14 @@ int misc_init_r(void)
/* Verify if enabled */
tmp_val = 0;
i2c_read(0x38, 0x08, 1, &tmp_val, sizeof(tmp_val));
- debug("DVI Encoder Read: 0x%02lx\n",tmp_val);
+ debug("DVI Encoder Read: 0x%02x\n", tmp_val);
tmp_val = 0x10;
i2c_write(0x38, 0x0A, 1, &tmp_val, sizeof(tmp_val));
/* Verify if enabled */
tmp_val = 0;
i2c_read(0x38, 0x0A, 1, &tmp_val, sizeof(tmp_val));
- debug("DVI Encoder Read: 0x%02lx\n",tmp_val);
+ debug("DVI Encoder Read: 0x%02x\n", tmp_val);
return 0;
}
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 15/39] GCC4.6: Squash warnings in tqm834x.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (13 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 14/39] GCC4.6: Squash warnings in mpc8610hpcd.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 16/39] GCC4.6: Squash warning in jedec_flash.c Marek Vasut
` (25 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
tqm834x.c: In function 'initdram':
tqm834x.c:126: warning: format '%d' expects type 'int', but argument 3 has type
'long int'
tqm834x.c: In function 'set_cs_bounds':
tqm834x.c:336: warning: format '%08x' expects type 'unsigned int', but argument
2 has type 'long int'
tqm834x.c:336: warning: format '%08x' expects type 'unsigned int', but argument
3 has type 'long int'
tqm834x.c: In function 'set_cs_config':
tqm834x.c:354: warning: format '%08x' expects type 'unsigned int', but argument
2 has type 'long int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
board/tqc/tqm834x/tqm834x.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/board/tqc/tqm834x/tqm834x.c b/board/tqc/tqm834x/tqm834x.c
index 260e392..7af8b4c 100644
--- a/board/tqc/tqm834x/tqm834x.c
+++ b/board/tqc/tqm834x/tqm834x.c
@@ -123,7 +123,7 @@ phys_size_t initdram (int board_type)
(long *)(CONFIG_SYS_DDR_BASE + size));
size += bank_size;
- debug("DDR Bank%d size: %d MiB\n\n", cs, bank_size >> 20);
+ debug("DDR Bank%d size: %ld MiB\n\n", cs, bank_size >> 20);
/* exit if less than one bank */
if(size < DDR_MAX_SIZE_PER_CS) break;
@@ -333,7 +333,7 @@ static long int get_ddr_bank_size(short cs, long *base)
*/
static void set_cs_bounds(short cs, long base, long size)
{
- debug("Setting bounds %08x, %08x for cs %d\n", base, size, cs);
+ debug("Setting bounds %08lx, %08lx for cs %d\n", base, size, cs);
if(size == 0){
im->ddr.csbnds[cs].csbnds = 0x00000000;
} else {
@@ -351,7 +351,7 @@ static void set_cs_bounds(short cs, long base, long size)
*/
static void set_cs_config(short cs, long config)
{
- debug("Setting config %08x for cs %d\n", config, cs);
+ debug("Setting config %08lx for cs %d\n", config, cs);
im->ddr.cs_config[cs] = config;
SYNC;
}
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 16/39] GCC4.6: Squash warning in jedec_flash.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (14 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 15/39] GCC4.6: Squash warnings in tqm834x.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 17/39] GCC4.6: Squash warnings in 44x_spd_ddr.c Marek Vasut
` (24 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
jedec_flash.c: In function 'fill_info':
jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but
argument 2 has type 'ulong'
jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but
argument 3 has type 'ulong'
jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 2 has
type 'ulong'
jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 3 has
type 'ulong'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Scott Wood <scottwood@freescale.com>
---
drivers/mtd/jedec_flash.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
index da8c9b1..36d30c3 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -390,7 +390,8 @@ static inline void fill_info(flash_info_t *info, const struct amd_flash_info *je
debug("unlock address index %d\n", uaddr_idx);
info->addr_unlock1 = unlock_addrs[uaddr_idx].addr1;
info->addr_unlock2 = unlock_addrs[uaddr_idx].addr2;
- debug("unlock addresses are 0x%x/0x%x\n", info->addr_unlock1, info->addr_unlock2);
+ debug("unlock addresses are 0x%lx/0x%lx\n",
+ info->addr_unlock1, info->addr_unlock2);
sect_cnt = 0;
total_size = 0;
@@ -399,7 +400,7 @@ static inline void fill_info(flash_info_t *info, const struct amd_flash_info *je
ulong erase_region_count = (jedec_entry->regions[i] & 0xff) + 1;
total_size += erase_region_size * erase_region_count;
- debug ("erase_region_count = %d erase_region_size = %d\n",
+ debug("erase_region_count = %ld erase_region_size = %ld\n",
erase_region_count, erase_region_size);
for (j = 0; j < erase_region_count; j++) {
if (sect_cnt >= CONFIG_SYS_MAX_FLASH_SECT) {
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 17/39] GCC4.6: Squash warnings in 44x_spd_ddr.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (15 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 16/39] GCC4.6: Squash warning in jedec_flash.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 18/39] GCC4.6: Squash warnings in 4xx_enet.c Marek Vasut
` (23 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
44x_spd_ddr.c: In function 'program_tr0':
44x_spd_ddr.c:823: warning: format '%x' expects type 'unsigned int', but
argument 2 has type 'long unsigned int'
44x_spd_ddr.c: In function 'program_tr1':
44x_spd_ddr.c:1054: warning: format '%x' expects type 'unsigned int', but
argument 2 has type 'long unsigned int'
44x_spd_ddr.c: In function 'program_bxcr':
44x_spd_ddr.c:1127: warning: format '%d' expects type 'int', but argument 2 has
type 'long unsigned int'
44x_spd_ddr.c:1196: warning: format '%d' expects type 'int', but argument 2 has
type 'long unsigned int'
44x_spd_ddr.c:1196: warning: format '%d' expects type 'int', but argument 3 has
type 'long unsigned int'
44x_spd_ddr.c:1196: warning: format '%d' expects type 'int', but argument 4 has
type 'long unsigned int'
44x_spd_ddr.c:1196: warning: format '%d' expects type 'int', but argument 5 has
type 'long unsigned int'
44x_spd_ddr.c:1242: warning: format '%d' expects type 'int', but argument 2 has
type 'long unsigned int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c b/arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c
index ec7291f..e05daf2 100644
--- a/arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c
+++ b/arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c
@@ -820,7 +820,7 @@ static void program_tr0(unsigned long *dimm_populated,
break;
}
- debug("tr0: %x\n", tr0);
+ debug("tr0: %lx\n", tr0);
mtsdram(SDRAM0_TR0, tr0);
}
@@ -1051,7 +1051,7 @@ static void program_tr1(void)
}
tr1 |= SDRAM_TR1_RDCT_ENCODE(rdclt_average);
- debug("tr1: %x\n", tr1);
+ debug("tr1: %lx\n", tr1);
/*
* program SDRAM Timing Register 1 TR1
@@ -1124,7 +1124,7 @@ static unsigned long program_bxcr(unsigned long *dimm_populated,
num_col_addr = spd_read(iic0_dimm_addr[dimm_num], 4);
num_banks = spd_read(iic0_dimm_addr[dimm_num], 5);
bank_size_id = spd_read(iic0_dimm_addr[dimm_num], 31);
- debug("DIMM%d: row=%d col=%d banks=%d\n", dimm_num,
+ debug("DIMM%ld: row=%d col=%d banks=%d\n", dimm_num,
num_row_addr, num_col_addr, num_banks);
/*
@@ -1193,9 +1193,11 @@ static unsigned long program_bxcr(unsigned long *dimm_populated,
bank_parms[ctrl_bank_num[dimm_num]+i].bank_size_bytes =
(4 << 20) * bank_size_id;
bank_parms[ctrl_bank_num[dimm_num]+i].cr = cr;
- debug("DIMM%d-bank %d (SDRAM0_B%dCR): bank_size_bytes=%d\n",
- dimm_num, i, ctrl_bank_num[dimm_num]+i,
- bank_parms[ctrl_bank_num[dimm_num]+i].bank_size_bytes);
+ debug("DIMM%ld-bank %ld (SDRAM0_B%ldCR): "
+ "bank_size_bytes=%ld\n",
+ dimm_num, i,
+ ctrl_bank_num[dimm_num] + i,
+ bank_parms[ctrl_bank_num[dimm_num] + i].bank_size_bytes);
}
}
}
@@ -1239,7 +1241,8 @@ static unsigned long program_bxcr(unsigned long *dimm_populated,
bank_parms[sorted_bank_num[bx_cr_num]].cr;
mtdcr(SDRAM0_CFGDATA, temp);
bank_base_addr += bank_parms[sorted_bank_num[bx_cr_num]].bank_size_bytes;
- debug("SDRAM0_B%dCR=0x%08lx\n", sorted_bank_num[bx_cr_num], temp);
+ debug("SDRAM0_B%ldCR=0x%08lx\n",
+ sorted_bank_num[bx_cr_num], temp);
}
}
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 18/39] GCC4.6: Squash warnings in 4xx_enet.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (16 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 17/39] GCC4.6: Squash warnings in 44x_spd_ddr.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 19/39] GCC4.6: Squash warnings in 4xx_ibm_ddr2_autocalib.c Marek Vasut
` (22 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
4xx_enet.c: In function 'ppc_4xx_eth_init':
4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'volatile struct mal_desc_t *'
4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
argument 3 has type 'volatile struct mal_desc_t *'
4xx_enet.c:1365: warning: format '%08lx' expects type 'long unsigned int', but
argument 3 has type 'unsigned int'
4xx_enet.c:1376: warning: format '%08lx' expects type 'long unsigned int', but
argument 3 has type 'unsigned int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
drivers/net/4xx_enet.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c
index 9ab5c80..8013ad9 100644
--- a/drivers/net/4xx_enet.c
+++ b/drivers/net/4xx_enet.c
@@ -1349,7 +1349,7 @@ get_speed:
hw_p->rx_phys = bd_cached + MAL_TX_DESC_SIZE;
hw_p->tx = (mal_desc_t *)(bd_uncached);
hw_p->rx = (mal_desc_t *)(bd_uncached + MAL_TX_DESC_SIZE);
- debug("hw_p->tx=%08x, hw_p->rx=%08x\n", hw_p->tx, hw_p->rx);
+ debug("hw_p->tx=%p, hw_p->rx=%p\n", hw_p->tx, hw_p->rx);
}
for (i = 0; i < NUM_TX_BUFF; i++) {
@@ -1362,7 +1362,7 @@ get_speed:
if ((NUM_TX_BUFF - 1) == i)
hw_p->tx[i].ctrl |= MAL_TX_CTRL_WRAP;
hw_p->tx_run[i] = -1;
- debug("TX_BUFF %d @ 0x%08lx\n", i, (u32)hw_p->tx[i].data_ptr);
+ debug("TX_BUFF %d @ 0x%08x\n", i, (u32)hw_p->tx[i].data_ptr);
}
for (i = 0; i < NUM_RX_BUFF; i++) {
@@ -1373,7 +1373,7 @@ get_speed:
hw_p->rx[i].ctrl |= MAL_RX_CTRL_WRAP;
hw_p->rx[i].ctrl |= MAL_RX_CTRL_EMPTY | MAL_RX_CTRL_INTR;
hw_p->rx_ready[i] = -1;
- debug("RX_BUFF %d @ 0x%08lx\n", i, (u32)hw_p->rx[i].data_ptr);
+ debug("RX_BUFF %d @ 0x%08x\n", i, (u32)hw_p->rx[i].data_ptr);
}
reg = 0x00000000;
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 19/39] GCC4.6: Squash warnings in 4xx_ibm_ddr2_autocalib.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (17 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 18/39] GCC4.6: Squash warnings in 4xx_enet.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 20/39] GCC4.6: Squash warnings in 4xx_pcie.c Marek Vasut
` (21 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
4xx_ibm_ddr2_autocalib.c: In function 'DQS_calibration_methodB':
4xx_ibm_ddr2_autocalib.c:910: warning: format '%08X' expects type 'unsigned
int', but argument 2 has type 'ulong'
4xx_ibm_ddr2_autocalib.c:911: warning: format '%08X' expects type 'unsigned
int', but argument 2 has type 'ulong'
4xx_ibm_ddr2_autocalib.c: In function 'DQS_autocalibration':
4xx_ibm_ddr2_autocalib.c:1217: warning: format '%08x' expects type 'unsigned
int', but argument 2 has type 'ulong'
4xx_ibm_ddr2_autocalib.c:1230: warning: format '%08x' expects type 'unsigned
int', but argument 2 has type 'ulong'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c b/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
index b909fca..4b8e65a 100644
--- a/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
+++ b/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
@@ -907,8 +907,8 @@ static u32 DQS_calibration_methodB(struct ddrautocal *cal)
mtsdram(SDRAM_RQDC, rqdc_reg);
mtsdram(SDRAM_RFDC, rfdc_reg);
- debug("RQDC: 0x%08X\n", rqdc_reg);
- debug("RFDC: 0x%08X\n", rfdc_reg);
+ debug("RQDC: 0x%08lX\n", rqdc_reg);
+ debug("RFDC: 0x%08lX\n", rfdc_reg);
/* if something passed, then return the size of the largest window */
if (passed != 0) {
@@ -1214,7 +1214,7 @@ u32 DQS_autocalibration(void)
SDRAM_RQDC_RQFD_ENCODE(tcal.autocal.rqfd));
mfsdram(SDRAM_RQDC, rqdc_reg);
- debug("*** best_result: read value SDRAM_RQDC 0x%08x\n",
+ debug("*** best_result: read value SDRAM_RQDC 0x%08lx\n",
rqdc_reg);
#if defined(CONFIG_DDR_RFDC_FIXED)
@@ -1227,7 +1227,7 @@ u32 DQS_autocalibration(void)
#endif /* CONFIG_DDR_RFDC_FIXED */
mfsdram(SDRAM_RFDC, rfdc_reg);
- debug("*** best_result: read value SDRAM_RFDC 0x%08x\n",
+ debug("*** best_result: read value SDRAM_RFDC 0x%08lx\n",
rfdc_reg);
mfsdram(SDRAM_RDCC, val);
debug("*** SDRAM_RDCC 0x%08x\n", val);
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 20/39] GCC4.6: Squash warnings in 4xx_pcie.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (18 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 19/39] GCC4.6: Squash warnings in 4xx_ibm_ddr2_autocalib.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 21/39] GCC4.6: Squash warnings in ahci.c Marek Vasut
` (20 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
4xx_pcie.c: In function 'pcie_read_config':
4xx_pcie.c:268: warning: format '%08x' expects type 'unsigned int', but argument
3 has type 'volatile unsigned char *'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
arch/powerpc/cpu/ppc4xx/4xx_pcie.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/cpu/ppc4xx/4xx_pcie.c b/arch/powerpc/cpu/ppc4xx/4xx_pcie.c
index b76890e..a87e93b 100644
--- a/arch/powerpc/cpu/ppc4xx/4xx_pcie.c
+++ b/arch/powerpc/cpu/ppc4xx/4xx_pcie.c
@@ -265,7 +265,8 @@ static int pcie_read_config(struct pci_controller *hose, unsigned int devfn,
*/
pcie_dmer_disable ();
- debug("%s: cfg_data=%08x offset=%08x\n", __func__, hose->cfg_data, offset);
+ debug("%s: cfg_data=%p offset=%08x\n", __func__,
+ hose->cfg_data, offset);
switch (len) {
case 1:
*val = in_8(hose->cfg_data + offset);
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 21/39] GCC4.6: Squash warnings in ahci.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (19 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 20/39] GCC4.6: Squash warnings in 4xx_pcie.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 22/39] GCC4.6: Squash warning in cmd_pmc440.c Marek Vasut
` (19 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
ahci.c: In function 'ahci_port_start':
ahci.c:401: warning: format '%x' expects type 'unsigned int', but argument 2 has
type 'struct ahci_cmd_hdr *'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
drivers/block/ahci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index 64f52bb..015b341 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -398,7 +398,7 @@ static int ahci_port_start(u8 port)
* 32 bytes each in size
*/
pp->cmd_slot = (struct ahci_cmd_hdr *)mem;
- debug("cmd_slot = 0x%x\n", pp->cmd_slot);
+ debug("cmd_slot = %p\n", pp->cmd_slot);
mem += (AHCI_CMD_SLOT_SZ + 224);
/*
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 22/39] GCC4.6: Squash warning in cmd_pmc440.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (20 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 21/39] GCC4.6: Squash warnings in ahci.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 23/39] GCC4.6: Use dst instead of l2srbar in cpu_early_init.c Marek Vasut
` (18 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
cmd_pmc440.c: In function 'do_painit':
cmd_pmc440.c:371: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'phys_size_t'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
board/esd/pmc440/cmd_pmc440.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/board/esd/pmc440/cmd_pmc440.c b/board/esd/pmc440/cmd_pmc440.c
index 200d7ee..0202876 100644
--- a/board/esd/pmc440/cmd_pmc440.c
+++ b/board/esd/pmc440/cmd_pmc440.c
@@ -368,7 +368,7 @@ int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
*/
param = base - (pram << 10);
printf("PARAM: @%08x\n", param);
- debug("memsize=0x%08x, base=0x%08x\n", gd->bd->bi_memsize, base);
+ debug("memsize=0x%08x, base=0x%08x\n", (u32)gd->bd->bi_memsize, base);
/* clear entire PA ram */
memset((void*)param, 0, (pram << 10));
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 23/39] GCC4.6: Use dst instead of l2srbar in cpu_early_init.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (21 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 22/39] GCC4.6: Squash warning in cmd_pmc440.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 24/39] GCC4.6: Squash warnings in ddr[123]_dimm_params.c Marek Vasut
` (17 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
cpu_init_early.c: In function 'cpu_init_early_f':
cpu_init_early.c:74: warning: 'l2srbar' may be used uninitialized in this
function
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
arch/powerpc/cpu/mpc85xx/cpu_init_early.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
index 4ef3c9a..091af7c 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -71,7 +71,7 @@ void cpu_init_early_f(void)
#endif
#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && !defined(CONFIG_SYS_RAMBOOT)
ccsr_l2cache_t *l2cache = (void *)CONFIG_SYS_MPC85xx_L2_ADDR;
- u32 *l2srbar, *dst, *src;
+ u32 *dst, *src;
void (*setup_ifc_sram)(void);
#endif
@@ -137,7 +137,7 @@ void cpu_init_early_f(void)
dst = (u32 *) SRAM_BASE_ADDR;
src = (u32 *) setup_ifc;
for (i = 0; i < 1024; i++)
- *l2srbar++ = *src++;
+ *dst++ = *src++;
setup_ifc_sram();
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 24/39] GCC4.6: Squash warnings in ddr[123]_dimm_params.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (22 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 23/39] GCC4.6: Use dst instead of l2srbar in cpu_early_init.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 25/39] GCC4.6: Squash warnings in fsl_espi.c Marek Vasut
` (16 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
ddr1_dimm_params.c: In function 'compute_ranksize':
ddr1_dimm_params.c:44: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'long long unsigned int'
ddr2_dimm_params.c: In function 'compute_ranksize':
ddr2_dimm_params.c:43: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'long long unsigned int'
ddr3_dimm_params.c: In function 'compute_ranksize':
ddr3_dimm_params.c:74: warning: format '%16lx' expects type 'long unsigned int',
but argument 2 has type 'long long unsigned int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
arch/powerpc/cpu/mpc8xxx/ddr/ddr1_dimm_params.c | 2 +-
arch/powerpc/cpu/mpc8xxx/ddr/ddr2_dimm_params.c | 2 +-
arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/ddr1_dimm_params.c b/arch/powerpc/cpu/mpc8xxx/ddr/ddr1_dimm_params.c
index 9184764..376be2f 100644
--- a/arch/powerpc/cpu/mpc8xxx/ddr/ddr1_dimm_params.c
+++ b/arch/powerpc/cpu/mpc8xxx/ddr/ddr1_dimm_params.c
@@ -41,7 +41,7 @@ compute_ranksize(unsigned int mem_type, unsigned char row_dens)
/* Bottom 2 bits up to the top. */
bsize = ((row_dens >> 2) | ((row_dens & 3) << 6));
bsize <<= 24ULL;
- debug("DDR: DDR I rank density = 0x%08x\n", bsize);
+ debug("DDR: DDR I rank density = 0x%16llx\n", bsize);
return bsize;
}
diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/ddr2_dimm_params.c b/arch/powerpc/cpu/mpc8xxx/ddr/ddr2_dimm_params.c
index b565e33..f637f3d 100644
--- a/arch/powerpc/cpu/mpc8xxx/ddr/ddr2_dimm_params.c
+++ b/arch/powerpc/cpu/mpc8xxx/ddr/ddr2_dimm_params.c
@@ -40,7 +40,7 @@ compute_ranksize(unsigned int mem_type, unsigned char row_dens)
/* Bottom 5 bits up to the top. */
bsize = ((row_dens >> 5) | ((row_dens & 31) << 3));
bsize <<= 27ULL;
- debug("DDR: DDR II rank density = 0x%08x\n", bsize);
+ debug("DDR: DDR II rank density = 0x%16llx\n", bsize);
return bsize;
}
diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c b/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c
index 838cebe..ffb503a 100644
--- a/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c
+++ b/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c
@@ -71,7 +71,7 @@ compute_ranksize(const ddr3_spd_eeprom_t *spd)
bsize = 1ULL << (nbit_sdram_cap_bsize - 3
+ nbit_primary_bus_width - nbit_sdram_width);
- debug("DDR: DDR III rank density = 0x%16lx\n", bsize);
+ debug("DDR: DDR III rank density = 0x%16llx\n", bsize);
return bsize;
}
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 25/39] GCC4.6: Squash warnings in fsl_espi.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (23 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 24/39] GCC4.6: Squash warnings in ddr[123]_dimm_params.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 26/39] GCC4.6: Squash warnings in fsl_pci_init.c Marek Vasut
` (15 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
fsl_espi.c: In function 'spi_setup_slave':
fsl_espi.c:100: warning: format '%d' expects type 'int', but argument 3 has type
'long unsigned int'
fsl_espi.c: In function 'spi_xfer':
fsl_espi.c:237: warning: format '%08x' expects type 'unsigned int', but argument
5 has type 'const void *'
fsl_espi.c:237: warning: format '%08x' expects type 'unsigned int', but argument
7 has type 'void *'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
drivers/spi/fsl_espi.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index f872cd8..a1ebd33 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -97,8 +97,8 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
pm = spibrg / (max_hz * 16 * 2);
if (pm > 16) {
pm = 16;
- debug("Requested speed is too low: %d Hz, "
- "%d Hz is used.\n", max_hz, spibrg / (32 * 16));
+ debug("Requested speed is too low: %d Hz, %ld Hz "
+ "is used.\n", max_hz, spibrg / (32 * 16));
}
} else
pm = spibrg / (max_hz * 2);
@@ -234,7 +234,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *data_out,
break;
}
- debug("spi_xfer: slave %u:%u dout %08X(%08x) din %08X(%08x) len %u\n",
+ debug("spi_xfer: slave %u:%u dout %08X(%p) din %08X(%p) len %u\n",
slave->bus, slave->cs, *(uint *) dout,
dout, *(uint *) din, din, len);
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 26/39] GCC4.6: Squash warnings in fsl_pci_init.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (24 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 25/39] GCC4.6: Squash warnings in fsl_espi.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 27/39] GCC4.6: Squash warnings in pmc405de.c Marek Vasut
` (14 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
fsl_pci_init.c: In function 'fsl_pci_init':
fsl_pci_init.c:308: warning: format '%08x' expects type 'unsigned int', but
argument 6 has type 'long unsigned int'
fsl_pci_init.c:347: warning: format '%x' expects type 'unsigned int', but
argument 2 has type 'volatile u32 *'
fsl_pci_init.c: In function 'fsl_pci_init':
fsl_pci_init.c:308: warning: format '%016llx' expects type 'long long unsigned
int', but argument 4 has type 'pci_addr_t'
fsl_pci_init.c:308: warning: format '%016llx' expects type 'long long unsigned
int', but argument 5 has type 'pci_size_t'
fsl_pci_init.c:308: warning: format '%08x' expects type 'unsigned int', but
argument 6 has type 'long unsigned int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
drivers/pci/fsl_pci_init.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index 7f601d4..bff1314 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -305,10 +305,10 @@ void fsl_pci_init(struct pci_controller *hose, struct fsl_pci_info *pci_info)
inbound = fsl_pci_setup_inbound_windows(hose, out_lo, pcie_cap, pi);
for (r = 0; r < hose->region_count; r++)
- debug("PCI reg:%d %016llx:%016llx %016llx %08x\n", r,
+ debug("PCI reg:%d %016llx:%016llx %016llx %08lx\n", r,
(u64)hose->regions[r].phys_start,
- hose->regions[r].bus_start,
- hose->regions[r].size,
+ (u64)hose->regions[r].bus_start,
+ (u64)hose->regions[r].size,
hose->regions[r].flags);
pci_register_hose(hose);
@@ -344,7 +344,7 @@ void fsl_pci_init(struct pci_controller *hose, struct fsl_pci_info *pci_info)
setbits_be32(&pci->pdb_stat, 0x08000000);
(void) in_be32(&pci->pdb_stat);
udelay(100);
- debug(" Asserting PCIe reset @%x = %x\n",
+ debug(" Asserting PCIe reset @%p = %x\n",
&pci->pdb_stat, in_be32(&pci->pdb_stat));
/* clear PCIe reset */
clrbits_be32(&pci->pdb_stat, 0x08000000);
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 27/39] GCC4.6: Squash warnings in pmc405de.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (25 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 26/39] GCC4.6: Squash warnings in fsl_pci_init.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 28/39] GCC4.6: Squash warnings in sata_sil3114.c Marek Vasut
` (13 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
pmc405de.c: In function 'do_painit':
pmc405de.c:444: warning: format '%08x' expects type 'unsigned int', but argument
2 has type 'phys_size_t'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
board/esd/pmc405de/pmc405de.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/board/esd/pmc405de/pmc405de.c b/board/esd/pmc405de/pmc405de.c
index c266ebe..a60809a 100644
--- a/board/esd/pmc405de/pmc405de.c
+++ b/board/esd/pmc405de/pmc405de.c
@@ -441,7 +441,7 @@ int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
*/
param = base - (pram << 10);
printf("PARAM: @%08x\n", param);
- debug("memsize=0x%08x, base=0x%08x\n", gd->bd->bi_memsize, base);
+ debug("memsize=0x%08x, base=0x%08x\n", (u32)gd->bd->bi_memsize, base);
/* clear entire PA ram */
memset((void*)param, 0, (pram << 10));
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 28/39] GCC4.6: Squash warnings in sata_sil3114.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (26 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 27/39] GCC4.6: Squash warnings in pmc405de.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 29/39] GCC4.6: Squash warnings in tqm8xx_pcmcia.c Marek Vasut
` (12 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
sata_sil3114.c: In function 'sata_identify':
sata_sil3114.c:174: warning: format '%x' expects type 'unsigned int', but
argument 2 has type 'lbaint_t'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
drivers/block/sata_sil3114.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/block/sata_sil3114.c b/drivers/block/sata_sil3114.c
index d43064e..1e60636 100644
--- a/drivers/block/sata_sil3114.c
+++ b/drivers/block/sata_sil3114.c
@@ -171,7 +171,7 @@ static void sata_identify (int num, int dev)
sata_dev_desc[devno].removable = 0;
sata_dev_desc[devno].lba = (u32) n_sectors;
- debug ("lba=0x%x\n", sata_dev_desc[devno].lba);
+ debug("lba=0x%lx\n", sata_dev_desc[devno].lba);
#ifdef CONFIG_LBA48
if (iobuf[83] & (1 << 10)) {
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 29/39] GCC4.6: Squash warnings in tqm8xx_pcmcia.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (27 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 28/39] GCC4.6: Squash warnings in sata_sil3114.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 30/39] GCC4.6: Squash undefined variable in cmd_mtdparts.c Marek Vasut
` (11 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
tqm8xx_pcmcia.c: In function 'power_off':
tqm8xx_pcmcia.c:46: warning: passing argument 1 of 'out_be32' makes pointer from
integer without a cast
tqm8xx_pcmcia.c: In function 'power_on_5_0':
tqm8xx_pcmcia.c:52: warning: passing argument 1 of 'out_be32' makes pointer from
integer without a cast
tqm8xx_pcmcia.c: In function 'power_on_3_3':
tqm8xx_pcmcia.c:58: warning: passing argument 1 of 'out_be32' makes pointer from
integer without a cast
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
drivers/pcmcia/tqm8xx_pcmcia.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/pcmcia/tqm8xx_pcmcia.c b/drivers/pcmcia/tqm8xx_pcmcia.c
index 859cbe0..dda7d37 100644
--- a/drivers/pcmcia/tqm8xx_pcmcia.c
+++ b/drivers/pcmcia/tqm8xx_pcmcia.c
@@ -43,19 +43,28 @@ static inline void power_config(int slot) {}
static inline void power_off(int slot)
{
- out_be32(PCMCIA_CTRL, 0);
+ volatile unsigned __iomem *addr;
+ addr = (volatile unsigned __iomem *)PCMCIA_CTRL;
+
+ out_be32(addr, 0);
}
static inline void power_on_5_0(int slot)
{
+ volatile unsigned __iomem *addr;
+ addr = (volatile unsigned __iomem *)PCMCIA_CTRL;
+
/* Enable 5V Vccout */
- out_be32(PCMCIA_CTRL, 2);
+ out_be32(addr, 2);
}
static inline void power_on_3_3(int slot)
{
+ volatile unsigned __iomem *addr;
+ addr = (volatile unsigned __iomem *)PCMCIA_CTRL;
+
/* Enable 3.3V Vccout */
- out_be32(PCMCIA_CTRL, 1);
+ out_be32(addr, 1);
}
#else
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 30/39] GCC4.6: Squash undefined variable in cmd_mtdparts.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (28 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 29/39] GCC4.6: Squash warnings in tqm8xx_pcmcia.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 31/39] GCC4.6: Squash warnings in serial_xuartlite.c Marek Vasut
` (10 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
common/cmd_mtdparts.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c
index 2c2e4e0..b7c833b 100644
--- a/common/cmd_mtdparts.c
+++ b/common/cmd_mtdparts.c
@@ -839,9 +839,7 @@ static int device_parse(const char *const mtd_dev, const char **ret, struct mtd_
const char *mtd_id;
unsigned int mtd_id_len;
const char *p;
-#ifdef DEBUG
const char *pend;
-#endif
LIST_HEAD(tmp_list);
struct list_head *entry, *n;
u16 num_parts;
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 31/39] GCC4.6: Squash warnings in serial_xuartlite.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (29 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 30/39] GCC4.6: Squash undefined variable in cmd_mtdparts.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 32/39] GCC4.6: Squash warnings in mpc86xx/interrupts.c Marek Vasut
` (9 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
serial_xuartlite.c: In function 'uartlite_serial_putc':
serial_xuartlite.c:60: warning: initialization discards qualifiers from pointer
target type
serial_xuartlite.c: In function 'uartlite_serial_getc':
serial_xuartlite.c:78: warning: initialization discards qualifiers from pointer
target type
serial_xuartlite.c: In function 'uartlite_serial_tstc':
serial_xuartlite.c:87: warning: initialization discards qualifiers from pointer
target type
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
drivers/serial/serial_xuartlite.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index 2dc6bd1..3a38f9e 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -40,7 +40,7 @@ struct uartlite {
unsigned int status;
};
-static const struct uartlite *userial_ports[4] = {
+static struct uartlite *userial_ports[4] = {
#ifdef XILINX_UARTLITE_BASEADDR
[0] = (struct uartlite *)XILINX_UARTLITE_BASEADDR,
#endif
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 32/39] GCC4.6: Squash warnings in mpc86xx/interrupts.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (30 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 31/39] GCC4.6: Squash warnings in serial_xuartlite.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 33/39] GCC4.6: Squash warnings in r360mpi/flash.c Marek Vasut
` (8 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
interrupts.c: In function 'interrupt_init_cpu':
interrupts.c:62: warning: format '%d' expects type 'int', but argument 2 has
type 'long unsigned int'
interrupts.c:69: warning: format '%x' expects type 'unsigned int', but argument
2 has type 'volatile uint *'
interrupts.c:72: warning: format '%x' expects type 'unsigned int', but argument
2 has type 'volatile uint *'
interrupts.c:75: warning: format '%x' expects type 'unsigned int', but argument
2 has type 'volatile uint *'
interrupts.c:79: warning: format '%x' expects type 'unsigned int', but argument
2 has type 'volatile uint *'
interrupts.c:83: warning: format '%x' expects type 'unsigned int', but argument
2 has type 'volatile uint *'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
arch/powerpc/cpu/mpc86xx/interrupts.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c
index 14821f4..aff1f6d 100644
--- a/arch/powerpc/cpu/mpc86xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc86xx/interrupts.c
@@ -59,28 +59,28 @@ int interrupt_init_cpu(unsigned long *decrementer_count)
pic->gcr = MPC86xx_PICGCR_MODE;
*decrementer_count = get_tbclk() / CONFIG_SYS_HZ;
- debug("interrupt init: tbclk() = %d MHz, decrementer_count = %ld\n",
+ debug("interrupt init: tbclk() = %ld MHz, decrementer_count = %ld\n",
(get_tbclk() / 1000000),
*decrementer_count);
#ifdef CONFIG_INTERRUPTS
pic->iivpr1 = 0x810001; /* 50220 enable mcm interrupts */
- debug("iivpr1@%x = %x\n", &pic->iivpr1, pic->iivpr1);
+ debug("iivpr1@%p = %x\n", &pic->iivpr1, pic->iivpr1);
pic->iivpr2 = 0x810002; /* 50240 enable ddr interrupts */
- debug("iivpr2@%x = %x\n", &pic->iivpr2, pic->iivpr2);
+ debug("iivpr2@%p = %x\n", &pic->iivpr2, pic->iivpr2);
pic->iivpr3 = 0x810003; /* 50260 enable lbc interrupts */
- debug("iivpr3@%x = %x\n", &pic->iivpr3, pic->iivpr3);
+ debug("iivpr3@%p = %x\n", &pic->iivpr3, pic->iivpr3);
#if defined(CONFIG_PCI1) || defined(CONFIG_PCIE1)
pic->iivpr8 = 0x810008; /* enable pcie1 interrupts */
- debug("iivpr8@%x = %x\n", &pic->iivpr8, pic->iivpr8);
+ debug("iivpr8@%p = %x\n", &pic->iivpr8, pic->iivpr8);
#endif
#if defined(CONFIG_PCI2) || defined(CONFIG_PCIE2)
pic->iivpr9 = 0x810009; /* enable pcie2 interrupts */
- debug("iivpr9@%x = %x\n", &pic->iivpr9, pic->iivpr9);
+ debug("iivpr9@%p = %x\n", &pic->iivpr9, pic->iivpr9);
#endif
pic->ctpr = 0; /* 40080 clear current task priority register */
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 33/39] GCC4.6: Squash warnings in r360mpi/flash.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (31 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 32/39] GCC4.6: Squash warnings in mpc86xx/interrupts.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 34/39] GCC4.6: Squash warnings in PPChameleonEVB/flash.c Marek Vasut
` (7 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
flash.c: In function 'flash_get_size':
flash.c:222: warning: format '%08lx' expects type 'long unsigned int', but
argument 3 has type 'int'
flash.c:238: warning: format '%08lx' expects type 'long unsigned int', but
argument 3 has type 'int'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
board/r360mpi/flash.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/r360mpi/flash.c b/board/r360mpi/flash.c
index 45cccf7..26ec11d 100644
--- a/board/r360mpi/flash.c
+++ b/board/r360mpi/flash.c
@@ -219,7 +219,7 @@ static ulong flash_get_size (FPW * addr, flash_info_t * info)
value = addr[0];
- debug ("Manuf. ID @ 0x%08lx: 0x%08lx\n", (ulong)addr, value);
+ debug("Manuf. ID @ 0x%08lx: 0x%08x\n", (ulong)addr, value);
switch (value) {
case (FPW) INTEL_MANUFACT:
@@ -235,7 +235,7 @@ static ulong flash_get_size (FPW * addr, flash_info_t * info)
value = addr[1]; /* device ID */
- debug ("Device ID @ 0x%08lx: 0x%08lx\n", (ulong)(&addr[1]), value);
+ debug("Device ID @ 0x%08lx: 0x%08x\n", (ulong)(&addr[1]), value);
switch (value) {
case (FPW) INTEL_ID_28F320J3A:
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 34/39] GCC4.6: Squash warnings in PPChameleonEVB/flash.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (32 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 33/39] GCC4.6: Squash warnings in r360mpi/flash.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 35/39] GCC4.6: Squash error in pcmcia/i82365.c Marek Vasut
` (6 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
flash.c: In function 'flash_init':
flash.c:54: warning: format '%08X' expects type 'unsigned int', but argument 4
has type 'struct flash_info_t *'
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
board/dave/PPChameleonEVB/flash.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/board/dave/PPChameleonEVB/flash.c b/board/dave/PPChameleonEVB/flash.c
index 2e1a9ab..3d5b20d 100644
--- a/board/dave/PPChameleonEVB/flash.c
+++ b/board/dave/PPChameleonEVB/flash.c
@@ -51,7 +51,8 @@ unsigned long flash_init (void)
int size_val = 0;
debug("[%s, %d] Entering ...\n", __FUNCTION__, __LINE__);
- debug("[%s, %d] flash_info = 0x%08X ...\n", __FUNCTION__, __LINE__, flash_info);
+ debug("[%s, %d] flash_info = 0x%p ...\n", __func__, __LINE__,
+ flash_info);
/* Init: no FLASHes known */
for (i=0; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 35/39] GCC4.6: Squash error in pcmcia/i82365.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (33 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 34/39] GCC4.6: Squash warnings in PPChameleonEVB/flash.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 36/39] GCC4.6: Squash error in cpc45/pd67290.c Marek Vasut
` (5 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
i82365.c: In function 'cirrus_set_opts':
i82365.c:329: error: 'buf' undeclared (first use in this function)
i82365.c:329: error: (Each undeclared identifier is reported only once
i82365.c:329: error: for each function it appears in.)
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
drivers/pcmcia/i82365.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c
index 1bcb3a5..1cde83a 100644
--- a/drivers/pcmcia/i82365.c
+++ b/drivers/pcmcia/i82365.c
@@ -272,11 +272,7 @@ static u_int cirrus_set_opts (socket_info_t * s)
{
cirrus_state_t *p = &s->c_state;
u_int mask = 0xffff;
-#if DEBUG
- char buf[200];
-
- memset (buf, 0, 200);
-#endif
+ char buf[200] = {0};
if (has_ring == -1)
has_ring = 1;
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 36/39] GCC4.6: Squash error in cpc45/pd67290.c
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (34 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 35/39] GCC4.6: Squash error in pcmcia/i82365.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 37/39] RFT GCC4.6: Fix muas3001 and IDS8247 Marek Vasut
` (4 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
pd67290.c: In function 'cirrus_set_opts':
pd67290.c:282: error: 'buf' undeclared (first use in this function)
pd67290.c:282: error: (Each undeclared identifier is reported only once
pd67290.c:282: error: for each function it appears in.)
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
board/cpc45/pd67290.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/board/cpc45/pd67290.c b/board/cpc45/pd67290.c
index 0d8ef23..815e4ba 100644
--- a/board/cpc45/pd67290.c
+++ b/board/cpc45/pd67290.c
@@ -225,11 +225,7 @@ static u_int cirrus_set_opts (socket_info_t * s)
{
cirrus_state_t *p = &s->c_state;
u_int mask = 0xffff;
-#if DEBUG
- char buf[200];
-
- memset (buf, 0, 200);
-#endif
+ char buf[200] = {0};
if (has_ring == -1)
has_ring = 1;
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 37/39] RFT GCC4.6: Fix muas3001 and IDS8247
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (35 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 36/39] GCC4.6: Squash error in cpc45/pd67290.c Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 38/39] GCC4.6: Squash GTREADREG related errors Marek Vasut
` (3 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
The boards suffer from the following error due to undefined configuration
variables:
Configuring for IDS8247 board...
ether_fcc.c:75: error: 'CONFIG_SYS_CMXFCR_MASK1' undeclared here (not in a
function)
ether_fcc.c:76: error: 'CONFIG_SYS_CMXFCR_VALUE1' undeclared here (not in a
function)
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
include/configs/IDS8247.h | 4 ++++
include/configs/muas3001.h | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/include/configs/IDS8247.h b/include/configs/IDS8247.h
index 8552250..bc26bd7 100644
--- a/include/configs/IDS8247.h
+++ b/include/configs/IDS8247.h
@@ -147,6 +147,10 @@
#define CONFIG_ETHER_INDEX 1 /* which SCC/FCC channel for ethernet */
#define CONFIG_ETHER_ON_FCC1
#define FCC_ENET
+#define CONFIG_SYS_CMXFCR_MASK1 \
+ (CMXFCR_FC1 | CMXFCR_RF1CS_MSK | CMXFCR_TF1CS_MSK)
+#define CONFIG_SYS_CMXFCR_VALUE1 \
+ (CMXFCR_RF1CS_CLK11 | CMXFCR_TF1CS_CLK12)
/*
* - Rx-CLK is CLK10
diff --git a/include/configs/muas3001.h b/include/configs/muas3001.h
index 8b3022b..e21dea3 100644
--- a/include/configs/muas3001.h
+++ b/include/configs/muas3001.h
@@ -78,6 +78,10 @@
#define CONFIG_ETHER_ON_FCC1
#define CONFIG_HAS_ETH0
#define FCC_ENET
+#define CONFIG_SYS_CMXFCR_MASK1 \
+ (CMXFCR_FC1 | CMXFCR_RF1CS_MSK | CMXFCR_TF1CS_MSK)
+#define CONFIG_SYS_CMXFCR_VALUE1 \
+ (CMXFCR_RF1CS_CLK11 | CMXFCR_TF1CS_CLK12)
/*
* - Rx-CLK is CLK11
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 38/39] GCC4.6: Squash GTREADREG related errors
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (36 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 37/39] RFT GCC4.6: Fix muas3001 and IDS8247 Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:17 ` [U-Boot] [PATCH 39/39] GCC4.6: Add macros to mv_gen_reg.h Marek Vasut
` (2 subsequent siblings)
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
interrupts.c: In function 'interrupt_init_cpu':
interrupts.c:37: warning: implicit declaration of function 'GTREGREAD'
interrupts.c:37: error: 'LOW_INTERRUPT_CAUSE_REGISTER' undeclared (first use in
this function)
interrupts.c:37: error: (Each undeclared identifier is reported only once
interrupts.c:37: error: for each function it appears in.)
interrupts.c:37: error: 'HIGH_INTERRUPT_CAUSE_REGISTER' undeclared (first use in
this function)
interrupts.c:40: error: 'ETHERNET0_INTERRUPT_CAUSE_REGISTER' undeclared (first
use in this function)
interrupts.c:40: error: 'ETHERNET1_INTERRUPT_CAUSE_REGISTER' undeclared (first
use in this function)
interrupts.c:40: error: 'ETHERNET2_INTERRUPT_CAUSE_REGISTER' undeclared (first
use in this function)
interrupts.c:44: error: 'ETHERNET0_INTERRUPT_MASK_REGISTER' undeclared (first
use in this function)
interrupts.c:44: error: 'ETHERNET1_INTERRUPT_MASK_REGISTER' undeclared (first
use in this function)
interrupts.c:44: error: 'ETHERNET2_INTERRUPT_MASK_REGISTER' undeclared (first
use in this function)
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
include/configs/PCIPPC2.h | 4 ++++
include/configs/PCIPPC6.h | 4 ++++
include/configs/mpc7448hpc2.h | 4 ++++
include/configs/p3mx.h | 4 ++++
include/configs/ppmc7xx.h | 4 ++++
5 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/include/configs/PCIPPC2.h b/include/configs/PCIPPC2.h
index fb485b0..77cedc0 100644
--- a/include/configs/PCIPPC2.h
+++ b/include/configs/PCIPPC2.h
@@ -55,6 +55,10 @@
#define CONFIG_PREBOOT ""
#define CONFIG_BOOTDELAY 5
+#ifndef __ASSEMBLY__
+#include <galileo/core.h>
+#endif
+
/*
* BOOTP options
*/
diff --git a/include/configs/PCIPPC6.h b/include/configs/PCIPPC6.h
index 16d6450..a8d20ca 100644
--- a/include/configs/PCIPPC6.h
+++ b/include/configs/PCIPPC6.h
@@ -55,6 +55,10 @@
#define CONFIG_PREBOOT ""
#define CONFIG_BOOTDELAY 5
+#ifndef __ASSEMBLY__
+#include <galileo/core.h>
+#endif
+
/*
* BOOTP options
*/
diff --git a/include/configs/mpc7448hpc2.h b/include/configs/mpc7448hpc2.h
index 700dcda..8a91c91 100644
--- a/include/configs/mpc7448hpc2.h
+++ b/include/configs/mpc7448hpc2.h
@@ -54,6 +54,10 @@
#undef CONFIG_ECC /* disable ECC support */
+#ifndef __ASSEMBLY__
+#include <galileo/core.h>
+#endif
+
/* Board-specific Initialization Functions to be called */
#define CONFIG_SYS_BOARD_ASM_INIT
#define CONFIG_BOARD_EARLY_INIT_F
diff --git a/include/configs/p3mx.h b/include/configs/p3mx.h
index 94a6992..e44009e 100644
--- a/include/configs/p3mx.h
+++ b/include/configs/p3mx.h
@@ -447,4 +447,8 @@
#define L2_ENABLE (L2_INIT | L2CR_L2E)
+#ifndef __ASSEMBLY__
+#include <../board/Marvell/include/core.h>
+#endif
+
#endif /* __CONFIG_H */
diff --git a/include/configs/ppmc7xx.h b/include/configs/ppmc7xx.h
index d3c8990..4ceee17 100644
--- a/include/configs/ppmc7xx.h
+++ b/include/configs/ppmc7xx.h
@@ -51,6 +51,10 @@
#define CONFIG_SYS_TEXT_BASE 0xFFF00000
+#ifndef __ASSEMBLY__
+#include <galileo/core.h>
+#endif
+
/*
* Monitor configuration
*
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [PATCH 39/39] GCC4.6: Add macros to mv_gen_reg.h
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (37 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 38/39] GCC4.6: Squash GTREADREG related errors Marek Vasut
@ 2011-10-22 0:17 ` Marek Vasut
2011-10-22 0:35 ` [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Albert ARIBAUD
2011-10-25 9:04 ` Marek Vasut
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 0:17 UTC (permalink / raw)
To: u-boot
interrupts.c: In function 'interrupt_init_cpu':
interrupts.c:40: error: 'ETHERNET0_INTERRUPT_CAUSE_REGISTER' undeclared (first
use in this function)
interrupts.c:40: error: (Each undeclared identifier is reported only once
interrupts.c:40: error: for each function it appears in.)
interrupts.c:40: error: 'ETHERNET1_INTERRUPT_CAUSE_REGISTER' undeclared (first
use in this function)
interrupts.c:40: error: 'ETHERNET2_INTERRUPT_CAUSE_REGISTER' undeclared (first
use in this function)
interrupts.c:44: error: 'ETHERNET0_INTERRUPT_MASK_REGISTER' undeclared (first
use in this function)
interrupts.c:44: error: 'ETHERNET1_INTERRUPT_MASK_REGISTER' undeclared (first
use in this function)
interrupts.c:44: error: 'ETHERNET2_INTERRUPT_MASK_REGISTER' undeclared (first
use in this function)
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
board/Marvell/include/mv_gen_reg.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/board/Marvell/include/mv_gen_reg.h b/board/Marvell/include/mv_gen_reg.h
index 03fcd88..008185e 100644
--- a/board/Marvell/include/mv_gen_reg.h
+++ b/board/Marvell/include/mv_gen_reg.h
@@ -1864,6 +1864,14 @@
#define ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE(port) (0x3500 + (port<<10))
#define ETH_DA_FILTER_UNICAST_TABLE_BASE(port) (0x3600 + (port<<10))
+/* Compat with interrupts.c */
+#define ETHERNET0_INTERRUPT_CAUSE_REGISTER ETH_INTERRUPT_CAUSE_REG(0)
+#define ETHERNET1_INTERRUPT_CAUSE_REGISTER ETH_INTERRUPT_CAUSE_REG(1)
+#define ETHERNET2_INTERRUPT_CAUSE_REGISTER ETH_INTERRUPT_CAUSE_REG(2)
+
+#define ETHERNET0_INTERRUPT_MASK_REGISTER ETH_INTERRUPT_MASK_REG(0)
+#define ETHERNET1_INTERRUPT_MASK_REGISTER ETH_INTERRUPT_MASK_REG(1)
+#define ETHERNET2_INTERRUPT_MASK_REGISTER ETH_INTERRUPT_MASK_REG(2)
/* Ethernet GT64260 */
/*
--
1.7.6.3
^ permalink raw reply related [flat|nested] 73+ messages in thread* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (38 preceding siblings ...)
2011-10-22 0:17 ` [U-Boot] [PATCH 39/39] GCC4.6: Add macros to mv_gen_reg.h Marek Vasut
@ 2011-10-22 0:35 ` Albert ARIBAUD
2011-10-22 1:18 ` Marek Vasut
2011-10-25 9:04 ` Marek Vasut
40 siblings, 1 reply; 73+ messages in thread
From: Albert ARIBAUD @ 2011-10-22 0:35 UTC (permalink / raw)
To: u-boot
Hi Marek,
Le 22/10/2011 02:16, Marek Vasut a ?crit :
> This patch series reworks the debug() and debugX() macro in include/common.h to
> be compatible with GCC 4.6.
>
> This series needs further discussion:
> * Some files suffer size growth with gcc4.2, why ?
> - Possibility is that the GCC4.2 is incapable to optimize code out so deep
> * Does this change break any platforms? Compile tested on PowerPC.
> - Please run MAKEALL on your platforms to test this.
Any git branch we could pull and rebase on our trees rather than am'ing
39 patches one by one?
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 73+ messages in thread* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-22 0:35 ` [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Albert ARIBAUD
@ 2011-10-22 1:18 ` Marek Vasut
2011-10-22 9:48 ` Albert ARIBAUD
0 siblings, 1 reply; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 1:18 UTC (permalink / raw)
To: u-boot
On Saturday, October 22, 2011 02:35:13 AM Albert ARIBAUD wrote:
> Hi Marek,
>
> Le 22/10/2011 02:16, Marek Vasut a ?crit :
> > This patch series reworks the debug() and debugX() macro in
> > include/common.h to be compatible with GCC 4.6.
> >
> > This series needs further discussion:
> > * Some files suffer size growth with gcc4.2, why ?
> >
> > - Possibility is that the GCC4.2 is incapable to optimize code out so
> > deep
> >
> > * Does this change break any platforms? Compile tested on PowerPC.
> >
> > - Please run MAKEALL on your platforms to test this.
>
> Any git branch we could pull and rebase on our trees rather than am'ing
> 39 patches one by one?
Please try:
git://git.denx.de/u-boot-marex.git , "debug" branch.
Cheers
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-22 1:18 ` Marek Vasut
@ 2011-10-22 9:48 ` Albert ARIBAUD
2011-10-22 14:19 ` Marek Vasut
2011-10-23 5:33 ` Mike Frysinger
0 siblings, 2 replies; 73+ messages in thread
From: Albert ARIBAUD @ 2011-10-22 9:48 UTC (permalink / raw)
To: u-boot
Le 22/10/2011 03:18, Marek Vasut a ?crit :
> On Saturday, October 22, 2011 02:35:13 AM Albert ARIBAUD wrote:
>> Hi Marek,
>>
>> Le 22/10/2011 02:16, Marek Vasut a ?crit :
>>> This patch series reworks the debug() and debugX() macro in
>>> include/common.h to be compatible with GCC 4.6.
>>>
>>> This series needs further discussion:
>>> * Some files suffer size growth with gcc4.2, why ?
>>>
>>> - Possibility is that the GCC4.2 is incapable to optimize code out so
>>> deep
>>>
>>> * Does this change break any platforms? Compile tested on PowerPC.
>>>
>>> - Please run MAKEALL on your platforms to test this.
>>
>> Any git branch we could pull and rebase on our trees rather than am'ing
>> 39 patches one by one?
>
> Please try:
>
> git://git.denx.de/u-boot-marex.git , "debug" branch.
>
> Cheers
A differential 'MAKEALL arm' (ELDK42) show a sharp rise in board not
building properly, from 74 to 141 (out of a total of 248).
Of the 67 boards, many show , essentially due to a lot of printf format
warnings such as:
ks8695eth.c: In function 'ks8695_eth_send':
ks8695eth.c:199: warning: format '%x' expects type 'unsigned int', but
argument 4 has type 'volatile void *'
(in cm4008, cm41xx), or
lcd.c: In function 'lcd_setmem':
lcd.c:446: warning: format '%d' expects type 'int', but argument 2 has
type 'u_long'
lcd.c:446: warning: format '%d' expects type 'int', but argument 3 has
type 'u_long'
(in at91sam9261ek_nandflash). Another, different, case is smdk2410:
s3c2410_nand.c: In function 's3c2410_hwcontrol':
s3c2410_nand.c:59: error: 'DEBUG' undeclared (first use in this function)
s3c2410_nand.c:59: error: (Each undeclared identifier is reported only once
s3c2410_nand.c:59: error: for each function it appears in.)
s3c2410_nand.c: In function 's3c2410_dev_ready':
s3c2410_nand.c:86: error: 'DEBUG' undeclared (first use in this function)
s3c2410_nand.c: In function 'board_nand_init':
Seems like you're trading some warnings against some others, depending
on the compiler. :(
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-22 9:48 ` Albert ARIBAUD
@ 2011-10-22 14:19 ` Marek Vasut
2011-10-22 15:23 ` Albert ARIBAUD
2011-10-23 5:33 ` Mike Frysinger
1 sibling, 1 reply; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 14:19 UTC (permalink / raw)
To: u-boot
On Saturday, October 22, 2011 11:48:43 AM Albert ARIBAUD wrote:
> Le 22/10/2011 03:18, Marek Vasut a ?crit :
> > On Saturday, October 22, 2011 02:35:13 AM Albert ARIBAUD wrote:
> >> Hi Marek,
> >>
> >> Le 22/10/2011 02:16, Marek Vasut a ?crit :
> >>> This patch series reworks the debug() and debugX() macro in
> >>> include/common.h to be compatible with GCC 4.6.
> >>>
> >>> This series needs further discussion:
> >>> * Some files suffer size growth with gcc4.2, why ?
> >>>
> >>> - Possibility is that the GCC4.2 is incapable to optimize code out
> >>> so deep
> >>>
> >>> * Does this change break any platforms? Compile tested on PowerPC.
> >>>
> >>> - Please run MAKEALL on your platforms to test this.
> >>
> >> Any git branch we could pull and rebase on our trees rather than am'ing
> >> 39 patches one by one?
> >
> > Please try:
> >
> > git://git.denx.de/u-boot-marex.git , "debug" branch.
> >
> > Cheers
>
> A differential 'MAKEALL arm' (ELDK42) show a sharp rise in board not
> building properly, from 74 to 141 (out of a total of 248).
This was expected ... will fix.
>
> Of the 67 boards, many show , essentially due to a lot of printf format
> warnings such as:
>
> ks8695eth.c: In function 'ks8695_eth_send':
> ks8695eth.c:199: warning: format '%x' expects type 'unsigned int', but
> argument 4 has type 'volatile void *'
>
> (in cm4008, cm41xx), or
>
> lcd.c: In function 'lcd_setmem':
> lcd.c:446: warning: format '%d' expects type 'int', but argument 2 has
> type 'u_long'
> lcd.c:446: warning: format '%d' expects type 'int', but argument 3 has
> type 'u_long'
>
> (in at91sam9261ek_nandflash). Another, different, case is smdk2410:
>
> s3c2410_nand.c: In function 's3c2410_hwcontrol':
> s3c2410_nand.c:59: error: 'DEBUG' undeclared (first use in this function)
> s3c2410_nand.c:59: error: (Each undeclared identifier is reported only once
> s3c2410_nand.c:59: error: for each function it appears in.)
> s3c2410_nand.c: In function 's3c2410_dev_ready':
> s3c2410_nand.c:86: error: 'DEBUG' undeclared (first use in this function)
> s3c2410_nand.c: In function 'board_nand_init':
>
> Seems like you're trading some warnings against some others, depending
> on the compiler. :(
Not trading, the typechecking wasn't there and now that it is there, these kind
of warnings keep popping up. Did you ever try to build those boards with DEBUG
enabled?
Cheers
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-22 14:19 ` Marek Vasut
@ 2011-10-22 15:23 ` Albert ARIBAUD
2011-10-22 22:17 ` Marek Vasut
0 siblings, 1 reply; 73+ messages in thread
From: Albert ARIBAUD @ 2011-10-22 15:23 UTC (permalink / raw)
To: u-boot
Le 22/10/2011 16:19, Marek Vasut a ?crit :
> On Saturday, October 22, 2011 11:48:43 AM Albert ARIBAUD wrote:
>> Le 22/10/2011 03:18, Marek Vasut a ?crit :
>>> On Saturday, October 22, 2011 02:35:13 AM Albert ARIBAUD wrote:
>>>> Hi Marek,
>>>>
>>>> Le 22/10/2011 02:16, Marek Vasut a ?crit :
>>>>> This patch series reworks the debug() and debugX() macro in
>>>>> include/common.h to be compatible with GCC 4.6.
>>>>>
>>>>> This series needs further discussion:
>>>>> * Some files suffer size growth with gcc4.2, why ?
>>>>>
>>>>> - Possibility is that the GCC4.2 is incapable to optimize code out
>>>>> so deep
>>>>>
>>>>> * Does this change break any platforms? Compile tested on PowerPC.
>>>>>
>>>>> - Please run MAKEALL on your platforms to test this.
>>>>
>>>> Any git branch we could pull and rebase on our trees rather than am'ing
>>>> 39 patches one by one?
>>>
>>> Please try:
>>>
>>> git://git.denx.de/u-boot-marex.git , "debug" branch.
>>>
>>> Cheers
>>
>> A differential 'MAKEALL arm' (ELDK42) show a sharp rise in board not
>> building properly, from 74 to 141 (out of a total of 248).
>
> This was expected ... will fix.
Much welcome. :)
>> Of the 67 boards, many show , essentially due to a lot of printf format
>> warnings such as:
>>
>> ks8695eth.c: In function 'ks8695_eth_send':
>> ks8695eth.c:199: warning: format '%x' expects type 'unsigned int', but
>> argument 4 has type 'volatile void *'
>>
>> (in cm4008, cm41xx), or
>>
>> lcd.c: In function 'lcd_setmem':
>> lcd.c:446: warning: format '%d' expects type 'int', but argument 2 has
>> type 'u_long'
>> lcd.c:446: warning: format '%d' expects type 'int', but argument 3 has
>> type 'u_long'
>>
>> (in at91sam9261ek_nandflash). Another, different, case is smdk2410:
>>
>> s3c2410_nand.c: In function 's3c2410_hwcontrol':
>> s3c2410_nand.c:59: error: 'DEBUG' undeclared (first use in this function)
>> s3c2410_nand.c:59: error: (Each undeclared identifier is reported only once
>> s3c2410_nand.c:59: error: for each function it appears in.)
>> s3c2410_nand.c: In function 's3c2410_dev_ready':
>> s3c2410_nand.c:86: error: 'DEBUG' undeclared (first use in this function)
>> s3c2410_nand.c: In function 'board_nand_init':
>>
>> Seems like you're trading some warnings against some others, depending
>> on the compiler. :(
>
> Not trading, the typechecking wasn't there and now that it is there, these kind
> of warnings keep popping up. Did you ever try to build those boards with DEBUG
> enabled?
Not the whole code; I only enabled debug in very specific areas.
> Cheers
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-22 15:23 ` Albert ARIBAUD
@ 2011-10-22 22:17 ` Marek Vasut
2011-10-24 10:10 ` Detlev Zundel
0 siblings, 1 reply; 73+ messages in thread
From: Marek Vasut @ 2011-10-22 22:17 UTC (permalink / raw)
To: u-boot
On Saturday, October 22, 2011 05:23:52 PM Albert ARIBAUD wrote:
> Le 22/10/2011 16:19, Marek Vasut a ?crit :
> > On Saturday, October 22, 2011 11:48:43 AM Albert ARIBAUD wrote:
> >> Le 22/10/2011 03:18, Marek Vasut a ?crit :
> >>> On Saturday, October 22, 2011 02:35:13 AM Albert ARIBAUD wrote:
> >>>> Hi Marek,
> >>>>
> >>>> Le 22/10/2011 02:16, Marek Vasut a ?crit :
> >>>>> This patch series reworks the debug() and debugX() macro in
> >>>>> include/common.h to be compatible with GCC 4.6.
> >>>>>
> >>>>> This series needs further discussion:
> >>>>> * Some files suffer size growth with gcc4.2, why ?
> >>>>>
> >>>>> - Possibility is that the GCC4.2 is incapable to optimize code
> >>>>> out so deep
> >>>>>
> >>>>> * Does this change break any platforms? Compile tested on PowerPC.
> >>>>>
> >>>>> - Please run MAKEALL on your platforms to test this.
> >>>>
> >>>> Any git branch we could pull and rebase on our trees rather than
> >>>> am'ing 39 patches one by one?
> >>>
> >>> Please try:
> >>>
> >>> git://git.denx.de/u-boot-marex.git , "debug" branch.
> >>>
> >>> Cheers
> >>
> >> A differential 'MAKEALL arm' (ELDK42) show a sharp rise in board not
> >> building properly, from 74 to 141 (out of a total of 248).
> >
> > This was expected ... will fix.
>
> Much welcome. :)
>
> >> Of the 67 boards, many show , essentially due to a lot of printf format
> >> warnings such as:
> >>
> >> ks8695eth.c: In function 'ks8695_eth_send':
> >> ks8695eth.c:199: warning: format '%x' expects type 'unsigned int', but
> >> argument 4 has type 'volatile void *'
> >>
> >> (in cm4008, cm41xx), or
> >>
> >> lcd.c: In function 'lcd_setmem':
> >> lcd.c:446: warning: format '%d' expects type 'int', but argument 2 has
> >> type 'u_long'
> >> lcd.c:446: warning: format '%d' expects type 'int', but argument 3 has
> >> type 'u_long'
> >>
> >> (in at91sam9261ek_nandflash). Another, different, case is smdk2410:
> >>
> >> s3c2410_nand.c: In function 's3c2410_hwcontrol':
> >> s3c2410_nand.c:59: error: 'DEBUG' undeclared (first use in this
> >> function) s3c2410_nand.c:59: error: (Each undeclared identifier is
> >> reported only once s3c2410_nand.c:59: error: for each function it
> >> appears in.)
> >> s3c2410_nand.c: In function 's3c2410_dev_ready':
> >> s3c2410_nand.c:86: error: 'DEBUG' undeclared (first use in this
> >> function) s3c2410_nand.c: In function 'board_nand_init':
> >>
> >> Seems like you're trading some warnings against some others, depending
> >> on the compiler. :(
> >
> > Not trading, the typechecking wasn't there and now that it is there,
> > these kind of warnings keep popping up. Did you ever try to build those
> > boards with DEBUG enabled?
>
> Not the whole code; I only enabled debug in very specific areas.
So because noone actually bothered to compile u-boot with DEBUG enabled, we (me
?) now have literally piles of places to fix. Hm :-(
Cheers
>
> > Cheers
>
> Amicalement,
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-22 22:17 ` Marek Vasut
@ 2011-10-24 10:10 ` Detlev Zundel
2011-10-24 10:16 ` Marek Vasut
0 siblings, 1 reply; 73+ messages in thread
From: Detlev Zundel @ 2011-10-24 10:10 UTC (permalink / raw)
To: u-boot
Hi Marek,
[...]
> So because noone actually bothered to compile u-boot with DEBUG enabled, we (me
> ?) now have literally piles of places to fix. Hm :-(
So it seems. This is a very good reminder of the fact that with ifdef
we actually hide source code from the compiler under certain
circumstances. The number of these "certain circumstances" produces the
number of _differing input_ to our compiler. Given the trivial fact
that a simple ifdef results in two different inputs one needs only to
visualize the graph of 2^x to get an idea of how many sources we are
actually using.
Unrelated to your current efforts (that are greatly appreciated) We
should really try not to use #ifdef at all. Using constants together
with the dead code eliminatino of the compiler can usually reach the
same goal but with syntax checks on every compile.
Sorry, but I couldn't resist lobbying for this. Perhaps it helps when
it gets repeated approximately every year ;)
Cheers
Detlev
--
F?r jemanden, der in eine Religion geboren wurde, in der das Ringen um eine
einzige Seele ein Stafettenlauf ?ber viele Jahrhunderte sein kann [..], hat
das Tempo des Christentums etwas Schwindelerregendes. Wenn der Hinduismus
friedlich dahinflie?t wie der Ganges, dann ist das Christentum Toronto in
der Rushhour. -- Yann Martel
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-24 10:10 ` Detlev Zundel
@ 2011-10-24 10:16 ` Marek Vasut
2011-10-24 11:52 ` Detlev Zundel
0 siblings, 1 reply; 73+ messages in thread
From: Marek Vasut @ 2011-10-24 10:16 UTC (permalink / raw)
To: u-boot
On Monday, October 24, 2011 12:10:02 PM Detlev Zundel wrote:
> Hi Marek,
>
> [...]
>
> > So because noone actually bothered to compile u-boot with DEBUG enabled,
> > we (me ?) now have literally piles of places to fix. Hm :-(
>
> So it seems. This is a very good reminder of the fact that with ifdef
> we actually hide source code from the compiler under certain
> circumstances. The number of these "certain circumstances" produces the
> number of _differing input_ to our compiler. Given the trivial fact
> that a simple ifdef results in two different inputs one needs only to
> visualize the graph of 2^x to get an idea of how many sources we are
> actually using.
>
> Unrelated to your current efforts (that are greatly appreciated) We
> should really try not to use #ifdef at all. Using constants together
> with the dead code eliminatino of the compiler can usually reach the
> same goal but with syntax checks on every compile.
>
> Sorry, but I couldn't resist lobbying for this. Perhaps it helps when
> it gets repeated approximately every year ;)
>
> Cheers
> Detlev
Hey Detlev,
I certainly see your point. Btw. do you feel like help reviewing the PPC portion
of the patches? That'd be greatly appreciated as I'm not a PPC expert. I wanted
to avoid resubmission, so I only pushed the new set to git://git.denx.de/u-boot-
marex.git / debug branch. There is over 50 patches now.
Cheers
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-24 10:16 ` Marek Vasut
@ 2011-10-24 11:52 ` Detlev Zundel
2011-10-24 12:33 ` Marek Vasut
0 siblings, 1 reply; 73+ messages in thread
From: Detlev Zundel @ 2011-10-24 11:52 UTC (permalink / raw)
To: u-boot
Hi Marek,
[...]
> I certainly see your point. Btw. do you feel like help reviewing the PPC portion
> of the patches? That'd be greatly appreciated as I'm not a PPC expert. I wanted
> to avoid resubmission, so I only pushed the new set to git://git.denx.de/u-boot-
> marex.git / debug branch. There is over 50 patches now.
I fear that we have the possibility to loose efforts in communicating
our distrubuted efforts here. If want to ack only a subset of the
patches only available on a git tree, I don't know how to give my
"Acked-By" through the patchwork magic and _not_ add even more work on
your shoulders. On the other hand, the majority of fixes are printf
fixes, so if the compiler does not complain on a MAKEALL any more, I
don't see what other aspect I can evaluate on a "dry review".
Effectively I was hoping that your large patch set stabilizes and
produces no more warnings on a MAKEALL - in this case you have my
Acked-by: Detlev Zundel <dzu@denx.de>
Let me know if you have any better ideas...
Cheers
Detlev
--
Referee's report: This paper contains much that is new and much that
is true. Unfortunately, that which is true is not new and that which
is new is not true.
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-24 11:52 ` Detlev Zundel
@ 2011-10-24 12:33 ` Marek Vasut
0 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-24 12:33 UTC (permalink / raw)
To: u-boot
> Hi Marek,
Hi Detlev,
>
> [...]
>
> > I certainly see your point. Btw. do you feel like help reviewing the PPC
> > portion of the patches? That'd be greatly appreciated as I'm not a PPC
> > expert. I wanted to avoid resubmission, so I only pushed the new set to
> > git://git.denx.de/u-boot- marex.git / debug branch. There is over 50
> > patches now.
>
> I fear that we have the possibility to loose efforts in communicating
> our distrubuted efforts here. If want to ack only a subset of the
> patches only available on a git tree, I don't know how to give my
> "Acked-By" through the patchwork magic and _not_ add even more work on
> your shoulders. On the other hand, the majority of fixes are printf
> fixes, so if the compiler does not complain on a MAKEALL any more, I
> don't see what other aspect I can evaluate on a "dry review".
More like a superset actually.
>
> Effectively I was hoping that your large patch set stabilizes and
> produces no more warnings on a MAKEALL - in this case you have my
>
> Acked-by: Detlev Zundel <dzu@denx.de>
There are a few patches that are not only printf() format patches. And even
those printf() format patches deserve proper review.
Cheers
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-22 9:48 ` Albert ARIBAUD
2011-10-22 14:19 ` Marek Vasut
@ 2011-10-23 5:33 ` Mike Frysinger
1 sibling, 0 replies; 73+ messages in thread
From: Mike Frysinger @ 2011-10-23 5:33 UTC (permalink / raw)
To: u-boot
On Sat, Oct 22, 2011 at 05:48, Albert ARIBAUD wrote:
> A differential 'MAKEALL arm' (ELDK42) show a sharp rise in board not
> building properly, from 74 to 141 (out of a total of 248).
these boards are broken already. Marek is just making their problems
more apparent.
-mike
^ permalink raw reply [flat|nested] 73+ messages in thread
* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
2011-10-22 0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
` (39 preceding siblings ...)
2011-10-22 0:35 ` [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Albert ARIBAUD
@ 2011-10-25 9:04 ` Marek Vasut
40 siblings, 0 replies; 73+ messages in thread
From: Marek Vasut @ 2011-10-25 9:04 UTC (permalink / raw)
To: u-boot
> This patch series reworks the debug() and debugX() macro in
> include/common.h to be compatible with GCC 4.6.
>
> This series needs further discussion:
> * Some files suffer size growth with gcc4.2, why ?
> - Possibility is that the GCC4.2 is incapable to optimize code out so
> deep * Does this change break any platforms? Compile tested on PowerPC. -
> Please run MAKEALL on your platforms to test this.
>
> Marek Vasut (39):
> DEBUG: Fix debug macros
> GCC4.6: Squash warnings in common/usb.c
> GCC4.6: Squash warning in cmd_ide.c
> GCC4.6: Squash warning in cmd_date.c
> GCC4.6: Squash warning in usb_storage.c
> GCC4.6: Squash subsequent warnings in usb_storage.c
> PowerPC: Squash warning in mpc512x serial.c
> GCC4.6: Squash warning in mpc5121ads.c
> GCC4.6: Squash warning in cfb_console.c
> GCC4.6: Squash warning in cfi_flash.c
> GCC4.6: Squash warnings in denali_data_eye.c
> GCC4.6: Squash warnings in denali_spd_ddr2.c
> GCC4.6: Squash warnings in diu.c
> GCC4.6: Squash warnings in mpc8610hpcd.c
> GCC4.6: Squash warnings in tqm834x.c
> GCC4.6: Squash warning in jedec_flash.c
> GCC4.6: Squash warnings in 44x_spd_ddr.c
> GCC4.6: Squash warnings in 4xx_enet.c
> GCC4.6: Squash warnings in 4xx_ibm_ddr2_autocalib.c
> GCC4.6: Squash warnings in 4xx_pcie.c
> GCC4.6: Squash warnings in ahci.c
> GCC4.6: Squash warning in cmd_pmc440.c
> GCC4.6: Use dst instead of l2srbar in cpu_early_init.c
> GCC4.6: Squash warnings in ddr[123]_dimm_params.c
> GCC4.6: Squash warnings in fsl_espi.c
> GCC4.6: Squash warnings in fsl_pci_init.c
> GCC4.6: Squash warnings in pmc405de.c
> GCC4.6: Squash warnings in sata_sil3114.c
> GCC4.6: Squash warnings in tqm8xx_pcmcia.c
> GCC4.6: Squash undefined variable in cmd_mtdparts.c
> GCC4.6: Squash warnings in serial_xuartlite.c
> GCC4.6: Squash warnings in mpc86xx/interrupts.c
> GCC4.6: Squash warnings in r360mpi/flash.c
> GCC4.6: Squash warnings in PPChameleonEVB/flash.c
> GCC4.6: Squash error in pcmcia/i82365.c
> GCC4.6: Squash error in cpc45/pd67290.c
> RFT GCC4.6: Fix muas3001 and IDS8247
> GCC4.6: Squash GTREADREG related errors
> GCC4.6: Add macros to mv_gen_reg.h
>
> arch/powerpc/cpu/mpc512x/serial.c | 2 +-
> arch/powerpc/cpu/mpc85xx/cpu_init_early.c | 4 +-
> arch/powerpc/cpu/mpc86xx/interrupts.c | 12 +++---
> arch/powerpc/cpu/mpc8xxx/ddr/ddr1_dimm_params.c | 2 +-
> arch/powerpc/cpu/mpc8xxx/ddr/ddr2_dimm_params.c | 2 +-
> arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c | 2 +-
> arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c | 17 ++++---
> arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c | 8 ++--
> arch/powerpc/cpu/ppc4xx/4xx_pcie.c | 3 +-
> arch/powerpc/cpu/ppc4xx/denali_data_eye.c | 10 ++--
> arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c | 52
> +++++++++++----------- board/Marvell/include/mv_gen_reg.h |
> 8 +++
> board/cpc45/pd67290.c | 6 +--
> board/dave/PPChameleonEVB/flash.c | 3 +-
> board/esd/pmc405de/pmc405de.c | 2 +-
> board/esd/pmc440/cmd_pmc440.c | 2 +-
> board/freescale/mpc5121ads/mpc5121ads.c | 4 +-
> board/freescale/mpc8610hpcd/mpc8610hpcd.c | 4 +-
> board/freescale/p1022ds/diu.c | 2 +-
> board/r360mpi/flash.c | 4 +-
> board/tqc/tqm834x/tqm834x.c | 6 +-
> common/cmd_ide.c | 2 +-
> common/cmd_mtdparts.c | 2 -
> common/usb.c | 21 +++------
> common/usb_storage.c | 33 +++++++-------
> drivers/block/ahci.c | 2 +-
> drivers/block/sata_sil3114.c | 2 +-
> drivers/mtd/cfi_flash.c | 2 +-
> drivers/mtd/jedec_flash.c | 5 +-
> drivers/net/4xx_enet.c | 6 +-
> drivers/pci/fsl_pci_init.c | 8 ++--
> drivers/pcmcia/i82365.c | 6 +--
> drivers/pcmcia/tqm8xx_pcmcia.c | 15 +++++-
> drivers/serial/serial_xuartlite.c | 2 +-
> drivers/spi/fsl_espi.c | 6 +-
> drivers/video/cfb_console.c | 2 +-
> include/common.h | 20 +++++---
> include/configs/IDS8247.h | 4 ++
> include/configs/PCIPPC2.h | 4 ++
> include/configs/PCIPPC6.h | 4 ++
> include/configs/mpc7448hpc2.h | 4 ++
> include/configs/muas3001.h | 4 ++
> include/configs/p3mx.h | 4 ++
> include/configs/ppmc7xx.h | 4 ++
> include/i2c.h | 32 ++++++++++----
> 45 files changed, 201 insertions(+), 148 deletions(-)
>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
Guys,
please DO NOT MERGE the patches from this series. I'll resubmit it into smaller
chunks as suggested by Graeme.
Cheers
^ permalink raw reply [flat|nested] 73+ messages in thread