From patchwork Sun Jun 5 16:57:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2006 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 22FC23F0FB for ; Sun, 5 Jun 2022 18:57:13 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id x8-20020a056402414800b0042d8498f50asf8949839eda.23 for ; Sun, 05 Jun 2022 09:57:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654448233; cv=pass; d=google.com; s=arc-20160816; b=0RjzIqX18H1lwAqUy0yFNkpTED+OuJ9AUAj8Q1diJyTH7uwV43tNgACQhA/n7eohY7 HKUu9dkBzXf+hxCoJeuX7Uo/rQdoDrJBQCQH/88cqpLzOeBMUNrslwgFv3KFP8FZePba PDjutvqdDW4ewM0AHG7fzmiXNNI6y8zVrcjaIRPATj08BFjeIpf2Snkyfe7cwQPEBF9A 5bh+Al5gDAYQ+PwM7EkjpLhoZvAWEx2RHZvkn/1ugAkkF4CL4AO7/a3Zk0g6x3POTE0A 5V1UZBR3WKGvyVZUdQGiT2wUcBMguqcaKdNLbgqCVjapbKUbvuiPkaZ/u0j1uRjbrkRZ MoFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=5KwE2LgoEN9ef2ZBZ4saewvtRAUpg1ZASxZ8LdpDc28=; b=Ux8RhHFvYm7ZKZZzF+UolUfoHUjB0XKxisnKoaZRGi965m6eLwqgGVtnyY8P4+IBwI coo+BWuYWVBtLLz2b6JoqegiZqhd9u9QPUxnmsUv6bZXHbTALnSMJxOEkEL/mutu7KJU ayxDBbfg9pHSz0+4DIEEf1RSvUH1aotcnUSFLgnRuh/5Mf7JPaeKqe+HOPhnCi+mn8eS Ilh3ZGgYlw76wPItyyWqUGj4x01S2axoR9VWtZULdrai1gnF9M30IglWqYBQiiTgplqz F7ihHfJkM0InN4OYTh787KykMzyA2uyPre3QQBzHIJnSzQRhmothyoaMm2rzjCgrgMPm J3KQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VIbhzFl/"; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=5KwE2LgoEN9ef2ZBZ4saewvtRAUpg1ZASxZ8LdpDc28=; b=bvwVwaCUk7xnWMHIvtTBf0SSKlbXmpBgkM5wVMbr9x7kk+2F1jVW8ndSGWJkVu5xtF dKg+NQ4tH6P/Dyc/8x6QOlkEYW1uwaonnPchUKbseGYcxsXLwd3biIc+5pmNDZAugQYm YXIvpRXVrlde4puPSLpiBVWhPHQ6AqHNFWJRA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=5KwE2LgoEN9ef2ZBZ4saewvtRAUpg1ZASxZ8LdpDc28=; b=ZHS7W/CTgErdM9jIB9GpbJlYmBX5lBoz4Vc/IkLGNKPe6oCFWAEyvxQjouVbLrsgq8 OpYaD6+hMlkapJh+cXghuzTcAz8TzEA8nKXOigJhRh5TPrT7gVcR7AYJg8g+VCz2Kqe3 AROlHuRy5cgEwElSyPevBR4FAoqvattLuHUX81ez70DyCmEy9P5dDO+2XX7U8jKep7fk 0MsTSKzuWk7i0z2bRCePdsqoCPSPpuUTdMI5/I6JxBseRgGmd5OgqnwuUEbXNhCHIzCU u9DWQ5fXvw0JGZyZITE/tJklKTRDlRGBS/81fknVzk5zGjGqhXX5FGZSuUK/OHGC9QXb Kmsw== X-Gm-Message-State: AOAM531zeJuaIcPz0IlPbvIFCjrYHIHhIhjcUzVb14G7j/HKIVXGFKKU ol/XmZZaSrm/M1MOizx9xQN0FvYe X-Google-Smtp-Source: ABdhPJxf3ZxEraF1JEWjd1Y27W5Wd6hTQFBw7axQaXRGF/kun2x7vVfbHrG7swV9fo21MTsp0agBww== X-Received: by 2002:a17:906:9b86:b0:6f8:24e7:af7d with SMTP id dd6-20020a1709069b8600b006f824e7af7dmr18468983ejc.295.1654448232907; Sun, 05 Jun 2022 09:57:12 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:294a:b0:42b:31b9:2087 with SMTP id ed10-20020a056402294a00b0042b31b92087ls25883edb.2.gmail; Sun, 05 Jun 2022 09:57:11 -0700 (PDT) X-Received: by 2002:a05:6402:cab:b0:42d:c842:8369 with SMTP id cn11-20020a0564020cab00b0042dc8428369mr22036121edb.181.1654448231607; Sun, 05 Jun 2022 09:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654448231; cv=none; d=google.com; s=arc-20160816; b=awemJhTXhd76esI3EQoNoHJ+rupTuc0jnKdfaVv2YIypywvI4oc1NJVANpIVTVj7vi a0NG7LWXHpJqc4OMVWXbVPcc3778SA+N0+UY8faMfwAEK80zIUbKmvswj8t9YpBWWVwL 7qcfKtUAcgabayA6oXBQkw/CqWH3aU95FtFaC2bhela3mGWmDIkdaU5dIGQ4DjeqUEmf ELmj8bdXeKNQAQv61DqlnP81EF8W1izeT59POVdKKaU30AoSUUpKIPENkXXriJD8oBCL 5TXUIxtHjbu6rcJi33PG8vIVZ9ovruS/+U+adTSfoU74tz+gVKjUZfxjyIpE9lFuJUdq /LIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=uqI55ErVc07HSIivOX7AXS9kfYIm1rBhZwSqgaXUh40=; b=D+5wRrTb2q1QI6rP4LSKMliFIpUVsS4uMssI5MMgyaCziNJUwolfalUxnmnEv1xr21 YPZHJ5V8vLTjeinR0vQQ2s1Cj4j0Npc97SCnQqgeW/29ev5lt8tCDuJy4Kexjx75+9wu PK8MC9FdYFmt2yHeCHBmG7HHMNf4tr5ZrBHNW1KpZrLdTlwKlin9L9uJB7/FVWwrxsXs bfmT7cxIIz+BMBHSQGvTCNPPpcWG4TWmrpWxeGoqjzZMqAH5cV5/ftZnXXYxUmrrdhHh Pmc+CIz+p4v5rzVUOFyzFYci0ICl5B9XR5LGo3mZ18c3AEyoRS4Nwx3BzQG1xHiRTN9Q dZbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VIbhzFl/"; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id kl9-20020a170907994900b006feb8232c82sor5618482ejc.126.2022.06.05.09.57.11 for (Google Transport Security); Sun, 05 Jun 2022 09:57:11 -0700 (PDT) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:906:1492:b0:70e:294c:c37e with SMTP id x18-20020a170906149200b0070e294cc37emr12007185ejc.574.1654448231288; Sun, 05 Jun 2022 09:57:11 -0700 (PDT) Received: from localhost.localdomain (mob-83-225-9-201.net.vodafone.it. [83.225.9.201]) by smtp.gmail.com with ESMTPSA id b12-20020a170906660c00b0070e3f58ed5csm3260761ejp.48.2022.06.05.09.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 09:57:10 -0700 (PDT) From: Michael Trimarchi To: Matti Vaittinen , Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org (open list:COMMON CLK FRAMEWORK), linux-kernel@vger.kernel.org (open list) Cc: Dario Binacchi , linux-amarula@amarulasolutions.com, linux-clk@vger.kernel.org (open list:COMMON CLK FRAMEWORK), linux-kernel@vger.kernel.org (open list) Subject: [RFC PATCH 2/3] clk: bd718x7: Enable the possibility to mark the clock as critical Date: Sun, 5 Jun 2022 18:57:02 +0200 Message-Id: <20220605165703.1565234-3-michael@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220605165703.1565234-1-michael@amarulasolutions.com> References: <20220605165703.1565234-1-michael@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VIbhzFl/"; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , If the clock is used to generate the osc_32k, we need to mark as critical. clock-critical has no binding description at the moment but it's defined in linux kernel bd71847: pmic@4b { ... rohm,reset-snvs-powered; #clock-cells = <0>; clock-critical = <1>; clocks = <&osc_32k 0>; clock-output-names = "clk-32k-out"; ... } Signed-off-by: Michael Trimarchi --- drivers/clk/clk-bd718x7.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/clk-bd718x7.c b/drivers/clk/clk-bd718x7.c index 04cc0beb67df..5088379ec2b7 100644 --- a/drivers/clk/clk-bd718x7.c +++ b/drivers/clk/clk-bd718x7.c @@ -83,6 +83,7 @@ static int bd71837_clk_probe(struct platform_device *pdev) const char *parent_clk; struct device *dev = &pdev->dev; struct device *parent = pdev->dev.parent; + unsigned long flags; struct clk_init_data init = { .name = "bd718xx-32k-out", .ops = &bd71837_clk_ops, @@ -100,6 +101,9 @@ static int bd71837_clk_probe(struct platform_device *pdev) parent_clk = of_clk_get_parent_name(parent->of_node, 0); + of_clk_detect_critical(dev->of_node, 0, &flags); + init.flags = flags; + init.parent_names = &parent_clk; if (!parent_clk) { dev_err(dev, "No parent clk found\n");