Message ID | 20200503143323.17334-3-peng.fan@nxp.com |
---|---|
State | Changes Requested |
Delegated to: | Stefano Babic |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=selector2 header.b=LzHqsk4A; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49FSZX0Z5Pz9sRY for <incoming@patchwork.ozlabs.org>; Mon, 4 May 2020 00:10:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6E5ED81EDB; Sun, 3 May 2020 16:10:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=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=nxp.com header.i=@nxp.com header.b="LzHqsk4A"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A9B6981F03; Sun, 3 May 2020 16:10:38 +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=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-ve1eur03on060a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe09::60a]) (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 2FBCF8172F for <u-boot@lists.denx.de>; Sun, 3 May 2020 16:10:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=erGFNQMDk6r6RCUS/4Qqg5iyFQDUz/xEdRRyGRJ8H89QgCl+4Y+8ASaRhCsuA8BWvMipXKnId5oizzaRgFtPHyZ9EX6HMPUtVFCzxpt5lRo4BG6rIu9ZQAeUieFAZOipsMsQYOXdXiEWKsfKlJpQmQQQOseyqJE5Ydj13EMvSWRt+PgnDnbPQl5+4uvXv7tHr/cbreyu8Gof5Y39MDQ1MB4FFrbQy5r7x5Id/FlXX4y91BDxGYG4WPWBv04W6xA4HXHKA1enh2faTLlzO5OqUX56EjgYc6obyo0CatKlxaNjbXnPn93Eue0FyR0R64KWqpwiJQFfblfwQoiD48LFMQ== 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=IeQxJ41iHogWSdfROH/UDx2JkGczZrZYUSS+Z+Pe8LI=; b=LeqRRKIE+XkuXuM0Aiq/8Hz61KZAyBNMVvrtXOFaYMeleuur6gYwHPh9M+uBpRRDTnwBec9P4+WwWA2rAbVzRLMLeo1sPRNDhXUnKSyMB9/dWaWWQ2khJOlreyB/NHXRe1yVSoQK+B/lBhTVhHshhmAoH7JaYQEm66XmHcDu3vWAE60YJlcryfJGXRlbUv27b0LtufMOizKV7loXbCknGFzZh3Nel457SBnj+X+mgLL/uYQVmWYHNleuHJLWWv7N5xvMTc9p6QizP9hiwvrelKKV5rt77vhpOQJMIwbRucX5vs2eoROedfW3hiiSRAHSvcbg7wjRDrmYI3nY3bi5Aw== 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=IeQxJ41iHogWSdfROH/UDx2JkGczZrZYUSS+Z+Pe8LI=; b=LzHqsk4AUAPxinLK/8227uNGWj+uoJTVa5E8gzF7w4nkAz/Gi/dyrxlw4xFj9U2hd3vKAsKgt+DfL9MW/Vbh9jWd2i6gKH7b8ba0XscqR5c992IoZuOaM0gDbtMUXTYDmYNKIM8ITwPe69fubXO2lC/Cy0s4/RYrXy++g3DyMGg= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none;denx.de; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR0402MB2695.eurprd04.prod.outlook.com (2603:10a6:4:95::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Sun, 3 May 2020 14:10:31 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871%6]) with mapi id 15.20.2958.029; Sun, 3 May 2020 14:10:31 +0000 From: Peng Fan <peng.fan@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> Subject: [PATCH 3/5] power: imx8: remove the resource owned check before power off Date: Sun, 3 May 2020 22:33:21 +0800 Message-Id: <20200503143323.17334-3-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200503143323.17334-1-peng.fan@nxp.com> References: <20200503143323.17334-1-peng.fan@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR06CA0156.apcprd06.prod.outlook.com (2603:1096:1:1f::34) 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 SG2PR06CA0156.apcprd06.prod.outlook.com (2603:1096:1:1f::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Sun, 3 May 2020 14:10:29 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1390dde7-0d36-4078-bca9-08d7ef6bbd89 X-MS-TrafficTypeDiagnostic: DB6PR0402MB2695:|DB6PR0402MB2695: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB6PR0402MB26955D33BEB9B0957F893D1788A90@DB6PR0402MB2695.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:190; X-Forefront-PRVS: 0392679D18 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4UnYkAWpm5ud1f3vTcZEp5kdzCnadwxqZQh73cVCayi5wlhh2DdSrAtdcDPsm3+s06C9OESAuawQDKozsumAOWNvhjVdNNnzdX5wtTReNF4A7X3TpEyPfozD7ostzxjKVDeik2CXf9lnnn9XdznK/TNxFeTBKTo5Elg3Vvp+hTGRHDFvQ9e0CWUwrIfhnxUDMqpb5O+FZqHFONachHo0LHNePzl6ZofW5sGMp19AtkdEfkRB38K9iNqcpNfTHJkTRHuajm+D2nfZeVi68K/ahNjGe+wkZswp1iv64Lu68yKJfm8oqO2kLX3TktqkwHVUjaopkpKqohM3FGeJQNPfRzZ1cVJhpeMGhuWPOr7D9sXqe5uXlC2Cvv6Aj41r0oxN4qUy3pbTufHLrf6gXSpDD3HESQfgdk9sc3+5xk/0rdQtfv/K9uBZKA1FckgoDrMK 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; SFTY:; SFS:(4636009)(366004)(39860400002)(376002)(136003)(396003)(346002)(8676002)(2906002)(6666004)(478600001)(66556008)(66946007)(66476007)(6512007)(6486002)(86362001)(5660300002)(4326008)(16526019)(1076003)(44832011)(8936002)(956004)(36756003)(2616005)(186003)(52116002)(26005)(6506007)(316002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: mMe4gQ54N6gKyj4HaXw7wnIaOm5sya7VfMFbqzFaYpDnm5AlUvY2mCW+qv6lLcjm+bNl29a1pUqovkUT2sFUnWasZmCRAnfwkzOoZX899i6Zx50YnBBuQTiHFHChrnoa9gdmAEn5Kyk/lfB427G8NNFKEW7YOeGqXBdDlPiM6477Pvz1+F0a21MTepxWNA9BN5D2rrpPgJQy3qFHaDHcn2CYPupn4Y5HIkOgsCTBC+0P/TFgtH6M53os/QBD7XNM0r6QOa5RcWwN7h+aDq184LO45TQse9A0PtrAHqpOtFnwyWRHw8aGuL7Z1j//KuPvMSXyhf0gOF3O+fqQs1WUryfPOVGEeGYz9QWPJ0Rcd4OWjt4CwwNjdoUybKj3CMsYSPo2vQHCmhHa+e9XpJjVQHV5UhRekSsy1X5NFUgKJVq3d+zUqrWd1PXSreovu2Azk3wZmyi/0QH44zihUh87UEy4nL+hCMpBw8gIGj0eH9LOQiujPlKmy+tU9n6iQq1gXtN48aLr+Mg7fU3FJ1RrYfnXZtm3eE72JLTO3weF2UtSyzEjVnVIRt4dYwurnyo0F/YjQIqXcUOjiI88rGPZWQIsaEWc35h1rQnUuhqxdygVyglMCtIJ9gJ0C0cxiXXNrep8XzfXk+eO/+KoZaF7o2z4CPrFHkQHk0kayHhtlHiXqrjA5wgVnxXdqwtYC43JpNB9IHsVHKSTd3zFNKrvAHVxLFPnaUejS0ygIzDeXaJIvfyqmaIdcpiKBV+I+gtcWFLDbD/xcC8Q+MwmrEn61WsFtDsHZhL+HoRRAn1ym74= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1390dde7-0d36-4078-bca9-08d7ef6bbd89 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2020 14:10:31.8483 (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: XdRVNX+4XSAbJOZ7NKSQbYoDVqTJis22F6G8xtTinYQTZ3iZ6JvAQw2bKFnU+23jJs9o4+X1HyYLmhL8hzfHlw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2695 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.102.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
[1/5] imx8: power: Add PD device lookup interface to power domain uclass
|
expand
|
diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c index e6e619358c..b68be40766 100644 --- a/drivers/power/domain/imx8-power-domain-legacy.c +++ b/drivers/power/domain/imx8-power-domain-legacy.c @@ -137,13 +137,13 @@ static int imx8_power_domain_off_node(struct power_domain *power_domain) } if (pdata->resource_id != SC_R_LAST) { - if (!sc_rm_is_resource_owned(-1, pdata->resource_id)) { - printf("%s not owned by curr partition\n", dev->name); - return 0; - } ret = sc_pm_set_resource_power_mode(-1, pdata->resource_id, SC_PM_PW_MODE_OFF); if (ret) { + if (!sc_rm_is_resource_owned(-1, pdata->resource_id)) { + printf("%s not owned by curr partition %d\n", dev->name, pdata->resource_id); + return 0; + } printf("Error: %s Power off failed! (error = %d)\n", dev->name, ret); return -EIO;
For all the devices used and set ACTIVE in U-Boot, U-Boot needs to power off all of them without the check of resource owner. When we create software partition before booting Linux, the resource own checkw will return false, and cause the power domain not powered off. If without the check of resource owner, the power domain in the other software partition could be powered off with parent partition could access child partition resources. Signed-off-by: Peng Fan <peng.fan@nxp.com> --- drivers/power/domain/imx8-power-domain-legacy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)