[U-Boot] [Patch v2 03/16] net/fm: Fix the endian issue of ucode uploading to IRAM

York Sun yorksun at freescale.com
Mon Sep 21 19:27:05 CEST 2015



On 09/17/2015 12:05 AM, Gong Qianyu wrote:
> From: Shaohui Xie <Shaohui.Xie at freescale.com>
> 
> Remove the redundant byte swap of the ucode before uploading to IRAM.
> 
> Signed-off-by: Hou Zhiqiang <B48286 at freescale.com>
> Signed-off-by: Shaohui Xie <Shaohui.Xie at freescale.com>
> Signed-off-by: Mingkai Hu <Mingkai.Hu at freescale.com>
> Signed-off-by: Gong Qianyu <Qianyu.Gong at freescale.com>
> ---
>  drivers/net/fm/eth.c | 69 +++++++++++++++++++++++++++-------------------------
>  drivers/net/fm/fm.c  | 11 +++++----
>  2 files changed, 42 insertions(+), 38 deletions(-)
> 
> diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
> index 6702f5a..cd05dbc 100644
> --- a/drivers/net/fm/eth.c
> +++ b/drivers/net/fm/eth.c
> @@ -109,7 +109,7 @@ static int tgec_is_fibre(struct eth_device *dev)
>  static u16 muram_readw(u16 *addr)
>  {
>  	u32 base = (u32)addr & ~0x3;
> -	u32 val32 = *(u32 *)base;
> +	u32 val32 = in_be32((u32 *)base);
>  	int byte_pos;
>  	u16 ret;

Reorder this patch with "fix compile warnings for 64-bit platform", or squash
them if possible.

York


More information about the U-Boot mailing list