From patchwork Thu Jan 14 07:28:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 362852 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp448970jap; Thu, 14 Jan 2021 04:27:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxWWSr1YsMvP82vDZgcLrO4rDKI6yJecK1rrj0HRScr0Hz+8f3rgP3QOC0XZQOoPWxy1lRc X-Received: by 2002:a50:d685:: with SMTP id r5mr5708597edi.248.1610627243377; Thu, 14 Jan 2021 04:27:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610627243; cv=pass; d=google.com; s=arc-20160816; b=pzraEPQSQdJFkrJmnMN/g0b0hNw6g691Hhs9nVo4Ox6lQh5lQt6TFfxKSfX576/cuc MRUxeewnm+X2hZbFxne16QAjTwEyeIPjDr5xAVEUSbPef9rzMMveIanVUkLY1NjfJbfd nMLbsr/jGQU+DqMtMudAG35P/QxJ2clWByqgex2IQ/ar5AFBY9gntfeHPUjAXcO2yxAm rovN0ha2Q3NZvMHUqWgDI8vFXv1vn73IuL542S+HpkW/FXuLlO4/apiM/lDTN2Qtqdpc Mu91LTHmfgLUfUVIzH14ckI7F+qF5jZW2B7AE7nshjGpsYPA0SXJmkDEhowhZv24rzst b0XQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=DtSZ95K+OQl3W7FIG+7AiTbgy+Zj5SVCj6NXkSqrTns=; b=iLgVkIBHCbloclTB9SDVorbOLgmBp9lqT1Sa1FMUlsthwf1aogZ5YVQjJOpDXUEFHi x5TuHjs8qSxfq/lBWnj39fIDVTEwktXFRofjBMIe4pXqZ/kVTRSVVS5z/X/o/CvVUuGW AFZHfnkq3cpxWfcgU5Q7iuflKtUSSJASJbgzNao4knya2BRZdDGYijTOOjVBm98nar37 olmnohMFNJRHDajbJw0ddOmp8xRvM4G3jbWRj1adIyMzIDgWl5dsVw8wgtMASZDmuHME ABt5zR3B5AuzpbIqB9162vcy1ldyc5rWbVwAdBCDIEPtCFlIusPz96ZuhfgJT0IxNuRt oDOA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=SWYy5fIf; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id h24si2508725ejk.426.2021.01.14.04.27.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 04:27:23 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=SWYy5fIf; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 63637827A3; Thu, 14 Jan 2021 13:26:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="SWYy5fIf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 698F3826F5; Thu, 14 Jan 2021 07:59:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on0630.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0e::630]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 99BE88268C for ; Thu, 14 Jan 2021 07:59:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@oss.nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SkjDRJr7ysDSHFflJE/wX3JdgJZcR//STAIRHiAu3CZG7KcQb8tm3KIKP1wXSkUxJIqKyjpxwTzLI2ezP/e5q+J2Cw/12gioQjAJefxPTsKOidwm0RBiLAALy3jPYO4N1s/XGKQ1VSY+ZOlXAuC+R0UgkvsiTowXmE6y59woqSJeWf4mw7l1DciS+As8+rSzz9zFjSXnJalakAtZ6lh3YqgNiYMfhTcR3I95kLbl9ZBbCR/H581tcnOiwzR/gaXZHCbPDTu+fMjeOldMDSpis75+EjKxc0V40OEHjLpKrLMcwmRAqdg669MxukWWhRMDu/cxVR06rX7NBclP1eN4sA== 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=DtSZ95K+OQl3W7FIG+7AiTbgy+Zj5SVCj6NXkSqrTns=; b=Lnm+SetDMEKuo8e4G99VyBl7borB3Lbvb2Rk2FYjpC5/CpcaKq826QCalhFqU0H9oOnpzsgxph9wv66CIr+LwEmnYy1BijEXin0Qb7Qp3IPUmZOSDyBWvLd5P3bRKwXSeYICjeW0TISfUzK2jS4xWQSi2lG1gWOn57cIsCTzbQ817OoF3xtecuKc36bGHgb8XnN+xBBX2M/adDczbLTxIbAf0wKCyW/ISCL7eHrl/PDB+YA4ER4dF8m/KeZmKfehYlTA9VhrQQY3u/Tub1oevJBv2naPCmeXm30PwLSt/9KXi/E+dGw6ot8WfOS/1wtne+0vIBrAyaoPYt1DeNexLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DtSZ95K+OQl3W7FIG+7AiTbgy+Zj5SVCj6NXkSqrTns=; b=SWYy5fIfoDz+6N4JPIyUa0CJeXMfi/+8n7DXFRXUfa9m/vtbTuIP83z2xTiD0sJsW8Z5x9cvf8Xp793PRE326pH827SHOW5Ik4KpypNbTfDZDi4rFTpSM4ZmAj1BFIIQNGBdPoJSpjh5CrQLAvnW1/8hfQFhUFqxmUTtfW3KtYQ= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none; denx.de; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4634.eurprd04.prod.outlook.com (2603:10a6:5:39::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.12; Thu, 14 Jan 2021 06:59:29 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Thu, 14 Jan 2021 06:59:29 +0000 From: "Peng Fan (OSS)" To: sbabic@denx.de, festevam@gmail.com Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan Subject: [PATCH 10/13] imx8m: add QSPI boot dev Date: Thu, 14 Jan 2021 15:28:07 +0800 Message-Id: <20210114072810.11873-10-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210114072810.11873-1-peng.fan@oss.nxp.com> References: <20210114072810.11873-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR03CA0144.apcprd03.prod.outlook.com (2603:1096:4:c8::17) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR03CA0144.apcprd03.prod.outlook.com (2603:1096:4:c8::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.6 via Frontend Transport; Thu, 14 Jan 2021 06:59:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f0dd2664-fde4-4ea6-b4a8-08d8b859effa X-MS-TrafficTypeDiagnostic: DB7PR04MB4634: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uUiQNokUyh5K5IOVU5erSNP4vMkfQxImZKxwAMvKVlIJRSW20iWJllBGrcCYI4Le61Fskt5Uw2QV+o66Zb01YyoQ0gy83a6azyfBXg2EChm0HEWJ5FSxsB7dXPBZaz9zTbnwmp/Zljs7IyUoZNznqApd7kg0MatSwz9STvEKDuyH1R6lwXcVO/zTS+7N60udY/cIjOUGs5bd8XU9c/P9py6EhJkKt15zITW3Qjg3zik3GxrRO+RTkxE2EwLOCq8oJ/WEin6bvZtfw42XUccyUVxL+C0+GJp3b3EbrsJTGflG0VBI1E9sCFnA0D6wnV72cCtY8S8czybYo0D12CyNCFAsaai94+dksU3cQhe14sRFIOi/23UPR1HNavpxk7iQYyPOr5Dvf4hCGYcs7z+joF8hxi5KcDn1UGpKMB1hIEt1Mga97By4TfgwICydkfvt X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(396003)(39860400002)(376002)(346002)(6506007)(66556008)(86362001)(4326008)(8676002)(2906002)(316002)(6486002)(5660300002)(66476007)(66946007)(8936002)(478600001)(6666004)(83380400001)(52116002)(956004)(16526019)(26005)(1076003)(2616005)(6512007)(186003)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: GDQS8crztdx5Cp9oAy+M/O1mJ7jDhrA2eCr6yntAVgLklmoG9B+jMQWCor26ufQ8z+vi2n622bhNkVPPSFmC7cnN/sSZYXxRTg5sj9WZq2Ijg/shgb73t/PgrNhgiqVxkWTdSh/l5n5x4aLLHuxuBUxq/B1iNnwg0K3tYwjO8jCsBhel1DmCFZ97RT3HRDadcbI1ay74jZwy4fBCkaNlywxLAvp/CY6huj6W2elwHxaZJm+P6N1W2pJQgvSnE8CteZk3VxyqCfmUGpaEFVT9qaip5S9Jb+F8z8on2kIU2aFfymRxN05t8r62MUwZZeuRrhK7UZcdBc3FeUhWqRMzehqldzNQvDRnMhe6BBweB14QoIXO8D59JACbh+AuP+1NRj5huBLf9MVginhxoSmbf3FX1ObRVcVsd49TANRNnBNNuq8SPBvL9veoNfSVPx4tWzoTjzXkkpI5j0LRKUCJd4/2RMd6XhKurkP2M+UmscuJzkKbSjiskS3AhelMnpUpoUL+C6vYogVWSXh64G2VhoGX+uWp+/QLhPXFj8BJh48N+r3+gAtTCs/dSErzz62nd4sMTVjMTNtYBOmSz+5XJiHIzX3+Ji4JoDEcySRJTelHCxM2+vlV61ZJkiDN64yqMOpPHmuWMiRLm8oOUsHJZuQe+TL2iJngJKDLaBvS2NNY9gGpE9WV8zw5vOhXRSui6tGeSdMBmx5/TtNYnuwzRY5lo5xPe4+PfWq2sn2PH9HazezPpGgzn8nXjDULGdLVd/uHdGlSey7KV+3/XQL7Ccvdo7FFsjkfZ7NFjkVexwsx0jJBxfl3WbeYmep3rcP1Xt9jwL5+8poI5xJAzyU8AsOcZYYWWmhsQE/JDUxE2qyghw1iXdL5M3osCIYlytH7tmLxnMNk8ubuFxMWnoMqTGq/+c7oKyDRVQdYsjiLu51PlOmdignX7d2i/TcQGAavHQU7Pt/7ISbKgf6qJTpKti5+c5CjSabS5pter1zWWqS/OQ4Y1zmatH9w00UJUrip X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2021 06:59:29.0350 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: f0dd2664-fde4-4ea6-b4a8-08d8b859effa X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EtyFYo8PGSr7rkeIW2XKFluK8XMXVO4UuITNBxaZYOlvgeGxHjSxWXAteIcDydm3oJRjwpTzIRtMvesANmLBaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4634 X-Mailman-Approved-At: Thu, 14 Jan 2021 13:25:35 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Peng Fan When boot type could not be detected from rom sw info, read sbmr1 to detect, here we only use it to detect FLEXSPI boot, because ROM not update it in rom sw info. Signed-off-by: Peng Fan --- arch/arm/mach-imx/cpu.c | 6 ++++-- arch/arm/mach-imx/spl.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) -- 2.28.0 diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index af0b7fbf7b..38b87ed5c3 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx/cpu.c @@ -467,12 +467,14 @@ enum boot_device get_boot_device(void) case BOOT_TYPE_SPINOR: boot_dev = SPI_NOR_BOOT; break; -#ifdef CONFIG_IMX8M case BOOT_TYPE_USB: boot_dev = USB_BOOT; break; -#endif default: +#ifdef CONFIG_IMX8M + if (((readl(SRC_BASE_ADDR + 0x58) & 0x00007FFF) >> 12) == 0x4) + boot_dev = QSPI_BOOT; +#endif break; } diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index aa2686bb92..2d15f62445 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -172,6 +172,8 @@ u32 spl_boot_device(void) return BOOT_DEVICE_NAND; case SPI_NOR_BOOT: return BOOT_DEVICE_SPI; + case QSPI_BOOT: + return BOOT_DEVICE_NOR; case USB_BOOT: return BOOT_DEVICE_USB; default: