From patchwork Wed Jun 21 13:35:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 111028 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4373929vqr; Wed, 21 Jun 2023 06:42:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6PtgizbGvDJcEGn2nhAEw0qRzrrs4dCBARZQjytI3VvVg8t3tnsKvDU8x12u5Fc8bJAolA X-Received: by 2002:a05:6a20:3cb:b0:114:ec7e:a60a with SMTP id 11-20020a056a2003cb00b00114ec7ea60amr15000777pzu.38.1687354970306; Wed, 21 Jun 2023 06:42:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687354970; cv=pass; d=google.com; s=arc-20160816; b=WoYhMTHL3zLPSQLCCxYd/IvOd4KgJv+qwYMkeBK+FPvmQvtO4rnmrjlp94WANZXc0S hz0eJOwuqMHsvKZUOH9QnU08aiAcqcVZ5/9nZc8H1FTTRTdu4oS+/PWPV8Rkl1awpNeJ nvd9DCWTqiEu/mJ2LfLjY69Sh33mh7L9ocyHJLYCjH/2C+7eq1Ud1A505jEuSeMUJBk+ lRTDr52v+J2VvRahCVyxuiAXvizgi1iPbkdxmsFFymnpdurII3E/BzWnlOSSDjb5BjdD BSVN7AePVYyFHuc2/C3bcDKq3KoLcV6Vpdao5SdarWzqqNYOcxWTP6RJ+D9BafeGuJno KZxA== 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=BY8I+IBbW96zwu4wl5MX6bfFQg0hNWzsHLD0psGy0x6Nm4x3q3GY296HSvnf65LsV2 LgpVCzTBY1fa3v07Ypdu7kFBd0sjB+RWnhtj+y7pTnWYermbxENjB7m1nb3T1X9aqGAf bEUdQSeMaJWwpw4P8ociS4RUTcqqpP5sfsqUPxbaaBZXv/0xQb8Ny0DPlTr4EXKh6zdm cTI3TuE0OJgaHUFZ5FMTuKvui+/UhCAPUzCtoaENFumv+3gA4QYMFqMC+m9WmpXLSWL9 u12wCJGkkgwcwVigCyi+A7ptgpbQtVA0wjcnqG7zpjKAbGibBvki4bhGMxBqqQttTJzp E3TA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=PXcUWaE8; 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 l65-20020a639144000000b005573d0a4de4si364283pge.218.2023.06.21.06.42.37; Wed, 21 Jun 2023 06:42:50 -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=PXcUWaE8; 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 S232629AbjFUNgB (ORCPT + 99 others); Wed, 21 Jun 2023 09:36:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232586AbjFUNf4 (ORCPT ); Wed, 21 Jun 2023 09:35:56 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2050.outbound.protection.outlook.com [40.107.243.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 272AA1981; Wed, 21 Jun 2023 06:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IzFWq583LYgLAeHdF3wR/m947y37mOrfvh1oGC1C86qui26/dZeopn7uZySxjogMm5fOYqirz/NkeUM0I1Fs1LtE5NZVZpQVBDOD61hHO12SnVWRoBqio6G0+nc2ii3lkYi3kFnhzPwagOVEWT5SxvK8eqMbXRW6s/V5GwgAKCsALWkKHX8TgNjtb/6U2MDYh8vw/QWADctrj/5SFfr8EbhpdOaZPMcj/DOklk2neu/AZ2j6F+vlMGZlF3BpH8T+aP6RR4mnGp6lvEaR0rgUAhXkys9rcFoGvEFURHf86s6MlXxM9G1IdhApFyDCKo5tqBB7M73B2buOs4ipIehT5Q== 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=OVcKyg6EZNChGNx/qko+1rz8UDQqW0zLX9Y972dSdPQu1rQXe4+Llrat/kGyKV9sn+qc2ZnVjMW64rvNeu1PQo8nkvRHLrwW782P6YtJgNxqm5t5nJ8AqMyBxJOefbxxtROPxXwUcHZ/QQ3dcZLsTXYA6weK3p5osTyc9KwTUfguOXdH67Q/qhZw+mO6Se/f0DvdkQrShjuaSTPWmIhSu4yjAAbwXtmTHym2UKtnh9XjTN2ORSMjVtDOdG2mgmvsU7hi//rR4P8yW7pJZTGHQdp0C7r7/9KxlqihCBzhdp5PkjhkdgJqAPKkseY/0lG+hTF1ZMcCjbgNtZa4GK5rSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=PXcUWaE8vNpJsz5QyF2iLp/gh7xSIwkpyKc+Vl51PPKbw2L9/eIpu1liD3HQmnD3KyIkQcBvGxBkvmz5zTYMLOYh9eaXfY0QSVj25tthkxRZIU3WPQCI57fkzgOrqFpWR0egd+CJAAeiZO7GWvkQngcSii8127CuuW1hqhjdyuk7cBWq0Q8YBNEWODFoSQWQF82boUqbsH2sMk0crsDV5bqQT9ks6jeP+8ltbQI8yzjQEzikza18GMzW17tHNBMq6kdCtBHUdZB4i7+mObQKWtYvhQ1RwDk0NUDLrQA72KQlq3nfmQ+5/nlPTSLVNH43xlbfDHPKEofBjlZzyalwQQ== Received: from MW4PR04CA0307.namprd04.prod.outlook.com (2603:10b6:303:82::12) by MW4PR12MB7333.namprd12.prod.outlook.com (2603:10b6:303:21b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Wed, 21 Jun 2023 13:35:50 +0000 Received: from CO1PEPF000042AA.namprd03.prod.outlook.com (2603:10b6:303:82:cafe::6e) by MW4PR04CA0307.outlook.office365.com (2603:10b6:303:82::12) 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:35:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1PEPF000042AA.mail.protection.outlook.com (10.167.243.39) 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:35:50 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.67) 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:35:36 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail202.nvidia.com (10.129.68.7) 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:35:36 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Wed, 21 Jun 2023 06:35:33 -0700 From: Sumit Gupta To: , , , , CC: , , Subject: [Patch 1/4] memory: tegra: sort tegra234_mc_clients table as per register offsets Date: Wed, 21 Jun 2023 19:05:24 +0530 Message-ID: <20230621133526.22492-2-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230621133526.22492-1-sumitg@nvidia.com> References: <20230621133526.22492-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: CO1PEPF000042AA:EE_|MW4PR12MB7333:EE_ X-MS-Office365-Filtering-Correlation-Id: 2c37faa4-952b-4d7b-89b1-08db725c6d7e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hSygYxAyd8Z2O2aZs8Ma0LBS0ffauV/tVl8ywvvY8CN+y8INRB2RuybI3h683g3zdIX8j+GxZkD+8DqN0W23rXm+Dmry/mDXqPThs63dHUK+2D8cqOJCDCB8OrF8tqThJzIXRm67XwtHLiR/tQJN+vAvRnqVaA9f+0FjuG3xDa6bd1kCtweyMdqshL5cEZNUyNlv31+u9LyjPFTGg93OxXADWLDMkkuMDMDkod2BL6VVRrRhltUEPzF3EZGYdZm/9bVEVD0cfaJV4dhYjrOLohVXii7AvnW7R4q9gTgxiLo/L1C1PGdibsz/z/N5nas0SvR8bpq1HBTwDuEikCAiRka8Ibole5GlhgpkjyLvIOsN9il40sKMXn5mV9veJxdrlCeV5vzHk+Ln9AMhLxxXfih71SqSnksMGHmLEimfSMB1FYSJzDrgF1yln7ra6OWmbAVK35kwVrkx2g17BRC90xtVRbpKR/TLjcFImxly3a+znUQ2bsQ7gv+xtxf7vKwLQ77HnrX61YtkIIIIQpk975LoEr1ipuAORzXv6UXO9Z1YcW8cAFozX9QN9X6xQuBhVGHYO1dS7YGPEbLQdJj2IBlUq0YChEau0zBwdDQQt8jlysodjCZIgmxdklsZBCg4j/V7q/sBB/ra4lyLkPNMAwDTXufChnmfta+AmFnVVT8tA6xC6smBn3X5TGX+QW22uvcPnR0EqnOaduoJJA2TIVNT7abWpxQhkK0KGwdC75dgMUMWnZdqPsCfq9z84Eux X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(39860400002)(346002)(396003)(451199021)(36840700001)(46966006)(40470700004)(54906003)(110136005)(26005)(41300700001)(1076003)(186003)(7696005)(6666004)(478600001)(70586007)(70206006)(40460700003)(4326008)(316002)(40480700001)(36756003)(336012)(5660300002)(8936002)(36860700001)(107886003)(8676002)(47076005)(2616005)(2906002)(86362001)(82310400005)(83380400001)(30864003)(356005)(7636003)(82740400003)(426003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2023 13:35:50.1061 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c37faa4-952b-4d7b-89b1-08db725c6d7e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042AA.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7333 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?1769319925256984917?= X-GMAIL-MSGID: =?utf-8?q?1769319925256984917?= 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 --- 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:35:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 111030 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4375112vqr; Wed, 21 Jun 2023 06:44:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7vdN45cfz3sSlLiD/dPf+MFPcYI085RqFanmaQY4rkCzxJ9MP7ZgiSA9n5WkcfH2wVynA7 X-Received: by 2002:a05:6870:a2c5:b0:1a9:888b:9781 with SMTP id w5-20020a056870a2c500b001a9888b9781mr9297991oak.18.1687355077811; Wed, 21 Jun 2023 06:44:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687355077; cv=pass; d=google.com; s=arc-20160816; b=APKnxMLMsKix5YnmZBHBjcIeNCZI0Ymmq70xAOYpOVBAOYg21KlInCvD92TcWt8Z/b teuqN1qag8UccVMkjsKtA1Kur2J+ATrJ45ZjT1wamjCSsLopmDyHfRqI82FqfWFFXHi/ ii3pr3Ll4QgD/JF1wXaUVWoV2SRq3lx7+5ZZ/anaanlS1lLdoPntfE+71rEJEgvAu++l 8m8J9sN9bqgExbxq/pac7gtc8UFknHiTwKBkISJG5TNrWWx0mrTLEwbukqrK6mgZi+Vn yo8PqYi6h1g0DgoH8IYp+KsHeK/0Pf5nwb8Nc6v5PKg+VeOaNm/XAD0bJNfYB5xly1Kv PJbA== 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=vnJ47qUW+UnPk1TO6H+UMEsHlqJ1KgQcyxx9ccLVEC167ujYqQzDx+Hpw2mE/mYtIM qSSk5rE7EnGJ4za3gyuJyuEQ9ABPR5fvhhEVrhi3Lfzk5yPQMA7LIs3tJUyWXopxIGee dh8ipJdzCSbRitwTYO8bL/ZTJh5UH59RTBeWLvpaXmLryT6yQ3/UAv1MzGEgIbphjL5D 0J7UVVGcekZnYvVDH9c7bKP3xS+DPMkD1hTbB/CgOrwrcx0flqzD1CuvxfmxB6UCCOW0 8e0lIkj3aik7kMFuz9AxYkuC13Qu1ChDe061rt2DC/XASAnVgrD1NQNL7pFPhGe7I43r hj6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=LPgkYUFP; 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 g15-20020a63374f000000b005533f251ea7si4111127pgn.122.2023.06.21.06.44.24; Wed, 21 Jun 2023 06:44:37 -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=LPgkYUFP; 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 S232461AbjFUNgD (ORCPT + 99 others); Wed, 21 Jun 2023 09:36:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232606AbjFUNgA (ORCPT ); Wed, 21 Jun 2023 09:36:00 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2065.outbound.protection.outlook.com [40.107.243.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8BB31998; Wed, 21 Jun 2023 06:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cnBoRDi83W5tuMBRVRQ5yi66VO1Gel9MW5jsMkDSgL+tApHnnigZM0VgLcj3vbN8InegPhhqtNa8zJFN1B/SL/RYfvkjL/2Tfphk7TPekWq1jJGNCrOVfsPtp1h/OHnuhrMVjYW83zr+6lvwia02wo6vhVoQ6lLRjpyLUFbNTwyOLLtzHWGCoWvgEKANr3Lb3xQJFlLSEGDSVM1XdIa0TQS5mVYeDeN0f3Xx71gbydSJ6TSO33sQOKj+zZ3mB5oh3pwZaHlfLx1Z9aJYVO9ZATslY/Q6VeHN+hUexf8mqi7M78+/w40SGRlKhiaSj2fmFXMkstXpC4GBUyU7ZxyJdw== 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=oYxK4kfDm85i6Z+NlrXaIV38bJ54d6QkUtloWqmzsDtYHGQZwy9FVtcxJyrXMOhS7UlgDEP+YJtaMQzbxT09H6DoFzP2J49+5wIGhPKpWU4lDQORGqogGjp+n+bydUi7XONpgDOFIM2YsODkI4YvYQSBWBOPHSeNBbaO52/f/9w5vYcPGLEM0DEAZKBtTJgcaputCILIXmfJQqN4AW8Bpp7uLH8x3zESkfrcvX7x5zszkxjWbnnA25HpNIAoudJki2gK5K97AlYWN3SQ3a4J5GqqQfMsDyUFpBNzaXyucbMxZRyvKol1QNgfgA/kmbnAHFUjO9O81Q3RPPxMPycFhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=LPgkYUFP8KUIMKQKCaAHRXmPMAU8SMtjVl7ntk2zXzAJcpdEf820OlPOAtiVqdmCUZTiurqZMaW7A35mE8RKMfTL17I+WClVVEM4qgggCgPvi92ozrIcwMNAnEcWWMiA75YDY33Nkhc42spSSxWzgoC0EblV9EcAYsSLNbxFm6J6iKoWORHRJ+AESvmXGfs7t0PoiKgXfxgZq49k/uiUQ3tGIaJYkVGFpWUwzBjrkwxLpjf4qHT0krF15HKpOiRn7db7h3Fbguq6SAZlXNsqGvFStzDZNfkjwIiu6S6chJtk6S1p/bDkSoSpx8ts7cTkezu5yMc+CXvcJ/et7eiAaw== Received: from SA1P222CA0048.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:2d0::23) by SN7PR12MB7108.namprd12.prod.outlook.com (2603:10b6:806:2a3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Wed, 21 Jun 2023 13:35:53 +0000 Received: from SA2PEPF0000150A.namprd04.prod.outlook.com (2603:10b6:806:2d0:cafe::3f) by SA1P222CA0048.outlook.office365.com (2603:10b6:806:2d0::23) 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:35:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SA2PEPF0000150A.mail.protection.outlook.com (10.167.242.42) 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:35:53 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) 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:35:40 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail204.nvidia.com (10.129.68.6) 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:35:40 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Wed, 21 Jun 2023 06:35:38 -0700 From: Sumit Gupta To: , , , , CC: , , Subject: [Patch 3/4] memory: tegra: add check if MRQ_EMC_DVFS_LATENCY is supported Date: Wed, 21 Jun 2023 19:05:25 +0530 Message-ID: <20230621133526.22492-3-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230621133526.22492-1-sumitg@nvidia.com> References: <20230621133526.22492-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: SA2PEPF0000150A:EE_|SN7PR12MB7108:EE_ X-MS-Office365-Filtering-Correlation-Id: 8bec7874-e0a9-465d-3751-08db725c6f58 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fa9W9aBxVbDJaOsYODHmVIrZ7YbY7LT+XdeWWF8AlgQmLsZ1KFkdPHB/cljFphlLIbW7N36L9l3ehaQz6C9kJ9yO/EDAe5+4VMK+AxhFaaSqx25UMTOtTjy6K8blUlzSsVvgpsBrIyATys7U/YyJQCkHnHnpGMjAk6QppPcnNcSexXX7HFJOf9BBio1sfqvHGvOLyFPPnA07OGq173y4UJeXym7YNx8w+1KlkNN8P1Rsc4/YV5M+7EE8Kw1UPUcBcm4aTZ6xe9INH/mlUY48juYFWPvXDWKQ4wHr8SeJsl40xRlA8nV4jXcqYDkAbH/qPyOB/O8m00P4G4UlFiawYc46np1aozpTobCekRi4RFG8au11Zcag3PzKLCKG6W/iz0mwEf/EzlhfYA6zy6XwYh0eu5dnf8NTyqcD4xR3mH4NJ1Xgu4aDYs5uMqCJWJNTLdfV6/xnwhaAq4GlYwYHBGQGsJ0xxB0wlMs+kSQORMWA+RIg7bIXScVrCB9vtIWF/bOuJHQHmgYAbpm5y8K+xn3oOawDOjUbRNTPU5VdWg891jyGwdBYXLC5oQNag8hBaCMOi3IahKFGtEhxNyjDqrjVcOFgDKMfJ0ebkr+oB5zvTGM6NeXoSoFkw2/UvhkEnOiccNlTzzYFCqqfbQld1rxMUUEpsHYsPh7Ua1/AU6ANsx2fySwhAj8/qc+1MkXbv1E+0SYBdmQcj5KFzP0UecWb7ESAtmsde0dm7K1hvxAZk3adXk0MrOSurt669Nci X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(346002)(396003)(39860400002)(451199021)(36840700001)(46966006)(40470700004)(40460700003)(7696005)(478600001)(6666004)(36860700001)(336012)(47076005)(186003)(426003)(36756003)(83380400001)(82310400005)(86362001)(7636003)(2616005)(356005)(1076003)(82740400003)(40480700001)(107886003)(26005)(4326008)(70586007)(70206006)(316002)(8676002)(8936002)(5660300002)(41300700001)(2906002)(54906003)(110136005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2023 13:35:53.2260 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8bec7874-e0a9-465d-3751-08db725c6f58 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF0000150A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7108 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?1769320038387697818?= X-GMAIL-MSGID: =?utf-8?q?1769320038387697818?= 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 --- 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:35:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 111039 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4380315vqr; Wed, 21 Jun 2023 06:53:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ERWCs2DLEs8FAd0XTbO0XkgAzdZEF/m9WFbQ3GDbnriwEpGS3HHMOcaL47jiAeAHgVZa0 X-Received: by 2002:a05:6a20:914b:b0:117:7ad7:d9a1 with SMTP id x11-20020a056a20914b00b001177ad7d9a1mr28891381pzc.20.1687355603545; Wed, 21 Jun 2023 06:53:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687355603; cv=pass; d=google.com; s=arc-20160816; b=lOfpq2NuIODCd38gy/W2zzAtG1h4NeLhkzdxgTY5FrYbFwairojQZTdk7AZh5/6Md4 Q8laOEFW17sKByUvWcG6LPiMCwImaGA2yH4/EqWSemoxioXplXCX8X1usNvXdA0Oqh1e DfTtEdTR27p0Q1KuPupQwW1lQjGuCRaPBsajCQY5GGb56XvBied3iA8mCptxZw2QnnAP aO+9DOMduVRKR23Rjl8bMCnEvEseSH8cFRcn6k5rG3fYbPFf68O0mH7ceHCqm9Dwd7GR iJlw82u03SiJ8dPzhGsQ0nXrtTIB7OKgrSNFPYMIEvMJeDW8EJ+1kKTxchgIgkU9u2YV a+ig== 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=Ps5RpVAYB7riSm9rbfJwVzVfkHE3jTyRkWN9cRSUhra9PtDGM3v6JmJwvrzHcayrPc mGZc19jnK0JSwF9F4zctHU0xWjEC0Q3JMU7QJP+v8GmYH6uwSteZ+f7CaFN1dlW2oHbx JebZMTAxUwzrlwyJ5WI/ICAAjPyECAHwOSQletH7qNpkB1dN7XeyYH9LDGbKHj38c7jh v8F2CQeIpYUa/lQO+x+PZGFeclA1gLSARFTfv6SWUY5/tGm6vVW41fyMVKbYGmyPaKsn SP9P3AQna5QfLOkxpUqc6/vilyS0IfZMT/khcS/8JQ3tXQsPgF7qe9OYf51XBEk+WbeE 0Jaw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=l0qbfckI; 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 z17-20020a637e11000000b005346c49e06fsi3947525pgc.845.2023.06.21.06.53.08; Wed, 21 Jun 2023 06:53:23 -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=l0qbfckI; 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 S232635AbjFUNgU (ORCPT + 99 others); Wed, 21 Jun 2023 09:36:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232586AbjFUNgK (ORCPT ); Wed, 21 Jun 2023 09:36:10 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C92971981; Wed, 21 Jun 2023 06:36:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z1h/bQdu0GGzyb0KUcrVMaz/6SRaYABwiTAYN6tZ9uJkwweaj0ISsR8BbMhp8OBxUrorIZzTuaDXHVU3w7AFGMnwYT3TmuzZY2Hgv3HIyBhZpqh9ISjJ/2mTn/c+fNIcEUT2K7LKwXbpXG0qCODWr0LXDZ17Brf4P1YT9n06yevai4rE20rhJDPo0OW4pxSs8sKyu/QjKj7RfgE265BFsi1wok5GhKWFgQ+7hZc1fGr89GFclxfMwwjd+9X9E7fbunGsYngpBhbGqATYHyj/7Ez5KK5xSOzxZ9S2pIGY54t7MKqAlpkyNyuU3L4SmvzX5NJYGfxzQRJRqbTZdjHeSw== 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=Ck68V/JJS3iRg8RDlJeuZd349gJHDJzOOWNr+mWRHWaG0X+njRTYwB4M264xFHXHC27ZQGVDeS5cN20EOvi0ltSIPf/IT6nhYCCJne3nO5WWtSCIkfHg/bgJI6YHB/76L3MbocSeOb5ae47mXI6AzBSHOWcmwBwXhVZZOSNAxVkXLkdAWXxt5SaOCsw2WCcaPGFGBGd5rYPIqYanK0Dv1PtlLDPhzduVUWFoFfJQtNn9Ij3LPD0teQFalFrRWJnBoasSJnrEg6FTTZHBH3ubumR1/MGahoq9Fgo/LGdGOAE38CRyNXOuUcip/xDZXt5+zDYVNN6HfrW2calR3DFUmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=l0qbfckIJgmeC+vSsEoOEOAGLi2/QIx4OrY1iLp7M3sh8DWpiLpgKvns2NgvcIh0ZKAfOMPxZ2PW2nlupRdcLrCa0U4UpEV1UHtxeVP53wWNTnhtZ8TkdLXTmJlFdK0B3gFYxu6sLsjVHVRIqQRi+mJrPw3GM3flH2bJELdXoFLjvE7dDw8ejPdXWRbQmkYKiSC87zfRMW2cEakLk/bAfVlybeC7NTUvMhPJLWo3da1i8zwzk8QzyK9vEPB5ixaVpNIuY7AOBcW3rgxThZ2J32Odl+5lk2Kd5XCoUpVKXX2OJLclr9TiMbO3N3SkpeUHOu1c745bhmO3yXA8U/CTVg== Received: from SA1P222CA0043.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:2d0::17) by SA3PR12MB8000.namprd12.prod.outlook.com (2603:10b6:806:31f::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:36:00 +0000 Received: from SA2PEPF0000150A.namprd04.prod.outlook.com (2603:10b6:806:2d0:cafe::b1) by SA1P222CA0043.outlook.office365.com (2603:10b6:806:2d0::17) 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:36:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SA2PEPF0000150A.mail.protection.outlook.com (10.167.242.42) 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:36:00 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) 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:35:44 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail204.nvidia.com (10.129.68.6) 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:35:44 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Wed, 21 Jun 2023 06:35:42 -0700 From: Sumit Gupta To: , , , , CC: , , Subject: [Patch 4/4] memory: tegra: make icc_set_bw return zero if BWMGR not supported Date: Wed, 21 Jun 2023 19:05:26 +0530 Message-ID: <20230621133526.22492-4-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230621133526.22492-1-sumitg@nvidia.com> References: <20230621133526.22492-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: SA2PEPF0000150A:EE_|SA3PR12MB8000:EE_ X-MS-Office365-Filtering-Correlation-Id: 10543ffb-133f-42e8-2ba4-08db725c73bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ut/4qrVYgaY7LhRVS+1LzxGesWPKlagiOn9LYBL950qxcyops3LhLvkP2RsnmSdoQOQd+5ofsChokfNcCy33byqOl9b1Jm3x27fjyvFYbAWwXOrbjMuC1mUeBS6ZbBX0VDQqt2xuc0GNEmiZplyGOY0uq3zKLjBP419jMwcXNsWd7WnIoUPQxxVfYqjV/OM5GI0fqNArl0grCN0ZIwhgz01NlM310P0C7iig3RC3UYjY2l/BKRVMzgy9cUJmh8vhG/3IQtTsQAmR32r/A2U5RFIXjldqQOjnD9OwDdsVzOEZMr6BqF9Qi0UMdQUew/qy2lS+gp9LQ6+ZqXA+ljVZARNLrAGUWBN1FWKuGhblupsgcdW5oxnE0mBRTe3/12RTHz5uCqCsn9R92wF3zHLAGSKrkbinlNazJFTnz7sfNBcZRj/vufYeOFOsuwFdLZgy6i7WjKBJXreRnI/+G4XcMz7Sv5QPM2Bybnia8b0XIXFd8/FoRKU+bBXRhh3dZroXzylnYMahweRT46r5fxaojoLBWrkh810tmCEntIkRObMd/+Nv/q8gD8V8RHTmRmW2BJUUdDddde0wqOrNfRj/3SXpncL44UeaQjmhWGYp1Vu2sWudk2ryyxY+0gi8dmmiwZGTwBlMnRL+Rs+1GxFm/V+Y/YDZnfL73r4WjQG3ETAXBxLz+4phdFP5WN87u2dfS0Yfe0A/ixHa8hD2xvALaopRJI5rcubpgOjlvhe1pvnlMk8u5VkzPpDzY8HUYItd X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(346002)(39860400002)(396003)(451199021)(40470700004)(36840700001)(46966006)(36860700001)(82310400005)(47076005)(478600001)(426003)(2616005)(107886003)(6666004)(54906003)(110136005)(336012)(83380400001)(7696005)(26005)(1076003)(2906002)(5660300002)(36756003)(40460700003)(70206006)(356005)(316002)(40480700001)(86362001)(70586007)(4326008)(82740400003)(8676002)(41300700001)(7636003)(8936002)(186003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2023 13:36:00.5854 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10543ffb-133f-42e8-2ba4-08db725c73bb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF0000150A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB8000 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?1769320589658893705?= X-GMAIL-MSGID: =?utf-8?q?1769320589658893705?= 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 --- 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 ||