From patchwork Mon Mar 20 18:24:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 665307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2D4BC77B61 for ; Mon, 20 Mar 2023 18:34:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231216AbjCTSeK (ORCPT ); Mon, 20 Mar 2023 14:34:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231225AbjCTSdx (ORCPT ); Mon, 20 Mar 2023 14:33:53 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on20611.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe59::611]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B22A37B76; Mon, 20 Mar 2023 11:26:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=btyrvy2TxoeJDpjwLAJtGFSSgbGyHtr8HQczImxn7l7OSfPoXu/GmY52EEzdmYiypqgTZYPTtw14pY4/9IGdO52bgcjFx+Cnfw7nvVNDOKSLlIKG4MSjGCG+xpsDxzYTpVPP7R8c48aEGy/sc//ltvqnAm0jZcK31ZFTkmz6Ux2YJX+KsZ/e+HjwEqjZervPQ+H1oAX2UQKlKKHXs470ALrbj0t2ZvK/YDivq/gk6xDqfRfQh84o9VGJIzOY7upiJ8zIrK1y8jdibLy5qJOM7OkVfGWOsG4RYNyJm5Wvaqa6ZB/kA9ozy5WFntFEKjAcFlRoN/klGzVIn4EBpuMsGQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7HewRol2vw9rvVIfTdmYVBC/1mQMXSvdHNc/fD3rnGM=; b=huecutLzswikLy0Po1OD2PAh+Ty4Yg7rHFtQbyrVLyaAOof3a19suZ621aef5147kYr7EjBMLwrd03FEXRnNWuzgHJM5qsA0eG5/Smt+eQ6zeQhfYWSulBydC8sZdH+fli2EPwt+KsNhZEVTpXgpy02PNOyF+YgbwqhTuWbJp3crSiw62b3Fc+sf/+PZlfDCtpWSgzEEtLBTLmI5qye/MRy2oIu/SUz6KyMfXi0FBe7Vg9kGzjyHFhqsJ0C3+itKGSRgIFxRRKlcPj8VSGQYqlEWh2FIOLad7ZPKfS2jrE0PN+ySWK3ck+c7Ym1R5UC/tNGeRv4FvBgWrBoYnXkUOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7HewRol2vw9rvVIfTdmYVBC/1mQMXSvdHNc/fD3rnGM=; b=VO4kZJjnQ9er8s1YeHChuyw4riQj5/eMyItoZgPAmamPAF8KS6M6ykn01LnXvn0GkzQc0bi3IG1fOhyiVSqhFLD2z0HdgNubgcAuSWaaPOUN8v7qDrEBquZe887OtEKqcXkncBHPqFlZwIiWAd43D4TSX/Z5ZiRnVhFxJ4tjI6XzSCI+HXxxQWWmoDxlHQBbMHCcHyLt7YIemJ9RSpMZVEVaIxFQt+fShRBJVAvWo2KbfMXQGfOOPHByvOCS4mmj0kUgHXRCcofgXOmVeFu4CoPSbfE2uVvSZFHG+t52dMPFNuXoFZ/1PyKWKD88mHbJlTaVyYE8jOxiWEiJI5szYA== Received: from MW4P223CA0007.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::12) by SA1PR12MB8986.namprd12.prod.outlook.com (2603:10b6:806:375::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Mon, 20 Mar 2023 18:25:34 +0000 Received: from CO1NAM11FT112.eop-nam11.prod.protection.outlook.com (2603:10b6:303:80:cafe::fe) by MW4P223CA0007.outlook.office365.com (2603:10b6:303:80::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37 via Frontend Transport; Mon, 20 Mar 2023 18:25:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CO1NAM11FT112.mail.protection.outlook.com (10.13.174.213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.16 via Frontend Transport; Mon, 20 Mar 2023 18:25:34 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 20 Mar 2023 11:25:31 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 20 Mar 2023 11:25:30 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 20 Mar 2023 11:25:25 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v3 03/11] memory: tegra: add mc clients for Tegra234 Date: Mon, 20 Mar 2023 23:54:33 +0530 Message-ID: <20230320182441.11904-4-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230320182441.11904-1-sumitg@nvidia.com> References: <20230320182441.11904-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT112:EE_|SA1PR12MB8986:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ff521ef-2109-496c-029c-08db29707ef0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ux2b5Ws2vvUBnD5B6iKpGOVN9euXgrN1AZt9+dALTH+UmlszAKiBoCLHQW3zjSOeY9wTMzLBZC5BeVAVUH1STjgGpLyKaOO+rml8HDY46KK0IjbSitAFIeeHRIh5HrCkHPRSf6P+IALbX6XYAIF/zpHezDTC1oGCL57K49bSR8LYwT8Y4CsOTgSTIm69N4eFu3j+P7c3jIdVeb2s/fVIDojtzeK3Fjv5WMpgLPVvD2oSZDIzvHNMNwDZqAoedJl4pszs7agvbI3m8H/J7B4pce53Ql5GRmMeiEC9sXC7ARZz0haUggORTZbBkWMItOdp3WxRvPRb87Rpc/QkviSS8xIYhUAhJrPrTnJpNeR5QoTsLyAGVHx8mw6ec+ZJInBXsaaK+oWR49YzqG7eybi1u6bcwlS2Nb8jKqgJRUFic3NwB7q8FQkJhcOjsW0EopNZ9lvFJAAndkRSGDS50ai1Sl1qMWU/JejlYreBMabSTDpfoi8NeCO1QefouU8/N8VEATRfR44Z8jZ+Ha3KLPSdzMKzRhkfSE/lpPYixC8K1qWKjDxpjipKPJd+EWlkAVj4kl3nhNFz8V3JdJUddvj01Z73nmaOJjqxrEm9vRv/cihuBi5IWHWY1AdphAgbgPCJh6BfHjvD+PpDgW2KJuYByWwTX4aGM15ggSV2VsWUoFjtj5Wlz8dO9MZS2/Yw0sn7cvsrGAzR7hJ+FK/JUGm1LwZXYnO9zfcQJE0ONW7AJ7y5aNPlw6XfMrIArfFIM+7A X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(346002)(396003)(39860400002)(376002)(136003)(451199018)(40470700004)(46966006)(36840700001)(2906002)(82740400003)(7636003)(356005)(40480700001)(40460700003)(47076005)(7696005)(426003)(478600001)(83380400001)(186003)(86362001)(36756003)(82310400005)(110136005)(6666004)(2616005)(316002)(41300700001)(54906003)(70206006)(4326008)(8676002)(5660300002)(70586007)(107886003)(336012)(26005)(1076003)(8936002)(7416002)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2023 18:25:34.4854 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2ff521ef-2109-496c-029c-08db29707ef0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT112.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8986 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add few Isochronous (ISO) and Non-ISO MC clients. ISO clients have guaranteed bandwidth requirement. PCIE clients added to the mc_clients table represent each controller in Tegra234. Signed-off-by: Sumit Gupta Acked-by: Krzysztof Kozlowski --- drivers/memory/tegra/tegra234.c | 420 ++++++++++++++++++++++++++++++++ 1 file changed, 420 insertions(+) diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra234.c index b40229926558..7ca744036f59 100644 --- a/drivers/memory/tegra/tegra234.c +++ b/drivers/memory/tegra/tegra234.c @@ -15,6 +15,30 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { { + .id = TEGRA234_MEMORY_CLIENT_HDAR, + .name = "hdar", + .bpmp_id = TEGRA_ICC_BPMP_HDA, + .type = TEGRA_ICC_ISO_AUDIO, + .sid = TEGRA234_SID_HDA, + .regs = { + .sid = { + .override = 0xa8, + .security = 0xac, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_HDAW, + .name = "hdaw", + .bpmp_id = TEGRA_ICC_BPMP_HDA, + .type = TEGRA_ICC_ISO_AUDIO, + .sid = TEGRA234_SID_HDA, + .regs = { + .sid = { + .override = 0x1a8, + .security = 0x1ac, + }, + }, + }, { .id = TEGRA234_MEMORY_CLIENT_MGBEARD, .name = "mgbeard", .bpmp_id = TEGRA_ICC_BPMP_EQOS, @@ -134,6 +158,90 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x33c, }, }, + }, { + .id = TEGRA234_MEMORY_CLIENT_VI2W, + .name = "vi2w", + .bpmp_id = TEGRA_ICC_BPMP_VI2, + .type = TEGRA_ICC_ISO_VI, + .sid = TEGRA234_SID_ISO_VI2, + .regs = { + .sid = { + .override = 0x380, + .security = 0x384, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_VI2FALR, + .name = "vi2falr", + .bpmp_id = TEGRA_ICC_BPMP_VI2FAL, + .type = TEGRA_ICC_ISO_VIFAL, + .sid = TEGRA234_SID_ISO_VI2FALC, + .regs = { + .sid = { + .override = 0x388, + .security = 0x38c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_VI2FALW, + .name = "vi2falw", + .bpmp_id = TEGRA_ICC_BPMP_VI2FAL, + .type = TEGRA_ICC_ISO_VIFAL, + .sid = TEGRA234_SID_ISO_VI2FALC, + .regs = { + .sid = { + .override = 0x3e0, + .security = 0x3e4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_APER, + .name = "aper", + .bpmp_id = TEGRA_ICC_BPMP_APE, + .type = TEGRA_ICC_ISO_AUDIO, + .sid = TEGRA234_SID_APE, + .regs = { + .sid = { + .override = 0x3d0, + .security = 0x3d4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_APEW, + .name = "apew", + .bpmp_id = TEGRA_ICC_BPMP_APE, + .type = TEGRA_ICC_ISO_AUDIO, + .sid = TEGRA234_SID_APE, + .regs = { + .sid = { + .override = 0x3d8, + .security = 0x3dc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVDISPLAYR, + .name = "nvdisplayr", + .bpmp_id = TEGRA_ICC_BPMP_DISPLAY, + .type = TEGRA_ICC_ISO_DISPLAY, + .sid = TEGRA234_SID_ISO_NVDISPLAY, + .regs = { + .sid = { + .override = 0x490, + .security = 0x494, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVDISPLAYR1, + .name = "nvdisplayr1", + .bpmp_id = TEGRA_ICC_BPMP_DISPLAY, + .type = TEGRA_ICC_ISO_DISPLAY, + .sid = TEGRA234_SID_ISO_NVDISPLAY, + .regs = { + .sid = { + .override = 0x508, + .security = 0x50c, + }, + }, }, { .id = TEGRA234_MEMORY_CLIENT_BPMPR, .name = "bpmpr", @@ -358,6 +466,318 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x37c, }, }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE0R, + .name = "pcie0r", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_0, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE0, + .regs = { + .sid = { + .override = 0x6c0, + .security = 0x6c4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE0W, + .name = "pcie0w", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_0, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE0, + .regs = { + .sid = { + .override = 0x6c8, + .security = 0x6cc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE1R, + .name = "pcie1r", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_1, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE1, + .regs = { + .sid = { + .override = 0x6d0, + .security = 0x6d4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE1W, + .name = "pcie1w", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_1, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE1, + .regs = { + .sid = { + .override = 0x6d8, + .security = 0x6dc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE2AR, + .name = "pcie2ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_2, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE2, + .regs = { + .sid = { + .override = 0x6e0, + .security = 0x6e4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE2AW, + .name = "pcie2aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_2, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE2, + .regs = { + .sid = { + .override = 0x6e8, + .security = 0x6ec, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE3R, + .name = "pcie3r", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_3, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE3, + .regs = { + .sid = { + .override = 0x6f0, + .security = 0x6f4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE3W, + .name = "pcie3w", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_3, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE3, + .regs = { + .sid = { + .override = 0x6f8, + .security = 0x6fc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE4R, + .name = "pcie4r", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_4, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE4, + .regs = { + .sid = { + .override = 0x700, + .security = 0x704, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE4W, + .name = "pcie4w", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_4, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE4, + .regs = { + .sid = { + .override = 0x708, + .security = 0x70c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE5R, + .name = "pcie5r", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_5, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE5, + .regs = { + .sid = { + .override = 0x710, + .security = 0x714, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE5W, + .name = "pcie5w", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_5, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE5, + .regs = { + .sid = { + .override = 0x718, + .security = 0x71c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE5R1, + .name = "pcie5r1", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_5, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE5, + .regs = { + .sid = { + .override = 0x778, + .security = 0x77c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE6AR, + .name = "pcie6ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_6, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE6, + .regs = { + .sid = { + .override = 0x140, + .security = 0x144, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE6AW, + .name = "pcie6aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_6, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE6, + .regs = { + .sid = { + .override = 0x148, + .security = 0x14c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE6AR1, + .name = "pcie6ar1", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_6, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE6, + .regs = { + .sid = { + .override = 0x1e8, + .security = 0x1ec, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE7AR, + .name = "pcie7ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_7, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE7, + .regs = { + .sid = { + .override = 0x150, + .security = 0x154, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE7AW, + .name = "pcie7aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_7, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE7, + .regs = { + .sid = { + .override = 0x180, + .security = 0x184, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE7AR1, + .name = "pcie7ar1", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_7, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE7, + .regs = { + .sid = { + .override = 0x248, + .security = 0x24c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE8AR, + .name = "pcie8ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_8, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE8, + .regs = { + .sid = { + .override = 0x190, + .security = 0x194, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE8AW, + .name = "pcie8aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_8, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE8, + .regs = { + .sid = { + .override = 0x1d8, + .security = 0x1dc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE9AR, + .name = "pcie9ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_9, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE9, + .regs = { + .sid = { + .override = 0x1e0, + .security = 0x1e4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE9AW, + .name = "pcie9aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_9, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE9, + .regs = { + .sid = { + .override = 0x1f0, + .security = 0x1f4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE10AR, + .name = "pcie10ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_10, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE10, + .regs = { + .sid = { + .override = 0x1f8, + .security = 0x1fc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE10AW, + .name = "pcie10aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_10, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE10, + .regs = { + .sid = { + .override = 0x200, + .security = 0x204, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE10AR1, + .name = "pcie10ar1", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_10, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE10, + .regs = { + .sid = { + .override = 0x240, + .security = 0x244, + }, + }, }, }; From patchwork Mon Mar 20 18:24:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 665306 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63799C6FD1D for ; Mon, 20 Mar 2023 18:34:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231298AbjCTSee (ORCPT ); Mon, 20 Mar 2023 14:34:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjCTSeA (ORCPT ); Mon, 20 Mar 2023 14:34:00 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on20600.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8a::600]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF584AFE1; Mon, 20 Mar 2023 11:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g4z5dsAV4hihEw9XHeZw6dbiRf1rXEbCaiJPjvSTh0z92lwimMm8hz22v8Ydwq+mHcA8CGGuZmhWlnx+KAiunUgouJ/RaDwZW8UW7KmgQcmaE2s7x4mLIn0DkfOkuXVpYA9wrbT+BG42jyRYrkxUAk2md0tqyepMzxqMguJKNUHFxTgWoAQjKekDvCSpphXITer8kRKGIhaiuavt4x38lWv51t9JQ5Z9ijDkRlZAqvGEyRMxIE4YnBvdTEuvzD5pzvmyfJ6ZZ8b+4kM9KO3YHpOAnr+f+D0yrockbYzexBVmRGzkOlBPevfXUSxXq6GNfikDin2wXXbH8Ld510Xbsg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8EOLSj2IMC6AmgQP+x8WnAbrOd38Fq0L406q4vninRQ=; b=E3NCiZka0h6nArlSQXrsUVlX1NAdeXklFVryBBJRcfZZT04jjYnZQpdWp4aBwVMcySzqF76OSVmq0q9FuOZpeG7/JNcD70xThsz7yhEX9BakyrURE5NnqgRWkVlPqtAFcYs6lNXIgvDmB9X68GsM87j7rZJoHyUD/tZmWZ1vUSqRKGBHpY4Y8QAXdOa8bd4w1Dewll8wjY9RCK1+nug5CqhnZy7sWGcsASGA3abwr1itamLvhSXxGCofvaHd8WdcXo16bhLklJPnPkMMxZW/h8V0sX5pTRtGig/M2cLYvKL+VK29mBOexWk05ORmZxS4cOpsLPXc1etZ56BUF+ihvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8EOLSj2IMC6AmgQP+x8WnAbrOd38Fq0L406q4vninRQ=; b=unI0W+bB6n3M9w/WRVbR0P6AOXgcD4eVrXDU4BjUMBXYBwXCLtmzGlyvWUJMCIEqnxcE0uyDLMPZ8ivqtEPVfr7BnsUSqWPAn/zblvxxJFUJsREw4XfIoar5dV/5W+TcVMbBNLCNXhJagFwzwzBH4UudkN5o2fpy9cccb1JGT1p1SQ+yybEV3w9GJcBklj7SIh+tMQ1PpQVB3rjh/o5IhdrIURmkXoUpQUT3rPhCr/DnQvQyCVQvlwq2aHs7uYkttSi8BgNcPnClkMEm2RyMwifEu09durT2issE/RtGb8s69UvHP+8RCBYO2xrjwSIchf4zg103V5TfmlaFuNEHng== Received: from MW4PR03CA0116.namprd03.prod.outlook.com (2603:10b6:303:b7::31) by DM6PR12MB4186.namprd12.prod.outlook.com (2603:10b6:5:21b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Mon, 20 Mar 2023 18:25:47 +0000 Received: from CO1NAM11FT085.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b7:cafe::46) by MW4PR03CA0116.outlook.office365.com (2603:10b6:303:b7::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37 via Frontend Transport; Mon, 20 Mar 2023 18:25:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CO1NAM11FT085.mail.protection.outlook.com (10.13.174.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.15 via Frontend Transport; Mon, 20 Mar 2023 18:25:47 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 20 Mar 2023 11:25:46 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 20 Mar 2023 11:25:46 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 20 Mar 2023 11:25:41 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v3 05/11] dt-bindings: tegra: add icc ids for dummy MC clients Date: Mon, 20 Mar 2023 23:54:35 +0530 Message-ID: <20230320182441.11904-6-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230320182441.11904-1-sumitg@nvidia.com> References: <20230320182441.11904-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT085:EE_|DM6PR12MB4186:EE_ X-MS-Office365-Filtering-Correlation-Id: aad7287b-1ae3-420d-96e8-08db2970869d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TKv3wSuCicyBdvUiFIYQ7a6HEMv1m9wbSHVUQ3SgBDMeD1Th4ywa6CKnuto7SVBC/63hhzJQvoQuoLhvCXNE5hNjmla9fJw6VE/5lZlaCTUezhqdnVqEFAuw7tA6Cd83E2YNm/a0wA4/4iTTZ3qbaWNGq0RJVPK2HZGFONF4biqXThv8Tkozi8PjjZStJW8v1wExa/1UXLVenhLVtii8G/vnay1NvFQPmL3uAUo+UUG7dQn+CNjmsv+TPnQTYgM1WEcSAIf/FCCn2JZWxD+93tNqesRVg/UaTVZFkll466dNQ+YAzNpPgt0ebjuTgMUe1L9BjCMxUt2uKA50tYIEOv14YCwXjku1T87Sr6aMSJSxATrEHA2sikaC40KFA0E6ymdpvgEi5PrPbtLnvUDrE4O71IbXo+pz4vmU0ZNcZQi6nDrwbEO1li9p4GkAV4fUqQvXN9SOmLWIP5VXMuKGCy6Of1Pa6bKWDxfE0cVezvfJ5wtKqr0BjlcSj71KOaWPn/Af8AHk3qQFF/5viiMJmgnVYF+5KsgeVHwml2QDbWRN7PhL8pYa+k6iZpg/KOu2feqgZLkYoiyscK+2iECrA583X98ftMQrFZlBADKw6ShlTEMGVv6q82LpPQ9XTouonPUypgOrE0w1T3BfQUQa09xGMKq4dLhMouLh5tMU+phVv1QdkDnwgN5S5e+pGuLEUhLRRMAtE7ho6XThgdIIIrE57P7nIMLzjvCqj+bu18/F55HpyxKK+/sxyjKka+tJ X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(396003)(376002)(39860400002)(346002)(136003)(451199018)(40470700004)(46966006)(36840700001)(47076005)(2616005)(82310400005)(478600001)(426003)(316002)(54906003)(26005)(186003)(110136005)(6666004)(1076003)(7696005)(7416002)(107886003)(8936002)(356005)(7636003)(40460700003)(336012)(86362001)(36860700001)(2906002)(4744005)(70206006)(70586007)(5660300002)(4326008)(82740400003)(40480700001)(41300700001)(8676002)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2023 18:25:47.3670 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aad7287b-1ae3-420d-96e8-08db2970869d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT085.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4186 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add ICC id's for dummy software clients representing CCPLEX clusters. Signed-off-by: Sumit Gupta Acked-by: Krzysztof Kozlowski --- include/dt-bindings/memory/tegra234-mc.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/dt-bindings/memory/tegra234-mc.h b/include/dt-bindings/memory/tegra234-mc.h index 347e55e89a2a..6e60d55491b3 100644 --- a/include/dt-bindings/memory/tegra234-mc.h +++ b/include/dt-bindings/memory/tegra234-mc.h @@ -536,4 +536,9 @@ #define TEGRA234_MEMORY_CLIENT_NVJPG1SRD 0x123 #define TEGRA234_MEMORY_CLIENT_NVJPG1SWR 0x124 +/* ICC ID's for dummy MC clients used to represent CPU Clusters */ +#define TEGRA_ICC_MC_CPU_CLUSTER0 1003 +#define TEGRA_ICC_MC_CPU_CLUSTER1 1004 +#define TEGRA_ICC_MC_CPU_CLUSTER2 1005 + #endif From patchwork Mon Mar 20 18:24:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 665305 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B12AC6FD1D for ; Mon, 20 Mar 2023 18:35:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbjCTSfH (ORCPT ); Mon, 20 Mar 2023 14:35:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231478AbjCTSee (ORCPT ); Mon, 20 Mar 2023 14:34:34 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on20604.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaa::604]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37FAB2E0FF; Mon, 20 Mar 2023 11:26:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IwoQzOubhEHVSidMieDmqnphoRVfhhXhpWz6i/uUj2PuYNGhNkpStrd3nqUlTdtLW/+D6dlCr7ZhC2uk31RFPub7JuzMOfmfRDAn1i26U+0PW5mdXk088OYboiyVErojCAeyQKep3+saCQIktMIVXXh2+y2r5R4R1gCImjOUs1YHzqYcQrmSgKBks+ME4yhkE6hq2VPxSaO1HGG5+/61A/DrihlFs2iXvSYeeE5Qq7yrAK+nI7kjPQk7QMQKhBSUO5h3FfaxDecB1KHJxQrjj1MD3T2MAl32h5bTgivwondneG7G43OcBVE/5M3/SuNYCsPcwh2amnLa3+8KBbPnGQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pNCTaro6ewyVWAmKyh/Qk0oQqzhR9dQ1kRZCS8CFNvY=; b=Z0v0XusEuQtcZYNp3TxV7mLwOfWRUS3F7g5hxzIQG2mMaJYTn/612H92D5z4aiGwSUzgaRyIcn1vrFuelyMTtEXKONe3O02wr2YVbRGLvejbqBi7bgJKBlKjXOxDwhi9TLkCDwWsYiAx63V6BFeEewW1qd3qahGLW/buGIT+AE/o309mN8N/cRZh1E+sRLXkbtVsXJF601srm2hg4u2aIPQZj44aR4MGOmEDsvCLfy/A6VdG6ijYfqZlOiJygsUyiwcLrPB1m+ZuqkLNdymWXwPuttTHhI0UaaQSyyCtMYQxUHJ5TmOid+QyGWbv3HXEk0VchF3rKMWP0GN/YFyjbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pNCTaro6ewyVWAmKyh/Qk0oQqzhR9dQ1kRZCS8CFNvY=; b=patRxxeQu4JLr8blBdscvmFMn6UMpZNX2uAhzg+w5CPa3xDLh89Pt8Q+Clm+O6IGn80Lli4ESGTNszgH4GLV0s4IPGr6OxIBNZfUQ8YAKPpX1JMDd0f+TB76/Yhmt35FKTwvJLOcavOSO3mQhMyioJtzlhzWXQK+J4YgLCeIepXEib2Aw0aLJlA/dCcVsi5hnfMsZkZzKl3KGcqTKM/KPKTgXuvbiSr6N0Q2MibqEcSyrHA6kWE7PsZgkDJ3c/QGGtsVBm3R0vcy/DYA66itGnh2HljhsfSrxXAFrKCxGngeTdxLMHnb38hvGZf8qYEXugPVKmxfpkySvinYvd3Mrw== Received: from BN9PR03CA0735.namprd03.prod.outlook.com (2603:10b6:408:110::20) by MN2PR12MB4208.namprd12.prod.outlook.com (2603:10b6:208:1d0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Mon, 20 Mar 2023 18:26:07 +0000 Received: from BN8NAM11FT087.eop-nam11.prod.protection.outlook.com (2603:10b6:408:110:cafe::cc) by BN9PR03CA0735.outlook.office365.com (2603:10b6:408:110::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37 via Frontend Transport; Mon, 20 Mar 2023 18:26:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by BN8NAM11FT087.mail.protection.outlook.com (10.13.177.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.16 via Frontend Transport; Mon, 20 Mar 2023 18:26:06 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 20 Mar 2023 11:25:58 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 20 Mar 2023 11:25:58 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 20 Mar 2023 11:25:53 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v3 06/11] arm64: tegra: Add cpu OPP tables and interconnects property Date: Mon, 20 Mar 2023 23:54:36 +0530 Message-ID: <20230320182441.11904-7-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230320182441.11904-1-sumitg@nvidia.com> References: <20230320182441.11904-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT087:EE_|MN2PR12MB4208:EE_ X-MS-Office365-Filtering-Correlation-Id: 8cf87a40-3128-40d5-c742-08db29709255 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HhehNrbaR7qyRdQ1oAiXW0HmJn8CWZVAKutBD9g5iicGCfmK/nxa6qcFLppFYj6EcCPrd2CXa3VEDJ9hWS3Ge7U7bAvLOx6cr94nWg1Ha6qvVyrhQOvXAGqYFWGlVgSUifipQ6DBDmx75DpcyK93dBs90j/1hvh8alKdfarNQggEud9UiXRhWywCU1bEk/6Da/pWPLbb4PnLOCGgkyvOUOVoNWC53g8v4NUnSrKJs8HTdR1p1HoadBmL31CTOyFxgdda/iLtS0aDlbztpv6DozbJfcGu6WhYAwLrfq2rK0v84AN6UJtRUVGFmiDCFyg/Y3U9MoeHXZlHrO84WaZSkRXUooE2KS3lDhoH5dZHq9e1wecUvapfgLEoKG5mOU7xkFjsgj0Rb+v1GqMeBULHJX5lgiTq/dW6MXIuyNEecq/Tl783xN35GDSaRnehLz3LmVR0rpVvz6hXu6J9EOCYb/yFQ5bQNv00vrjHvP/qcEsXPQv9JXWQoojGBaPnKPW3pqB5tB3o+2V9mT1gqFtV2wGrctmzaxTU4mk7Q6DZ8OnNIxJJFZi6HrngM4lD5cLtf/U926DQJshfnWZAgdyAcNgkeF+LinsnxhKSR0+lhnkfuHTPkGwN9NGw4CEnZ3OUqBtRPaqkZDhnbupnF7Fjxo2IS7DcW4q0gmBJiFstEBuVWbPgrKNX+sHgdCDBMwxviaReTVfFEqZ15MdMASOcCi0YN08A6rXb84rPKtOj71+wlzA24mohOgLoL4RfBIH+ X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(396003)(346002)(39860400002)(376002)(136003)(451199018)(46966006)(40470700004)(36840700001)(356005)(2616005)(6666004)(107886003)(336012)(186003)(1076003)(26005)(7696005)(47076005)(426003)(86362001)(2906002)(478600001)(83380400001)(40460700003)(82740400003)(82310400005)(7636003)(8676002)(54906003)(110136005)(40480700001)(316002)(8936002)(4326008)(5660300002)(7416002)(36860700001)(41300700001)(36756003)(70586007)(70206006); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2023 18:26:06.9353 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8cf87a40-3128-40d5-c742-08db29709255 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT087.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4208 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add OPP table and interconnects property to scale DDR frequency with CPU frequency for better performance. Each operating point entry of the OPP table has CPU freq to per MC channel bandwidth mapping. One table is added for each cluster even though the table data is same because the bandwidth request is per cluster. This is done because OPP framework creates a single icc path and hence single bandwidth request if the table is marked as 'opp-shared' and shared among all clusters. For us, the OPP table data is same but the MC Client ID argument to interconnects property is different for each cluster. So, having per cluster table makes different icc path for each cluster and helps to make per cluster BW requests. Signed-off-by: Sumit Gupta --- arch/arm64/boot/dts/nvidia/tegra234.dtsi | 276 +++++++++++++++++++++++ 1 file changed, 276 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi index f1748cff8a33..285fff0bef99 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi @@ -3013,6 +3013,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl0_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER0 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3029,6 +3032,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl0_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER0 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3045,6 +3051,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl0_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER0 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3061,6 +3070,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl0_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER0 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3077,6 +3089,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl1_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER1 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3093,6 +3108,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl1_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER1 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3109,6 +3127,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl1_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER1 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3125,6 +3146,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl1_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER1 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3141,6 +3165,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl2_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER2 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3157,6 +3184,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl2_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER2 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3173,6 +3203,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl2_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER2 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3189,6 +3222,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl2_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER2 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3445,4 +3481,244 @@ interrupt-parent = <&gic>; always-on; }; + + cl0_opp_tbl: opp-table-cluster0 { + compatible = "operating-points-v2"; + opp-shared; + + cl0_ch1_opp1: opp-115200000 { + opp-hz = /bits/ 64 <115200000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp2: opp-268800000 { + opp-hz = /bits/ 64 <268800000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp3: opp-422400000 { + opp-hz = /bits/ 64 <422400000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp4: opp-576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp5: opp-729600000 { + opp-hz = /bits/ 64 <729600000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp6: opp-883200000 { + opp-hz = /bits/ 64 <883200000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp7: opp-1036800000 { + opp-hz = /bits/ 64 <1036800000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp8: opp-1190400000 { + opp-hz = /bits/ 64 <1190400000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp9: opp-1344000000 { + opp-hz = /bits/ 64 <1344000000>; + opp-peak-kBps = <1632000>; + }; + + cl0_ch1_opp10: opp-1497600000 { + opp-hz = /bits/ 64 <1497600000>; + opp-peak-kBps = <1632000>; + }; + + cl0_ch1_opp11: opp-1651200000 { + opp-hz = /bits/ 64 <1651200000>; + opp-peak-kBps = <2660000>; + }; + + cl0_ch1_opp12: opp-1804800000 { + opp-hz = /bits/ 64 <1804800000>; + opp-peak-kBps = <2660000>; + }; + + cl0_ch1_opp13: opp-1958400000 { + opp-hz = /bits/ 64 <1958400000>; + opp-peak-kBps = <3200000>; + }; + + cl0_ch1_opp14: opp-2112000000 { + opp-hz = /bits/ 64 <2112000000>; + opp-peak-kBps = <6400000>; + }; + + cl0_ch1_opp15: opp-2201600000 { + opp-hz = /bits/ 64 <2201600000>; + opp-peak-kBps = <6400000>; + }; + }; + + cl1_opp_tbl: opp-table-cluster1 { + compatible = "operating-points-v2"; + opp-shared; + + cl1_ch1_opp1: opp-115200000 { + opp-hz = /bits/ 64 <115200000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp2: opp-268800000 { + opp-hz = /bits/ 64 <268800000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp3: opp-422400000 { + opp-hz = /bits/ 64 <422400000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp4: opp-576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp5: opp-729600000 { + opp-hz = /bits/ 64 <729600000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp6: opp-883200000 { + opp-hz = /bits/ 64 <883200000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp7: opp-1036800000 { + opp-hz = /bits/ 64 <1036800000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp8: opp-1190400000 { + opp-hz = /bits/ 64 <1190400000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp9: opp-1344000000 { + opp-hz = /bits/ 64 <1344000000>; + opp-peak-kBps = <1632000>; + }; + + cl1_ch1_opp10: opp-1497600000 { + opp-hz = /bits/ 64 <1497600000>; + opp-peak-kBps = <1632000>; + }; + + cl1_ch1_opp11: opp-1651200000 { + opp-hz = /bits/ 64 <1651200000>; + opp-peak-kBps = <2660000>; + }; + + cl1_ch1_opp12: opp-1804800000 { + opp-hz = /bits/ 64 <1804800000>; + opp-peak-kBps = <2660000>; + }; + + cl1_ch1_opp13: opp-1958400000 { + opp-hz = /bits/ 64 <1958400000>; + opp-peak-kBps = <3200000>; + }; + + cl1_ch1_opp14: opp-2112000000 { + opp-hz = /bits/ 64 <2112000000>; + opp-peak-kBps = <6400000>; + }; + + cl1_ch1_opp15: opp-2201600000 { + opp-hz = /bits/ 64 <2201600000>; + opp-peak-kBps = <6400000>; + }; + }; + + cl2_opp_tbl: opp-table-cluster2 { + compatible = "operating-points-v2"; + opp-shared; + + cl2_ch1_opp1: opp-115200000 { + opp-hz = /bits/ 64 <115200000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp2: opp-268800000 { + opp-hz = /bits/ 64 <268800000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp3: opp-422400000 { + opp-hz = /bits/ 64 <422400000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp4: opp-576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp5: opp-729600000 { + opp-hz = /bits/ 64 <729600000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp6: opp-883200000 { + opp-hz = /bits/ 64 <883200000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp7: opp-1036800000 { + opp-hz = /bits/ 64 <1036800000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp8: opp-1190400000 { + opp-hz = /bits/ 64 <1190400000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp9: opp-1344000000 { + opp-hz = /bits/ 64 <1344000000>; + opp-peak-kBps = <1632000>; + }; + + cl2_ch1_opp10: opp-1497600000 { + opp-hz = /bits/ 64 <1497600000>; + opp-peak-kBps = <1632000>; + }; + + cl2_ch1_opp11: opp-1651200000 { + opp-hz = /bits/ 64 <1651200000>; + opp-peak-kBps = <2660000>; + }; + + cl2_ch1_opp12: opp-1804800000 { + opp-hz = /bits/ 64 <1804800000>; + opp-peak-kBps = <2660000>; + }; + + cl2_ch1_opp13: opp-1958400000 { + opp-hz = /bits/ 64 <1958400000>; + opp-peak-kBps = <3200000>; + }; + + cl2_ch1_opp14: opp-2112000000 { + opp-hz = /bits/ 64 <2112000000>; + opp-peak-kBps = <6400000>; + }; + + cl2_ch1_opp15: opp-2201600000 { + opp-hz = /bits/ 64 <2201600000>; + opp-peak-kBps = <6400000>; + }; + }; }; From patchwork Mon Mar 20 18:24:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 665304 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97768C761A6 for ; Mon, 20 Mar 2023 18:35:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231450AbjCTSfq (ORCPT ); Mon, 20 Mar 2023 14:35:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231631AbjCTSfD (ORCPT ); Mon, 20 Mar 2023 14:35:03 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on20606.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5a::606]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FC663598; Mon, 20 Mar 2023 11:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dPN9yd6hOnaPRTajKmTctjnxg10X+xxtmCFg+O3M8hoMpSOPS7Vhr32TbDoxbP8bqCT2pd6eHEI5YJ7EKQGt2sxr2x711TO19Lz9xxNsXsYwIQSa7ao/iltD1bkH8NBLrAsiJ9GUymH7W6CencuhFvKBu37vBC2Q3drtO+fQt8jhfz8LOa16yQwxGGLL6kwT7Gw0dPXURB3DelIHJTf+ReIyArv7G6Y9CYeJShgKSXczBbWM2cbs+y0ZgIVVjW5WwGV6J43sP+5C4cPeo0s9OONN5LVEQ7aVdQX0rFx2/eeRnNj7yxyrJs5CiKG/NBGNaiWoM9HLAWqfP/A1RUSJLw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oVRwgFgeJYSRsGwUZ2XIMEM87v9qQMGzP1nTzHvrqW4=; b=HbrZfUVrPG4e9H391ggnRiosA0hjaXGdDT1qSlK0mnbofkey1NHHQWo6T4YC+yz/msND4Xnpfx9kX4kqT/HGcXrdO07qpKiJYpLB8GVip4skg+bAbq/pXqivZKYBWWgjJbaAtj2oTTW6GCxuMlWsLts6ixic1dUYmS6AaYJ+ifllZ5EQuEoaBAWuYR2EUwd1Zi+YbCOIw+GJ2VJ84iNp6uAZDDhIAWBkyI8G62eLi+y9OXuvKNCaQF/cmNMucoQPeSvTsuBMKfqyWzYnIzmHi8D3HzefgkrnZi9wKtDErAHwkCJNC1Z+6TpEtK9lQbNOhNKxOnUt7sI4QVUCJVRXjQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oVRwgFgeJYSRsGwUZ2XIMEM87v9qQMGzP1nTzHvrqW4=; b=r5hWqjepssJwnDPok+6zZ4Ykp9z7s0Xyn4soUqFahCe6fllfO/2VCD0Y6BdsOYCx9oLTSAtw5A7q3vOi4srFbDkcfauZUU+wnadwEncnjuU1SnlMTO4DFR/e24wb5C9MO/L1GK9xrisGsKultjz0jZh6TdQ/89fTMKcKC+PIVGwPxGrkt4JI0RnS1vQrpoBTHC/C/Y8LQCsU34r4w9tB/ePBhGrFo3Pt5CzzwL7J7Fs+uN0CzEhrDLW8ciGeGJB+EKSB+t331DoPqs8tzjsOzKHji5oOU+3hMQlb/w3kd4781yhTUBGmncZwnhvfybWyHwYQ6GYFeJvMzIUDAvI72g== Received: from BN0PR04CA0125.namprd04.prod.outlook.com (2603:10b6:408:ed::10) by BL1PR12MB5112.namprd12.prod.outlook.com (2603:10b6:208:316::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Mon, 20 Mar 2023 18:26:41 +0000 Received: from BN8NAM11FT023.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ed:cafe::9e) by BN0PR04CA0125.outlook.office365.com (2603:10b6:408:ed::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37 via Frontend Transport; Mon, 20 Mar 2023 18:26:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by BN8NAM11FT023.mail.protection.outlook.com (10.13.177.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.16 via Frontend Transport; Mon, 20 Mar 2023 18:26:40 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 20 Mar 2023 11:26:33 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 20 Mar 2023 11:26:32 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 20 Mar 2023 11:26:27 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v3 08/11] memory: tegra: make cpu cluster bw request a multiple of mc channels Date: Mon, 20 Mar 2023 23:54:38 +0530 Message-ID: <20230320182441.11904-9-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230320182441.11904-1-sumitg@nvidia.com> References: <20230320182441.11904-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT023:EE_|BL1PR12MB5112:EE_ X-MS-Office365-Filtering-Correlation-Id: 43e773a7-e4d4-4335-74c0-08db2970a694 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yGeIDYM1rQW51KCOI1zNHcUqclzU1MzRxaJTuoIC5lhfpRFWEx+MwJe8naDfL/ND0MrW4mkjtvLjIyOb8+sErNoXR/NjA32lTKP0ZkfmU61uvhROTjiEP40vr340LV1D6zpx1cT/X37ZvD8dnA3JNQBhFkbVA5hZUJtgeFUeaeRTCxnl9UH9DG+cj5QOmfEtIxeiz3NcUk5kWhU7yv3SFSFBm3NPXlk2CNBNMst+12N7UlDksy9z/JPsX4CvRqaAnqEty49IHgs2FplfjO8qJ17aezrY4lxEZFSFSWDKvNGpOjMaMYng5JGqy2bye2udr5LDG0hULktrL8dXFh/GQrNeTsEnVdyoy0oT5KdsvrtRsWzUY2yQBo5uJj5bNftQG4lmNSxbZYjquib/xeVxyxPfuAcgCX5/1rn0vCsbP0PoHGciEl2SoPPX4Gw5aQq1i1wlMsBXVPDpvt/b9TP1fPpp7YHgKOapy+sOKesqNtQNIu45OPGnGXxPtAadoNy/l7nNPThTJvOVe6IeuHst0uK2Gl6AaZaPNgn1yckHdDD4Cl/uZzBnv5qEAawwfJ5q1AjCFW8HbRXvZIEWzVS+k213AMEcsWHqT14VEVMVvoFR9A9dxYxuzh5TPYTWSqgRby2ONzxCBfnS5c6mUuU5GWR9NPOlqE5vUpoCpJ+CketpF2AHUDUWtmkIBlXXX9K8823CMrX95YEWlowbKrFCkUWV5RszhRpWMY0WBqsb/c8BnPKHVZmSdkU7osIFKf4h X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(396003)(346002)(376002)(136003)(451199018)(36840700001)(40470700004)(46966006)(47076005)(426003)(2616005)(83380400001)(82310400005)(54906003)(6666004)(107886003)(1076003)(478600001)(316002)(5660300002)(186003)(26005)(7416002)(7696005)(7636003)(110136005)(36860700001)(40460700003)(356005)(86362001)(336012)(82740400003)(8936002)(2906002)(41300700001)(40480700001)(70586007)(70206006)(4326008)(8676002)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2023 18:26:40.8849 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 43e773a7-e4d4-4335-74c0-08db2970a694 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT023.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5112 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Make CPU cluster's bandwidth (BW) request a multiple of MC channels. CPU OPP tables have BW info per MC channel. But, the actual BW depends on the number of MC channels which can change as per the boot config. Get the number of MC channels which are actually enabled in current boot configuration and multiply the BW request from a CPU cluster with the number of enabled MC channels. This is not required to be done for other MC clients. Signed-off-by: Sumit Gupta Acked-by: Krzysztof Kozlowski --- drivers/memory/tegra/mc.c | 19 +++++++++++++++++++ drivers/memory/tegra/mc.h | 1 + drivers/memory/tegra/tegra234.c | 21 ++++++++++++++++++++- include/soc/tegra/mc.h | 1 + 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c index bbd27d754fef..77346125dea6 100644 --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c @@ -843,6 +843,23 @@ static int tegra_mc_interconnect_setup(struct tegra_mc *mc) return err; } +static void tegra_mc_num_channel_enabled(struct tegra_mc *mc) +{ + unsigned int i; + u32 value; + + value = mc_ch_readl(mc, 0, MC_EMEM_ADR_CFG_CHANNEL_ENABLE); + if (value <= 0) { + mc->num_channels = mc->soc->num_channels; + return; + } + + for (i = 0; i < 32; i++) { + if (value & BIT(i)) + mc->num_channels++; + } +} + static int tegra_mc_probe(struct platform_device *pdev) { struct tegra_mc *mc; @@ -881,6 +898,8 @@ static int tegra_mc_probe(struct platform_device *pdev) return err; } + tegra_mc_num_channel_enabled(mc); + if (mc->soc->ops && mc->soc->ops->handle_irq) { mc->irq = platform_get_irq(pdev, 0); if (mc->irq < 0) diff --git a/drivers/memory/tegra/mc.h b/drivers/memory/tegra/mc.h index bc01586b6560..c3f6655bec60 100644 --- a/drivers/memory/tegra/mc.h +++ b/drivers/memory/tegra/mc.h @@ -53,6 +53,7 @@ #define MC_ERR_ROUTE_SANITY_ADR 0x9c4 #define MC_ERR_GENERALIZED_CARVEOUT_STATUS 0xc00 #define MC_ERR_GENERALIZED_CARVEOUT_ADR 0xc04 +#define MC_EMEM_ADR_CFG_CHANNEL_ENABLE 0xdf8 #define MC_GLOBAL_INTSTATUS 0xf24 #define MC_ERR_ADR_HI 0x11fc diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra234.c index 0c666e52bf46..0b608b820b28 100644 --- a/drivers/memory/tegra/tegra234.c +++ b/drivers/memory/tegra/tegra234.c @@ -868,6 +868,25 @@ static int tegra234_mc_icc_set(struct icc_node *src, struct icc_node *dst) return ret; } +static int tegra234_mc_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, + u32 peak_bw, u32 *agg_avg, u32 *agg_peak) +{ + struct icc_provider *p = node->provider; + struct tegra_mc *mc = icc_provider_to_tegra_mc(p); + + if (node->id == TEGRA_ICC_MC_CPU_CLUSTER0 || + node->id == TEGRA_ICC_MC_CPU_CLUSTER1 || + node->id == TEGRA_ICC_MC_CPU_CLUSTER2) { + if (mc) + peak_bw = peak_bw * mc->num_channels; + } + + *agg_avg += avg_bw; + *agg_peak = max(*agg_peak, peak_bw); + + return 0; +} + static struct icc_node* tegra234_mc_of_icc_xlate(struct of_phandle_args *spec, void *data) { @@ -899,7 +918,7 @@ static int tegra234_mc_icc_get_init_bw(struct icc_node *node, u32 *avg, u32 *pea static const struct tegra_mc_icc_ops tegra234_mc_icc_ops = { .xlate = tegra234_mc_of_icc_xlate, - .aggregate = icc_std_aggregate, + .aggregate = tegra234_mc_icc_aggregate, .get_bw = tegra234_mc_icc_get_init_bw, .set = tegra234_mc_icc_set, }; diff --git a/include/soc/tegra/mc.h b/include/soc/tegra/mc.h index fefac9622987..2fe6f0217a39 100644 --- a/include/soc/tegra/mc.h +++ b/include/soc/tegra/mc.h @@ -233,6 +233,7 @@ struct tegra_mc { struct tegra_mc_timing *timings; unsigned int num_timings; + unsigned int num_channels; struct reset_controller_dev reset; From patchwork Mon Mar 20 18:24:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 665303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61436C7618A for ; Mon, 20 Mar 2023 18:36:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231220AbjCTSgJ (ORCPT ); Mon, 20 Mar 2023 14:36:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229663AbjCTSfd (ORCPT ); Mon, 20 Mar 2023 14:35:33 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20626.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::626]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE5F22B289; Mon, 20 Mar 2023 11:27:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vv9GNvJoV6EB1HgrKSPt9ZMScD3qk6c9UD4HWgBvhUBae39hl1+IfZcwAz1zJUZysGzKFXMoin/GVZ7m7HeA2RfJeT6swd1gYRXCA1LvBRefTB+81XACxJ3o82Psk6v5mLaqgeEUBwEh4HYcUGxZL3tDaZ/j8u6QjYnw/CGz9EYZldujTK1uqNW0RDBIjbuVJJghyc2O/faDC7TxrKNlUA6jiWqC+KlWUPk67hxvZ8QmozYoaGvBg09matXmvyg6ENDDYV8mvOdJZz00POQQTOMV4U2bVa7+ULb7KjRMIWgqf8VSSfK751bWKKyXBhE8vZexIaorsv5IQXPzxNw/kw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sexpUMgz4sNbKdwfL02pMAnMxx9Kiyp9FsqW9Yav37U=; b=LDrBnmOmTEKYWqt3ZD4zgKokieNxxZxzk3QCb0bKvdcLSFsq68VwUhzEs1dbKKYnkWGnWarEF78EJU1h3F/qWz0adr25E9jCC1isBPK0xis2aM2vHbFZs4hZDeyQFin+DujO5F+a+aDwureDjkmAh27dpavoO0rjlK+LeTp2FzVFiJtY0XoY6sXNm36CkXhAMdJBPrx/QkSmm3ZFYbvHQAFcTEOE6On4uoN0yBTPXRIpGasnMQGLmbxDtjOhfr6y+YvyooptgcNCGTFOOGTKwz69Qiq/+BKOq9Nma//zoq5XoxG+E/sNgXji7GVgiN976uUeSlV5GRfOB/cMWBHsvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sexpUMgz4sNbKdwfL02pMAnMxx9Kiyp9FsqW9Yav37U=; b=kfvzuOcjziQS8VcfWxBfk61n/jbyjTF3NZv18AAAOjhd6w0XBcPHGTra1l/vS4zoPJ1suMF+hIPXFgiD39kwukT5nOr1f5zEMR4Q6oU5wdEvTt2s2VDegO4rqZ9sUlUoPE++/ka6KycLGdK1NgVseKTEPWZvPVZTFFaFPWHDH+dtw9KBSTwn/llfzLWvRPrLkL5EZBmVIyo34GeT04sWtE8Bs38ifVDf27njPJGj2BXtYvYTsT2kHXaMjGGiH0ypQ6HbwwLSABFOrY+dcWLxJBJwbzOIHUOnaodCzvYN0cX8vWECtJGVsLoTkXvrzb7hppsz1qWhTn+VE/mqc8F1nA== Received: from MW2PR2101CA0034.namprd21.prod.outlook.com (2603:10b6:302:1::47) by PH7PR12MB6979.namprd12.prod.outlook.com (2603:10b6:510:1b9::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Mon, 20 Mar 2023 18:27:09 +0000 Received: from CO1NAM11FT092.eop-nam11.prod.protection.outlook.com (2603:10b6:302:1:cafe::35) by MW2PR2101CA0034.outlook.office365.com (2603:10b6:302:1::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.2 via Frontend Transport; Mon, 20 Mar 2023 18:27:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CO1NAM11FT092.mail.protection.outlook.com (10.13.175.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.15 via Frontend Transport; Mon, 20 Mar 2023 18:27:08 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 20 Mar 2023 11:27:06 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 20 Mar 2023 11:27:05 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 20 Mar 2023 11:27:00 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v3 10/11] memory: tegra: handle no BWMGR MRQ support in BPMP Date: Mon, 20 Mar 2023 23:54:40 +0530 Message-ID: <20230320182441.11904-11-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230320182441.11904-1-sumitg@nvidia.com> References: <20230320182441.11904-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT092:EE_|PH7PR12MB6979:EE_ X-MS-Office365-Filtering-Correlation-Id: e37ed870-55d1-4b49-0101-08db2970b734 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TGVh/eEkwcplQ6rrca+wJPLiQJqOq79itVnSbaCsfek5ue/y9AvyVsFyDdBGKWpwNzTOCVCa1BDgg1+P5dY8kLGiLEusxepA+9ydT84VYtggjYd2F8myRX8RrLW0onctwxQ3HP1hocbjV72Xiqu9LtbqZ555Bs9NiHGDLtkTxBvXgMlBmke0N0mV8e+lxnsTvl1Vk7fTZ7fSUiRSe321GMdwg0kV3aewugxxFpw3Wyw8hB8hUkNp9smtzSbE7N+I+oCjkShhPfWfyRSB8DEL7TN1i/BCMP1cHJmdA8n6pnGTxYAR2AzA+pHXBNuQfKAJEeRdMOatGZbqvM/tf2WKB1FxSK/qqCBVzDhaHUrIvXvMXDXS3nzC0a+K82Q74KG4H0ZxzWqsd30Rzj4kQFFQ4L8rlAKn3GFfK5CR8yUJUMR1WTNMYiOXXLpPCNrHfdIW6PIUARq8jBBY/vyPGE/I5XPSpa+P5yQHGmJiicUTBlRiI3gDjW3/OjdU5LtXSPd/ljcP4tqS9V1rmfSOWczCdxrY6GdP6GQMWkJaRdr/KHtFOB/nrLXKZfRmdRL2c/dwc1cISnP03Pl21ey6ldtncxYrKh20L/LT4uxl4JID0Zarm/Xhtc4n0qKMoJO+5Mqcp6hkiOG43apLBA4r7uj7KockhQvl42YfdvaAvFRQpXfJBB3/tLClUfcynzZuoDJXwmmXficu14bUORZa2/x6gW2OPhayOS2ARUBSBxhUo7L6ZgGcyu77CS1XsirFnObj X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(346002)(376002)(396003)(136003)(39860400002)(451199018)(36840700001)(40470700004)(46966006)(2616005)(478600001)(7696005)(47076005)(426003)(107886003)(336012)(83380400001)(6666004)(316002)(8676002)(70206006)(70586007)(186003)(26005)(1076003)(54906003)(110136005)(4326008)(5660300002)(36860700001)(41300700001)(7416002)(8936002)(40460700003)(82740400003)(7636003)(2906002)(356005)(40480700001)(82310400005)(36756003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2023 18:27:08.8834 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e37ed870-55d1-4b49-0101-08db2970b734 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT092.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6979 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org If BPMP-FW doesn't support 'MRQ_BWMGR_INT', then the MC Client driver probe fails with 'EPROBE_DEFER' which it receives on calling the func 'devm_of_icc_get()'. Fix this by initializing the ICC even if the MRQ is missing and return 'EINVAL' from 'icc_set_bw()' instead of passing the request to BPMP-FW later when the BW request is made by client. Fixes: ("memory: tegra: add interconnect support for DRAM scaling in Tegra234") Signed-off-by: Sumit Gupta --- drivers/memory/tegra/tegra186-emc.c | 13 +++++++------ drivers/memory/tegra/tegra234.c | 6 ++++++ include/soc/tegra/mc.h | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c index 978be8f54de4..0d68a20fd376 100644 --- a/drivers/memory/tegra/tegra186-emc.c +++ b/drivers/memory/tegra/tegra186-emc.c @@ -343,13 +343,14 @@ static int tegra186_emc_probe(struct platform_device *pdev) mc = dev_get_drvdata(emc->dev->parent); if (mc && mc->soc->icc_ops) { - if (tegra_bpmp_mrq_is_supported(emc->bpmp, MRQ_BWMGR_INT)) { - err = tegra_emc_interconnect_init(emc); - if (err) - goto put_bpmp; - } else { + err = tegra_emc_interconnect_init(emc); + if (err) + goto put_bpmp; + + if (tegra_bpmp_mrq_is_supported(emc->bpmp, MRQ_BWMGR_INT)) + mc->bwmgr_mrq_supported = true; + else dev_info(&pdev->dev, "MRQ_BWMGR_INT not present\n"); - } } return 0; diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra234.c index 0b608b820b28..5b4b359f7c71 100644 --- a/drivers/memory/tegra/tegra234.c +++ b/drivers/memory/tegra/tegra234.c @@ -828,6 +828,9 @@ static int tegra234_mc_icc_set(struct icc_node *src, struct icc_node *dst) if (src->id == dst->id) return 0; + if (!mc->bwmgr_mrq_supported) + return -EINVAL; + bpmp = of_tegra_bpmp_get(); if (IS_ERR(bpmp)) { ret = PTR_ERR(bpmp); @@ -874,6 +877,9 @@ static int tegra234_mc_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, struct icc_provider *p = node->provider; struct tegra_mc *mc = icc_provider_to_tegra_mc(p); + if (!mc->bwmgr_mrq_supported) + return -EINVAL; + if (node->id == TEGRA_ICC_MC_CPU_CLUSTER0 || node->id == TEGRA_ICC_MC_CPU_CLUSTER1 || node->id == TEGRA_ICC_MC_CPU_CLUSTER2) { diff --git a/include/soc/tegra/mc.h b/include/soc/tegra/mc.h index 2fe6f0217a39..522b7679500c 100644 --- a/include/soc/tegra/mc.h +++ b/include/soc/tegra/mc.h @@ -234,7 +234,7 @@ struct tegra_mc { struct tegra_mc_timing *timings; unsigned int num_timings; unsigned int num_channels; - + bool bwmgr_mrq_supported; struct reset_controller_dev reset; struct icc_provider provider; From patchwork Mon Mar 20 18:24:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 665302 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D799C7618E for ; Mon, 20 Mar 2023 18:36:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231387AbjCTSgp (ORCPT ); Mon, 20 Mar 2023 14:36:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231520AbjCTSgL (ORCPT ); Mon, 20 Mar 2023 14:36:11 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2077.outbound.protection.outlook.com [40.107.220.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 794543645E; Mon, 20 Mar 2023 11:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NzcHhSw2AC7XlQFbRoLQ5pRPSOSS9kNcraKWLzOkbznLtyexSSd3DaX05Fo2muquLrpRqL2sOE2JdUJlGC4ue4m523dIzuplXVlLrgUqDDj9pUbYWoNwtSJ/K9M6d6+SMx5DBWLid3kN12vV76l/tgFdRYobhxaORpq3F20U3wd53f4vGCzG7CO583rtSbK8qhQUquxopIaRJZRx4gUhpJC50B00D4Fu7uP3g0ep1Ar+C7pRb5PeSl+W9G8k+ChzfH35LuI/Gr+sblaXAIO9/tVyrY9huhDWZ1RuLCqgMgVLTfHMeHALQLFEfEIIe2LQq9oJbpmYZyi0GwNyJsM9yg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mFknPj1juTW4yd0nvS8kgtV28YxgIZKG3ZTe30gnatA=; b=Fx/jYw861a3R7WJw7IjuIphwq+I0mPbq916iSmzOREwrYVTOWNsC8vqc02wte5gMzBiTLWoNpooIsdyPxR4cmfUAUa8r8lSyYDi2sIqQQpEKnwn8Pn+uFRCF6p6E3Rf8+lsaVkvcIdWTKAkZZ1S/NDBxm79Wsl+E5FyueSKGI01jqp0ny41JvBmLeV8SESn/35GWBcDZukU6r1Z72wrrHgGgglDqIMrFYiF1bHdyA5H8uAU+OWh1tvMkESnDcYz8Kgmb+uy2+R4Q69fDT65Te1JpFkpQWS1QD2JardE8wHVJ7v3h0w24eO7DZYkBjVfDdTaSozUYcJ2jaQ+fK0nliw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mFknPj1juTW4yd0nvS8kgtV28YxgIZKG3ZTe30gnatA=; b=HwZyWxMScnuOA9LGZMiebr04sPtYeSrR7SGYrZvdxtbzT1hDfrXhyGV8IHphlWd2EtQR4XkcZ0hl+JNLlBWWIrg+givrnQ32iQaE1JqGiD2Ju6smQbHfRvc+p7FHaH8Sl4cmkO4i3Sn1mr9Hl2/vewb1BYLuv7dMI8Cl7DfzmzNMS1OVALMbVh4SDngEzkXLmeWgU8efi68dHzpAEgIMfOxNfzA52EwfQ35Lt3OLOjNbDyNz6TrGWEwpQT2do6odRxqfUBBF8xl+UYcxpNFItcnSu5w4yGHIUwtJFC13KRBek4kiCcsDBZDRLBeHEjODEBLLfMF0V3aslc+ExBvRrA== Received: from MW4PR04CA0059.namprd04.prod.outlook.com (2603:10b6:303:6a::34) by PH0PR12MB8125.namprd12.prod.outlook.com (2603:10b6:510:293::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Mon, 20 Mar 2023 18:27:22 +0000 Received: from CO1NAM11FT056.eop-nam11.prod.protection.outlook.com (2603:10b6:303:6a:cafe::db) by MW4PR04CA0059.outlook.office365.com (2603:10b6:303:6a::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37 via Frontend Transport; Mon, 20 Mar 2023 18:27:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CO1NAM11FT056.mail.protection.outlook.com (10.13.175.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.16 via Frontend Transport; Mon, 20 Mar 2023 18:27:21 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 20 Mar 2023 11:27:13 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 20 Mar 2023 11:27:12 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 20 Mar 2023 11:27:07 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v3 11/11] memory: tegra186-emc: fix interconnect registration race Date: Mon, 20 Mar 2023 23:54:41 +0530 Message-ID: <20230320182441.11904-12-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230320182441.11904-1-sumitg@nvidia.com> References: <20230320182441.11904-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT056:EE_|PH0PR12MB8125:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a67cb8c-72c5-40e4-4494-08db2970bf00 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aNmrClQK7SYCKuVaxl43iEGAVzMwtJQJ40SWsRwk0AejLb9CXlJYZkyeiGxQdXHlcv1DGSj14ZNvWFa0EWeKmGT1Ev9pkSkBsCZ0niASgWU7zY4W1t3s4JB3IIJESzRMVsnNZsIws+ieq0UU0WlKgjLgtrUsfWg8jRQlJbkWWoxbtQkmp0BkDiCAyjgpOWpY3wALa+7rrJH/+9WE7OIjsx57dczG95Mt+P8t45mGgz4JHz0u1BsPNigZmwOMIxmEBP2wXZEKPv/VRl10Xvbm2ZN9b1ukALb00RfmkHZomj5PbmbtLFIA9EwIQB5OxAvTJFuBN0tGtO+ca8QmOn8DEeGjY4uN2vXQDOkxNuiGV8V4EJOUDz4rZMX0OHLlNbY3WMIPM+sxoLFpRCIOwVlKbADSP9InlIJgjSEJ16zjFn4VMiFMW0GkBfqXfMGZgHFGrK+WGRdsVmS60xpwwKMYjuIG+LUzcIqO+RRDY3a/2yBinR579I4nEhazids32lg9QC4l/83NWVLw3CgptF+EXAfD+2nLD6+rDsb1jXmcYcJUq5V+cT6RVOiMyZhVmomOLvmACoigImTyZR0YAWdt49kX0z4IlcpJKKu8OcdbmKGkEMtrDkXAUfM8JAHuvyCJEsBv7P6iPcVluWpcReL52B7rUGZeLr2Nv1EbvjrVtoxb+4MpxBm2bbKqiWGzsaBwzqqU+bgdSlEDXKlXffbB95ta9bHLbzYmBChdPyIcyankjxLw396pGdePDA4t7/pC X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(376002)(39860400002)(396003)(136003)(346002)(451199018)(40470700004)(36840700001)(46966006)(41300700001)(40480700001)(4326008)(8676002)(70586007)(70206006)(82740400003)(36756003)(7636003)(2906002)(36860700001)(40460700003)(8936002)(5660300002)(26005)(1076003)(7416002)(82310400005)(336012)(107886003)(6666004)(47076005)(7696005)(356005)(186003)(2616005)(426003)(86362001)(83380400001)(316002)(478600001)(110136005)(54906003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2023 18:27:21.9349 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6a67cb8c-72c5-40e4-4494-08db2970bf00 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT056.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8125 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The current interconnect provider registration interface is inherently racy as nodes are not added until the after adding the provider. This can specifically cause racing DT lookups to fail. Switch to using the new API where the provider is not registered until after it has been fully initialised. Fixes: ("memory: tegra: add interconnect support for DRAM scaling in Tegra234") Signed-off-by: Sumit Gupta --- drivers/memory/tegra/tegra186-emc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c index 0d68a20fd376..a5a2bce01db4 100644 --- a/drivers/memory/tegra/tegra186-emc.c +++ b/drivers/memory/tegra/tegra186-emc.c @@ -207,15 +207,13 @@ static int tegra_emc_interconnect_init(struct tegra186_emc *emc) emc->provider.xlate = tegra_emc_of_icc_xlate; emc->provider.get_bw = tegra_emc_icc_get_init_bw; - err = icc_provider_add(&emc->provider); - if (err) - goto err_msg; + icc_provider_init(&emc->provider); /* create External Memory Controller node */ node = icc_node_create(TEGRA_ICC_EMC); if (IS_ERR(node)) { err = PTR_ERR(node); - goto del_provider; + goto err_msg; } node->name = "External Memory Controller"; @@ -236,11 +234,13 @@ static int tegra_emc_interconnect_init(struct tegra186_emc *emc) node->name = "External Memory (DRAM)"; icc_node_add(node, &emc->provider); + err = icc_provider_register(&emc->provider); + if (err) + goto remove_nodes; + return 0; remove_nodes: icc_nodes_remove(&emc->provider); -del_provider: - icc_provider_del(&emc->provider); err_msg: dev_err(emc->dev, "failed to initialize ICC: %d\n", err);