From: Wolfgang Denk Date: Wed, 09 Apr 2014 16:26:40 +0200 Subject: [U-Boot] [RFC][PATCH] fdt: Remove fdt_fixup_memory function In-Reply-To: <1397047800-26221-1-git-send-email-trini@ti.com> References: <1397047800-26221-1-git-send-email-trini@ti.com> Message-ID: <20140409142640.B2541380361@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Tom Rini, In message <1397047800-26221-1-git-send-email-trini@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_