From patchwork Wed Jan 2 19:42:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 209138 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 29C882C008C for ; Thu, 3 Jan 2013 06:48:08 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9B03F4A0C0; Wed, 2 Jan 2013 20:48:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9rZ1yEQFoZqY; Wed, 2 Jan 2013 20:48:04 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8826D4A0C1; Wed, 2 Jan 2013 20:48:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1FC8D4A0C1 for ; Wed, 2 Jan 2013 20:48:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zj0MHpraK3FN for ; Wed, 2 Jan 2013 20:48:00 +0100 (CET) X-Greylist: delayed 338 seconds by postgrey-1.27 at theia; Wed, 02 Jan 2013 20:47:58 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by theia.denx.de (Postfix) with ESMTPS id 0F72A4A0C0 for ; Wed, 2 Jan 2013 20:47:58 +0100 (CET) Received: by mail-pa0-f45.google.com with SMTP id bg2so8147992pad.4 for ; Wed, 02 Jan 2013 11:47:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding:x-gm-message-state; bh=OFhqXXhQyEjmDRYOW5cAfD2tD61Bgg+yB3p6b8bk4LA=; b=dOrjLOSWIgHWLmA0aftRsYuxwrEbjUH1QGPUUnYW/4H+C++fvaLNir2iuEPxyNmVtY o3NLwexyHsvztEM8J3j1DMjDyZUczRo1iZtccYKqU+5OQvS2RR4K93OfdX5G6ZEdFknN MJfdl0Nf+SSPlwLr/vSyBEzY/QvB/0gkHeNT8zHanVNrUkeDJqzq0g9VToMeDrs3f3g5 u37DAN2/eP8e4Ufo9i8dNUjakisDEdU24hzFdW93vRxbOa7iy0AlhpLqnUJuEyJeUCdp YWOQGYjG4kSfgnSGd27HVux55OYlKJO1ZT5EPEDHJ+wNjkoxnwP0kL4GD5c3KFrzLu5A zNZQ== X-Received: by 10.66.89.42 with SMTP id bl10mr139362691pab.2.1357155738858; Wed, 02 Jan 2013 11:42:18 -0800 (PST) Received: from [29.6.1.8] ([70.96.116.236]) by mx.google.com with ESMTPS id f5sm29794001pav.22.2013.01.02.11.42.16 (version=SSLv3 cipher=OTHER); Wed, 02 Jan 2013 11:42:17 -0800 (PST) Message-ID: <50E48D98.9020609@boundarydevices.com> Date: Wed, 02 Jan 2013 12:42:16 -0700 From: Troy Kisky User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Fabio Estevam References: <1355243818-23962-1-git-send-email-fabio.estevam@freescale.com> In-Reply-To: X-Gm-Message-State: ALoCoQnHLoCRSjjeT4LxbEaH15vHQnbZOokcKRqJfYNgAUbnmst6KBVQzpPi8Q1obvjIam+LLAG/ Cc: Fabio Estevam , =?UTF-8?B?VmHFoXV0?= , u-boot@lists.denx.de, =?UTF-8?B?TWFyZWsg?=@theia.denx.de Subject: Re: [U-Boot] [PATCH] mx53loco: Fix PMIC name X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 -- 1.7.9.5 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)