* [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set
@ 2008-05-15 14:08 Jason McMullan
2008-05-15 14:08 ` Jason McMullan
0 siblings, 1 reply; 9+ messages in thread
From: Jason McMullan @ 2008-05-15 14:08 UTC (permalink / raw)
To: u-boot
This patch add the standard 'nand_init()' call to the mips generic
'board_init_r()' call, bringing MIPS in line with the other architectures.
Signed-off-by: Jason McMullan <mcmullan@netapp.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set
2008-05-15 14:08 Jason McMullan
@ 2008-05-15 14:08 ` Jason McMullan
2008-05-15 14:14 ` Scott Wood
0 siblings, 1 reply; 9+ messages in thread
From: Jason McMullan @ 2008-05-15 14:08 UTC (permalink / raw)
To: u-boot
---
lib_mips/board.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/lib_mips/board.c b/lib_mips/board.c
index 1645f2c..7237842 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -48,6 +48,8 @@ extern int incaip_set_cpuclk(void);
extern ulong uboot_end_data;
extern ulong uboot_end;
+extern void nand_init(void);
+
ulong monitor_flash_len;
const char version_string[] =
@@ -416,6 +418,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
}
#endif
+#ifdef CONFIG_CMD_NAND
+ puts("NAND: ");
+ nand_init(); /* go init the NAND */
+#endif
+
#if defined(CONFIG_MISC_INIT_R)
/* miscellaneous platform dependent initialisations */
misc_init_r ();
--
1.5.4.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set
2008-05-15 14:08 ` Jason McMullan
@ 2008-05-15 14:14 ` Scott Wood
0 siblings, 0 replies; 9+ messages in thread
From: Scott Wood @ 2008-05-15 14:14 UTC (permalink / raw)
To: u-boot
On Thu, May 15, 2008 at 10:08:31AM -0400, Jason McMullan wrote:
> ---
> lib_mips/board.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/lib_mips/board.c b/lib_mips/board.c
> index 1645f2c..7237842 100644
> --- a/lib_mips/board.c
> +++ b/lib_mips/board.c
> @@ -48,6 +48,8 @@ extern int incaip_set_cpuclk(void);
> extern ulong uboot_end_data;
> extern ulong uboot_end;
>
> +extern void nand_init(void);
> +
Please include <nand.h> instead.
-Scott
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set
@ 2008-05-15 14:30 Jason McMullan
2008-05-16 16:26 ` Shinya Kuribayashi
2008-05-22 14:50 ` Shinya Kuribayashi
0 siblings, 2 replies; 9+ messages in thread
From: Jason McMullan @ 2008-05-15 14:30 UTC (permalink / raw)
To: u-boot
---
lib_mips/board.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib_mips/board.c b/lib_mips/board.c
index 1645f2c..e33070d 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -28,6 +28,7 @@
#include <version.h>
#include <net.h>
#include <environment.h>
+#include <nand.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -416,6 +417,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
}
#endif
+#ifdef CONFIG_CMD_NAND
+ puts("NAND: ");
+ nand_init(); /* go init the NAND */
+#endif
+
#if defined(CONFIG_MISC_INIT_R)
/* miscellaneous platform dependent initialisations */
misc_init_r ();
--
1.5.4.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set
2008-05-15 14:30 [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set Jason McMullan
@ 2008-05-16 16:26 ` Shinya Kuribayashi
2008-05-16 18:39 ` [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in genericboard " McMullan, Jason
2008-05-16 19:32 ` [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board " Scott Wood
2008-05-22 14:50 ` Shinya Kuribayashi
1 sibling, 2 replies; 9+ messages in thread
From: Shinya Kuribayashi @ 2008-05-16 16:26 UTC (permalink / raw)
To: u-boot
Hi Jason,
Jason McMullan wrote:
> diff --git a/lib_mips/board.c b/lib_mips/board.c
> index 1645f2c..e33070d 100644
> --- a/lib_mips/board.c
> +++ b/lib_mips/board.c
> @@ -28,6 +28,7 @@
> #include <version.h>
> #include <net.h>
> #include <environment.h>
> +#include <nand.h>
This will break build. According to the blackfin, we can't even include
<nand.h> if it's not configured.
http://git.denx.de/?p=u-boot.git;a=blob;f=lib_blackfin/board.c;h=43d8be8e21f25e37e7ade0eea86549b125775152;hb=a38dc3ea8614f8b0c41e432b445a9959b9711295#l25
# by the way, all ARCHs which need nand_init() should include <nand.h>
in the same way as blackfin, shouldn't they?
>
> DECLARE_GLOBAL_DATA_PTR;
>
> @@ -416,6 +417,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
> }
> #endif
>
> +#ifdef CONFIG_CMD_NAND
> + puts("NAND: ");
> + nand_init(); /* go init the NAND */
> +#endif
> +
> #if defined(CONFIG_MISC_INIT_R)
> /* miscellaneous platform dependent initialisations */
> misc_init_r ();
I'm not familiar with NAND, so don't know that above is a good timing to
call nand_init(). If this works for you, I'm fine ATM.
Thanks!
Shinya
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in genericboard initialization when CONFIG_CMD_NAND is set
2008-05-16 16:26 ` Shinya Kuribayashi
@ 2008-05-16 18:39 ` McMullan, Jason
2008-05-16 19:32 ` [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board " Scott Wood
1 sibling, 0 replies; 9+ messages in thread
From: McMullan, Jason @ 2008-05-16 18:39 UTC (permalink / raw)
To: u-boot
On Sat, 2008-05-17 at 01:26 +0900, Shinya Kuribayashi wrote:
> Jason McMullan wrote:
> > +#include <nand.h>
>
> This will break build. According to the blackfin, we can't even include
> <nand.h> if it's not configured.
That is, of course, why I originally just had 'extern int
nand_init(void)' instead of the #include.
So, should I send in another patch with #ifdef CONFIG_CMD_NAND around
the #include?
That seems messy, as including any common include nand.h shouldn't break
the build regardless of the state of the CONFIG_CMD_* defines.
But that's just my opinion.
Jason McMullan
MTS SW
System Firmware
NetApp
724.741.5011 Fax
724.741.5166 Direct
412.656.3519 Mobile
jason.mcmullan at netapp.com
www.netapp.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080516/d1dfc601/attachment.pgp
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set
2008-05-16 16:26 ` Shinya Kuribayashi
2008-05-16 18:39 ` [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in genericboard " McMullan, Jason
@ 2008-05-16 19:32 ` Scott Wood
2008-05-17 1:07 ` Shinya Kuribayashi
1 sibling, 1 reply; 9+ messages in thread
From: Scott Wood @ 2008-05-16 19:32 UTC (permalink / raw)
To: u-boot
On Sat, May 17, 2008 at 01:26:27AM +0900, Shinya Kuribayashi wrote:
> Hi Jason,
>
> Jason McMullan wrote:
> > diff --git a/lib_mips/board.c b/lib_mips/board.c
> > index 1645f2c..e33070d 100644
> > --- a/lib_mips/board.c
> > +++ b/lib_mips/board.c
> > @@ -28,6 +28,7 @@
> > #include <version.h>
> > #include <net.h>
> > #include <environment.h>
> > +#include <nand.h>
>
> This will break build. According to the blackfin, we can't even include
> <nand.h> if it's not configured.
Let's fix that, then. What is the error?
I just tried doing something similar on ppc, and it built fine.
-Scott
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set
2008-05-16 19:32 ` [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board " Scott Wood
@ 2008-05-17 1:07 ` Shinya Kuribayashi
0 siblings, 0 replies; 9+ messages in thread
From: Shinya Kuribayashi @ 2008-05-17 1:07 UTC (permalink / raw)
To: u-boot
Scott Wood wrote:
>> This will break build. According to the blackfin, we can't even include
>> <nand.h> if it's not configured.
>
> Let's fix that, then. What is the error?
mips-linux-gnu-gcc -g -Os -D__KERNEL__ -DTEXT_BASE=0xbfc00000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/codesourcery/mips-4.2/bin/../lib/gcc/mips-linux-gnu/4.2.3/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -march=r5500 -Wa,--trap -Wall -Wstrict-prototypes -c -o board.o board.c
In file included from /home/skuribay/devel/u-boot.git/include/nand.h:29,
from board.c:31:
/home/skuribay/devel/u-boot.git/include/linux/mtd/nand.h:413: error: 'NAND_MAX_CHIPS' undeclared here (not in a function)
make[1]: *** [board.o] Error 1
make[1]: Leaving directory `/home/skuribay/devel/u-boot.git/lib_mips'
make: *** [lib_mips/libmips.a] Error 2
skuribay at debian:~/devel/u-boot.git$
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set
2008-05-15 14:30 [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set Jason McMullan
2008-05-16 16:26 ` Shinya Kuribayashi
@ 2008-05-22 14:50 ` Shinya Kuribayashi
1 sibling, 0 replies; 9+ messages in thread
From: Shinya Kuribayashi @ 2008-05-22 14:50 UTC (permalink / raw)
To: u-boot
Jason McMullan wrote:
> ---
> lib_mips/board.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
As you submitted this patch and its description separately, I manually
combined them with two CodingStyle fixes. Now you seem to be getting
along with git :-)
Applied, thanks. Will be pushed out soon.
Shinya
================================>
[MIPS] lib_mips/board.c: Add nand_init
This patch adds the standard 'nand_init()' call to the mips generic
'board_init_r()' call, bringing MIPS in line with the other architectures.
Signed-off-by: Jason McMullan <mcmullan@netapp.com>
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---
lib_mips/board.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib_mips/board.c b/lib_mips/board.c
index 1645f2c..43cfc17 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -28,6 +28,7 @@
#include <version.h>
#include <net.h>
#include <environment.h>
+#include <nand.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -416,6 +417,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
}
#endif
+#ifdef CONFIG_CMD_NAND
+ puts ("NAND: ");
+ nand_init (); /* go init the NAND */
+#endif
+
#if defined(CONFIG_MISC_INIT_R)
/* miscellaneous platform dependent initialisations */
misc_init_r ();
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-05-22 14:50 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-15 14:30 [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board initialization when CONFIG_CMD_NAND is set Jason McMullan
2008-05-16 16:26 ` Shinya Kuribayashi
2008-05-16 18:39 ` [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in genericboard " McMullan, Jason
2008-05-16 19:32 ` [U-Boot-Users] [PATCH] mips: Call 'nand_init()' in generic board " Scott Wood
2008-05-17 1:07 ` Shinya Kuribayashi
2008-05-22 14:50 ` Shinya Kuribayashi
-- strict thread matches above, loose matches on Subject: below --
2008-05-15 14:08 Jason McMullan
2008-05-15 14:08 ` Jason McMullan
2008-05-15 14:14 ` Scott Wood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox