From patchwork Mon Jan 16 15:19:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devarsh Thakkar X-Patchwork-Id: 44228 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1250164wrn; Mon, 16 Jan 2023 07:27:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXuod/wCVi0hGZK+xLl/GP3d9Mz9lcGaPrwEcB/Ay93qTh38dFIDW6CWpLuZzjrWKFdH3whz X-Received: by 2002:a05:6402:2:b0:483:5e56:7bc5 with SMTP id d2-20020a056402000200b004835e567bc5mr67196659edu.40.1673882822960; Mon, 16 Jan 2023 07:27:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673882822; cv=none; d=google.com; s=arc-20160816; b=FrDR1/vAbAfLyptKd9litu30iCpVIKUzSeL3/Mgq3bMr8RrasB9ppZdfKRoJzKOWUJ a98CL3JhhEq4nVNz1jcBvE4gA28p6Bzd8S2LojOi/mUZobDTs0UgJy2D09jVzNGMntsE XbWjDwtpFL1lEjc93T3THAO9Dejf/vuwV46hheN8yvespsjDC1VvRRcmaJNbQ8TlilKX t9j+yWFK1lEGUbOXS8neS+5kvkybUlstWfiJdnJ+GHtJQDx53suLwgHElM4zVRYgEmmz RAInPWVkNkd6SpNx+0dBHsow1pKRIrBEF1oTiJjoCC4D0EskCSlzAelhhjnU8UWr4ume Xibg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pNVQc0hSPsZL4W0FLb/+psbHVCNOFe7OY57lkawxHjU=; b=Jtv7PXzYQnX4cpzLiBTCKGdX44BHZNhRF8t8Zly/L5qICbMFBA8DtbrK34yfz5n8wo 7rLjjSn5e7gbYAxdPsB0Lsdj5pTnOT4m/HtfeY7Bem7buL8GRvk0gIyYbqGVqYmh3fkG 4K/EBzvAnDFDoXM5tSXhbEbuixq4uPoh7EMkq/02FCk+HgRiAtFY3craBsoBgXQGhZZx vd9GfubS8CuF3z+7h3+RzwhLVPXc8O1RHhmlQy8xOIJ1NjMZ33fMqWqAz+RAiXE60i8T s86QJ+czgSs/x0sGctKvCpDE/vbcGzKnYgLR7apnZmb1Um5x+3fYMWrTfHkIGoXVBqJ7 5lpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kKQVO+C8; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bf16-20020a0564021a5000b0047b79b99e58si27579213edb.446.2023.01.16.07.26.39; Mon, 16 Jan 2023 07:27:02 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b=kKQVO+C8; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231397AbjAPPWp (ORCPT + 99 others); Mon, 16 Jan 2023 10:22:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231977AbjAPPVt (ORCPT ); Mon, 16 Jan 2023 10:21:49 -0500 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE2391D93D; Mon, 16 Jan 2023 07:19:22 -0800 (PST) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30GFJ9qV009701; Mon, 16 Jan 2023 09:19:09 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1673882349; bh=pNVQc0hSPsZL4W0FLb/+psbHVCNOFe7OY57lkawxHjU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=kKQVO+C8vUuz86Cb4cvqK+UVkY3bNEGJFzinJKpykhlRWEnurg24JnoWMJ70E0b+g 58M41KuGkV6VV1PqfgPhrNO1zhqEtF6acUZNUFDMJw453MbKBlzHpTtGNyuTT57IUn ylab1DD+jGJ18QxkEdYmwplgeTEm9DQmaVuOkLAg= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30GFJ9D0039170 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 16 Jan 2023 09:19:09 -0600 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 16 Jan 2023 09:19:09 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 16 Jan 2023 09:19:09 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30GFJ8Ri128205; Mon, 16 Jan 2023 09:19:09 -0600 From: Devarsh Thakkar To: , , , , , , , , CC: , , , , , , Subject: [PATCH v6 1/3] remoteproc: k3-r5: Simplify single core config set Date: Mon, 16 Jan 2023 20:49:04 +0530 Message-ID: <20230116151906.549384-2-devarsht@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230116151906.549384-1-devarsht@ti.com> References: <20230116151906.549384-1-devarsht@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham 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?1755193354687789926?= X-GMAIL-MSGID: =?utf-8?q?1755193354687789926?= The config PROC_BOOT_CFG_FLAG_R5_SINGLE_CORE is set only when cluster mode is set to CLUSTER_MODE_SINGLECPU and cluster mode is already configured before setting this config. So directly check for cluster mode instead of checking soc_data->single_cpu_mode first and then checking cluster mode. Signed-off-by: Devarsh Thakkar --- V6: No change --- drivers/remoteproc/ti_k3_r5_remoteproc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c index 0481926c6975..036c9dc217f3 100644 --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c @@ -875,15 +875,14 @@ static int k3_r5_rproc_configure(struct k3_r5_rproc *kproc) boot_vec = 0x0; if (core == core0) { clr_cfg = PROC_BOOT_CFG_FLAG_R5_TEINIT; - if (cluster->soc_data->single_cpu_mode) { - /* - * Single-CPU configuration bit can only be configured - * on Core0 and system firmware will NACK any requests - * with the bit configured, so program it only on - * permitted cores - */ - if (cluster->mode == CLUSTER_MODE_SINGLECPU) - set_cfg = PROC_BOOT_CFG_FLAG_R5_SINGLE_CORE; + /* + * Single-CPU configuration bit can only be configured + * on Core0 and system firmware will NACK any requests + * with the bit configured, so program it only on + * permitted cores + */ + if (cluster->mode == CLUSTER_MODE_SINGLECPU) { + set_cfg = PROC_BOOT_CFG_FLAG_R5_SINGLE_CORE; } else { /* * LockStep configuration bit is Read-only on Split-mode