From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6A319C433F5 for ; Mon, 25 Apr 2022 07:21:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 48C3A81D4B; Mon, 25 Apr 2022 09:21:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="Mlyyywcv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 76AEB83093; Mon, 25 Apr 2022 09:21:20 +0200 (CEST) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 6F0A681DD0 for ; Mon, 25 Apr 2022 09:21:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=narmstrong@baylibre.com Received: by mail-wm1-x336.google.com with SMTP id n126-20020a1c2784000000b0038e8af3e788so8994670wmn.1 for ; Mon, 25 Apr 2022 00:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:organization:in-reply-to:content-transfer-encoding; bh=WBISsVDMcgNvwDGc7n1t4HRZZHhQxykenp2V9mkqXDU=; b=Mlyyywcv1UbS3IWKbXJpajvVVHMytV2B28l36a0ft3jqpr6ILzC0VyZ3DnIBfof0PT 598NANH80PWWeZTkNKCqfe4138f/CYeBnWYozkzD/gR0c1LllVFl+zxRULa4Xdqny8t6 DLY59NdSGTOgT7BEbKmsMR25utgFxSmlgO+Fa0kKxZMB/+FZLxZBQwQ6Etmfn4XohyXp qLltDaYO/0QyNjaY7tAmQSg1ypzbAEcMN6/gQwpnfU2V523z6yYPPE5o3ag4KNxAPfsN tNOL0VK+46bY40amkxnMxJL4ZVKgKZ+2MUqaoptFUKtmf8O0Rv6hT2+5TEMkwNtGJA7O W8kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:organization:in-reply-to :content-transfer-encoding; bh=WBISsVDMcgNvwDGc7n1t4HRZZHhQxykenp2V9mkqXDU=; b=dEZY3ablHYlkB2tB1UmOFYWV12WWQYqIXVRX6OfUKvUAOq8dBbknxKA+oxSx4TerYA sDYKIun05GOFgS77CNT13/LN+pTjYkLaFI5SQq76Bt0rKBngqilWWgcZVwe9W7sGUJgW RXAKl5v8JwVJaQEfsgR1RLTeUNTuYLf68qhjRUNwhaW2AY2Lxy2q/4HbrPZTLnhIprQD u5hl4eT64suDiXHl2o8IeTWbu+tx8CGf67gHlrTrI04fe0L5n9rb9C04me2VoL6i/hC+ XjRS05oPQb8dioKpuzNgo+00XisJjUgIwADoeKbTotVs2d+4u74S0owwN9hGNCzbzz+d AFeQ== X-Gm-Message-State: AOAM533xNWkvQ7njuvPb4aFCxp/LxLXkplIw0NgJIK0L+Iap4g3pc/9F ElOO+Y+74AGCVn69V7JJ0isMfg== X-Google-Smtp-Source: ABdhPJwV9lCq2D79lCwfiGi4Dzs9oG+VjttkuJtkLVyWyeKReB7rvo8l5UZu6xvH59+EZuT/rXhDzA== X-Received: by 2002:a1c:f20d:0:b0:38e:ab1c:3f70 with SMTP id s13-20020a1cf20d000000b0038eab1c3f70mr24755425wmc.27.1650871276641; Mon, 25 Apr 2022 00:21:16 -0700 (PDT) Received: from ?IPV6:2001:861:44c0:66c0:c03c:5940:50fa:c716? ([2001:861:44c0:66c0:c03c:5940:50fa:c716]) by smtp.gmail.com with ESMTPSA id d18-20020a05600c34d200b0038ed14b7ac3sm7896499wmq.40.2022.04.25.00.21.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Apr 2022 00:21:15 -0700 (PDT) Message-ID: <6b9cf5c4-20b4-92b5-c934-3c7c2402db47@baylibre.com> Date: Mon, 25 Apr 2022 09:21:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v3 3/6] clk: meson: update driver for g12a-ao clocks Content-Language: en-US To: Vyacheslav Bocharov , Lukasz Majewski , Sean Anderson , u-boot@lists.denx.de, u-boot-amlogic@groups.io References: <20220424082159.757622-1-adeep@lexina.in> <20220424082159.757622-4-adeep@lexina.in> From: Neil Armstrong Organization: Baylibre In-Reply-To: <20220424082159.757622-4-adeep@lexina.in> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean On 24/04/2022 10:21, Vyacheslav Bocharov wrote: > Update g12a-ao clk driver: > - move clk->id check to .request function > - remove unnecessary check (gate->reg == 0) > > Signed-off-by: Vyacheslav Bocharov > --- > drivers/clk/meson/g12a-ao.c | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/drivers/clk/meson/g12a-ao.c b/drivers/clk/meson/g12a-ao.c > index 17b11eb52a..1a855a6896 100644 > --- a/drivers/clk/meson/g12a-ao.c > +++ b/drivers/clk/meson/g12a-ao.c > @@ -28,14 +28,8 @@ static int meson_set_gate(struct clk *clk, bool on) > struct meson_clk *priv = dev_get_priv(clk->dev); > struct meson_gate *gate; > > - if (clk->id >= ARRAY_SIZE(gates)) > - return -ENOENT; > - > gate = &gates[clk->id]; > > - if (gate->reg == 0) > - return 0; > - > regmap_update_bits(priv->map, gate->reg, > BIT(gate->bit), on ? BIT(gate->bit) : 0); > > @@ -63,9 +57,18 @@ static int meson_clk_probe(struct udevice *dev) > return 0; > } > > +static int meson_clk_request(struct clk *clk) > +{ > + if (clk->id >= ARRAY_SIZE(gates)) > + return -ENOENT; > + > + return 0; > +} > + > static struct clk_ops meson_clk_ops = { > .disable = meson_clk_disable, > .enable = meson_clk_enable, > + .request = meson_clk_request, > }; > > static const struct udevice_id meson_clk_ids[] = { Acked-by: Neil Armstrong