public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH 3/3] 8xx: Add OF support to adder87x board
@ 2008-02-12  1:12 Bryan O'Donoghue
  2008-02-12 13:09 ` Jerry Van Baren
  2008-02-12 19:13 ` Scott Wood
  0 siblings, 2 replies; 5+ messages in thread
From: Bryan O'Donoghue @ 2008-02-12  1:12 UTC (permalink / raw)
  To: u-boot

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 */

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

* [U-Boot-Users] [PATCH 3/3] 8xx: Add OF support to adder87x board
  2008-02-12  1:12 [U-Boot-Users] [PATCH 3/3] 8xx: Add OF support to adder87x board Bryan O'Donoghue
@ 2008-02-12 13:09 ` Jerry Van Baren
  2008-02-12 19:13 ` Scott Wood
  1 sibling, 0 replies; 5+ messages in thread
From: Jerry Van Baren @ 2008-02-12 13:09 UTC (permalink / raw)
  To: u-boot

Bryan O'Donoghue wrote:
> 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
> +

Please do only "#if defined(CONFIG_OF_LIBFDT)", skip CONFIG_OF_FLAT_TREE 
support entirely.  CONFIG_OF_FLAT_TREE is deprecated and will be removed 
RSN.

[snip]

> +/* pass open firmware flat tree */
> +#undef  CONFIG_OF_FLAT_TREE

Obviously, this goes too.

Thanks,
gvb

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

* [U-Boot-Users] [PATCH 3/3] 8xx: Add OF support to adder87x board
  2008-02-12  1:12 [U-Boot-Users] [PATCH 3/3] 8xx: Add OF support to adder87x board Bryan O'Donoghue
  2008-02-12 13:09 ` Jerry Van Baren
@ 2008-02-12 19:13 ` Scott Wood
  2008-02-12 23:42   ` Bryan O'Donoghue
  1 sibling, 1 reply; 5+ messages in thread
From: Scott Wood @ 2008-02-12 19:13 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 12, 2008 at 01:12:24AM +0000, Bryan O'Donoghue wrote:
> +#define OF_CPU			"PowerPC,875 at 0"
> +#define OF_SOC			"soc at ff000000"

Do we really still need this?  We should be able to search by compatible or
device_type instead of using hardcoded paths.

-Scott

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

* [U-Boot-Users] [PATCH 3/3] 8xx: Add OF support to adder87x board
  2008-02-12 19:13 ` Scott Wood
@ 2008-02-12 23:42   ` Bryan O'Donoghue
  2008-02-12 23:44     ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Bryan O'Donoghue @ 2008-02-12 23:42 UTC (permalink / raw)
  To: u-boot

On Tue, 12 Feb 2008 13:13:13 -0600
Scott Wood <scottwood@freescale.com> wrote:

> On Tue, Feb 12, 2008 at 01:12:24AM +0000, Bryan O'Donoghue wrote:
> > +#define OF_CPU			"PowerPC,875 at 0"
> > +#define OF_SOC			"soc at ff000000"
> 
> Do we really still need this?  We should be able to search by compatible or
> device_type instead of using hardcoded paths.

Still ? Beats me Scott - you probably know better then I do - I really just
cloned some of the entries in the other board .h files - which seemed to make
sense at the time...

I'll have a go at removing them for the next drop...

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

* [U-Boot-Users] [PATCH 3/3] 8xx: Add OF support to adder87x board
  2008-02-12 23:42   ` Bryan O'Donoghue
@ 2008-02-12 23:44     ` Scott Wood
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Wood @ 2008-02-12 23:44 UTC (permalink / raw)
  To: u-boot

Bryan O'Donoghue wrote:
> Still ? Beats me Scott - you probably know better then I do - I really just
> cloned some of the entries in the other board .h files - which seemed to make
> sense at the time...
> 
> I'll have a go at removing them for the next drop...

They're leftovers from before we had node iteration ability.

-Scott

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

end of thread, other threads:[~2008-02-12 23:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-12  1:12 [U-Boot-Users] [PATCH 3/3] 8xx: Add OF support to adder87x board Bryan O'Donoghue
2008-02-12 13:09 ` 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

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