U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kim Phillips <kim.phillips@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH/RFC] mpc5200: switch to CONFIG_OF_LIBFDT
Date: Thu, 30 Aug 2007 16:57:11 -0500	[thread overview]
Message-ID: <20070830165711.9982bf08.kim.phillips@freescale.com> (raw)
In-Reply-To: <20070830173340.24697.19740.stgit@trillian.cg.shawcable.net>

On Thu, 30 Aug 2007 12:20:14 -0600
Grant Likely <grant.likely@secretlab.ca> wrote:

> From: Grant Likely <grant.likely@secretlab.ca>
> 
> Here is a patch which converts the icecube* and tqm5200 boards from using
> OF_FLAT_TREE to OF_LIBFDT.  It also fixes the compile of cm5200.
> 
> It's been tested on the lite5200.
> 
> Still to be resolved: is there a better place to put the helper functions.

the way you've done them, they probably belong in libfdt space.

> diff --git a/board/icecube/icecube.c b/board/icecube/icecube.c
> index c027f6f..6a2a77a 100644
> --- a/board/icecube/icecube.c
> +++ b/board/icecube/icecube.c
> @@ -29,9 +29,11 @@
>  #include <pci.h>
>  #include <asm/processor.h>
>  
> -#if defined(CONFIG_OF_FLAT_TREE)
> -#include <ft_build.h>
> -#endif
> +#ifdef CONFIG_OF_LIBFDT
> +#include <libfdt.h>

> +#include <libfdt_env.h>
> +#include <fdt_support.h>

you really don't need (or want) the above two.

> +#endif /* CONFIG_OF_LIBFDT */
>  
> diff --git a/board/tqm5200/tqm5200.c b/board/tqm5200/tqm5200.c
> index 51f4aeb..09f1709 100644
> --- a/board/tqm5200/tqm5200.c
> +++ b/board/tqm5200/tqm5200.c
> @@ -32,9 +32,11 @@
>  #include <pci.h>
>  #include <asm/processor.h>
>  
> -#if defined(CONFIG_OF_FLAT_TREE)
> -#include <ft_build.h>
> -#endif
> +#ifdef CONFIG_OF_LIBFDT
> +#include <libfdt.h>
> +#include <libfdt_env.h>
> +#include <fdt_support.h>

ditto.

> +#endif /* CONFIG_OF_LIBFDT */

do the includes need such protection?

> +void ft_cpu_setup(void *blob, bd_t *bd)
> +{
> +	char * cpu_path = "/cpus/" OF_CPU;
> +	char * eth_path = "/" OF_SOC "/ethernet at 3000";

s/char * /char */

actually, we should get rid of OF_CPU, and OF_SOC altogether.
fdt_find_node_by_type "cpu" and "soc" should be used instead.  The cpu
update code probably belongs in lib_ppc.

Kim

  reply	other threads:[~2007-08-30 21:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-30 18:20 [U-Boot-Users] [PATCH/RFC] mpc5200: switch to CONFIG_OF_LIBFDT Grant Likely
2007-08-30 21:57 ` Kim Phillips [this message]
2007-08-30 22:33   ` Grant Likely
2007-08-31 17:39     ` Grant Likely
2007-09-03 20:23       ` Bartlomiej Sieka
2007-09-03 21:50         ` Grant Likely
2007-09-03 20:36 ` Bartlomiej Sieka
2007-09-03 21:47   ` Grant Likely
2007-09-03 21:59     ` Jerry Van Baren
2007-09-03 22:09       ` Grant Likely
2007-09-03 22:40         ` Jerry Van Baren
2007-09-03 22:55           ` Grant Likely
2007-09-04  0:18             ` Jerry Van Baren
2007-09-04  3:09               ` Grant Likely
2007-09-04  4:14                 ` Grant Likely
2007-09-04 12:39                 ` Jerry Van Baren
2007-09-04 14:46                   ` Jon Loeliger
2007-09-04 14:48                     ` Jon Loeliger
2007-09-04 14:48                     ` Grant Likely

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=20070830165711.9982bf08.kim.phillips@freescale.com \
    --to=kim.phillips@freescale.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