From patchwork Fri Nov 8 14:03:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Ray X-Patchwork-Id: 2008472 X-Patchwork-Delegate: festevam@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gehealthcare.com header.i=@gehealthcare.com header.a=rsa-sha256 header.s=selector1 header.b=FqwUydKx; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XlLKj1pDFz1xy0 for ; Sat, 9 Nov 2024 01:04:41 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1D53A890FC; Fri, 8 Nov 2024 15:04:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=gehealthcare.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gehealthcare.com header.i=@gehealthcare.com header.b="FqwUydKx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A119A88DF1; Fri, 8 Nov 2024 15:04:29 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on20616.outbound.protection.outlook.com [IPv6:2a01:111:f403:2415::616]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A32D38904E for ; Fri, 8 Nov 2024 15:04:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=gehealthcare.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ian.ray@gehealthcare.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Tc/z7Tj8N6KgMXwIvheitxvdAnHhmaHTP+y/zcArnB1aa5bUxoyoydED1+nGvqPB/3ZVZ3c0D60XSFEh6YC8AUOjZ7eUlvR3Zk05bzGc3sZ81CQJIhqmaKpdGjBLlachfW4pUqzR00xGKGIozhe2ne60xs8YUjqRKH7l0+pAXrA53+0a2cnOyH+qGni0EMLswhECccMuihBvuuu+xO3DXwwagAfw7wW12c799zrKYvxrXKgtvQBWeeMbJiz7boux7NRzTrU8lMa9tUv/EKs4dX8tTjX1YYH20+MK9H13QrjOvBQ7FkcL89M6Y/lQk1qNXYy/ImvQ8zHZXM9S++88Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6HJx4uAxK1rahMjvTbm6bpn0OCNWYGERR2w13/UOg4k=; b=OQxT7svZ22BjMyt7TepL+xQTMsgm/MKPPrex7PvP2slF+XDB5yQIUVj1+vMssVPnuXvcb6IcZ+v9PmHYctgPBxYCJFS9MgGCEismo+Kki3H+S+8YtAZKFhjRLbKu1YPs/dBX8IyJfWvqth5bqQUVkHDNMcMqRIMYP8gvEpRJVAi7AbjgBwUcBspVAV1ouc7zdffZEHB8sKlEBiG1ep/LsqA/Xz/hKJSv4l+dKbTKn762Eyous2nbvHVtFStM97vW2wNjOjjjIKTolNHNjlWA10uLEHlk56a08AUopnpkX69lqhIygl3+hqSvippZypRNQB0PnRRN4AenSzzi6l72QA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 165.85.157.49) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=gehealthcare.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=gehealthcare.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gehealthcare.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6HJx4uAxK1rahMjvTbm6bpn0OCNWYGERR2w13/UOg4k=; b=FqwUydKxQX+XzrlYAQWGFPThgY70fZhIrUNAq76AbVUnOg3RxudYgvGji4O86d2wry4FKjdXqxdxFLw0tIN2tO1HOLSyouG5/5vGK22cI41nDjQHGLXk68cB1SVJTaxf0WU+EroYVa8cV8iqFQxCC+Q0LZVK0VOlfKrwUI4DT8RGF70ozwjGzuwUTGWDJl+halZm1scZi/CAHbHiINTy8kLuUMswC38BE4RhtBR03U2CHZCGzE3hvSvVy9eAQtwwSDvLb+jyK0x7hd7bWME668SOWXe5oLy7AU9jC5J3yHZiESD3rsaJEAoFimdXYxbvf/p+yBrFFCNrU5Bmz4/qhg== Received: from SJ0PR03CA0254.namprd03.prod.outlook.com (2603:10b6:a03:3a0::19) by LV3PR22MB5691.namprd22.prod.outlook.com (2603:10b6:408:276::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.22; Fri, 8 Nov 2024 14:04:21 +0000 Received: from CO1PEPF000044FA.namprd21.prod.outlook.com (2603:10b6:a03:3a0:cafe::1) by SJ0PR03CA0254.outlook.office365.com (2603:10b6:a03:3a0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.20 via Frontend Transport; Fri, 8 Nov 2024 14:04:20 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 165.85.157.49) smtp.mailfrom=gehealthcare.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=gehealthcare.com; Received-SPF: Fail (protection.outlook.com: domain of gehealthcare.com does not designate 165.85.157.49 as permitted sender) receiver=protection.outlook.com; client-ip=165.85.157.49; helo=atlrelay2.compute.ge-healthcare.net; Received: from atlrelay2.compute.ge-healthcare.net (165.85.157.49) by CO1PEPF000044FA.mail.protection.outlook.com (10.167.241.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.1 via Frontend Transport; Fri, 8 Nov 2024 14:04:18 +0000 Received: from 0e263a2c6991.em.health.ge.com (unknown [10.168.174.111]) by builder1.em.health.ge.com (Postfix) with ESMTP id 85228613D; Fri, 8 Nov 2024 16:04:16 +0200 (EET) From: Ian Ray To: Stefano Babic , Fabio Estevam , "NXP i.MX U-Boot Team" , Tom Rini Cc: Ian Ray , u-boot@lists.denx.de Subject: [PATCH V2 1/2] arm: mach-imx: move snvs module Date: Fri, 8 Nov 2024 16:03:54 +0200 Message-Id: <20241108140356.483-1-ian.ray@gehealthcare.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FA:EE_|LV3PR22MB5691:EE_ X-MS-Office365-Filtering-Correlation-Id: 76188529-18c8-4dba-7f11-08dcfffe3d1a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: iqI6gajbHBOqIRWxWjifIbMf4x8tDnx6OJq1hfom+h1nDZUFDPjZ2cEHmf070gdPxLPhmmY7MFSbcsJ6U6ELkGhhUjuAtN8EeVbt9ZWc0g3+9hvfPk7kBNsdgYxiqlFmCSM4vMQO0XUmTWkdIwHOXw6kYYDVHSB35w1hA1GxFfC3WPGgk3svj3VYoy0nRCDP7vius9VDCmGkxg+Xro6oFRsZbK/ZsJv0Zkujo0T3DxSElXr4PnNBErr22fqoo592Lh17A7k855EPxNVfGyU1nMaO3csSMbUsyBwmMxI/+Dyk7PWYlK4V+exarHafPiZa5UgCzdpogqz6MbzgYUNnozCFl7YqGvYihBF3xuIpxUTTnuLbi5uSZyxi6SpEecTRzCPtIEndI525V1hBHbkyxakZQf0k9MQLL4sqGucKG4rZM9ykgRcUCV9fOsSEg4xhNGzPkwTKPl9c5ueCOp8r0xJnM2U4hsxCLcnOgjk07tbtrMFzS/nCU6pYBjOFqmhslgh58QJoDocngXE6vEe6hyB68q25EsB2rLh0GOgRMOVpS+J/JfrsNytrHgLROdRBJnz+4bLkg7yUmTCUbx/LomlkQug2TNAcaok82FNJachY6topMX9+BqvcJg/87GyecgPkLPIMnx1xDC/67JDiuZlwjvnvu9a14ogm4Xjunx9fcyWy7+mYESppgqn+Ecv+5BOqbqKi/XgPTLb8hQuWEw+k2vY/BZgGRGt6XsFlhw93UmOaJq3cJiR4ruCY2sN1whf1RtUB/Vd3RhGRhz5+KScDSLR3Nlln48qJOcEuzSKGqaQCl7M4l0Avg+ThCHvZJJMbvMPF0z/HJJszaeArx3Y6JZKgiebh6/ld6XDHJzHyeqKXqP7Sh4Y+c16rxneok6tWbNnvVPOtwmAE/Ldqn5Z4kUTZF2yWNuEpQtGmyUKDDV90bitkj6f+C844RD2/B9/X91gIK0NdUkwgOel5eu/6Rygf0sCcV8GLsyaNV+2Ynn0Vv0/S+dj6/ZJA/bHU5nf16lr/XjjThcGGXZKWMiMNN0q9i65kTvp4aFMkf7ftXJPQlZS7Xrhbnbde8rMZBdsiQCKyrI8VjHIRjv3Hw5w3QHItI4iq66QT5yacNh/zjUj+dC+7rtyzsSUzBsC+g+6i9quP8H/lJ2n2i2qTBcSr/gj+u5NVugDcSHbORnFrwCuS5Y1yjeiFZvEB2IX/pLarRXgpZSTk1PFoy+B0T4HADKb73858A63Yh6DudqOtPSLP/EAvxdeW66Rzz9tWfwXCYXGgryH0J4yFxUbWbaCKpuPeMrRUaAcWnUw3xVIZE+vMgOrdmCIcDlx7mnGV/SQdZVPhFtJrDzlRAbUFQCVxGSnt7ha46KhO+e3gtDA= X-Forefront-Antispam-Report: CIP:165.85.157.49; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:atlrelay2.compute.ge-healthcare.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: gehealthcare.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 14:04:18.9034 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 76188529-18c8-4dba-7f11-08dcfffe3d1a X-MS-Exchange-CrossTenant-Id: 9a309606-d6ec-4188-a28a-298812b4bbbf X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=9a309606-d6ec-4188-a28a-298812b4bbbf; Ip=[165.85.157.49]; Helo=[atlrelay2.compute.ge-healthcare.net] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CO1PEPF000044FA.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR22MB5691 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Commit 723f8359c1 ("imx: mx7: snvs: Add an SNVS init routine") noted that the init_snvs() call likely applies to other i.MX processors, and this has been found to be true for i.MX8MP. Move snvs module for future re-use. Signed-off-by: Ian Ray --- arch/arm/mach-imx/Makefile | 2 ++ arch/arm/mach-imx/mx7/Makefile | 2 +- arch/arm/mach-imx/{mx7 => }/snvs.c | 0 arch/arm/mach-imx/snvs.h | 6 ++++++ 4 files changed, 9 insertions(+), 1 deletion(-) rename arch/arm/mach-imx/{mx7 => }/snvs.c (100%) create mode 100644 arch/arm/mach-imx/snvs.h diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 21d955b4ae..0de207c068 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -293,3 +293,5 @@ obj-$(CONFIG_ARCH_IMXRT) += imxrt/ obj-$(CONFIG_SPL_BOOTROM_SUPPORT) += spl_imx_romapi.o obj-$(CONFIG_IMX8_ROMAPI) += romapi.o + +obj-$(CONFIG_MX7) += snvs.o diff --git a/arch/arm/mach-imx/mx7/Makefile b/arch/arm/mach-imx/mx7/Makefile index f1436e2d0d..fec228a616 100644 --- a/arch/arm/mach-imx/mx7/Makefile +++ b/arch/arm/mach-imx/mx7/Makefile @@ -3,5 +3,5 @@ # (C) Copyright 2015 Freescale Semiconductor, Inc. # -obj-y := soc.o clock.o clock_slice.o ddr.o snvs.o +obj-y := soc.o clock.o clock_slice.o ddr.o obj-$(CONFIG_ARMV7_PSCI) += psci-mx7.o psci-suspend.o diff --git a/arch/arm/mach-imx/mx7/snvs.c b/arch/arm/mach-imx/snvs.c similarity index 100% rename from arch/arm/mach-imx/mx7/snvs.c rename to arch/arm/mach-imx/snvs.c diff --git a/arch/arm/mach-imx/snvs.h b/arch/arm/mach-imx/snvs.h new file mode 100644 index 0000000000..4ce9781ca6 --- /dev/null +++ b/arch/arm/mach-imx/snvs.h @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2018 Linaro + */ + +void init_snvs(void); From patchwork Fri Nov 8 14:03:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Ray X-Patchwork-Id: 2008471 X-Patchwork-Delegate: festevam@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gehealthcare.com header.i=@gehealthcare.com header.a=rsa-sha256 header.s=selector1 header.b=Qeo89+Yi; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XlLKX5XmCz1xy0 for ; Sat, 9 Nov 2024 01:04:32 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C164588E1B; Fri, 8 Nov 2024 15:04:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=gehealthcare.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gehealthcare.com header.i=@gehealthcare.com header.b="Qeo89+Yi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CB7F3890F2; Fri, 8 Nov 2024 15:04:28 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2060d.outbound.protection.outlook.com [IPv6:2a01:111:f403:2418::60d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A6B6888DF1 for ; Fri, 8 Nov 2024 15:04:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=gehealthcare.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ian.ray@gehealthcare.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mt7a81OL0Mo3ieNQciySg6lSvoTuViWTvI5zgrkvS7p0WxP00/y6fwu0trFn/cq7MV8jOZmZswEiOiyFeF9yiWY5U7OVlqhyRB97ge7QVo1p/+5Dy0LYSr+hHMW/lm6ADpFka/B+kqrmBI4HHMMNV3DOs8v9DiqKsNnTsjJHyLKJp4bEhe4+TV/I8VtvUeiIFad1hFih+xVFz/kENd1OWLlBIeMcLz/MX9ITeETwReo27mwt0sS+/rRA7ZkRGkDywHSOpq1hWyvvRC0+Zd5xIjTDoNcQgMe5DWZcpIS2Yx9PI2rRsmGviF1MB3YTUg1QwBqIrSlU1DJBsZ8k9wuU5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DkR4a1eoH075QKU+Y3ZTBbdpPRWpKZtnDuZUvpy+vhQ=; b=ohRtKXeoGF0qrmfgui3Uw1ah3kN1XD2pGiCPmorBxZvSVS1hezxK2szopJ5mIPmmbt64DsqjfLEKrUjrP/iT3xLLPgd4SRAszvzg9dFcCD96Y4kQwRLF0lqanVVvhYVsLqAd3IBzSd7ZxAf1uSsNKOGUZATGvmkIDa7vEMeTNlhacd4fz2RIE4EtGJtLKoc6hQFONjruS8txmjy5sHlan/g4fdT7F66PuFc/TqIUd1UTHuNw81eCWBiu2ABgNTgA4Owt0rprmplVWyjSNhPMGH97Rx5IoPIxLJHcAZtZYPW7KeSF3PBlHJMWVsj+Dgx2Odv9TDPfw7hS8oCldHU+WA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 165.85.157.49) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=gehealthcare.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=gehealthcare.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gehealthcare.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DkR4a1eoH075QKU+Y3ZTBbdpPRWpKZtnDuZUvpy+vhQ=; b=Qeo89+YipRkBzyj57ZI3rUSRz8DP+GRo2m8Nl+vYA2cWB83cXr0dbGH+m1vyQOOzZcrhPQ0qFR2uCIc5GjmofXnuoITrY4L/eU7rkmAjquaZECVXImDwkr7dHdSPZAn/ZHc0eMcQEoR7Lwm8p75VO4VlLwh6Wv3FA+xjj6A9YSXx6nFDNAjv3SgTi24i3Zt/+ElwZb2lhi0weDz0iYaZlCLoEmgnzULl575Am2wWKfemC0vFhCjzruiPvhHMP+UxDKK62ejE5cTkgi3WnW2OzAJNGHiWwJ/UkQ8HLL/5+EKk8VTbjVJ1L2S2C0K09PIq562zG7Mv2XGJwH4n0haIBw== Received: from SJ0PR03CA0242.namprd03.prod.outlook.com (2603:10b6:a03:3a0::7) by EA2PR22MB5307.namprd22.prod.outlook.com (2603:10b6:303:24f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19; Fri, 8 Nov 2024 14:04:22 +0000 Received: from CO1PEPF000044FA.namprd21.prod.outlook.com (2603:10b6:a03:3a0:cafe::7e) by SJ0PR03CA0242.outlook.office365.com (2603:10b6:a03:3a0::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.21 via Frontend Transport; Fri, 8 Nov 2024 14:04:22 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 165.85.157.49) smtp.mailfrom=gehealthcare.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=gehealthcare.com; Received-SPF: Fail (protection.outlook.com: domain of gehealthcare.com does not designate 165.85.157.49 as permitted sender) receiver=protection.outlook.com; client-ip=165.85.157.49; helo=atlrelay2.compute.ge-healthcare.net; Received: from atlrelay2.compute.ge-healthcare.net (165.85.157.49) by CO1PEPF000044FA.mail.protection.outlook.com (10.167.241.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.1 via Frontend Transport; Fri, 8 Nov 2024 14:04:21 +0000 Received: from 0e263a2c6991.em.health.ge.com (unknown [10.168.174.111]) by builder1.em.health.ge.com (Postfix) with ESMTP id F3F26ACD1A; Fri, 8 Nov 2024 16:04:16 +0200 (EET) From: Ian Ray To: Stefano Babic , Fabio Estevam , "NXP i.MX U-Boot Team" , Tom Rini Cc: Ian Ray , u-boot@lists.denx.de Subject: [PATCH V2 2/2] arm: mach-imx: imx8m: re-use SNVS init routine Date: Fri, 8 Nov 2024 16:03:55 +0200 Message-Id: <20241108140356.483-2-ian.ray@gehealthcare.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108140356.483-1-ian.ray@gehealthcare.com> References: <20241108140356.483-1-ian.ray@gehealthcare.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FA:EE_|EA2PR22MB5307:EE_ X-MS-Office365-Filtering-Correlation-Id: fc2ae97f-dada-4346-6b08-08dcfffe3ecc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: MRnmfpGSO/Pn67yw32/AJvbBgOyB2cm5GM36Frv5IgDHWRzLXZa3FzkO0KWqjfjdc5EVH9h6PWkgwJ1KR/VLPB/NlPLvCZX8YpKxlis1Jux4YTJkPcOvlc32y3Lg/U0A+khI4Ob0wVXBOtR+tIxDu1jczdVtxDpsl+W3PfrG6mMAzsJ0jYOCPLNBlQRUAzGaWBlKkWail9J/s4HV/YPEjqWz+wvVJRV2uYjEtbOeqfntrH9gff/osZpFoV5nU4mTwAAti6J1ezSddg+wrKk1mKjGxFqIXWX5q458KhNkwmfRuAFbV+sRe5BbWMb5LZweSk+yHdsSm1fD6jX4Zhbq/LABrtg13gOj95W6KMU5pYNjISabBGxr7s7XtpVnsJWrBCMYQMroQ2w4xyj3UZFzLR0FL/ub4nS198r6kuGKJpOxpZqboNWB27moUUIYUKRYWfk8pJMvnP+MK7CBym7JfWNyIVv60HZaZIKLZ2quWPwdMvMCBCEmmMLv1VUsgIl64SSM99tnhuG/ulB/hU95Mo25l16ZMtXmz6R/djFVAhQprwKzem6NG/AGVHf4z6+HEv65CinVbeWFbGiJyd8Jhs4ll3pwL2GH7ujQHykDL5VtiSL2Be4yndPXENFzKYoD0OxORo+dv2w27AkXQvDUBMP+oQUkYjUO/898R8HrWDguVWwFRsyapyZegknREXDLcY3gx37egN662YGFFVt76AjKfSeyI0PPdLtN0GJyuqJI8V8n96ez4xbZGAp7CUGqu8mDRRQTqF39J38lhLFGDhQyQ/leQppZqz8QLU0UcGZBo5cnZBxI79SooJCUIUw0p4QEw/LVH+DGgEpjVueiavS4fVDb5HBWS3P83R37vHrKGyFEL4tlZRJt2WuscLrLIriySOIG33JnJuqxuwnJXsM1TzclV/UMpXX9vSB6/q5w12veVxcs/IOlv6+tWrGRYHH0EUWdPZ2hlY3HHWXe07gXp3StnLVMc2niCYCwTtyiS7T4B8fugjR11flo1jJE2FrnoZc32nftzKY7iiapqSxoQELdKgNf24ncgMWuSsdYRFkYsXGVrcFKPO/XC+U4NPqDDS5Gvt+K9mY0hQI1Vw3UCb3MBGifNq1PrjXE3yxGZXjN+BpE9qwWSOkafivNWaiGfNlfqHgsyQRzvmsk8X6wOmN/MyX/X/Ry4lojgUPSLh7vVGF5eSK40R6TeWlxB5xOdCN7dcOcdCGnVcapegLtonsSSFwDGA8EY28Ki7fNRYfOSBgepBwHh7KdIwg0KCu19xEUHM2eC9F/Ccrm9I6vSQ1rS8WQtsPZhPxiSpV/WNR1j6OMz/cv0bGhugF5hwg0G/G3yKWL7gy1VIaB8KTNKty64Gd4928BwtBpeeE= X-Forefront-Antispam-Report: CIP:165.85.157.49; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:atlrelay2.compute.ge-healthcare.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(1800799024)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: gehealthcare.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 14:04:21.7003 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc2ae97f-dada-4346-6b08-08dcfffe3ecc X-MS-Exchange-CrossTenant-Id: 9a309606-d6ec-4188-a28a-298812b4bbbf X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=9a309606-d6ec-4188-a28a-298812b4bbbf; Ip=[165.85.157.49]; Helo=[atlrelay2.compute.ge-healthcare.net] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CO1PEPF000044FA.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: EA2PR22MB5307 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Working with HAB on the i.MX8MP we've encountered a case where a board that successfully authenticates u-boot when booting Linux subsequently fails to properly bring up the RTC. The RTC registers live in the low-power block of the Secure Non-Volatile Storage (SNVS) block. The root cause of the error has been traced to the HAB handing off the SNVS-RTC in a state where HPCOMR::NPSWA_EN = 0 in other words where the Non-Privileged Software Access Enable bit is zero. Configure SNVS to allow unpriv access to SNVS LP for imx8m and imx8mp. This commit generalizes 723f8359c1 ("imx: mx7: snvs: Add an SNVS init routine") to also be used on i.MX8M SoCs, and was testeed on i.MX8MP. Signed-off-by: Ian Ray --- arch/arm/mach-imx/Makefile | 2 +- arch/arm/mach-imx/imx8m/soc.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 0de207c068..011cca5d97 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -294,4 +294,4 @@ obj-$(CONFIG_ARCH_IMXRT) += imxrt/ obj-$(CONFIG_SPL_BOOTROM_SUPPORT) += spl_imx_romapi.o obj-$(CONFIG_IMX8_ROMAPI) += romapi.o -obj-$(CONFIG_MX7) += snvs.o +obj-$(CONFIG_MX7)$(CONFIG_IMX8M) += snvs.o diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index a72329ea91..459503b0d6 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -34,6 +34,8 @@ #include #include +#include "../snvs.h" + DECLARE_GLOBAL_DATA_PTR; #if defined(CONFIG_IMX_HAB) @@ -571,6 +573,8 @@ static void imx8m_setup_snvs(void) writel(SNVS_LPPGDR_INIT, SNVS_BASE_ADDR + SNVS_LPLVDR); /* Clear interrupt status */ writel(0xffffffff, SNVS_BASE_ADDR + SNVS_LPSR); + + init_snvs(); } static void imx8m_setup_csu_tzasc(void)