Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1472252pxv; Sat, 10 Jul 2021 05:26:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn+rzqo7PEr3a+yqjT8cfE89Hw+SmzzLRXOALrnq6YTTQMP7cbjdOLNRKMk5rUiJ1gQ3Jd X-Received: by 2002:aa7:c04e:: with SMTP id k14mr52194023edo.157.1625919995289; Sat, 10 Jul 2021 05:26:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625919995; cv=none; d=google.com; s=arc-20160816; b=BNC3x8/YkCZE/d4Lqs/oNBJwuUsXDETErVbeFPNuGMEsoP9Mo9W6zhlbsGTArhinFj DPYVNU/q2MYouzuqXitPeXi4nw3BfG+GBEKa+mudcN9HDmnHBSMYaEw8/2303wXPtnjJ UleQwlFWHOEwqYk6BTO0nKXOF5NDPf8anHt5rLv/JuRjFaAbz9YhSIBC4pvtOA3AFa93 DFxuFQ6ms9rw7gv1UBbYqVd03m1aV7s0dshmcqmpY/USNvz/va5mb/qxzft8dl8rDlaY r6A2/2pcVPbpVk7ALbKGCVNJP10SygB9McZM31H5OohE//ik7ffJeH9jehXbzxDMMqJF dXrg== ARC-Message-Signature: i=1; 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; bh=3kb06Ngcn8/xWz87Fh8EJjaKwR2jZ7O4k0f+taj/fOI=; b=Gh7kWeWOIBKghSufDWRxY4FbLk83BP7kx2m2X3Mc/k4yjKwvyxtV9QcBW3yGBjpWWX pk8xtuHfvKYkhHZ1qfryYvNYS62Pz2t1hKqN2EKmI5ZxUYuOO7i9bE7ELF6KXxfZhS8d 2nxlWbczbX1y0EDYVEyHQGVbro1wfoM/Ei9q1WT5lNLJ+IFeF79OZ8X43t+mKkvMZ9Gb kEpyc5+fGDpOLemm+GcJ0yUEgLSTevcLQJVen3FK3Nn86HGnN985PxNV6auajU0rLKVQ 7KFVmWV+KaqT9DUwAkXeMmIHSIDtDXKQIkDcItaIrx7NDlFk+CVP8SBrswCEpkear1Ok kctg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si10744531ejl.363.2021.07.10.05.26.10; Sat, 10 Jul 2021 05:26:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232706AbhGJM1v (ORCPT + 99 others); Sat, 10 Jul 2021 08:27:51 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:54854 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231184AbhGJM1u (ORCPT ); Sat, 10 Jul 2021 08:27:50 -0400 X-UUID: da9ffb9d678d4c28821839813c26c690-20210710 X-UUID: da9ffb9d678d4c28821839813c26c690-20210710 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 887776417; Sat, 10 Jul 2021 20:25:03 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 10 Jul 2021 20:25:01 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 10 Jul 2021 20:25:01 +0800 From: Tinghan Shen To: , , , , CC: , , , , , , , , Tinghan Shen Subject: [v2 2/2] remoteproc: mediatek: Support mt8195 scp Date: Sat, 10 Jul 2021 20:24:46 +0800 Message-ID: <20210710122446.5439-2-tinghan.shen@mediatek.com> X-Mailer: git-send-email 2.15.GIT In-Reply-To: <20210710122446.5439-1-tinghan.shen@mediatek.com> References: <20210710122446.5439-1-tinghan.shen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The SCP clock design is changed on mt8195 that doesn't need to control SCP clock on kernel side. Signed-off-by: Tinghan Shen --- drivers/remoteproc/mtk_scp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index 9679cc26895e..c31af75f947a 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -785,11 +785,13 @@ static int scp_probe(struct platform_device *pdev) if (ret) goto destroy_mutex; - scp->clk = devm_clk_get(dev, "main"); - if (IS_ERR(scp->clk)) { - dev_err(dev, "Failed to get clock\n"); - ret = PTR_ERR(scp->clk); - goto release_dev_mem; + if (of_get_property(np, "clocks", NULL)) { + scp->clk = devm_clk_get(dev, "main"); + if (IS_ERR(scp->clk)) { + dev_err(dev, "Failed to get clock\n"); + ret = PTR_ERR(scp->clk); + goto release_dev_mem; + } } /* register SCP initialization IPI */ @@ -877,6 +879,7 @@ static const struct mtk_scp_of_data mt8192_of_data = { static const struct of_device_id mtk_scp_of_match[] = { { .compatible = "mediatek,mt8183-scp", .data = &mt8183_of_data }, { .compatible = "mediatek,mt8192-scp", .data = &mt8192_of_data }, + { .compatible = "mediatek,mt8195-scp", .data = &mt8192_of_data }, {}, }; MODULE_DEVICE_TABLE(of, mtk_scp_of_match); -- 2.18.0