Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C8C1C433EF for ; Fri, 29 Oct 2021 00:57:54 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3ED3461051 for ; Fri, 29 Oct 2021 00:57:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3ED3461051 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8184D83564; Fri, 29 Oct 2021 02:57:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CLVksYy0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 202F38358C; Fri, 29 Oct 2021 02:57:48 +0200 (CEST) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8A27183564 for ; Fri, 29 Oct 2021 02:57:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x735.google.com with SMTP id x123so7738710qke.7 for ; Thu, 28 Oct 2021 17:57:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2lZahbVmhJdBqp1rmX83iHYQPrLAIP0Q5iIGOc9pk7M=; b=CLVksYy0fb85V32X2UMhLpL2AasF04Cgd2FFifn9kkjQRbu5XxuQzOrLkKaNLB1uvq bK5JftL60Ybe8AieWFnGF4Y9uJko8vhW2I/rV3k7lz8S4a49EW86LXTjh2QbQ+tTvvJ9 E2Z1fbpXS8p0/Ak1CuQqiHZO0in4w3KCM8OwlDrGXryVTvkbklQPo0NwZQe2N3DdPCZd 1PkUxKVIFbD2AzQh4QKVoUp/6b6B2DfaL+a6NsP8ASoujYKiXQ7FQKe8cBoeV0TtV52v HOy/ecWVsSnpiXyh3d4iRJUfAqYBka7hISyxJpBZWNnDz03ktOCyY3YMP7dbj+jBN/Sa UJ4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2lZahbVmhJdBqp1rmX83iHYQPrLAIP0Q5iIGOc9pk7M=; b=eeZeOzsEXGceqMMiFXdJwAivv60enT8CdDqJVC3+gtv8t+nonbYQWqk0gOAYYLKrV3 XsYX6ikSM0i4yTr05ZnMph+RN2Xd2+hYHB7fh/01I4bERSpt560V0F600o+yS6feLkuE NZ3fjSPov37FxBcHWE4l7PEcI7FqBQL2Kh04saxwPLrp0iGv05DZ3VVAkw+qkC/72x8D bGTAz+s+IPyxfFOCx04QvSoPkrkQs+n9hdAdnu7bdauAK/kYs/L78RNgoV9p0a2ka5ES OwUCH+g9GbeTWz8rJFpPKse+412v65G8dot2HuZnNUrKokKbc8OrAqfzQZkKI0NlZEI0 geFg== X-Gm-Message-State: AOAM533rrxeZwN7M79MUBWG7T0GxDDrTYojV9w9bFgDeCHAOoFUh82FA TZ8SKDm23veTb1e/uPEL3+o= X-Google-Smtp-Source: ABdhPJwzxC0hrxf7S9z2DqTvsn37eE8BplnE/MsEw0jzYWQ9zcJwYsYD0S26K6ojkrmHgX/o86fsHg== X-Received: by 2002:a37:4553:: with SMTP id s80mr6484850qka.489.1635469061083; Thu, 28 Oct 2021 17:57:41 -0700 (PDT) Received: from [192.168.1.201] (pool-108-45-127-224.washdc.fios.verizon.net. [108.45.127.224]) by smtp.googlemail.com with ESMTPSA id z19sm2962539qts.96.2021.10.28.17.57.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Oct 2021 17:57:40 -0700 (PDT) Subject: Re: [PATCH V2] clk: introduce u-boot,ignore-clk-defaults To: "Peng Fan (OSS)" , lukma@denx.de, sjg@chromium.org, trini@konsulko.com Cc: u-boot@lists.denx.de, Peng Fan References: <20211029012801.15193-1-peng.fan@oss.nxp.com> From: Sean Anderson Message-ID: <8996055a-70c3-ba11-5cce-f3dfd64f4963@gmail.com> Date: Thu, 28 Oct 2021 20:57:40 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20211029012801.15193-1-peng.fan@oss.nxp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 10/28/21 9:28 PM, Peng Fan (OSS) wrote: > From: Peng Fan > > Current code has a force clk_set_defaults in multiple stages, > U-Boot reuse the same device tree and Linux Kernel device tree, > but we not register all the clks as Linux Kernel, so clk_set_defaults > will fail and cause the clk provider registeration fail. > > So introduce a new property to ignore the default settings which could > be used by any node that wanna ignore default settings. > > Reviewed-by: Simon Glass > Signed-off-by: Peng Fan > --- > > V2: > Add R-b tag > Tom, Simon > After a thought, I think still put it as a u-boot thing. assigned-clock-x is > actually Linux specific, however I could not add the new property to Linux, > because we are supporting SystemReady-IR, we need the assigned-clock-x property > in linux working and ignore it in U-Boot. > > doc/device-tree-bindings/device.txt | 3 +++ > drivers/clk/clk-uclass.c | 3 +++ > 2 files changed, 6 insertions(+) > > diff --git a/doc/device-tree-bindings/device.txt b/doc/device-tree-bindings/device.txt > index 73ce2a3b5b..fe34ced268 100644 > --- a/doc/device-tree-bindings/device.txt > +++ b/doc/device-tree-bindings/device.txt > @@ -28,6 +28,9 @@ the acpi,compatible property. > Linux will only load the driver if the device can be detected (e.g. on I2C > bus). Note that this is an out-of-tree Linux feature. > > +Common device bindings that could be shared listed below: > + - u-boot,ignore-clk-defaults : ignore the assigned-clock-parents > + and assigned-clock-rates for a device that has the property. > > Example > ------- > diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c > index 493018b33e..6bf3179e7b 100644 > --- a/drivers/clk/clk-uclass.c > +++ b/drivers/clk/clk-uclass.c > @@ -376,6 +376,9 @@ int clk_set_defaults(struct udevice *dev, enum clk_defaults_stage stage) > if (!dev_has_ofnode(dev)) > return 0; > > + if (ofnode_get_property(dev_ofnode(dev), "u-boot,ignore-clk-defaults", NULL)) > + return 0; > + > /* > * To avoid setting defaults twice, don't set them before relocation. > * However, still set them for SPL. And still set them if explicitly > Reviewed-by: Sean Anderson