Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3414363rwb; Mon, 16 Jan 2023 07:43:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXvVO8Y8XdDUvYWWspXxKo9+oCAq9132xUA5lMUXQInoHgndl3v3ZjgR8ARBXzMW/9BOCsHH X-Received: by 2002:a17:90b:110a:b0:223:b920:28df with SMTP id gi10-20020a17090b110a00b00223b92028dfmr93189363pjb.29.1673883832932; Mon, 16 Jan 2023 07:43:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673883832; cv=none; d=google.com; s=arc-20160816; b=hZ8FtpJAb7tdXf0UHuLYyzIt+PbPVx1XResdR6JueUleiSoqTcD+ql/ItNJAvNTMSl /Ay7bR1QaUAh+GG/iehPoK8eHb4BHOMh7y+dvYT4hAlHtR1MX33f7swMl7Brq3yuI8DE JdGfD/e0u6KJ5UbORymX663kV64wnCQ/BAA5OCOWaIqbnvsekbilOyfvk3AOUjft8873 x6DcTS4jWhpGFF5wBwEfrL2q63gyD8If2ISYVDb0ddLlVk3tokBW9ofvxDaECv3yesFC i4vJHW+Qd/8JyxcQDT0OUZNuPybJN2qfL8mD/IuG7hmsQi/krxLpsFxgPXXB6E0/jcsi nZsw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n64-20020a632743000000b004ccf5368e1dsi4046793pgn.110.2023.01.16.07.43.46; Mon, 16 Jan 2023 07:43:52 -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 + 50 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 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 -- 2.34.1