From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Christophe PLAGNIOL-VILLARD Date: Tue, 18 Nov 2008 10:33:33 +0100 Subject: [U-Boot] [PATCH 2/2] fit: Fix little endian target support In-Reply-To: <20081118085848.6810F832E89D@gemini.denx.de> References: <20081118002708.GD20874@game.jcrosoft.org> <1226968111-965-1-git-send-email-plagnioj@jcrosoft.com> <1226968111-965-2-git-send-email-plagnioj@jcrosoft.com> <20081118085848.6810F832E89D@gemini.denx.de> Message-ID: <20081118093333.GK20874@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09:58 Tue 18 Nov , Wolfgang Denk wrote: > Dear Jean-Christophe PLAGNIOL-VILLARD, > > In message <1226968111-965-2-git-send-email-plagnioj@jcrosoft.com> you wrote: > > bswap_32 and bswap_64 is for host on target we use > > cpu_to_be32 and cpu_to_be64 > > Hm.... do you consider this a style cleanup, or is there any real > problem that needs fixing? on little endian it does not compile > > > #if __BYTE_ORDER == __LITTLE_ENDIAN > > +#ifdef USE_HOSTCC > > #define fdt32_to_cpu(x) bswap_32(x) > > #define cpu_to_fdt32(x) bswap_32(x) > > #define fdt64_to_cpu(x) bswap_64(x) > > #define cpu_to_fdt64(x) bswap_64(x) > > #else > > +#define fdt32_to_cpu(x) cpu_to_be32(x) > > +#define cpu_to_fdt32(x) cpu_to_be32(x) > > +#define fdt64_to_cpu(x) cpu_to_be64(x) > > +#define cpu_to_fdt64(x) cpu_to_be64(x) > > +#endif /* USE_HOSTCC */ > > This is IMO wrong. If we implement such a change, then fdt32_to_cpu > should translate to be32_to_cpu, and fdt64_to_cpu should translate to > be64_to_cpu. > > But actually I do not see the need for this change. I've try some arm little endian platfrom without it it does not compile at all Best Regards, J.