public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH 2/2] Remove prototypes of nand_init() in favor of including nand.h.
@ 2008-05-22 15:53 Scott Wood
  2008-07-01 14:43 ` Jens Gehrlein
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Wood @ 2008-05-22 15:53 UTC (permalink / raw)
  To: u-boot

Likewise with onenand_init().

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 lib_arm/board.c |   10 ++--------
 lib_ppc/board.c |    4 +---
 lib_sh/board.c  |    2 +-
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/lib_arm/board.c b/lib_arm/board.c
index 67506b3..5e04553 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -45,6 +45,8 @@
 #include <version.h>
 #include <net.h>
 #include <serial.h>
+#include <nand.h>
+#include <onenand_uboot.h>
 
 #ifdef CONFIG_DRIVER_SMC91111
 #include "../drivers/net/smc91111.h"
@@ -55,14 +57,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_CMD_NAND)
-void nand_init (void);
-#endif
-
-#if defined(CONFIG_CMD_ONENAND)
-void onenand_init(void);
-#endif
-
 ulong monitor_flash_len;
 
 #ifdef CONFIG_HAS_DATAFLASH
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 4956403..6f7242d 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -93,9 +93,7 @@ void doc_init (void);
 #if defined(CONFIG_HARD_SPI)
 #include <spi.h>
 #endif
-#if defined(CONFIG_CMD_NAND)
-void nand_init (void);
-#endif
+#include <nand.h>
 
 static char *failed = "*** failed ***\n";
 
diff --git a/lib_sh/board.c b/lib_sh/board.c
index 883c381..807415c 100644
--- a/lib_sh/board.c
+++ b/lib_sh/board.c
@@ -76,7 +76,7 @@ static int sh_flash_init(void)
 }
 
 #if defined(CONFIG_CMD_NAND)
-void nand_init (void);
+#include <nand.h>
 static int sh_nand_init(void)
 {
 	printf("NAND: ");
-- 
1.5.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot-Users] [PATCH 2/2] Remove prototypes of nand_init() in favor of including nand.h.
  2008-05-22 15:53 [U-Boot-Users] [PATCH 2/2] Remove prototypes of nand_init() in favor of including nand.h Scott Wood
@ 2008-07-01 14:43 ` Jens Gehrlein
  2008-07-01 15:07   ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Gehrlein @ 2008-07-01 14:43 UTC (permalink / raw)
  To: u-boot

Hi Scott,

Scott Wood schrieb:
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
>  lib_arm/board.c |   10 ++--------
>  lib_ppc/board.c |    4 +---
>  lib_sh/board.c  |    2 +-
>  3 files changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/lib_arm/board.c b/lib_arm/board.c
> index 67506b3..5e04553 100644
> --- a/lib_arm/board.c
> +++ b/lib_arm/board.c
> @@ -45,6 +45,8 @@
>  #include <version.h>
>  #include <net.h>
>  #include <serial.h>
> +#include <nand.h>

Today, I updated my local git tree to the current U-Boot. Running my 
board I saw the message "RAM Configuration:", which didn't appear before.

I think the reason is the following:
nand.h includes linux/mtd/mtd.h, which defines a macro
#define DEBUG(n, args...) do { } while(0).
This causes #ifdef DEBUG in line 198 of board.c to become true.

Could you please fix this?
Thank you very much.

Best Regards,
Jens

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] [PATCH 2/2] Remove prototypes of nand_init() in favor of including nand.h.
  2008-07-01 14:43 ` Jens Gehrlein
@ 2008-07-01 15:07   ` Scott Wood
  2008-07-02  5:28     ` Jens Gehrlein
  2008-07-09 21:52     ` Wolfgang Denk
  0 siblings, 2 replies; 5+ messages in thread
From: Scott Wood @ 2008-07-01 15:07 UTC (permalink / raw)
  To: u-boot

Jens Gehrlein wrote:
> Today, I updated my local git tree to the current U-Boot. Running my 
> board I saw the message "RAM Configuration:", which didn't appear before.
> 
> I think the reason is the following:
> nand.h includes linux/mtd/mtd.h, which defines a macro
> #define DEBUG(n, args...) do { } while(0).
> This causes #ifdef DEBUG in line 198 of board.c to become true.
> 
> Could you please fix this?
> Thank you very much.

It's already fixed in u-boot-nand-flash.git.

-Scott

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] [PATCH 2/2] Remove prototypes of nand_init() in favor of including nand.h.
  2008-07-01 15:07   ` Scott Wood
@ 2008-07-02  5:28     ` Jens Gehrlein
  2008-07-09 21:52     ` Wolfgang Denk
  1 sibling, 0 replies; 5+ messages in thread
From: Jens Gehrlein @ 2008-07-02  5:28 UTC (permalink / raw)
  To: u-boot

Hi Scott,

Scott Wood schrieb:
> Jens Gehrlein wrote:
>> Today, I updated my local git tree to the current U-Boot. Running my 
>> board I saw the message "RAM Configuration:", which didn't appear before.
>>
>> I think the reason is the following:
>> nand.h includes linux/mtd/mtd.h, which defines a macro
>> #define DEBUG(n, args...) do { } while(0).
>> This causes #ifdef DEBUG in line 198 of board.c to become true.
>>
>> Could you please fix this?
>> Thank you very much.
> 
> It's already fixed in u-boot-nand-flash.git.
> 
> -Scott

Okay. Found it. Thank you for the hint.

Kind regards,
Jens

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] [PATCH 2/2] Remove prototypes of nand_init() in favor of including nand.h.
  2008-07-01 15:07   ` Scott Wood
  2008-07-02  5:28     ` Jens Gehrlein
@ 2008-07-09 21:52     ` Wolfgang Denk
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2008-07-09 21:52 UTC (permalink / raw)
  To: u-boot

In message <486A4830.10300@freescale.com> you wrote:
> Jens Gehrlein wrote:
> > Today, I updated my local git tree to the current U-Boot. Running my 
> > board I saw the message "RAM Configuration:", which didn't appear before.
> > 
> > I think the reason is the following:
> > nand.h includes linux/mtd/mtd.h, which defines a macro
> > #define DEBUG(n, args...) do { } while(0).
> > This causes #ifdef DEBUG in line 198 of board.c to become true.
> > 
> > Could you please fix this?
> > Thank you very much.
> 
> It's already fixed in u-boot-nand-flash.git.

When will I see a pull request so this gets fixed in mainline, too?

I would like to have some -rc1 later this week.

Thanks in advance.

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 are an excellent tactician, Captain. You let your second in  com-
mand attack while you sit and watch for weakness.
	-- Khan Noonian Singh, "Space Seed", stardate 3141.9

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-09 21:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 15:53 [U-Boot-Users] [PATCH 2/2] Remove prototypes of nand_init() in favor of including nand.h Scott Wood
2008-07-01 14:43 ` Jens Gehrlein
2008-07-01 15:07   ` Scott Wood
2008-07-02  5:28     ` Jens Gehrlein
2008-07-09 21:52     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox