* [U-Boot-Users] [PATCH] ppc4xx: Fix include sequence in 4xx_pcie.c
@ 2008-07-10 9:38 Stefan Roese
2008-07-10 9:46 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Roese @ 2008-07-10 9:38 UTC (permalink / raw)
To: u-boot
This patch now moves common.h to the top of the inlcude list. This
is needed for boards with CONFIG_PHYS_64BIT set (e.g. katmai), so that
the phys_size_t/phys_addr_t are defined to the correct size in this
driver.
Signed-off-by: Stefan Roese <sr@denx.de>
---
cpu/ppc4xx/4xx_pcie.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpu/ppc4xx/4xx_pcie.c b/cpu/ppc4xx/4xx_pcie.c
index d50a538..9803fcc 100644
--- a/cpu/ppc4xx/4xx_pcie.c
+++ b/cpu/ppc4xx/4xx_pcie.c
@@ -25,11 +25,11 @@
#define DEBUG
#endif
-#include <asm/processor.h>
-#include <asm-ppc/io.h>
-#include <ppc4xx.h>
#include <common.h>
#include <pci.h>
+#include <ppc4xx.h>
+#include <asm/processor.h>
+#include <asm-ppc/io.h>
#if (defined(CONFIG_440SPE) || defined(CONFIG_405EX) || \
defined(CONFIG_460EX) || defined(CONFIG_460GT)) && \
--
1.5.6.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH] ppc4xx: Fix include sequence in 4xx_pcie.c
2008-07-10 9:38 [U-Boot-Users] [PATCH] ppc4xx: Fix include sequence in 4xx_pcie.c Stefan Roese
@ 2008-07-10 9:46 ` Wolfgang Denk
2008-07-10 10:06 ` Stefan Roese
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2008-07-10 9:46 UTC (permalink / raw)
To: u-boot
In message <1215682732-2051-1-git-send-email-sr@denx.de> you wrote:
> This patch now moves common.h to the top of the inlcude list. This
> is needed for boards with CONFIG_PHYS_64BIT set (e.g. katmai), so that
> the phys_size_t/phys_addr_t are defined to the correct size in this
> driver.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> ---
> cpu/ppc4xx/4xx_pcie.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
Hm. I think we have a serious problem when the correctness of the code
depends on the include order. It seems that include/asm-ppc/types.h
depends on CONFIG_PHYS_64BIT, so include/asm-ppc/types.h must make
sure this variable is set correctly, i. e. we should include common.h
there.
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 don't need a weatherman to know which way the wind blows.
- Bob Dylan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH] ppc4xx: Fix include sequence in 4xx_pcie.c
2008-07-10 9:46 ` Wolfgang Denk
@ 2008-07-10 10:06 ` Stefan Roese
2008-07-11 11:17 ` Stefan Roese
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Roese @ 2008-07-10 10:06 UTC (permalink / raw)
To: u-boot
On Thursday 10 July 2008, Wolfgang Denk wrote:
> In message <1215682732-2051-1-git-send-email-sr@denx.de> you wrote:
> > This patch now moves common.h to the top of the inlcude list. This
> > is needed for boards with CONFIG_PHYS_64BIT set (e.g. katmai), so that
> > the phys_size_t/phys_addr_t are defined to the correct size in this
> > driver.
> >
> > Signed-off-by: Stefan Roese <sr@denx.de>
> > ---
> > cpu/ppc4xx/4xx_pcie.c | 6 +++---
> > 1 files changed, 3 insertions(+), 3 deletions(-)
>
> Hm. I think we have a serious problem when the correctness of the code
> depends on the include order. It seems that include/asm-ppc/types.h
> depends on CONFIG_PHYS_64BIT, so include/asm-ppc/types.h must make
> sure this variable is set correctly, i. e. we should include common.h
> there.
Yes, I though too that this problem might affect other files too. But
unfortunately including common.h from within asm/types.h does not work since
common.h includes (and needs) types.h itself.
I have no elegant solution to handle this in a more generic way right now.
Perhaps somebody else has? Ideas welcome. :)
Thanks.
Best regards,
Stefan
=====================================================================
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] 4+ messages in thread
* [U-Boot-Users] [PATCH] ppc4xx: Fix include sequence in 4xx_pcie.c
2008-07-10 10:06 ` Stefan Roese
@ 2008-07-11 11:17 ` Stefan Roese
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2008-07-11 11:17 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
On Thursday 10 July 2008, Stefan Roese wrote:
> > Hm. I think we have a serious problem when the correctness of the code
> > depends on the include order. It seems that include/asm-ppc/types.h
> > depends on CONFIG_PHYS_64BIT, so include/asm-ppc/types.h must make
> > sure this variable is set correctly, i. e. we should include common.h
> > there.
>
> Yes, I though too that this problem might affect other files too. But
> unfortunately including common.h from within asm/types.h does not work
> since common.h includes (and needs) types.h itself.
>
> I have no elegant solution to handle this in a more generic way right now.
> Perhaps somebody else has? Ideas welcome. :)
Since nobody has come up with a better idea, I suggest we push the current fix
for now. Same reason as the USB shutdown patch that you pulled even though it
is not perfect.
Should I put it in my repo and send a pull request?
Best regards,
Stefan
=====================================================================
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] 4+ messages in thread
end of thread, other threads:[~2008-07-11 11:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-10 9:38 [U-Boot-Users] [PATCH] ppc4xx: Fix include sequence in 4xx_pcie.c Stefan Roese
2008-07-10 9:46 ` Wolfgang Denk
2008-07-10 10:06 ` Stefan Roese
2008-07-11 11:17 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox