[U-Boot] [PATCH][v2] driver/ifc:Change accessor function to take care of endianness

Wolfgang Denk wd at denx.de
Sat Jan 18 09:24:52 CET 2014


Dear Prabhakar Kushwaha,

In message <1390028310-30861-1-git-send-email-prabhakar at freescale.com> you wrote:
> IFC registers can be of type Little Endian or big Endian depending upon
> Freescale SoC. Here SoC defines the register type of IFC IP.

As is, you are only adding dead code, as there is no place anywhere in
the mainline code that defines CONFIG_SYS_FSL_IFC_LE


>  	/* Program ROW0/COL0 */
> -	out_be32(&ifc->ifc_nand.row0, page_addr);
> -	out_be32(&ifc->ifc_nand.col0, (oob ? IFC_NAND_COL_MS : 0) | column);
> +	ifc_out32(&ifc->ifc_nand.row0, page_addr);
> +	ifc_out32(&ifc->ifc_nand.col0, (oob ? IFC_NAND_COL_MS : 0) | column);

I seriously dislike the idea of introducing special I/O accessors for
a single device driver.  If more drivers would follow that example, we
will soon have a serious mess.



If would probably be useful to understand what you are trying to do if
we could see where you actually need this, so we can then try and
figure out a better implementation.

In the current form this should not be added to mainline.

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
"The whole world is about three drinks behind."     - Humphrey Bogart


More information about the U-Boot mailing list