Message ID | 20210629023240.22394-38-peng.fan@oss.nxp.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4509330jao; Mon, 28 Jun 2021 19:06:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxX/iuFO0cIslviwa6R0LBakIrlioVbRKULjNsa7xORmYL/YrMhKv4QAEqB2SPwkSqOttzt X-Received: by 2002:a17:906:dbcd:: with SMTP id yc13mr26571960ejb.161.1624932394274; Mon, 28 Jun 2021 19:06:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1624932394; cv=pass; d=google.com; s=arc-20160816; b=nuBshP9JBeohEPrPcDJsqGXxcSkR3fYSGAfqOGi8D2CXGeMimO8/E+N0ZLrIliuWs0 jSewHiN4DGJ/IBzwuIhlYjgykmTwyx3pQYHwd/kzf99xVN/+JUM85DtiVyavVMKt5thU uE5zN6ZZ1FTtOUl0eIJ+CicbEWVJQCANdde/pL647xWpMB+kmXCyzKGOY6a9jrSyHMma DxrGK3AxEw0XyHC3Iw+SytuQI9Qrx2pQpe4YjXxoc0sBKHTHeu2/DXrckOjVf9m+sWFe BtezQ3fgTPQOvhahrnoNHz/HoiId6iH4fhbSqrRzLL4OCvwbBPypmFxG7RtAKZLxV/JR S46w== 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=37D3VXzBFyND8sq8qpBZuo7YUfsH8MCjX7NdleHKAo8=; b=NDGEvdnTQk9IeyWCzQeK/OAwvtjwl2bl/4csqsPCEWmd0zGGTzFSKeLgmNDr66X7HP Lv3DAmFM/akfftgGfGGK/tApncYEqF+3WP0f4r8C7cINTfv9IeuHanBR/dUDP8DnCdLz isPJR+XHOoyO+V+MokPuJQFJwovioiiLEmRQvx6hIaH3HXYbmj64Gzt3w+W6+AosDMYC 1TLg3jvvPcsE6DaORQcr3CfrWXArNAFQAsiXILbHcnS1wCvkWzLGg6UDqwMXGYRYbDOi lzrPf75BM0h0DZ/lX6rEHMVstuUz1W1cC/uTUaIr5Q2WeCb3l40sycqciJn3i3OuP8eD ktow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=JYFcSW6Z; 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 85.214.62.61 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: <u-boot-bounces@lists.denx.de> Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id zd7si5414237ejb.14.2021.06.28.19.06.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jun 2021 19:06:34 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=JYFcSW6Z; 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 85.214.62.61 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 D8FE08317F; Tue, 29 Jun 2021 04:01:41 +0200 (CEST) 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="JYFcSW6Z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4796183145; Tue, 29 Jun 2021 04:00:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02on0617.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe06::617]) (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 A473983133 for <u-boot@lists.denx.de>; Tue, 29 Jun 2021 04:00:46 +0200 (CEST) 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=gSsJB/m6YEyL39pIGbcdmKBmwi4laV3mgY4tsIwAE3+7sciL7LsVBAE5IX4eawLeb3JNbf+nHF97YGwc8EBSihi36bqeHaMAW5UVzDENhOXIuRVZZ8i2pKxRqFFVMATe2h6QgYR8LGJso/XcQpkHuro7WjuPgte+d966PqxKNyVNO16xCX1R21bq4NRXAK9piz//rO4nEDzi/l9T0mcN6+ByFrUF2w6oyC9x8ZVUpLN0P2R9G9Yd4L+iWne+ckql9i4A27yDz+AGPgOZHosFBjS7LDXnGyuXPKZJb/UM+BypjGkqS6j9A7zkbYkztwmBsgccLKk2nzl5cw/5NeA+0Q== 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=37D3VXzBFyND8sq8qpBZuo7YUfsH8MCjX7NdleHKAo8=; b=k+uFSFidmebONuc0YNkvbv7yeC0xJW7FkNY9ZZqKTDR+BfXSXerLIwnzEcHSG3BNL3rMiJR9oHs8RkSL4A8fe8BpoTSTf7RLau0FrpcNmyC+LzHRKvqeD0NLcSbEkKMLaE43MdIyXXOz4KsGRfjjVFm98O3iZ4B3HwYw7sakVuZAtlSdeM0Pr+p6vcILBc6RJFOVJn634wQpgqW+DwuZxKaMzMD3nWLkOsxDB6b1E6t+AcMIye77zZ4qzjirU9KcmBjyIK4LZbgNxZs1gcZ2KztyEGhV0SgApMU8imKlkx+CaclQcZbxh6aniKNxBmdNvqSn7nfB6K79xZwMI+JK1g== 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=37D3VXzBFyND8sq8qpBZuo7YUfsH8MCjX7NdleHKAo8=; b=JYFcSW6ZIq3LQjl8/mpMyJP3ZUj6DLWhVTwtL2fMwYupfYQAeItNW3bVAMhtbmHIzDwxFKsc2kJXBeMGGwN5SqywTCBxZs0BADzVC7u3jalthIILd/LKuv8XURXcZppJHtPNMPclByE21zDn1zpDaLn0hDjGcw4kgW7iub2fL0Q= 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 DB6PR04MB3126.eurprd04.prod.outlook.com (2603:10a6:6:7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.23; Tue, 29 Jun 2021 02:00:45 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd%9]) with mapi id 15.20.4264.026; Tue, 29 Jun 2021 02:00:45 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> To: sbabic@denx.de, festevam@gmail.com Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan <peng.fan@nxp.com>, Ye Li <ye.li@nxp.com> Subject: [PATCH V2 37/46] imx8ulp: soc: correct reset cause Date: Tue, 29 Jun 2021 10:32:31 +0800 Message-Id: <20210629023240.22394-38-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210629023240.22394-1-peng.fan@oss.nxp.com> References: <20210629023240.22394-1-peng.fan@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0088.apcprd06.prod.outlook.com (2603:1096:3:14::14) 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 SG2PR06CA0088.apcprd06.prod.outlook.com (2603:1096:3:14::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19 via Frontend Transport; Tue, 29 Jun 2021 02:00:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d9a33fd1-5f10-4d2c-31f8-08d93aa1b4f8 X-MS-TrafficTypeDiagnostic: DB6PR04MB3126: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB6PR04MB312677B7DE981FF1573B1457C9029@DB6PR04MB3126.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:107; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G9Q5uc17gNum6szWm1dNOWV6lTbNdBhLqJHuv8mM+tF1fWWlDXUISenitFSPrKh+pGOgndpUP6m0DoyJYTUG8Gjr6B4/96MQYfihg7kiVLgOb8bCe8J2lNkes43877Xyc3suPXSNv6r12VHVpE+s3drycNaNzt9FFSMA+sjfh6BKmFuW+OwfktEBNEXnsRTjT1Pjo591gPRHQ+5rvVcsYAfFRoJ5AnjYR84GO4UjXMox3HdxVQ6dxYKmJRwlBMDdEkPpmn60Upu9rC6bJycpc+CVlZOpUnp/SFGq28/D4OuvrhVBjneQ/XR+muNbYHJwIOu2dVsGMrmUOhN671qgIMJsCN3Lm5KvwtNkVzgcg5F3PaD1faQbkAX+29uK2NlkPTrPfgRBf6L2Oq7vFHscJ5eEmMJCVY5vjtZhieth/xwIW/KNI77ZPrIrHUhOQkblgBE03asb++IEyHlMqeJXxzRNJf/NY7bpX3GZwAihBaIi1TDJYt2xLA+VQbmQNx6yzBq7dKiy8RqXYc63yia9jbezPCIoLVyKb72srkLmwt+wrRFqmnRW6ISsDPofdBvGsTcYhHXf/qQlUmQCVekMlzGVkJ1GGfojlUngB5AFlAF7zzzl/IjtMY2Eaepi1v5kBxhGxAnczZlsbBLmX6CssGuPbJp8FJuDmCC0Rqrv5/uCuDVMpFcCVVQYgAoaJieEd2pBl94kE7iTZrZpD9UxvdnxcuQd/sUTb+Y5W2LpvKM= 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)(39860400002)(346002)(366004)(376002)(396003)(136003)(66946007)(316002)(38100700002)(66476007)(52116002)(38350700002)(186003)(4326008)(956004)(6512007)(6486002)(2906002)(26005)(54906003)(16526019)(66556008)(8936002)(86362001)(478600001)(5660300002)(6506007)(8676002)(6666004)(83380400001)(1076003)(2616005)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CO7wxExGxSGbCZDcDPx7vjt7O/b8xLHUSEceQ5kgrfvCYM6EqkjW3L8HydOUF08Ot7GpY1+EnZqBKJhWXm9PyKi24nUZei4hGWPc+H8j/SIhQmGQ+0Kurz/1l0jaIwAZfYvtC6h9V5GpSKBBqgWLfEXSTAzjHIAXn+69CP2bR8geAnkX/pWAHPb4uqSwmgO3CzAZMevwBV5oB+FKOatjW1HQm1jRbh/W3/rpsJcHTUwBq4xJQFi1JGVa9cDLpG123QTL9jhVWxCBc6qy+YBQ+lDTtDvYy+S6XdfP23WhDBZteMJbodV7W1espIOZMo8+6wp/N66aGe/rwG6ChF+UOYMvtSjtfR3008CEypxQeVTswKmt+/jxJlb63qzqdjOUMx0CdQbOtvMWjZRApMjhxgylrjcf3la1FdBNn4hpdc1ejni1LRXIHF3HyYuIR56A1k5b/42YZMF+g539K5S3GuGlDYnJwh35tbMdseJjJ/aZ/X/7wSFwJxqMkm2PSPXIf96b4bBrkYkJ/4u6w0h31vSYQlk0mWGLXgYLpIU80jarnRD+CORcKiWl8Ai19Z/YJGyK0xDDBaKzd4tpBQsuhInCzj24BOmY8vhPt7NM9iUELKvjZJLjxncuGiIGgxWaeFuu+aLJOiAelujK2n/q1CotZXMvi4vbgeTi3z7x8505n98qIy8ZaOc/8jK5+pbMv8nA3soeZkr0hqwU7NDw6FrtnjHB8cBwKfMVeS84R2K9odmAw60cCMLS2vvceBFqNwDrJI0g2mz1mImfXmTEvZQV/EP6BNu4N9q8pvLnkTdRmlvFjzGw/RpD8X5EbwTv8U0EkxfWwpI15lXMqQ5GaPTuHj1yS/uSButjMbpwLbo/pP4iCJqLu8vPXofTCmZoh9g8xaGk4TmIAQVjeTfQyHyN34sJ8OE8npKCeM8Mksl9wzxVr302JIjxj9TPOHj96ERxyYlpADGdEIJb0JYd8//ot65KXqzyRgSVG497cTWnzqS1c+wVBpZUK+P/m+BkJ0d2vMdokqPaxZFHHeF80mR1Gdra3JXrnUeKpqgV8hRxIU1oNytPdw+8dRvjkL+LKp6xE9HIBWIjpL9ZPyA9RRxpivBVcunZVmzE37eYmKniV39k+iZGNal7ABkIYi5LT0h5SGwM78JddbKoGyWu2wdm3uTAJwn9Ye+OMqKOOIeBG0MG/mPI6BxuHLvOLDsDTMWjVquN8yoBSi7N4qmWiY1pUlYtAKw1Fdo9pM929y56IOcygU4Ew5YzF8Hh7C3jufcCmqR+Ksqp6KX4+ckdf4TXipWSapa3xpduCuZIQTBFlswbqaxG0AUq7At0jGl5 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9a33fd1-5f10-4d2c-31f8-08d93aa1b4f8 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 02:00:45.2654 (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: 1ua9MVfxD4hGzxJu0bj1NGDGBdu10e3GRNnTwdK+7JKwqQsnHULnlt4z6UraRmPexjpEzQSxIK2BMG/b6/1jog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR04MB3126 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
imx: add i.MX8ULP support
|
expand
|
diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c index 513c4166c9..052169f5ff 100644 --- a/arch/arm/mach-imx/imx8ulp/soc.c +++ b/arch/arm/mach-imx/imx8ulp/soc.c @@ -148,8 +148,6 @@ enum bt_mode get_boot_mode(void) #define CMC_SRS_POR BIT(1) #define CMC_SRS_WUP BIT(0) -static u32 reset_cause = -1; - static char *get_reset_cause(char *ret) { u32 cause1, cause = 0, srs = 0; @@ -162,9 +160,7 @@ static char *get_reset_cause(char *ret) srs = readl(reg_srs); cause1 = readl(reg_ssrs); - reset_cause = cause1; - - cause = cause1 & (CMC_SRS_POR | CMC_SRS_WUP | CMC_SRS_WARM); + cause = srs & (CMC_SRS_POR | CMC_SRS_WUP | CMC_SRS_WARM); switch (cause) { case CMC_SRS_POR: @@ -174,7 +170,7 @@ static char *get_reset_cause(char *ret) sprintf(ret, "%s", "WUP"); break; case CMC_SRS_WARM: - cause = cause1 & (CMC_SRS_WDG | CMC_SRS_SW | + cause = srs & (CMC_SRS_WDG | CMC_SRS_SW | CMC_SRS_JTAG_RST); switch (cause) { case CMC_SRS_WDG: @@ -192,7 +188,7 @@ static char *get_reset_cause(char *ret) } break; default: - sprintf(ret, "%s-%X", "UNKN", cause1); + sprintf(ret, "%s-%X", "UNKN", srs); break; }