From patchwork Wed Jun 21 13:43:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 111043 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4381765vqr; Wed, 21 Jun 2023 06:56:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5M72pp0FcGj0PyiUdMG/qH5Z6vOrDVpgrf6BL+tknKK00sUUvnfTKSWHFfptI16AsI6QO6 X-Received: by 2002:a17:902:f815:b0:1b5:2b7b:1225 with SMTP id ix21-20020a170902f81500b001b52b7b1225mr10509789plb.2.1687355762525; Wed, 21 Jun 2023 06:56:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687355762; cv=pass; d=google.com; s=arc-20160816; b=JUr2r2FvpciUjCBjnedkOKIIPMLizBz5w3lC+6fQ4V7FDjUmefsr+J37NGXmg0QLR7 02cJxd1fDpI3velnVZ6elUCsgoI4yoEzqgFSlDzNketG1M0YgvbzVR8MahkhSibUF6id MUvXs1ykt5QjIjLms1EeyXvYC5upHH49X9MvqG3zzA4DQlL2P6eKt1A4OOvtmbnypBVg nz6PlUbj4kqD7y/KLWK+XmXhof2L6elnl2VYkCiF1gmmrHllJ49BzubvC10PLA0tZ9Pa R3o98RR9sq9DA75sbgCY7NwDn65ztORIbKAdFWt8vDBvlJHSMWo4Scndg7GJFk7pOv5p fhsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ibABgDKSNz3uNA72AN/RcL5CymtEHl0cRwB9EHjxoE4=; b=e3nRW7Ug0zVGhI7vU8ArZJ0uqnKSPeMLw5oawVBDU/LkZl2DbAs+VLKnB1/xtfzcsk 7Ts0btSDcfdHQfr3YXpi5ZBv4dlzzzjYcEAEBeYLjAqkDH3MaXacOnkyvY4uSgbQtSdU 1ZeHKWetjpYxmT+KgYtqZ1ZPXQJefg/jVaiUchr6pzIoQTZ0qFkotSI3IMuS47zCBx6K DO6uW57B/g6+HtwXzVyLixjpkHI7jLPDfWKMlBT/zAksQtP68yWOqF33VQ+mv9CLqf/0 jC0Fzb4X0IeRS6DwReJti48HF3ZZ0PdXwXAwJozyakes6hBNJCOx/cGyr6wO3koWroMJ u1OQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=iHWL1woS; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k15-20020a170902c40f00b001b676f312besi4887797plk.2.2023.06.21.06.55.50; Wed, 21 Jun 2023 06:56:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=iHWL1woS; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232658AbjFUNoW (ORCPT + 99 others); Wed, 21 Jun 2023 09:44:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231200AbjFUNoU (ORCPT ); Wed, 21 Jun 2023 09:44:20 -0400 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2058.outbound.protection.outlook.com [40.107.95.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5597E6E; Wed, 21 Jun 2023 06:44:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LwBvBZyjSF23cVUbPGO8OWlZGT7O6XGQKM0VcD1iyyWCYWO7sok0r5wcF++MmUYlhWGPMrfFRYgp48nkAXHJ2YfQ1ul0s6IWuJ1fQtJOdOxQM2eFcMho2im/+++25alup+b74xVcCJacsPHB0abLktkR6c87IQUAkK0pW9zOIGpnuX5usVSCD9TMYSXFoOnNQFoL2CmWsFKhm8GFQ64O9PQj5xMokuXS9of20wdDBTVghhr06m0a3aegfwi/Y4uGzpTWd6zz0rrt7v36EYWfDo3zD3zqxocgEY0qScLqTs+FziFiYQIElR8OmmVqugaKu8pufCyQaUCYkoqxx+bqfg== 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=ibABgDKSNz3uNA72AN/RcL5CymtEHl0cRwB9EHjxoE4=; b=J2eNJ3ZRgeuJaljgBFV2ADcJcZzEpoL5CXv8W54phCgAKuacChbxfWK0XryQoI3ZDWXyPrIU8hc2sn7RsJm/j/gihpowFuT8IXKgea+lSj61qvJ11Q+2FjBHk+MNkD1MEF8ChzHZAysjmRAk4h/nbVNbZ5bvWcIPrIpTR0DbrghKzuUQZ3bQvMH2H5EhzvQdwEMwC2QARqoRBK2MkhKHujoa273yvCEFo3FaYC985AUxcuGevFtrSafSgOv58qSG4P0HtX0c00wRSEcjeAiL2VGkZ4+MZ5I8gogL+1yXhpNEgUgSknw4xp4ekq9maKjHQjb/5U11beHGXEQuqMbeEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=linaro.org 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=ibABgDKSNz3uNA72AN/RcL5CymtEHl0cRwB9EHjxoE4=; b=iHWL1woSIpbK9+z9ZSajbOcWwI5S8AVg+lqsOaVkxlb253PowESIYUEcL/LItpvoNGOJ+MDGZ++frE1wb9f96km0JNN5jp5RriFuL7chnh+6fWzdoUKF6yv8xWAuxgnQi+dUPFbRN1jf9cfhakIJ5x/DbtG3eTTKZ44Di0pEFidbBfBNTRU9FDcAsQvLtpIbk83U+xl+5Q1GR4bgpyYPbgKgIa0jez0DQSdjSoOsbZIlaXvn21bdwD5SwN4S2vVLn021UVSfhtNvT5u3vOkJBZdf+aSUnHo3+Xa6eTYoxMYx67xvuYj7Lnj6Y0rLBT1WVZG8TEWzeTDt+T09heFcEA== Received: from SA0PR11CA0037.namprd11.prod.outlook.com (2603:10b6:806:d0::12) by DM6PR12MB4465.namprd12.prod.outlook.com (2603:10b6:5:28f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.21; Wed, 21 Jun 2023 13:44:16 +0000 Received: from SN1PEPF0002636B.namprd02.prod.outlook.com (2603:10b6:806:d0:cafe::2d) by SA0PR11CA0037.outlook.office365.com (2603:10b6:806:d0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.21 via Frontend Transport; Wed, 21 Jun 2023 13:44:16 +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 SN1PEPF0002636B.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.17 via Frontend Transport; Wed, 21 Jun 2023 13:44:15 +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; Wed, 21 Jun 2023 06:44:10 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) 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; Wed, 21 Jun 2023 06:44:09 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Wed, 21 Jun 2023 06:44:07 -0700 From: Sumit Gupta To: , , , , CC: , , Subject: [Patch RESEND 1/4] memory: tegra: sort tegra234_mc_clients table as per register offsets Date: Wed, 21 Jun 2023 19:13:57 +0530 Message-ID: <20230621134400.23070-2-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230621134400.23070-1-sumitg@nvidia.com> References: <20230621134400.23070-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636B:EE_|DM6PR12MB4465:EE_ X-MS-Office365-Filtering-Correlation-Id: 90f26f89-4be9-4041-6ab7-08db725d9b00 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nXTrn/PmFHRSIW5uZjZ9CKZC8uM2QOEY7lrx+8cofp1h/aJu+5tmyUK6aNUKw2cQzEGIhNY1UkpVNTq6ULCQ5tAPHAgVriDX0V+2VgNVFtSrGhgWcEaKw5eDK3tPU8WwzAJ1TEgKeXmh5qyu9sxfDVGfSZ42T0K/0wzLZzUQ9eAM2SB1EgkZI1JgMXsbUQ1WAwe4ZbgthUfSHYW9FQo+OnIeG9f+Lal2sGqcVhEL9d7zSb4EfJ+xtaAWniAAx1SO2lq13ESxUHM4KjYg/56rPG3WkN8Ih421Rj+PS8ntbEX4g1665fbuxDgbCjgqhqpq9+jp0LjJObeeDJ0X9VXKraH6usOKo8FeUreuIEvN7s9nHKpoDvp1V5wlATiiIQXsx3gA+ueQJklCE5jQ9zZd5vbir5DDIXnH5rgwIMb0JUidqPhlIIRBWA9oNK+u2mEhFBKZIl3XxwV/gYFZ38byzcCbSl3Yym7FZFacnIJPHe9NhLb20jubN1T/dBWnIj/9BrYcPMtB/njvlaMJ7FTzrmLm/uNN5aVTrenyPzm1IojRYYUz8mTJUecWb18gaePJO/QvwwLKaxbm8AzbtWfe67/Ttp2+13LeA/YOE8WIDw6CkyUSSSWMsJ+7qvSC6dMuHTIAizi39F0gJd75AJ9IWXyGD7UDJfGaPZHc3US5meFL5HjZcRDPVP+DOdf2dUK7ms+HRpumZmqMFFW/bnaodQlV6QiYfCVN9Fvkc6AlLE99lSEBioFn40j8crxMXiFA 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:(13230028)(4636009)(396003)(136003)(346002)(39860400002)(376002)(451199021)(36840700001)(46966006)(40470700004)(336012)(83380400001)(82310400005)(426003)(2616005)(8936002)(8676002)(41300700001)(4326008)(70206006)(5660300002)(70586007)(316002)(40460700003)(86362001)(36756003)(26005)(186003)(1076003)(107886003)(82740400003)(47076005)(36860700001)(6666004)(2906002)(478600001)(30864003)(7696005)(40480700001)(7636003)(110136005)(54906003)(356005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2023 13:44:15.9827 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 90f26f89-4be9-4041-6ab7-08db725d9b00 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: SN1PEPF0002636B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4465 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769320756180757362?= X-GMAIL-MSGID: =?utf-8?q?1769320756180757362?= Sort the MC client entries in "tegra234_mc_clients" table as per the override and security register offsets. This will help to avoid creating duplicate entries. Signed-off-by: Sumit Gupta Acked-by: Thierry Reding --- drivers/memory/tegra/tegra234.c | 514 ++++++++++++++++---------------- 1 file changed, 259 insertions(+), 255 deletions(-) diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra234.c index 8e873a7bc34f..3e44efe4541e 100644 --- a/drivers/memory/tegra/tegra234.c +++ b/drivers/memory/tegra/tegra234.c @@ -12,6 +12,10 @@ #include #include "mc.h" +/* + * MC Client entries are sorted in the increasing order of the + * override and security register offsets. + */ static const struct tegra_mc_client tegra234_mc_clients[] = { { .id = TEGRA234_MEMORY_CLIENT_HDAR, @@ -25,6 +29,106 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0xac, }, }, + }, { + .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_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_DLA0RDB, + .name = "dla0rdb", + .sid = TEGRA234_SID_NVDLA0, + .regs = { + .sid = { + .override = 0x160, + .security = 0x164, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_DLA0RDB1, + .name = "dla0rdb1", + .sid = TEGRA234_SID_NVDLA0, + .regs = { + .sid = { + .override = 0x168, + .security = 0x16c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_DLA0WRB, + .name = "dla0wrb", + .sid = TEGRA234_SID_NVDLA0, + .regs = { + .sid = { + .override = 0x170, + .security = 0x174, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_DLA1RDB, + .name = "dla0rdb", + .sid = TEGRA234_SID_NVDLA1, + .regs = { + .sid = { + .override = 0x178, + .security = 0x17c, + }, + }, + }, { + .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_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_HDAW, .name = "hdaw", @@ -37,6 +141,102 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x1ac, }, }, + }, { + .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_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_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, + }, + }, + }, { + .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_MGBEARD, .name = "mgbeard", @@ -157,6 +357,26 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x33c, }, }, + }, { + .id = TEGRA234_MEMORY_CLIENT_DLA1RDB1, + .name = "dla0rdb1", + .sid = TEGRA234_SID_NVDLA1, + .regs = { + .sid = { + .override = 0x370, + .security = 0x374, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_DLA1WRB, + .name = "dla0wrb", + .sid = TEGRA234_SID_NVDLA1, + .regs = { + .sid = { + .override = 0x378, + .security = 0x37c, + }, + }, }, { .id = TEGRA234_MEMORY_CLIENT_VI2W, .name = "vi2w", @@ -181,18 +401,6 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .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", @@ -218,27 +426,27 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, }, }, { - .id = TEGRA234_MEMORY_CLIENT_NVDISPLAYR, - .name = "nvdisplayr", - .bpmp_id = TEGRA_ICC_BPMP_DISPLAY, - .type = TEGRA_ICC_ISO_DISPLAY, - .sid = TEGRA234_SID_ISO_NVDISPLAY, + .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 = 0x490, - .security = 0x494, + .override = 0x3e0, + .security = 0x3e4, }, }, }, { - .id = TEGRA234_MEMORY_CLIENT_NVDISPLAYR1, - .name = "nvdisplayr1", + .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 = 0x508, - .security = 0x50c, + .override = 0x490, + .security = 0x494, }, }, }, { @@ -305,6 +513,18 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x504, }, }, + }, { + .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_DLA0RDA, .name = "dla0rda", @@ -335,26 +555,6 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x604, }, }, - }, { - .id = TEGRA234_MEMORY_CLIENT_DLA0RDB, - .name = "dla0rdb", - .sid = TEGRA234_SID_NVDLA0, - .regs = { - .sid = { - .override = 0x160, - .security = 0x164, - }, - }, - }, { - .id = TEGRA234_MEMORY_CLIENT_DLA0RDA1, - .name = "dla0rda1", - .sid = TEGRA234_SID_NVDLA0, - .regs = { - .sid = { - .override = 0x748, - .security = 0x74c, - }, - }, }, { .id = TEGRA234_MEMORY_CLIENT_DLA0FALWRB, .name = "dla0falwrb", @@ -365,26 +565,6 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x60c, }, }, - }, { - .id = TEGRA234_MEMORY_CLIENT_DLA0RDB1, - .name = "dla0rdb1", - .sid = TEGRA234_SID_NVDLA0, - .regs = { - .sid = { - .override = 0x168, - .security = 0x16c, - }, - }, - }, { - .id = TEGRA234_MEMORY_CLIENT_DLA0WRB, - .name = "dla0wrb", - .sid = TEGRA234_SID_NVDLA0, - .regs = { - .sid = { - .override = 0x170, - .security = 0x174, - }, - }, }, { .id = TEGRA234_MEMORY_CLIENT_DLA1RDA, .name = "dla0rda", @@ -415,26 +595,6 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x624, }, }, - }, { - .id = TEGRA234_MEMORY_CLIENT_DLA1RDB, - .name = "dla0rdb", - .sid = TEGRA234_SID_NVDLA1, - .regs = { - .sid = { - .override = 0x178, - .security = 0x17c, - }, - }, - }, { - .id = TEGRA234_MEMORY_CLIENT_DLA1RDA1, - .name = "dla0rda1", - .sid = TEGRA234_SID_NVDLA1, - .regs = { - .sid = { - .override = 0x750, - .security = 0x754, - }, - }, }, { .id = TEGRA234_MEMORY_CLIENT_DLA1FALWRB, .name = "dla0falwrb", @@ -445,26 +605,6 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x62c, }, }, - }, { - .id = TEGRA234_MEMORY_CLIENT_DLA1RDB1, - .name = "dla0rdb1", - .sid = TEGRA234_SID_NVDLA1, - .regs = { - .sid = { - .override = 0x370, - .security = 0x374, - }, - }, - }, { - .id = TEGRA234_MEMORY_CLIENT_DLA1WRB, - .name = "dla0wrb", - .sid = TEGRA234_SID_NVDLA1, - .regs = { - .sid = { - .override = 0x378, - .security = 0x37c, - }, - }, }, { .id = TEGRA234_MEMORY_CLIENT_PCIE0R, .name = "pcie0r", @@ -610,171 +750,35 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, }, }, { - .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, + .id = TEGRA234_MEMORY_CLIENT_DLA0RDA1, + .name = "dla0rda1", + .sid = TEGRA234_SID_NVDLA0, .regs = { .sid = { - .override = 0x1f8, - .security = 0x1fc, + .override = 0x748, + .security = 0x74c, }, }, }, { - .id = TEGRA234_MEMORY_CLIENT_PCIE10AW, - .name = "pcie10aw", - .bpmp_id = TEGRA_ICC_BPMP_PCIE_10, - .type = TEGRA_ICC_NISO, - .sid = TEGRA234_SID_PCIE10, + .id = TEGRA234_MEMORY_CLIENT_DLA1RDA1, + .name = "dla0rda1", + .sid = TEGRA234_SID_NVDLA1, .regs = { .sid = { - .override = 0x200, - .security = 0x204, + .override = 0x750, + .security = 0x754, }, }, }, { - .id = TEGRA234_MEMORY_CLIENT_PCIE10AR1, - .name = "pcie10ar1", - .bpmp_id = TEGRA_ICC_BPMP_PCIE_10, + .id = TEGRA234_MEMORY_CLIENT_PCIE5R1, + .name = "pcie5r1", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_5, .type = TEGRA_ICC_NISO, - .sid = TEGRA234_SID_PCIE10, + .sid = TEGRA234_SID_PCIE5, .regs = { .sid = { - .override = 0x240, - .security = 0x244, + .override = 0x778, + .security = 0x77c, }, }, }, { From patchwork Wed Jun 21 13:43:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 111040 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4381363vqr; Wed, 21 Jun 2023 06:55:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7NaqqTkvahOzIogYVpUqKuiRWWNm+NjaA0un24DVcXV+J2PaXG2QYMoUGz52lfiHiQAmZT X-Received: by 2002:a05:6a20:4304:b0:122:2e73:3f28 with SMTP id h4-20020a056a20430400b001222e733f28mr7900142pzk.24.1687355720235; Wed, 21 Jun 2023 06:55:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687355720; cv=pass; d=google.com; s=arc-20160816; b=Lm1f4/Syn0Dg8hf1RGVmBgHSrt1WrCbXhgfwvmdXYgbVlKwo8BzRQF7CuPsgZ9Wi9p G8NlCJ0xe6XRAeFbuwJaAAKy2tRn2g/1VobnMEEuiCnOkzp23NuFOf0mmtJ5I7pzj7yl rkWQRJWx15Hw/r9c8D4IBdXWvDG6mpCIBMTSWNdSVDPuBBo6/VzubyiQ/mf0bT6Lgt5p ZVva0wMkmvRZFwnAQgwAcqAy93m7d61Kk+hH0Zwgrw85krw4GOQZXYLLQDP1/87GQD8X Q6uoUsFSIjn5r97dBdk/vjQjAaHKo2aQwR82HpS8l3iIOXNghBMiQuqKsyS5eY1zGaBI nVcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=JBCOPXy6SyMTkp6NTNnyOmwrucZGlcvZ/PgZCfxjlnI=; b=b1zzEpCtVSpLFJQ3bBi4E2QDbxlWCYeovVaBVFwgrX4OKqEYy9DTh0VPA6SGPucZ+Z 0lJYTt3u/FGDraIMCmqWIZu8DLx/icAxl+g6N9KpftNRLwed2XDG5TvZVNAfslHYRMkZ a552itrMQ+rHUBd8gs15JNq034k9h1SzzLCzdZsly5vVAbOBl4poaAnJL1tTxcnBeVZb 1OfLXLdkWhrOWQFluwYGmULbb9fLcJ2z/5+qrO3Q1WziEHT9AkeSEIWTNU31TGzFOY/7 GtY+lDasRYspSdcY1eYhK2Ok7MvhZ4PakU9SEZfPlE1FPwyhAq6tYVbM5jdHcfJrZUXP Kodw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=UW4GqXA1; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q6-20020aa79826000000b0066215192dd4si503596pfl.295.2023.06.21.06.55.07; Wed, 21 Jun 2023 06:55:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=UW4GqXA1; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232671AbjFUNoc (ORCPT + 99 others); Wed, 21 Jun 2023 09:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230212AbjFUNo0 (ORCPT ); Wed, 21 Jun 2023 09:44:26 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2040.outbound.protection.outlook.com [40.107.94.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F0DE199C; Wed, 21 Jun 2023 06:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fDC8dycXV39y4QOvekvXa5ir0EyB2YNwogR7fCpipoec1lia7ep4k+RuY4G6zE5LOKmFE4HfCV+BwSu4rhZKx4ABHglSyV2LL92HuDcTk5wxlHrlds/s9RG8Vn7vs0jTdSoSUuX6oXeS9z5QCPvjwzcl9DhxmLrptmo7XiHt0AMEF+NmPDJUiifx403AJGdgYBlMyLtMYq2L6xhNtRWzvzzRiX7m5Y7b8+lb7oTPWyDuLqlCUfnXWaV00ieAPST+keSvg82RtOWs3Anez2qav/MXMNhYgMMJDLRxsWKahVacMNSTVC7S6GmizAKmK2awy/aM/MzForY0oyY+9r3mdQ== 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=JBCOPXy6SyMTkp6NTNnyOmwrucZGlcvZ/PgZCfxjlnI=; b=l+xEBhm7xBmVCzELz9af1d1onPqTiXHlsYXVjah5XsKLeR5yf6ipIKnQClHVaHqyesNX5xoyyYuVQ5PAnY5x7APAZ3h6De8Kdl2A8L3G/SGQSV2uYyfvFIqhmN5vrRpBkCvcMBqEk1eNA0H0FVGBpvLgaE1dBXMUoRSN5pLB8HuohhVGG2sGLxFxtC3oDO+bHHHQGhhxKE/XQNfkod//fxAIbJqlJ1lUbWKKWNaHkA1CNr9t8k922Np3RnuH3ISiFvIopnIa3OcK8q5/mU/I8sLGAMa2klZQ2c8zEaP76NjlaNo4pZoZuafoJtNMCcFXtjU9addMRxEHtH3Y0Rikjg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=linaro.org 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=JBCOPXy6SyMTkp6NTNnyOmwrucZGlcvZ/PgZCfxjlnI=; b=UW4GqXA1pnPZ8UoKQGOai/nCZXsjofNqlUoxRPY4clvvtUjpGXwPbI+uuLbAdf8tSskQRV2SbPJ20Eo/WpmQ7es8jaqtzttt/rhoOR8SpJe+/mzTD7G3Yabmvr1rSLPTrdGtG6KyupLhfjvAFplgubJNyoFBiBONpVmg4OEmwNkqqJageF2Rf3RF/HfksumoilMGewpLtZG5s2I4Lh2mJm9ND3nnLkdOht7kRNiYoBjDVIU4xHCj9z3JumLgWk8Rs42IIGlC0rFDapiZilTFwyQwgiVuEsZPNtqSqna4JHLkzq1HGMjE6D7X/mh+8PhnPXb0h7v8WJcrWE/hIVxQPA== Received: from PH8PR21CA0005.namprd21.prod.outlook.com (2603:10b6:510:2ce::21) by PH0PR12MB8152.namprd12.prod.outlook.com (2603:10b6:510:292::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Wed, 21 Jun 2023 13:44:23 +0000 Received: from SA2PEPF000015C7.namprd03.prod.outlook.com (2603:10b6:510:2ce:cafe::d9) by PH8PR21CA0005.outlook.office365.com (2603:10b6:510:2ce::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.9 via Frontend Transport; Wed, 21 Jun 2023 13:44:23 +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 SA2PEPF000015C7.mail.protection.outlook.com (10.167.241.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23 via Frontend Transport; Wed, 21 Jun 2023 13:44:22 +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; Wed, 21 Jun 2023 06:44:15 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) 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; Wed, 21 Jun 2023 06:44:14 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Wed, 21 Jun 2023 06:44:12 -0700 From: Sumit Gupta To: , , , , CC: , , , Johnny Liu Subject: [Patch RESEND 2/4] memory: tegra: Add clients used by DRM in Tegra234 Date: Wed, 21 Jun 2023 19:13:58 +0530 Message-ID: <20230621134400.23070-3-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230621134400.23070-1-sumitg@nvidia.com> References: <20230621134400.23070-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015C7:EE_|PH0PR12MB8152:EE_ X-MS-Office365-Filtering-Correlation-Id: 8389b1b6-317d-4415-070a-08db725d9f0f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WsECdCaMGRZ9KDkoQ1qQ9mAYXcDJzwPJMVPHkWIiY+GCZ30PrV34Po4x81mW77MCLq35SzGDjShlZNULkn300QQUtS2RSxlnML4gfqHN/x2+wxuo9DC86SsvvnJB4zA1D1BzidAFc7EG9s/Ujir6BcJ3BPtqCrQ+aNZWir1JIX7KMp65SpRGcL4SaDm1Dq32g6mufzuvOPfVrNo8mdJMy6rA9du/CE7Fxy6IBYE7dgF9wAUWnCAGQFcGyKqVCNChUEkz3alTshxgY6GJbsSTvhFyLtHGb3w0dCzG80GeZQfe/uID+H8BOG/VfUBbz1+4FRNb70aMMkjbXnMU5KHEwiWxqsbCvBEMd6bjUcfbNw5MPt8/JaUdZKbpqIb4CsHXZKL2OcCA5tnbjwb4+lYJwmTeuXbJLHK8Fkj8J1yt5hQPsYKGKndOcTmI2Yt0W1AIJLSzwbWpXQ//Vy7WubHPlUqC8EnmT2SjrsonJPGkP1IZH59ASGoI8YTMO+SEwVN3UUlFwnhzSKbyIXLry252Y7s4dphXrA6dnTnb8xXiFZNedGOm0Vn3tB54sndh9dBspWKiIMSeo8ELxYGZAmJVxhU9EO/SbxboXBW2+UUUmUDIfVBr1VCRdWj8mZ5dOPaLRSGe4d3RcXVV5QxtyzHiFlMfyWgVk83Vrmokv255xvArJHdekW0CMA/bfEGd4alKOtZ0cvL104Ifh3ET8diMCxdwx6atAG+FnH9hqZ5y0Mpr2t0GX/ETvCAZrQ2NDFnI 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:(13230028)(4636009)(346002)(376002)(39860400002)(396003)(136003)(451199021)(36840700001)(40470700004)(46966006)(356005)(7636003)(82740400003)(40480700001)(2906002)(426003)(36860700001)(47076005)(83380400001)(36756003)(86362001)(107886003)(2616005)(1076003)(82310400005)(26005)(186003)(7696005)(40460700003)(336012)(6666004)(110136005)(54906003)(478600001)(70586007)(70206006)(41300700001)(8676002)(316002)(8936002)(5660300002)(4326008);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2023 13:44:22.7894 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8389b1b6-317d-4415-070a-08db725d9f0f 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: SA2PEPF000015C7.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8152 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769320712130776447?= X-GMAIL-MSGID: =?utf-8?q?1769320712130776447?= Add entries for VIC, NVDEC, NVENC, NVJPG memory controller clients into the 'tegra_234_mc_clients' table. Signed-off-by: Johnny Liu Signed-off-by: Sumit Gupta Acked-by: Thierry Reding --- drivers/memory/tegra/tegra234.c | 120 ++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra234.c index 3e44efe4541e..bc73be7fe143 100644 --- a/drivers/memory/tegra/tegra234.c +++ b/drivers/memory/tegra/tegra234.c @@ -29,6 +29,18 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0xac, }, }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVENCSRD, + .name = "nvencsrd", + .bpmp_id = TEGRA_ICC_BPMP_NVENC, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_NVENC, + .regs = { + .sid = { + .override = 0xe0, + .security = 0xe4, + }, + }, }, { .id = TEGRA234_MEMORY_CLIENT_PCIE6AR, .name = "pcie6ar", @@ -65,6 +77,18 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x154, }, }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVENCSWR, + .name = "nvencswr", + .bpmp_id = TEGRA_ICC_BPMP_NVENC, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_NVENC, + .regs = { + .sid = { + .override = 0x158, + .security = 0x15c, + }, + }, }, { .id = TEGRA234_MEMORY_CLIENT_DLA0RDB, .name = "dla0rdb", @@ -357,6 +381,30 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x33c, }, }, + }, { + .id = TEGRA234_MEMORY_CLIENT_VICSRD, + .name = "vicsrd", + .bpmp_id = TEGRA_ICC_BPMP_VIC, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_VIC, + .regs = { + .sid = { + .override = 0x360, + .security = 0x364, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_VICSWR, + .name = "vicswr", + .bpmp_id = TEGRA_ICC_BPMP_VIC, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_VIC, + .regs = { + .sid = { + .override = 0x368, + .security = 0x36c, + }, + }, }, { .id = TEGRA234_MEMORY_CLIENT_DLA1RDB1, .name = "dla0rdb1", @@ -401,6 +449,30 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x38c, }, }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVDECSRD, + .name = "nvdecsrd", + .bpmp_id = TEGRA_ICC_BPMP_NVDEC, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_NVDEC, + .regs = { + .sid = { + .override = 0x3c0, + .security = 0x3c4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVDECSWR, + .name = "nvdecswr", + .bpmp_id = TEGRA_ICC_BPMP_NVDEC, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_NVDEC, + .regs = { + .sid = { + .override = 0x3c8, + .security = 0x3cc, + }, + }, }, { .id = TEGRA234_MEMORY_CLIENT_APER, .name = "aper", @@ -437,6 +509,30 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x3e4, }, }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVJPGSRD, + .name = "nvjpgsrd", + .bpmp_id = TEGRA_ICC_BPMP_NVJPG_0, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_NVJPG, + .regs = { + .sid = { + .override = 0x3f0, + .security = 0x3f4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVJPGSWR, + .name = "nvjpgswr", + .bpmp_id = TEGRA_ICC_BPMP_NVJPG_0, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_NVJPG, + .regs = { + .sid = { + .override = 0x3f8, + .security = 0x3fc, + }, + }, }, { .id = TEGRA234_MEMORY_CLIENT_NVDISPLAYR, .name = "nvdisplayr", @@ -781,6 +877,30 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x77c, }, }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVJPG1SRD, + .name = "nvjpg1srd", + .bpmp_id = TEGRA_ICC_BPMP_NVJPG_1, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_NVJPG1, + .regs = { + .sid = { + .override = 0x918, + .security = 0x91c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVJPG1SWR, + .name = "nvjpg1swr", + .bpmp_id = TEGRA_ICC_BPMP_NVJPG_1, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_NVJPG1, + .regs = { + .sid = { + .override = 0x920, + .security = 0x924, + }, + }, }, { .id = TEGRA_ICC_MC_CPU_CLUSTER0, .name = "sw_cluster0", From patchwork Wed Jun 21 13:43:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 111041 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4381585vqr; Wed, 21 Jun 2023 06:55:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5SdsBA2xXgL5rK5ID5Vxy4xdPEROHI84W9P/RyzWDLxXHY5oAg0t0S5AAs2CkahOyHLvSx X-Received: by 2002:a05:6a00:1886:b0:668:8545:cbeb with SMTP id x6-20020a056a00188600b006688545cbebmr8926183pfh.15.1687355741678; Wed, 21 Jun 2023 06:55:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687355741; cv=pass; d=google.com; s=arc-20160816; b=0rbTR/nyZaplyO4/lYSLMYPUAGXPvRax1Fu6TR7IFymSU3mKTqObX3//eTdRGUJU7e p0748guZKEJh+jbyFIQWf1gJOfnDv36laPPPQCTP+zG5q36Bfl6AsSg7MIsI2W3WwjtW SFdZVKOhRbVLn/pNtDOm849QWyMab1C+/3rJEEt4xaRBQGqHdRKXy1Pi9GN8nkQp2Jk7 X/enqjYwLG3e43EfDigW8KRO/EwYuWUG5bfCc2zTeSblhibl2kpCYUbX3h+XGWigQ8Gn pVZlFocI0dYdNNHumBN+HeL8llRnbI+5R6k/wr0O3ubU1loON/gNQQFGnjz8Y4cF2YdT WkUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/bxRUW89IS2RPob1CambtRNJDIe+vIWKZ6XXJlqituo=; b=fkGij8tZGDqHm9J20yuFB4zaqmecMOSpy3a7MYDHkGkdkXB7lkNR3oog8NX0l8ivpg TMXGyZCQc7d9TpsW1XsnY/C6Z+WQx9rmCfxfMBA2z9HvFvcXOgg+pb2XqR5OwmloGPDk VGJCZop6xDRIb+AkblbtfgId7bNmmtYYs3EeW6G+KuA5745BU38k+yrin2FTyg8eR4k5 rvCwONp+zDYYKalMMcYoRmsxP+1T0EgSZqXKEwHpz7VXv5cnIBr2dQmUX2c+S8xtWApj pSsm4zyDI4nquZUxQphGKz+D07PRyXma6uYfpe57e648kzqlekKABunDPnKSI3bnQAtb pR1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=rDNfkQ1K; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a202-20020a621ad3000000b0065d56d5e7a9si4108492pfa.123.2023.06.21.06.55.19; Wed, 21 Jun 2023 06:55:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=rDNfkQ1K; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232695AbjFUNoh (ORCPT + 99 others); Wed, 21 Jun 2023 09:44:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232660AbjFUNoa (ORCPT ); Wed, 21 Jun 2023 09:44:30 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2056.outbound.protection.outlook.com [40.107.96.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03F2D199D; Wed, 21 Jun 2023 06:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AbEN9mCMHIv6GRwfC9UUBjqYwzzMVreNr1sf4wNrUbb5uOO4LnwfyXNNaxdSocfIJ7xD7qlt1BKQXhq0PtNu4GfMWvum4y9HGPi7l1vSM8Al5cz55vQ3wGTG9M+uWv/D4k/jLY4pomQ1UHk4MLddSOB9enY84+4OYLS/XDJMz1zScfvPE6MAuiYZTilJIQW+SgymXYnUJwjCswoVqA3RwmJFqy1VFOELFpt64LqZbPa+L3jirA/GN31VUfthstkkG8cKIZ4AIPsRKEuQQR/JO1DBuk5XcZ+kYCb6QC4/bu0hfqvtqRcbraIoonADSY7rhUY0EZLn+9nvDfVi9GvgqQ== 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=/bxRUW89IS2RPob1CambtRNJDIe+vIWKZ6XXJlqituo=; b=HdXKTCy2UpSRYFASZhGR+3G2qCUxUKoieTEL2/Cqr3DBYDxkARcXTF7qY9Yd75oEqy50RxYRhpuVNhwVkaJHgppsRqeCo1MmfwNwMkOFQKvCEQdXBkQ7kF/UZYwHGtvfUakLU7MrPzET0ZPw8etkkGxN+Xmg+xsKoXYWS0sbLki3Goz8c7SbBOaLzOe5rCl3MGZGllntg+qpJKICqbd6EF3FbIMaf3edcMHFckdRFZg3uSL3Is4zxjApgiD/C73kxDnhzAaa4zA8WxwM0wxcuBcb9V7ptoqTN60ftSBFVxDxTTHfAUb7gihE5KKmuR5PRuNOFaiazC/ETfuCynv3jQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=linaro.org 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=/bxRUW89IS2RPob1CambtRNJDIe+vIWKZ6XXJlqituo=; b=rDNfkQ1KMXPImMO4Dt7QMBV+1SFScdw1X8utwTGHH/acyWg59G8tTSsasamOIPIHqdmeUXD+zp1UjOeMEkW+0UNHHNTaS1hfRF3iBLcmo3laQQ31Svbss0XwK7nHQGuHUR88u0yl0izK6J/wNZX4c+xdKuVzF2Ov1V9fDB/VAAfqdS0EV7cv7kFDJgDu6Ln1CH0eGhVwEmVQvFH4DXNUhZLiPHOAy577INe9lIVEJhIRApi6c839hSV3p9eCFBOFwnDde8rfxxcM2ldRu60flQGNhgbJ+FaA3JREUnHxRxR6C+pjiZqlXSpDBsjqYNmjqPw3ix6zfAS1cgrC2NQnlA== Received: from SA1P222CA0007.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:22c::22) by IA1PR12MB6412.namprd12.prod.outlook.com (2603:10b6:208:3af::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Wed, 21 Jun 2023 13:44:23 +0000 Received: from SN1PEPF00026367.namprd02.prod.outlook.com (2603:10b6:806:22c:cafe::97) by SA1P222CA0007.outlook.office365.com (2603:10b6:806:22c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Wed, 21 Jun 2023 13:44:23 +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 SN1PEPF00026367.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.19 via Frontend Transport; Wed, 21 Jun 2023 13:44:23 +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; Wed, 21 Jun 2023 06:44:18 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) 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; Wed, 21 Jun 2023 06:44:18 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Wed, 21 Jun 2023 06:44:16 -0700 From: Sumit Gupta To: , , , , CC: , , Subject: [Patch RESEND 3/4] memory: tegra: add check if MRQ_EMC_DVFS_LATENCY is supported Date: Wed, 21 Jun 2023 19:13:59 +0530 Message-ID: <20230621134400.23070-4-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230621134400.23070-1-sumitg@nvidia.com> References: <20230621134400.23070-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00026367:EE_|IA1PR12MB6412:EE_ X-MS-Office365-Filtering-Correlation-Id: 8b6917cb-5ad0-4c32-631d-08db725d9f97 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fjemLxqa97PWSC+GYOp5isR+Ix2/HixmOKykKGUhljS49vm7CxSy7em6GiuvKl88kz0d4NWoHZ4fTRjHeFWKB5hVHerCT3wJZ5Skw+UdHbZ1mt9zB0ApfiG2c3uQu/IbSqroRPjsjmITg2xDmYvETkn3lA1XBDffYBtsCZjV9SdPtM4nDsDj7NSfs2Vu3cEgG6YZPRga9CqPK2wXgHjg+xJfV2mZP+w8k+Wg0EfvHsBbwWpJrc7AP7j+mxbuGvnm+mmtjnMSDZ/OWJE2vGl8XFGIUX+62h1kxJGBzuXmZvPKO0KXamlZGQ/denbw/p/Ekn+9MUT/KodBQ8f+mZjq268dnep/PWaEmePdLd6UYlP8clgVMyZgVXlR1z7rfL3CIOLswyrhlLmFaHc/2KkF26xaGhJMbtrqum5cc+aOY/oZtODGjEfcGECap59Es/AyBUovHnVaYWxtvKLtXWi768pLqIJdG/Tsgys+Io4vtKIXLnYaPjvtfWMeakcbe2Bztr98GIN3GWhOiE6OOIpT64z1wfDKHRVEKso4Jmxy3WaCvWOEWfX4m1cwI/REExT16BBvTE7578Ab7fr/7pBzS4h6lbSc5CdFgsriov6iDd07RVBEYXnQoROsfURh4ZEU9u18+Ez9PZAHvP19JHz4Ubmgx4cKGQyFKznELF113xTfkSwEKwKk0CfvSUSVxDBCaNcHBUxQC4+1OMS3DRX5PiD493+ZPzfg7osib0Je/vMS4LCA7+QMDI/R/7wpgC5s 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:(13230028)(4636009)(376002)(346002)(396003)(39860400002)(136003)(451199021)(40470700004)(46966006)(36840700001)(6666004)(478600001)(54906003)(110136005)(4326008)(47076005)(40480700001)(336012)(426003)(83380400001)(2616005)(86362001)(36756003)(36860700001)(40460700003)(2906002)(70586007)(82310400005)(186003)(7696005)(1076003)(107886003)(26005)(356005)(82740400003)(7636003)(316002)(70206006)(8676002)(8936002)(41300700001)(5660300002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2023 13:44:23.6830 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8b6917cb-5ad0-4c32-631d-08db725d9f97 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: SN1PEPF00026367.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6412 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769320733818131412?= X-GMAIL-MSGID: =?utf-8?q?1769320733818131412?= Add check to ensure that "MRQ_EMC_DVFS_LATENCY" is supported by the BPMP-FW before making the MRQ request. Currently, if the BPMP-FW doesn't support this MRQ, then the "tegra186_emc_probe" fails. Due to this the Memory Interconnect initialization also doesn't happen. Memory Interconnect is not dependent on this MRQ and can initialize even when this MRQ is not supported in any platform. The check ensures that the MRQ is called only when it is supported by the BPMP-FW and Interconnect initializes independent of this MRQ. Also, moved the code to new function for better readability. Signed-off-by: Sumit Gupta Acked-by: Thierry Reding --- drivers/memory/tegra/tegra186-emc.c | 136 +++++++++++++++------------- 1 file changed, 71 insertions(+), 65 deletions(-) diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c index 6ad8a4023dd7..83981ae3ea86 100644 --- a/drivers/memory/tegra/tegra186-emc.c +++ b/drivers/memory/tegra/tegra186-emc.c @@ -155,6 +155,73 @@ DEFINE_DEBUGFS_ATTRIBUTE(tegra186_emc_debug_max_rate_fops, tegra186_emc_debug_max_rate_get, tegra186_emc_debug_max_rate_set, "%llu\n"); +static int tegra186_emc_get_emc_dvfs_latency(struct tegra186_emc *emc) +{ + struct mrq_emc_dvfs_latency_response response; + struct tegra_bpmp_message msg; + unsigned int i; + int err; + + memset(&msg, 0, sizeof(msg)); + msg.mrq = MRQ_EMC_DVFS_LATENCY; + msg.tx.data = NULL; + msg.tx.size = 0; + msg.rx.data = &response; + msg.rx.size = sizeof(response); + + err = tegra_bpmp_transfer(emc->bpmp, &msg); + if (err < 0) { + dev_err(emc->dev, "failed to EMC DVFS pairs: %d\n", err); + return err; + } + if (msg.rx.ret < 0) { + dev_err(emc->dev, "EMC DVFS MRQ failed: %d (BPMP error code)\n", msg.rx.ret); + return -EINVAL; + } + + emc->debugfs.min_rate = ULONG_MAX; + emc->debugfs.max_rate = 0; + + emc->num_dvfs = response.num_pairs; + + emc->dvfs = devm_kmalloc_array(emc->dev, emc->num_dvfs, sizeof(*emc->dvfs), GFP_KERNEL); + if (!emc->dvfs) + return -ENOMEM; + + dev_dbg(emc->dev, "%u DVFS pairs:\n", emc->num_dvfs); + + for (i = 0; i < emc->num_dvfs; i++) { + emc->dvfs[i].rate = response.pairs[i].freq * 1000; + emc->dvfs[i].latency = response.pairs[i].latency; + + if (emc->dvfs[i].rate < emc->debugfs.min_rate) + emc->debugfs.min_rate = emc->dvfs[i].rate; + + if (emc->dvfs[i].rate > emc->debugfs.max_rate) + emc->debugfs.max_rate = emc->dvfs[i].rate; + + dev_dbg(emc->dev, " %2u: %lu Hz -> %lu us\n", i, + emc->dvfs[i].rate, emc->dvfs[i].latency); + } + + err = clk_set_rate_range(emc->clk, emc->debugfs.min_rate, emc->debugfs.max_rate); + if (err < 0) { + dev_err(emc->dev, "failed to set rate range [%lu-%lu] for %pC\n", + emc->debugfs.min_rate, emc->debugfs.max_rate, emc->clk); + return err; + } + + emc->debugfs.root = debugfs_create_dir("emc", NULL); + debugfs_create_file("available_rates", S_IRUGO, emc->debugfs.root, + emc, &tegra186_emc_debug_available_rates_fops); + debugfs_create_file("min_rate", S_IRUGO | S_IWUSR, emc->debugfs.root, + emc, &tegra186_emc_debug_min_rate_fops); + debugfs_create_file("max_rate", S_IRUGO | S_IWUSR, emc->debugfs.root, + emc, &tegra186_emc_debug_max_rate_fops); + + return 0; +} + /* * tegra_emc_icc_set_bw() - Set BW api for EMC provider * @src: ICC node for External Memory Controller (EMC) @@ -251,10 +318,7 @@ static int tegra_emc_interconnect_init(struct tegra186_emc *emc) static int tegra186_emc_probe(struct platform_device *pdev) { struct tegra_mc *mc = dev_get_drvdata(pdev->dev.parent); - struct mrq_emc_dvfs_latency_response response; - struct tegra_bpmp_message msg; struct tegra186_emc *emc; - unsigned int i; int err; emc = devm_kzalloc(&pdev->dev, sizeof(*emc), GFP_KERNEL); @@ -275,70 +339,12 @@ static int tegra186_emc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, emc); emc->dev = &pdev->dev; - memset(&msg, 0, sizeof(msg)); - msg.mrq = MRQ_EMC_DVFS_LATENCY; - msg.tx.data = NULL; - msg.tx.size = 0; - msg.rx.data = &response; - msg.rx.size = sizeof(response); - - err = tegra_bpmp_transfer(emc->bpmp, &msg); - if (err < 0) { - dev_err(&pdev->dev, "failed to EMC DVFS pairs: %d\n", err); - goto put_bpmp; - } - if (msg.rx.ret < 0) { - err = -EINVAL; - dev_err(&pdev->dev, "EMC DVFS MRQ failed: %d (BPMP error code)\n", msg.rx.ret); - goto put_bpmp; - } - - emc->debugfs.min_rate = ULONG_MAX; - emc->debugfs.max_rate = 0; - - emc->num_dvfs = response.num_pairs; - - emc->dvfs = devm_kmalloc_array(&pdev->dev, emc->num_dvfs, - sizeof(*emc->dvfs), GFP_KERNEL); - if (!emc->dvfs) { - err = -ENOMEM; - goto put_bpmp; - } - - dev_dbg(&pdev->dev, "%u DVFS pairs:\n", emc->num_dvfs); - - for (i = 0; i < emc->num_dvfs; i++) { - emc->dvfs[i].rate = response.pairs[i].freq * 1000; - emc->dvfs[i].latency = response.pairs[i].latency; - - if (emc->dvfs[i].rate < emc->debugfs.min_rate) - emc->debugfs.min_rate = emc->dvfs[i].rate; - - if (emc->dvfs[i].rate > emc->debugfs.max_rate) - emc->debugfs.max_rate = emc->dvfs[i].rate; - - dev_dbg(&pdev->dev, " %2u: %lu Hz -> %lu us\n", i, - emc->dvfs[i].rate, emc->dvfs[i].latency); - } - - err = clk_set_rate_range(emc->clk, emc->debugfs.min_rate, - emc->debugfs.max_rate); - if (err < 0) { - dev_err(&pdev->dev, - "failed to set rate range [%lu-%lu] for %pC\n", - emc->debugfs.min_rate, emc->debugfs.max_rate, - emc->clk); - goto put_bpmp; + if (tegra_bpmp_mrq_is_supported(emc->bpmp, MRQ_EMC_DVFS_LATENCY)) { + err = tegra186_emc_get_emc_dvfs_latency(emc); + if (err) + goto put_bpmp; } - emc->debugfs.root = debugfs_create_dir("emc", NULL); - debugfs_create_file("available_rates", S_IRUGO, emc->debugfs.root, - emc, &tegra186_emc_debug_available_rates_fops); - debugfs_create_file("min_rate", S_IRUGO | S_IWUSR, emc->debugfs.root, - emc, &tegra186_emc_debug_min_rate_fops); - debugfs_create_file("max_rate", S_IRUGO | S_IWUSR, emc->debugfs.root, - emc, &tegra186_emc_debug_max_rate_fops); - if (mc && mc->soc->icc_ops) { if (tegra_bpmp_mrq_is_supported(emc->bpmp, MRQ_BWMGR_INT)) { mc->bwmgr_mrq_supported = true; From patchwork Wed Jun 21 13:44:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 111042 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4381619vqr; Wed, 21 Jun 2023 06:55:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Psw/Os3K1L+zwaWu2BEwtCPewUMOn7oiWoJwvsf7O/HkVk1/PtEP9teqYnZEIJh/QEFRi X-Received: by 2002:a92:c048:0:b0:33c:5109:bb07 with SMTP id o8-20020a92c048000000b0033c5109bb07mr15757617ilf.1.1687355744339; Wed, 21 Jun 2023 06:55:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687355744; cv=pass; d=google.com; s=arc-20160816; b=R3NQH2FlJuGUNU5xHj4BOhZr9KgBo0r6XzfM6m8jEyB0ldg5ZYFoIMtJ88km0rgF07 j4jXMKDiSU9cYVtoGVbGaE57nkerJKQeRCDlWgbq//sb5mGk/2qmgdKt6AeV3ogbETL4 qFIP1U+Z+cHURRS7IV0L2LEezr+7pE9fxNbwH0ZjIxQasuocJIAIuJ5gN9pQ7Xqu2GKT Wybm4RZ0bdqHotC7YoebZehdnWmimsvOFE76MkcnIQxy2rrSNZw+tYY4vn8ZAovxyvsE gfsPwaG6Q/mdY62Ozo+ft1aG7SWRlkKq+UAOVIW+Po50rMYsRyYTMHDXei3FJKrxu9ol T+FA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=yPU6pwjZ5JP+wKRLO/yH1vCWuLkB0iwb9pKdtpFyve4=; b=IdVncv+imd/ziAiOlooEJmgIBrabX6bJARdKt8mi+LjObbyo86XTx73JQcrVdKpoW8 rlRcuTW3v/DWXHVMAAPjz81Io0A4pXkEmRt2FtvcpOvwhpMU35zLTlyVjM4Ac98E0W9e OU7P6lso3vYUOGmemEusvgeYBzvsjyCArBkuURdEkh7dHhjs1AfF24wkjm0WOBS0rYNu hn2a5ENb4WJlToCImNbwJouTaKBFh4YOKc5Q40IdddSF68l74xkRlUD28tiDb7oBidU7 /Pnb3XrSvyd1A7CwASHoTaRsV2HsYBncyu24T7EJ7HZMpbnUVv7DsZ5kWjKVS0MT9uif ti9A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=TeKWWSka; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mm22-20020a17090b359600b002470ea7f67fsi1184492pjb.3.2023.06.21.06.55.29; Wed, 21 Jun 2023 06:55:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=TeKWWSka; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232660AbjFUNol (ORCPT + 99 others); Wed, 21 Jun 2023 09:44:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232667AbjFUNoc (ORCPT ); Wed, 21 Jun 2023 09:44:32 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2048.outbound.protection.outlook.com [40.107.94.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 743BB1BC6; Wed, 21 Jun 2023 06:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fBDty7MbEu+A6R+mMqU6n4U82iQY6AG8AU8yiNypF3sfOpQVshW0BW0e6TpirlsNcBGZjVEvhksf+t6gHBdqANzHRby7+mDTlKVoCqUw6VjnWjkdvfKonI8yNtJ7Gxpx28gGI/o7r877KKv7Hkku/twWt+qlh/FgaSfOgIT3yko+t5Q7Rl9m4DQHJe7C+fbeHorwjf0zHLXfXl8ByvFIGWEaZKgl3S+j7yybCuW15NmuMgODVfQLVR9TNCWGxDZ3E/j3/1jnhrNzI+4cWz9e4xtT4+bMICwqYLSFfdbLBuBhlya2yry0igk6oCqZg02GrgcnRmCa7Znt4/d7D1qxjw== 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=yPU6pwjZ5JP+wKRLO/yH1vCWuLkB0iwb9pKdtpFyve4=; b=eGuwFvQh4w5CF8aX/LuNfI6WPafyLI4dw3YBALea6qmekEyMMrQIZSTeVxW3DWNkPxK0Su5aDHWw2ySQljiuUhZ5UkWxSGiGt7OQW4Y7P6ns+Pw852MngBI6Lzr6nuYl6a3BrYd2ySzOB/1k8MEHG7RTiTIvCBqplKpMl5HC8isVsbwjIMMR32ghGKnAXk7u+PZ+CNYc/eNnvx3TNYH5RKB6TmE5YixdCV7gW3ZjuJpwyhaSyGYEkSo8wdAs/8fY6bZSb9p7Hy7A4vHJGM7HUGVC76JGMQzn5ObQCvQLlZLbk72v6fIlJ6Pat5P/NAMgRWlyxo0mG/HaKwKrUCiSYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=linaro.org 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=yPU6pwjZ5JP+wKRLO/yH1vCWuLkB0iwb9pKdtpFyve4=; b=TeKWWSkahY8J4RELcSK27P61KQxfUlvK2caJkCIKZzB5z+RsbdY5HzWoVgzXP4GcV4sqvS82xPnG9yKIQkSFSIo60VKPQXoQPFy2rcXmmV8y/87cw8UrqLsyCgQ5y1Noos2SuSjSlgLdRCsSK53PdB5PuD9hh7MBN9iasgiVIGzM+ZaDhJgC2UgHJqEOLst9OaoBPqHFsWzcBCPAuOWGnVCvTmxi43w4axVi0iXZG1AWt24sZlGGX2VL6T7mfcUrS3OAJx8eLaw4Uf0pbnHFFpGwbfMngXlfLmGOTySfjYZC09xUn/kbHEyR9V1IoIUrYu53Uns1f0KJJQ3teCaP6w== Received: from SA1P222CA0004.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:22c::14) by MN0PR12MB6174.namprd12.prod.outlook.com (2603:10b6:208:3c5::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.36; Wed, 21 Jun 2023 13:44:26 +0000 Received: from SN1PEPF00026367.namprd02.prod.outlook.com (2603:10b6:806:22c:cafe::2a) by SA1P222CA0004.outlook.office365.com (2603:10b6:806:22c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23 via Frontend Transport; Wed, 21 Jun 2023 13:44:25 +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 SN1PEPF00026367.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.19 via Frontend Transport; Wed, 21 Jun 2023 13:44:25 +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; Wed, 21 Jun 2023 06:44:22 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) 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; Wed, 21 Jun 2023 06:44:22 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Wed, 21 Jun 2023 06:44:20 -0700 From: Sumit Gupta To: , , , , CC: , , Subject: [Patch RESEND 4/4] memory: tegra: make icc_set_bw return zero if BWMGR not supported Date: Wed, 21 Jun 2023 19:14:00 +0530 Message-ID: <20230621134400.23070-5-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230621134400.23070-1-sumitg@nvidia.com> References: <20230621134400.23070-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00026367:EE_|MN0PR12MB6174:EE_ X-MS-Office365-Filtering-Correlation-Id: 96bcc264-de77-4a49-6955-08db725da0e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fK5SyRxRVz/imamLyoi0ypp8Qk0GnYWwsdpfQGml/pn7hWptPUTV4NuXdiID2KB4kN/Un1QCYjJmyirulIWlmEQ89Em1gmvhto9B/9CD2qrJ2/NtZyo7oeerSCJ932CiT++w2bKGURMULnCFOddy1XQLIlOmcdxfy6//93v8f8jGCITrU3yij2FVrfpkFU3ywAPXgingQORdpp6oxHcLMF87Dvg37ev8x65C15kYtJZeov5iIKIrkf9bhTYx4+PhjmsgylLSLkIjjyW64cTZ5MBHHAL/VRbGwRb3kJLVBqWkUcLp4P9K1DSHU8quBG8+a7PstqOXW925CeyIj8R+e9DMJd7LGR7uyOUOZd55E6PGd95dW7a8uG81kKjCsM2KzvDRB9kwJ+efRvYulUHdk6cZ/vByx8LnnxvJnUmNHdk5c5RiEm+NBsV9LE8Xm3EGXWQH+bEZ6I04RiSJ8Sn9i/XneuaFFRVfX/tnOvpTdCHGDazDlz+j8mr/M+9vCPy0tFqsh0Nxdmbg97y2EX9y8GO1B+D0NdcgxPm24GOPNkuIWnop9m1EjAveWrLMw2m0gx6Q0MXxpeCo0mHAaPsMbI5xtdZiwnsxsF/L1YEA8SthFTjzRmmwb4+y26lD465UFtgK7fgm5MX/PSZK/8BTemkgYb12JNkh/P3MbJ4QQVuOcKnpZp+PajjjVAxARKmAncRFPInSwcR09rTL8C24nBO+DOrjsGtsnMbJwcJi/ijn4t939OPCYwVuEy5a6wi5 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:(13230028)(4636009)(39860400002)(396003)(346002)(376002)(136003)(451199021)(36840700001)(40470700004)(46966006)(8936002)(36756003)(82310400005)(70206006)(70586007)(8676002)(107886003)(1076003)(26005)(186003)(41300700001)(83380400001)(36860700001)(5660300002)(4326008)(82740400003)(316002)(54906003)(40460700003)(7696005)(7636003)(356005)(2616005)(6666004)(40480700001)(478600001)(2906002)(86362001)(336012)(426003)(110136005)(47076005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2023 13:44:25.8393 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 96bcc264-de77-4a49-6955-08db725da0e0 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: SN1PEPF00026367.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6174 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769320737307858438?= X-GMAIL-MSGID: =?utf-8?q?1769320737307858438?= Return zero from icc_set_bw() to MC client driver if MRQ_BWMGR_INT is not supported by the BPMP-FW. Currently, 'EINVAL' is returned which causes error message in client drivers even when the platform doesn't support scaling. Signed-off-by: Sumit Gupta Acked-by: Thierry Reding --- drivers/memory/tegra/tegra234.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra234.c index bc73be7fe143..07aba301a173 100644 --- a/drivers/memory/tegra/tegra234.c +++ b/drivers/memory/tegra/tegra234.c @@ -951,7 +951,7 @@ static int tegra234_mc_icc_set(struct icc_node *src, struct icc_node *dst) return 0; if (!mc->bwmgr_mrq_supported) - return -EINVAL; + return 0; if (!mc->bpmp) { dev_err(mc->dev, "BPMP reference NULL\n"); @@ -998,7 +998,7 @@ static int tegra234_mc_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, struct tegra_mc *mc = icc_provider_to_tegra_mc(p); if (!mc->bwmgr_mrq_supported) - return -EINVAL; + return 0; if (node->id == TEGRA_ICC_MC_CPU_CLUSTER0 || node->id == TEGRA_ICC_MC_CPU_CLUSTER1 ||