Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2700806pxv; Sun, 11 Jul 2021 23:08:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWrXckOhIkCztQ3YFIXYSWIWKiiHGD7eKoY6Wtj75JziGUGCPSpcARPA/8XgBHlbRUJJkP X-Received: by 2002:a02:aa8b:: with SMTP id u11mr37186381jai.43.1626070125617; Sun, 11 Jul 2021 23:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626070125; cv=none; d=google.com; s=arc-20160816; b=M0OOEqqEZkjBX2rH1KGt3NvyTRE+dcCioLo4Y49srKh6cYFSfluR/oTKAfCnE6N0JY GxKOnnjWAhZaDxCXYJJ2ai6P2lfZ5KcfUd8MEL5hT1169Pv9mla+8mmFbUbEwPfIWh1V SMBDLMNlldzRz5CJaWLInSqCeUVU+u6TmuOw5f2E2mt3rC/huZ8vUt66Timwrr1tWXD6 HPdgvAm8reSPNkL5HHB43s10xZzVD25JZDPDawX93Y/n6aW8f2yFDBcVCeFqfvdQOx3T 9S211HfNFP7S6RN/0tXgnMA83xkjPQluCa2XR39YOF978TyDd5kQ4Ta7Z4CnZGVp5YQp 2Mnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=QQbTdwpHiSKGRKYlqDaIH++wFzRy31sqh5rrqS0iJ60=; b=NQpOe9SW+FmgS+TiouLR1Fx0uw8I/7TAZ22eko1gj6COPPsVIVMlY541rzxJgTJyww c0Z5HfMj5bH4zXSkoBhrr1feiHk4lWnK/YFHuVSYwWckTxGTRsalHpyiu0nwpTf8pKlX 8pKm7lJylG4BxU+54IrgOaR3e+OWX4hbIF36cGdFrAiFCs91GwTGlzAl0Zuj9gJr1GoP jbQ1XscXDfBbJdPgpMhInoaO1oVGDwLtev0VXCl785yCCXhrfAypn8jaErnDjcFDHLqi NEgY+0aO9fG93bsu34+7oEW3mbyExalJEH9tJKL/JrNsYqlEpNlRPwMrlVKVrdDTn3gH Pimg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="t0Y/ybxJ"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g3si16141206ilc.117.2021.07.11.23.08.34; Sun, 11 Jul 2021 23:08:45 -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; dkim=pass header.i=@google.com header.s=20161025 header.b="t0Y/ybxJ"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231830AbhGLGJF (ORCPT + 99 others); Mon, 12 Jul 2021 02:09:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231351AbhGLGJD (ORCPT ); Mon, 12 Jul 2021 02:09:03 -0400 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB5FAC0613DD for ; Sun, 11 Jul 2021 23:06:15 -0700 (PDT) Received: by mail-io1-xd32.google.com with SMTP id g22so21219972iom.1 for ; Sun, 11 Jul 2021 23:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QQbTdwpHiSKGRKYlqDaIH++wFzRy31sqh5rrqS0iJ60=; b=t0Y/ybxJlERi6+gcvIqxVoSHTxGvCReSlnUccJ0b1pilessjk+biRgnQ360cyUs5gF DVmXtwAxqwsWyEfnN/s9dN/8smb09/5fMY5dXaJYUSvYX0q8kAZtiSD2XXmy5PC8BXIG L+f1CAFBBKhgbXBIJhWwGV4rK9oIRHCprc+giXaWBITPhymUkEPPaTtjW9m4ICbDXRcT 5cZ6hOz0l3DqGbNT0Om0M9SQVz+hAaMDp9lzyXaN19+Fy8sTIHN3klJ8Urf+Ss35Q+Um hI1P+L5PNxTSCzSIatiGeR8jrcg7SLbNGsdVkp3Z6vN89yM9w60EI7VCKhqwk7D9520R WVzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QQbTdwpHiSKGRKYlqDaIH++wFzRy31sqh5rrqS0iJ60=; b=uKG3cxxflV7EzCf7T/hLibh5BRvNdnBVU01f45vjezEUyZSPfrF7VyhCH9/PxKhwG+ 0hFJormZuDUPIlkD1zAUqsmyzT1idLKFlSyaJmioOWhTSj2nToGmQzcCOvf0enYFQfuz 0HuYu6bm6GuqamWYKvUzVZuQfcZ7ESclPc6E+vHAGD/jzJ9LFMEKlRKbab7IOvVFaCus pVp41dEDa/Lh3EFO3Y6bh8EfI3bePG5dG6Noq+uJkBV/9VeuiiXvC1N/9sXSR8XDL11d HvdlhZyFk8OP7PEFBmdJn3Zfv4S2WrKnJXl/ly6EHcvJ7pVFt6bxIqU3TSZopD4BhTVB hrDw== X-Gm-Message-State: AOAM532SaDsOz39AnW4vgOggYkD80FJDC3aAY3l+pIGgcZrx/risg88f 0nprqc+Lu/VOrdiJnlGJSt57/KklsPgOhphAQO56Vg== X-Received: by 2002:a5d:87d0:: with SMTP id q16mr38727515ios.109.1626069973247; Sun, 11 Jul 2021 23:06:13 -0700 (PDT) MIME-Version: 1.0 References: <20210710122446.5439-1-tinghan.shen@mediatek.com> <20210710122446.5439-2-tinghan.shen@mediatek.com> In-Reply-To: <20210710122446.5439-2-tinghan.shen@mediatek.com> From: Tzung-Bi Shih Date: Mon, 12 Jul 2021 14:06:02 +0800 Message-ID: Subject: Re: [v2 2/2] remoteproc: mediatek: Support mt8195 scp To: Tinghan Shen Cc: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, robh+dt@kernel.org, matthias.bgg@gmail.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, srv_heupstream@mediatek.com, Project_Global_Chrome_Upstream_Group@mediatek.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen wrote: > @@ -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; > + } Use devm_clk_get_optional().