public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bartlomiej Sieka <tur@semihalf.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 1/6] [new uImage] Pull in libfdt if CONFIG_FIT is enabled
Date: Wed, 20 Feb 2008 18:19:56 +0100	[thread overview]
Message-ID: <20080220171956.25624.18258.stgit@pollux.denx.de> (raw)
In-Reply-To: <20080220171950.25624.71201.stgit@pollux.denx.de>

From: Marian Balakowicz <m8@semihalf.com>

New uImage format (Flattened Image Tree) requires libfdt
functionality, print out error message if CONFIG_OF_LIBFDT
is not defined.

New uImage support is enabled by defining CONFIG_FIT (and CONFIG_OF_LIBFDT).
This commit turns it on by default.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
---

 cpu/mpc5xxx/cpu.c |    2 +-
 cpu/mpc8260/cpu.c |    2 +-
 cpu/mpc8xx/cpu.c  |    2 +-
 include/image.h   |    9 +++++++++
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c
index e4d6168..7522afe 100644
--- a/cpu/mpc5xxx/cpu.c
+++ b/cpu/mpc5xxx/cpu.c
@@ -114,7 +114,7 @@ unsigned long get_tbclk (void)
 
 /* ------------------------------------------------------------------------- */
 
-#ifdef CONFIG_OF_LIBFDT
+#if defined(CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
 void ft_cpu_setup(void *blob, bd_t *bd)
 {
 	int div = in_8((void*)CFG_MBAR + 0x204) & 0x0020 ? 8 : 4;
diff --git a/cpu/mpc8260/cpu.c b/cpu/mpc8260/cpu.c
index 55e61a1..414759e 100644
--- a/cpu/mpc8260/cpu.c
+++ b/cpu/mpc8260/cpu.c
@@ -300,7 +300,7 @@ void watchdog_reset (void)
 #endif /* CONFIG_WATCHDOG */
 
 /* ------------------------------------------------------------------------- */
-#if defined(CONFIG_OF_LIBFDT)
+#if defined(CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
 void ft_cpu_setup (void *blob, bd_t *bd)
 {
 	char * cpu_path = "/cpus/" OF_CPU;
diff --git a/cpu/mpc8xx/cpu.c b/cpu/mpc8xx/cpu.c
index c878352..5d4ab82 100644
--- a/cpu/mpc8xx/cpu.c
+++ b/cpu/mpc8xx/cpu.c
@@ -638,7 +638,7 @@ void reset_8xx_watchdog (volatile immap_t * immr)
 #endif /* CONFIG_WATCHDOG */
 
 /* ------------------------------------------------------------------------- */
-#if defined(CONFIG_OF_LIBFDT)
+#if defined(CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
 void ft_cpu_setup (void *blob, bd_t *bd)
 {
 	char * cpu_path = "/cpus/" OF_CPU;
diff --git a/include/image.h b/include/image.h
index dbbbee9..ecfce72 100644
--- a/include/image.h
+++ b/include/image.h
@@ -35,10 +35,19 @@
 
 #include <asm/byteorder.h>
 #include <command.h>
+
 #ifndef USE_HOSTCC
 #include <linux/string.h>
 #include <asm/u-boot.h>
+
+/* new uImage format support enabled by default */
+#define CONFIG_FIT		1
+#define CONFIG_OF_LIBFDT	1
+
+#if defined(CONFIG_FIT) && !defined(CONFIG_OF_LIBFDT)
+#error "CONFIG_OF_LIBFDT not enabled, required by CONFIG_FIT!"
 #endif
+#endif /* USE_HOSTCC */
 
 /*
  * Operating System Codes

  reply	other threads:[~2008-02-20 17:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20 17:19 [U-Boot-Users] [PATCH 0/6] [new uImage] patchset4 - assorted patches Bartlomiej Sieka
2008-02-20 17:19 ` Bartlomiej Sieka [this message]
2008-02-20 17:20 ` [U-Boot-Users] [PATCH 2/6] [libfdt] Fix compilation errors is fdt_support.c Bartlomiej Sieka
2008-02-20 17:33   ` Jerry Van Baren
2008-02-20 19:10   ` Kumar Gala
2008-02-20 20:36     ` Bartlomiej Sieka
2008-02-20 17:20 ` [U-Boot-Users] [PATCH 3/6] [new uImage] Add gen_get_image() routine Bartlomiej Sieka
2008-02-20 19:19   ` Kumar Gala
2008-02-20 20:38     ` Bartlomiej Sieka
2008-02-20 20:44       ` Kumar Gala
2008-02-21 15:57         ` Bartlomiej Sieka
2008-02-20 17:20 ` [U-Boot-Users] [PATCH 4/6] [new uImage] Add fit_parse_conf() and fit_parse_subimage() routines Bartlomiej Sieka
2008-02-20 19:27   ` Kumar Gala
2008-02-20 20:39     ` Bartlomiej Sieka
2008-02-20 17:20 ` [U-Boot-Users] [PATCH 5/6] [new uImage] Rename and move print_image_hdr() routine Bartlomiej Sieka
2008-02-20 17:20 ` [U-Boot-Users] [PATCH 6/6] [new uImage] Fix erroneous use of image_get_magic() in fdc/usb cmds Bartlomiej Sieka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080220171956.25624.18258.stgit@pollux.denx.de \
    --to=tur@semihalf.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox