[U-Boot] [PATCH] mx53loco: Fix PMIC name

Robert Nelson robertcnelson at gmail.com
Wed Jan 2 20:58:45 CET 2013


On Wed, Jan 2, 2013 at 1:42 PM, Troy Kisky
<troy.kisky at boundarydevices.com> wrote:
> On 1/2/2013 11:33 AM, Fabio Estevam wrote:
>>
>> Thanks for bisecting, Robert. Troy/Stefano, Any suggestions about this? It
>> would be really nice if we could keep mx53loco functional when using gcc
>> 4.6.2. Regards, Fabio Estevam
>
> Could you see if this patch makes any difference? It still needs cleaned up
> some before mainline
> [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512
>
> diff --git a/tools/imximage.c b/tools/imximage.c
> index 63f88b6..7e54e97 100644
> --- a/tools/imximage.c
> +++ b/tools/imximage.c
> @@ -494,6 +494,8 @@ static void imximage_print_header(const void *ptr)
>         }
>  }
>  +#define ALIGN(a, b)   (((a) + (b) - 1) & ~((b) - 1))
> +
>  static void imximage_set_header(void *ptr, struct stat *sbuf, int ifd,
>                                 struct mkimage_params *params)
>  {
> @@ -515,7 +517,13 @@ static void imximage_set_header(void *ptr, struct stat
> *sbuf, int ifd,
>         /* Set the imx header */
>         (*set_imx_hdr)(imxhdr, dcd_len, params->ep, imxhdr->flash_offset);
> -       *header_size_ptr = sbuf->st_size + imxhdr->flash_offset;
> +       /*
> +        * ROM bug alert
> +        * mx53 only loads 512 byte multiples.
> +        * The remaining fraction of a block bytes would
> +        * not be loaded.
> +        */
> +       *header_size_ptr = ALIGN(sbuf->st_size + imxhdr->flash_offset, 512);
>  }
>   int imximage_check_params(struct mkimage_params *params)
> -- 1.7.9.5

Sweet! Thanks Troy,

That fixes it on my Dialog based mx53loco with linaro's 4.7.3 gcc toolchain...

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/


More information about the U-Boot mailing list