From patchwork Wed Jul 17 10:33:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Bansal X-Patchwork-Id: 1133234 X-Patchwork-Delegate: priyanka.jain@nxp.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="CAKcHru6"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45pYXW0yhcz9sDB for ; Wed, 17 Jul 2019 20:34:03 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id BBFDEC21EA6; Wed, 17 Jul 2019 10:34:00 +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=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 B73FEC21D8E; Wed, 17 Jul 2019 10:33:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8197BC21D8E; Wed, 17 Jul 2019 10:33:56 +0000 (UTC) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30081.outbound.protection.outlook.com [40.107.3.81]) by lists.denx.de (Postfix) with ESMTPS id 02E37C21C27 for ; Wed, 17 Jul 2019 10:33:56 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RAluBUu2lxJBaoA/QnqoCI1HJWqvwsKEFVjuXeXgeIeLy+AHK9UBRv9ZqOtbVuzzwp/L0WyWiekfN9NYH+8wqNkEFe3mXcj5/QOZuWABwrY8M+jdBocezGiIi/x+g+kb0+fL5q8RUs2U5tqBVten5u/l6LlfTgnzjiAYzZDWwt36DIUU//WoxbgjPQcoLtHzwfAhXV5KqdL3D3RSVS2zNg7SdNXOQMYULNUYQKCSWdS7tvfRjZ6OvI1PfOwQ27XLmoFtjA+UyEgaVAdSHKLsD6g0ultUVe3CG+sQkd7P1kb2VoQjvsBU++E1EMxo+YYsab0R8YVSYin+FqcjswbQmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8DnWg2/t+Ck8bHKDxwR9fIWl8SDvgTcRcP9TcEX+5xA=; b=HJpqbC6jFHNNxtFKpRuNdEVYHgOaoyVxsDD8MjIh7eD+lQhWSmdHWqTWvyglX0aWouDxbf7T8bdh8M9xNj3WozXFnjel346EP/Ot0vpB5ZiK68bAtB1+S2SmSwYv/CcjCNOzDggw1Mk65d19yywjzBpb5GNbg37hGkWhQmbBX/XGD5jsOLZTFEO890AK0ATB248Yvh/8HFoyeSrMgQvzSWvjrZmzyqEW801CY/raUbYH1B0Ykh9NrjzHtFYw0JWiZ0c0wDorcs4YUPIb4QFoNZg+afC6b3U/muhQg6XLzQfOpyFCilpAK7vPhS9dbIqg75ORrLIhTUk7uL+x7jR//Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8DnWg2/t+Ck8bHKDxwR9fIWl8SDvgTcRcP9TcEX+5xA=; b=CAKcHru6rddGHPpwkcT0gMDHRko/oO4bl0USUmxQ4FA398Q0yumsBGr/4ydSAM+E16a0kWSH/scH1AxiaKiO1rRhUqCFfNGNHjJ6/khpDcDS2kXRd1Sig3iEEcmscFTMDqBm1WEpUnWJLOwEff0W63RqYSzLo5LQDlc5OYTDcUg= Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com (10.168.65.10) by VI1PR0401MB2335.eurprd04.prod.outlook.com (10.169.136.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.11; Wed, 17 Jul 2019 10:33:54 +0000 Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::6c7e:a751:af2:8d78]) by VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::6c7e:a751:af2:8d78%6]) with mapi id 15.20.2094.011; Wed, 17 Jul 2019 10:33:54 +0000 From: Pankaj Bansal To: Prabhakar Kushwaha , Meenakshi Aggarwal Thread-Topic: [PATCH v6] board/fsl/lx2160a: Fix MC firmware loading during SD boot Thread-Index: AQHVPIshCQJMbYkQnE2By/fxH3ml8A== Date: Wed, 17 Jul 2019 10:33:54 +0000 Message-ID: <20190717155635.29877-1-pankaj.bansal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BMXPR01CA0007.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::17) 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: 1bd0b5a0-d053-4c62-8c19-08d70aa2442e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VI1PR0401MB2335; x-ms-traffictypediagnostic: VI1PR0401MB2335: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:862; x-forefront-prvs: 01018CB5B3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(396003)(136003)(366004)(376002)(39860400002)(199004)(189003)(3846002)(81156014)(5660300002)(6436002)(8936002)(68736007)(478600001)(81166006)(14444005)(256004)(6486002)(71190400001)(71200400001)(86362001)(8676002)(7736002)(14454004)(1076003)(50226002)(36756003)(476003)(99286004)(102836004)(52116002)(6506007)(2616005)(386003)(25786009)(2906002)(64756008)(66946007)(66066001)(66556008)(53936002)(4326008)(305945005)(110136005)(186003)(66476007)(6636002)(486006)(54906003)(316002)(6116002)(66446008)(6512007)(26005)(44832011); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2335; 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: mAkLNWvZuNhT9jjHsWI2yIxbSOSjX6Y8TxEeADEQjusTtc355QbWkp7j9YwqDjdblCLIjjo8IAuTRlmyLZC/J77kwCOYlMBNMjh/5FycXwQsdDPKRSmO9fIbNHDfVWskvS2u6gQTMqHw6KBkv+VyppFk8137k86WdOE8qNllYOv6OnCyNluogikbG5b+JUf8O+//WdiOddm8rRq8HxcJBPxkJhM+/oi4NoveZW684FPP3waUVbjJy0ndiVAQSRbhRyZtYHO3B3CtEGxZmX5YtFVn9gIhE+JDI7yuFufwmBn04RwcwEGYybUJubTAXEiPw7K1lKnlTrg+AAos/oUMwUJKR5zabMg223Vb4TVttsHJqB4S4cu8wkwX8aqFStjGg+FIkbkiQiE5DNbrtmBix3fCELEXyyZW/JO0So6leXA= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bd0b5a0-d053-4c62-8c19-08d70aa2442e X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2019 10:33:54.3377 (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-CrossTenant-userprincipalname: pankaj.bansal@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2335 Cc: "u-boot@lists.denx.de" , Varun Sethi Subject: [U-Boot] [PATCH v6] board/fsl/lx2160a: Fix MC firmware loading during SD boot 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" 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 it's occurring MC firmware and DPC are copied from SD card to DDR. Size reserved between MC and DPC firmware on DDR is 1MB. if the size of MC firmware(load address 0x80000000) is more than 1 MB then part of MC firmware will be overwritten by DPC firmware (load address 0x80100000). so, Update the MC/DPL/DPC firmware's DDR address as per their respective addresses in SD card. Signed-off-by: Pankaj Bansal --- Notes: V6: - Modify the commit message to remove SD card firmware layout V5: - Add 2019 in Copyright year V4: - Modify the commit message to remove any reference to Flexspi flash V3: - modify the commit message. - remove issue/cause/fix from message. V2: - reduce the mc firmware size blocks from 0x1800 to 0x1200, to save on boot time - Fix the commit message to indicate that the patch is for LX2160A boards only and for SD boot only include/configs/lx2160a_common.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h index 711b434baf..110d497266 100644 --- a/include/configs/lx2160a_common.h +++ b/include/configs/lx2160a_common.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2018 NXP + * Copyright 2018-2019 NXP */ #ifndef __LX2_COMMON_H @@ -199,14 +199,14 @@ unsigned long get_board_ddr_clk(void); "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 0x1200;" \ + "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" \ @@ -265,11 +265,11 @@ unsigned long get_board_ddr_clk(void); #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;"