public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bodonoghue@codehermit.ie>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 3/3] 8xx: Add OF support to adder87x board
Date: Tue, 12 Feb 2008 01:12:24 +0000	[thread overview]
Message-ID: <20080212011224.59bc32d0@neuromancer.mindspace> (raw)

Fits in with recent work done in Linux.

Adds u-boot support in conjunction with two previous patches to boot a Linux
uImage in conjunction with a .dtb generated from the in-tree adder875-uboot.dts
in recent PowerPC Linux kernel patches.

Works too !

Signed-off-by: Bryan O'Donoghue <bodonoghue@codehermit.ie>
---

diff --git a/board/adder/adder.c b/board/adder/adder.c
index aa78158..03db678 100644
--- a/board/adder/adder.c
+++ b/board/adder/adder.c
@@ -27,6 +27,12 @@
 #include <common.h>
 #include <mpc8xx.h>
 
+#if defined(CONFIG_OF_FLAT_TREE)
+	#include <ft_build.h>
+#elif defined(CONFIG_OF_LIBFDT)
+	#include <libfdt.h>
+#endif
+
 /*
  * SDRAM is single Samsung K4S643232F-T70   chip (8MB)
  *       or single Micron  MT48LC4M32B2TG-7 chip (16MB).
@@ -111,3 +117,11 @@ int checkboard( void )
 
 	return 0;
 }
+
+#if defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+	ft_cpu_setup(blob, bd);
+
+}
+#endif
diff --git a/include/configs/Adder.h b/include/configs/Adder.h
index 4304ecc..d66bc2d 100644
--- a/include/configs/Adder.h
+++ b/include/configs/Adder.h
@@ -37,6 +37,8 @@
 
 #define CONFIG_ETHER_ON_FEC1
 #define CONFIG_ETHER_ON_FEC2
+#define CONFIG_HAS_ETH0
+#define CONFIG_HAS_ETH1
 
 #if defined(CONFIG_ETHER_ON_FEC1) || defined(CONFIG_ETHER_ON_FEC2)
 #define CFG_DISCOVER_PHY
@@ -212,4 +214,13 @@
 #define BOOTFLAG_COLD		0x01	/* Normal Power-On: Boot from flash	*/
 #define BOOTFLAG_WARM		0x02	/* Software reboot			*/
 
+/* pass open firmware flat tree */
+#undef  CONFIG_OF_FLAT_TREE
+#define CONFIG_OF_LIBFDT	1
+#define CONFIG_OF_BOARD_SETUP	1
+#define CONFIG_OF_CHOSEN_UPDATE 1
+
+#define OF_CPU			"PowerPC,875 at 0"
+#define OF_SOC			"soc at ff000000"
+
 #endif /* __CONFIG_H */

             reply	other threads:[~2008-02-12  1:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12  1:12 Bryan O'Donoghue [this message]
2008-02-12 13:09 ` [U-Boot-Users] [PATCH 3/3] 8xx: Add OF support to adder87x board Jerry Van Baren
2008-02-12 19:13 ` Scott Wood
2008-02-12 23:42   ` Bryan O'Donoghue
2008-02-12 23:44     ` Scott Wood

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=20080212011224.59bc32d0@neuromancer.mindspace \
    --to=bodonoghue@codehermit.ie \
    --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