[U-Boot] [RFC][PATCH] fdt: Remove fdt_fixup_memory function

Wolfgang Denk wd at denx.de
Wed Apr 9 16:26:40 CEST 2014


Dear Tom Rini,

In message <1397047800-26221-1-git-send-email-trini at ti.com> you wrote:
> The fdt_fixup_memory function is only used on PowerPC where we only
> claim one memory bank in U-Boot (and then in the device tree) so we can
> call a function that just calls fdt_fixup_memory_banks(..., 1).  Call
> this directly for consistency with other architectures.

I understand what you mean and what you want, but I'm not really
happy about it.

First, the description is not correct.  In my understanding a "bank"
of memory is some memory device which, on the hardware level, is
addressed using one specific chip select signal.  On PPC, we usually
have flexible memory controllers, so e can always map all existing
memory banks such that they for a single, contiguous region.

It is causing me some creepes to introduce code that claims it is
fixing memory for only one bank - I feel this is wrong.

And is dropping the (u64) not a problem?  bd->bi_memstart is just an
"unsigned long", but fdt_fixup_memory_banks() expects a u64 ?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All these theories, diverse as they are, have two things  in  common:
they explain the observed facts, and they are completeley and utterly
wrong.                       - Terry Pratchett, _The Light Fantastic_


More information about the U-Boot mailing list