From: Jerry Van Baren <gvb.uboot@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [RFC] Remove some redundant fdt code from do_bootm_linux
Date: Thu, 17 May 2007 23:34:09 -0400 [thread overview]
Message-ID: <464D1EB1.3060101@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0705171808100.26293@ld0175-tx32.am.freescale.net>
Andy Fleming wrote:
> There were a number of places where libfdt and the old ft code
> were doing essentially the same thing. By adding some stubs for
> some of the libfdt convenience functions, we can eliminate some
> of these redundancies.
>
> This patch has some overlap with a patch Jerry already submitted, so I'm
> not expecting this to apply. I'm just interested in opinions as to
> whether this is a good approach.
>
> In the process:
> * Eliminated a bug in the libfdt error handling for uImages where
> a correct header would trigger an error
Did my latest patch set fix this or am I still missing it?
> * Moved the debug message about transferring control to Linux
> next to the first potential invocation of Linux
Yup, that's all changed now, hopefully for the better... If I missed
something or if something could be improved, hollar.
> * Did a few minor formatting tweaks to improve readability
> * Removed what appeared to be redundant calls to fdt_chosen,
> fdt_env, and fdt_bd_t
Hmm, that sure looks redundant. What was I thinking??? Oh yeah, that's
right, I wasn't thinking when I hacked up bootm. :-(
> * Eliminated the #ifdef protecting the if statement which checked
> if we had an of_flat_tree. If CONFIG_OF_FLAT_TREE or
> CONFIG_OF_LIBFDT aren't defined, then of_flat_tree will be NULL
> (and any compiler will eliminate the check in that case)
Makes sense. Simplifying is GOOD. We may want to keep the #ifdef
around "of_data" to prevent a "unused variable" compiler warning (or
maybe it isn't a problem, I didn't really look at it).
> * Made clear in a few places that LIBFDT and OF_FLAT_TREE are
> mutually exclusive
> * Added definition for fdt_check_header (evaluates to 0 if the
> header is of type OF_DT_HEADER
> * Added definition for fdt_totalsize() (evaluates to the value of totalsize)
> * Added a stub for fdt_open_into() which just does the memmove and returns 0
WRT the above, my intent is to evangelize for LIBFDT, convert the other
targets that use fdt to LIBFDT, and remove OF_FLAT_TREE. That solves
the above bullets in a whole lot cleaner fashion. LIBFDT does
everything OF_FLAT_TREE does and much more. It's just a problem of time
(unlike Wolfgang, I need to sleep ;-).
The conversion is not difficult, following my lead on the MPC8360.
There are three functions that need to be updated. The three functions
that need to be converted are:
* ft_board_setup
* ft_cpu_setup
* ft_pci_setup
See the table in the ToDo section:
<http://www.denx.de/wiki/view/UBoot/UBootFdtInfo#ToDo>
> Signed-off-by: Andy Fleming <afleming@freescale.com>
Thanks for the thoughts & proposals,
gvb
prev parent reply other threads:[~2007-05-18 3:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-17 23:10 [U-Boot-Users] [RFC] Remove some redundant fdt code from do_bootm_linux Andy Fleming
2007-05-18 3:34 ` Jerry Van Baren [this message]
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=464D1EB1.3060101@gmail.com \
--to=gvb.uboot@gmail.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