From patchwork Sat Mar 9 07:35:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Bansal X-Patchwork-Id: 1053797 X-Patchwork-Delegate: prabhakar@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="c4eyCU4d"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44Gbkr1ZZHz9s4Y for ; Sat, 9 Mar 2019 18:35:48 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id D3FBEC21DB5; Sat, 9 Mar 2019 07:35:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAD_ENC_HEADER, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 50136C21C38; Sat, 9 Mar 2019 07:35:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8E344C21C38; Sat, 9 Mar 2019 07:35:41 +0000 (UTC) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40044.outbound.protection.outlook.com [40.107.4.44]) by lists.denx.de (Postfix) with ESMTPS id F4082C21BE5 for ; Sat, 9 Mar 2019 07:35:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XaPfOV8dX/pXlUFTFKmd2lOCGG3ifusM7ncEJaCW9oY=; b=c4eyCU4d7Nk2HpyQvKur128eV1uYg9g8tofr3gtwtqxhftXvZoDsbxrLto19LpUCzwRhxQFFPP2m3JC7Z0a0MhS+Ix0+GMVdcG0E6r3JG6vxdmkXPfhi7GOIF8rzxv5Dxya3Khussr7joGz97BVnTyqx4+DD41JHQoYvCGsWq7Q= Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com (10.168.65.10) by AM4SPR00MB270.eurprd04.prod.outlook.com (10.171.88.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.19; Sat, 9 Mar 2019 07:35:39 +0000 Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::e5db:1f34:f9d2:bdb0]) by VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::e5db:1f34:f9d2:bdb0%7]) with mapi id 15.20.1686.020; Sat, 9 Mar 2019 07:35:39 +0000 From: Pankaj Bansal To: Meenakshi Aggarwal , Priyanka Jain , Prabhakar Kushwaha Thread-Topic: [PATCH] board/freescale: Fix for not loading MC firmware correctly Thread-Index: AQHU1kqxk5VqN8+7Gku6cqOJvhJmuA== Date: Sat, 9 Mar 2019 07:35:39 +0000 Message-ID: <20190309130001.27348-1-pankaj.bansal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR01CA0157.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:68::27) To VI1PR0401MB2496.eurprd04.prod.outlook.com (2603:10a6:800:56::10) x-mailer: git-send-email 2.17.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=pankaj.bansal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [92.120.1.69] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9883e348-cbe9-4452-34e7-08d6a461d3ca x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM4SPR00MB270; x-ms-traffictypediagnostic: AM4SPR00MB270: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; AM4SPR00MB270; 23:lWT3Lrbh+njIvmwj4cCNF1IjhENq0lRAW0L0H7Y?= =?iso-8859-1?q?47FWoQpIoeQAO+3u/6BAVZe/e?= =?iso-8859-1?q?IctSOQYXTf9xDUzTWpbs7XxrAG0U3ODHrhqt6rZ5/ihUAcSYoIU?= =?iso-8859-1?q?QPk5Ho1JuyYMgrbz9owMhTPhkVpg8vqlchFUQQVQxZLQqNXMbvE?= =?iso-8859-1?q?KeMoqCa7PKPAZfsgZ71bFNzFxUHs8/qseuyaK+cUGIgevOBDUHC?= =?iso-8859-1?q?uw+5BkQC3ATZkmLGifmIog6eEUd3wnEOicKRYuF5yaaXfL2kf40?= =?iso-8859-1?q?8BXdzwvy5BayixFJuz04xTCgI7IAMcRnm2F+wxXreOVL2al5ymK?= =?iso-8859-1?q?X0eC9/5LrPFYQjaan+GuttBL7fbqfGXge+5Ki0JyOTYQS4TKs/y?= =?iso-8859-1?q?dtnYkw+JGn8Turi4NMoOSwJw9fQGavM43bpKNE9oUJ2hC8VsBxj?= =?iso-8859-1?q?m24KelCU/1tjw7ZE58+Q0dQB/x/UJu0zGwKnRJZAq77HaGZzN1j?= =?iso-8859-1?q?UNFbu3Nsf2D0K2VqDvMm7OqYsPFDjPlctCXLo9UgPtEslRCXIlO?= =?iso-8859-1?q?NOTkmu703406CdXFI0S7I3HY9xCypQpIPBjgLdBs5DAJOCWKEcr?= =?iso-8859-1?q?jjVnE7EPSmBXhaWMoVYp5m5I6Q53iMhS0hqxBGf+fQdzDvGUjF+?= =?iso-8859-1?q?ufypGy1Za4rtGfzeZ5pfdmu0FsQ3gvFkJxs8eEn8lPbAK+grV8F?= =?iso-8859-1?q?r3U6hDcbW/BIlEzybIf9i5dS/gsyOTLO/20KZq2GKd0onqCeYCG?= =?iso-8859-1?q?fA8zeH2pV/sEk8d7mNERvsCKqkDeo9AICq09kgWUQlbX5zk5PH0?= =?iso-8859-1?q?OArGd9tdWY0TGAxdxXPn8BKcQhJKFZrtsLoLK14S+XdDD//3yEq?= =?iso-8859-1?q?qQ5HAGepvTYTUnMQmlNDk2lMsLdhSaPRYDCy98pxmMxfoKHY8wx?= =?iso-8859-1?q?DXRXRxLXFN3MRy4968tqULhRMM+68epSNLox3nZkC+r6aR81Qg1?= =?iso-8859-1?q?AoDQ//ik6Hi4RrooAeBt1vU+BrHbkoOuTAsq0H/WLHFX05uzdvO?= =?iso-8859-1?q?gxp/AfwUxsCnVfBKlhE/JKq2yHqChZ4qlzeQAeLs/AwbP9FNQDz?= =?iso-8859-1?q?iXZ/uBWQ4BEX7w/31Iv8LR/hLpR59jFFm62QDnXfTMcnpTf3b5v?= =?iso-8859-1?q?HrR/kgV+fLZhOObLSN7MvcRfgDrfCkb3aXK3Ef8+RJ8lpw02hol?= =?iso-8859-1?q?u7l2XtomhrpkTOjsA7Pl/IF1V31banZxv1pddDKWnAUQ38/q720?= =?iso-8859-1?q?23SBFFrFjAyyN7K0H6pv8knqZrB8zz?= x-microsoft-antispam-prvs: x-forefront-prvs: 0971922F40 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(136003)(39860400002)(346002)(366004)(396003)(199004)(189003)(486006)(8936002)(68736007)(71190400001)(6506007)(14444005)(66066001)(52116002)(110136005)(1076003)(386003)(54906003)(102836004)(5660300002)(71200400001)(97736004)(256004)(6436002)(50226002)(2906002)(305945005)(6636002)(36756003)(6486002)(86362001)(44832011)(7736002)(2616005)(81166006)(99286004)(476003)(26005)(478600001)(53936002)(25786009)(316002)(14454004)(106356001)(105586002)(186003)(6116002)(6512007)(8676002)(81156014)(3846002)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4SPR00MB270; H:VI1PR0401MB2496.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: osiDPq5zBsWKfyIOiZ8jbBGDKsCH1Og3oWtF9uFD9mGG6ifpg1M7HTRHyjNKgvIldnOo6LzUh6l6m29JLycUZxco4rLhW/Y9y9xpkQDsoH6Yavs9t1EE0OtUDLRm2H4rAe9sGAGghebGIMC87Ue3bTQmIVdBqBIl8dLLgyQeMcgE3fLocFs7yxg1GwyeqdSrjIUy3EBg3TMTsgz8DK5G/NhLiB3aIgJiuvtvaFaj4kvo/I0xZcC9yegJje+zXJXKYF1ZxDtd10YoZcCMDjt0MsfXBAON2Gti6yL3N/fcGWtzT3q6Xa45DRaxwAtIv6uvDGCRBUVenBUs3WTCPclLvdasSV3aLTCyhSGSpIYLdi51DGPMVWIalAOwklEepekyUunT33Kw5LSgiLbHnV5SzH0tc9Z/k0eoaIoLHvmbS1U= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9883e348-cbe9-4452-34e7-08d6a461d3ca X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2019 07:35:39.6385 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4SPR00MB270 Cc: "u-boot@lists.denx.de" Subject: [U-Boot] [PATCH] board/freescale: Fix for not loading MC firmware correctly X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Issue: during SD boot, following error comes: MMC read: dev # 0, block # 20480, count 2048 ... 2048 blocks read: OK MMC read: dev # 0, block # 28672, count 2048 ... 2048 blocks read: OK fsl-mc: ERR: Bad firmware image (bad FIT header) Hit any key to stop autoboot: 0 Cause: mc 10.14.3 file size is 1064880, the value is 0x820 blocks which is more than 0x800. The default DPC loading address 0x80100000 has overlap with MC loading address 0x80000000, since the size of MC is over 1MB. Fix: update the MC and dpc address as per their addresses in XSPI flash. i.e. in xspi flash MC address is 0x20a00000 so corresponding address in dram when loading MC firmware from mmc is 0x80a00000. similarly dpc is @ 0x20e00000 in xspi flash and 0x80e00000 in dram when loaded from mmc. This same approach is being followed in other cases also in same file, e.g. esbc_validate 0x80740000 <=> esbc_validate 0x20740000 On same lines modify the address of dpl to 0x80d00000 Signed-off-by: Pankaj Bansal --- include/configs/lx2160a_common.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h index 17cfd7bfd7..40ef364c22 100644 --- a/include/configs/lx2160a_common.h +++ b/include/configs/lx2160a_common.h @@ -217,14 +217,14 @@ int select_i2c_ch_pca9547_sec(unsigned char ch); "fsl_mc start mc 0x20a00000 0x20e00000\0" #define SD_MC_INIT_CMD \ - "mmc read 0x80000000 0x5000 0x800;" \ - "mmc read 0x80100000 0x7000 0x800;" \ + "mmc read 0x80a00000 0x5000 0x1800;" \ + "mmc read 0x80e00000 0x7000 0x800;" \ "env exists secureboot && " \ "mmc read 0x80700000 0x3800 0x10 && " \ "mmc read 0x80740000 0x3A00 0x10 && " \ "esbc_validate 0x80700000 && " \ "esbc_validate 0x80740000 ;" \ - "fsl_mc start mc 0x80000000 0x80100000\0" + "fsl_mc start mc 0x80a00000 0x80e00000\0" #define EXTRA_ENV_SETTINGS \ "hwconfig=fsl_ddr:bank_intlv=auto\0" \ @@ -289,11 +289,11 @@ int select_i2c_ch_pca9547_sec(unsigned char ch); #define SD_BOOTCOMMAND \ "env exists mcinitcmd && mmcinfo; " \ - "mmc read 0x80001000 0x6800 0x800; " \ + "mmc read 0x80d00000 0x6800 0x800; " \ "env exists mcinitcmd && env exists secureboot " \ " && mmc read 0x80780000 0x3C00 0x10 " \ "&& esbc_validate 0x80780000;env exists mcinitcmd " \ - "&& fsl_mc lazyapply dpl 0x80001000;" \ + "&& fsl_mc lazyapply dpl 0x80d00000;" \ "run distro_bootcmd;run sd_bootcmd;" \ "env exists secureboot && esbc_halt;"