From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Fri, 24 Jan 2014 09:57:14 -0800 Subject: [U-Boot] [PATCH][v2] driver/ifc:Change accessor function to take care of endianness In-Reply-To: <52DEAF8F.1010204@freescale.com> References: <1390028310-30861-1-git-send-email-prabhakar@freescale.com> <20140118082452.BC291380481@gemini.denx.de> <1390258263.24905.337.camel@snotra.buserror.net> <20140121054228.DE99438201D@gemini.denx.de> <20140121063457.622CC3821EA@gemini.denx.de> <20140121091420.632C23821EA@gemini.denx.de> <1390325356.24905.485.camel@snotra.buserror.net> <52DEAF8F.1010204@freescale.com> Message-ID: <52E2A97A.7030509@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/21/2014 09:34 AM, York Sun wrote: > On 01/21/2014 09:29 AM, Scott Wood wrote: >> On Tue, 2014-01-21 at 10:14 +0100, Wolfgang Denk wrote: >>> Dear York, >>> >>> In message you wrote: >>>> >>>>> On second thought, I also think we should avoid solutions where the >>>>> BE/LE test has to be done for each and every I/O accessor call again >>>>> and again. We should rather do this just once, and for example set >>>>> function pointers as needed (hoping that this driver will only be >>>>> needed after relocation, so we have writable data segment). >>>> >>>> I like the idea of setting it just once, but I don't see how to >>>> implement it. A pointer is probably not the solution, because we do need >>>> some drivers before relocation. >>> >>> "some drivers before relocation" - how many which are these? > > IFC, DDR, I2C (only 32-bit controller is concerned), GUT > >>> >>> Also, is it really necessary to make the decision about endianess at >>> runtime? We don't have multi-board support in U-Boot yet, so when you >>> build an image you know exactly which SoC you are building for, so you >>> should be able to make the selection at compile time? >> >> It is done at compile time in this patch. >> > > No. It is not necessary to do it at run time. It would be easier to use a switch > to decide at compiling time. It does involve many changes to implement the wrapper. > Acked-by: York Sun Do we all agree on this patch? York