From patchwork Thu Apr 30 07:04:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1135 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id ED0673F0D3 for ; Thu, 30 Apr 2020 09:04:40 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id j21sf4580654pgh.12 for ; Thu, 30 Apr 2020 00:04:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1588230279; cv=pass; d=google.com; s=arc-20160816; b=eGgl+h9CfWX5Aa4f+Y01yeeYY99VpoUL1EueUHXri3tJftib5HJsdYDSNG4CeIbm4Q N2ComXymqV/dwsrSRq/wAi8X/QDu4VUTalS+mmmxPQAgddGGi3b0xVdU759JhXFD1qFq I8HIAuHxgvW+koDNxvPdq5ISEOsELP8bqRPslT5BV/w8/Pb/kYdYOgRmNvHiVxC/qQp6 /WKYoB8iyuJjIPa/hCTt2QOwuZl/fJdiavfwyiS5MEzDiN+V1BvCLe9EmFrkj7/AxERv gsPOzVU3xHQRuLDwKH0VUId8SDErNxh5bd5XdDOsBHuv8yxY6XhXmCV+NMShKxvIfZSc v0/g== 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:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=f744WqrZmsevPButyARFnzh2/MLaFjRIuLcu+e/E6gs=; b=Q5T+7gNw2MTopaFyWP2geccVKBmbsd7V1hAwiXMiHDJ7uP1fGoxds5umzgUXHdUzVg opY8G6BGhaO8C7kI+B+2Xifr9OsTx/MvDgYLvAQIhrNvkTjL7EhrtooRX0E4aQkAy74+ XOkD7tuLyZsF+4lx9CboI2qIsfhHUwi5GTueb609LLIiLcT9TJwGj1BKBJpEfiDGpQxT hqa3eYuzc512wkUHiIjCSWcRaRQuGPqUtdDqVOKZ+oiILvbDAK9z35TvzomI9yEcPA04 a2b1FJHwdico3bdpYZOfdKXZxytZxfNLHNIHza5GRtbFxhl+fNJeX79yu7boideWIahH OtfA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dOK6+5Ac; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=f744WqrZmsevPButyARFnzh2/MLaFjRIuLcu+e/E6gs=; b=DUNVxdiwryoUkMfmJk+xUzteNIwo+HypzNPrKP4aDcIaE0QTGAG8WhzWfZ/V+hw7qM YekRKmpFUAP0GfT7PouYsyr/2+pit1o6fepkjHFmwRX3XBjXWnleKRivlGCmmXTDPzPE 4DOHExSnXSrRT/2XcLBgkeB/rtSpaTHRAZIFk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references: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=f744WqrZmsevPButyARFnzh2/MLaFjRIuLcu+e/E6gs=; b=RLqxgWR4s0EAxDlm6besBVrj6jO9MqePizvUeNYVEcBQlHKXUu3+pDnqMrY7V/VVsN 6JFmUEUPahwVbXyexbvAAJbv/SayYJoObA0KOdQBBO1eq2iBG6BciZ5vjU0f9c9eyAbE xwC/30oa5r9ZHqS6uPD061sTiCEx1Ivob9EWRS1N8fr/R6WHRCEDOaC1z1RspbZppcyJ 68ZfObuSMCBl6VUZOhfvB9KXwl8juW9MtIAyi6nBgIo/4WSsMd/lpFs7wJ1FgCCxyBS9 XQcShRCmHf8c3gaxmCgjItNHzAjA2rzDmPi1E9LHkhZbw4LoafKisRwIXwAsOdK2RlDT dp5A== X-Gm-Message-State: AGi0PuYv2XZGT2Kpr43EFDl/QCC5mi2LUjabh4EjVRJ78ZGhICU1fmjd Y/8BTfhrJ8A7R0PJ+iAaFhh5Mwqj X-Google-Smtp-Source: APiQypJTEQ7uBa6Qtk1Jij5z081zdFPo+krZnreYosEWl0oBdF8j8nwi/fFTfy6No6yjo9jbAvsPKQ== X-Received: by 2002:a17:90a:1da6:: with SMTP id v35mr1440748pjv.44.1588230279561; Thu, 30 Apr 2020 00:04:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:ff0f:: with SMTP id k15ls2443194pgi.3.gmail; Thu, 30 Apr 2020 00:04:39 -0700 (PDT) X-Received: by 2002:a63:ac43:: with SMTP id z3mr1889508pgn.324.1588230279064; Thu, 30 Apr 2020 00:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588230279; cv=none; d=google.com; s=arc-20160816; b=P8wBmmQsKOdFsndiHnkfR30YW4/JJKom0FqD5J3DM5EMHnNiJjDVnP1gXUvhoKjcI7 re/+RW66RwBq7fbkpVrruKAWyYTPCrJNYwCOD+RToONic8B6CydIuK+HeUJTlijanUsR X33SX8mNsr/6fKiQCnrXFiN/L/exnH7clZojjPBwg8Qc0C5YFlZ/n9P2OSzPNbM22Grj Fli5wwXiynEZJwHc/wQfs4VUM3IF4T5yQS4ZV6XEe65QmicXIU1UxlvRFwl8AkXAIpaN bO2i1vkf5/aOulzmOUMqcvW0ZkQoeCl/jaH3EphF/cBA/JATljLDYY10nWljxzTy5575 NyHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GPV3Zk54Uc5uKzvhitTdYhJEIJtNWZE8p1htkX1ToAY=; b=gtZ2Lb6GmG6RzWQrhXsU/cohCAUomN7o3leOlVMzAnffWaye9TGM96KEuUO9abJPv3 tkToKVs9YbBCBsG1bxPLJ3xtxZceEhS2lrIQOA2cbEUejciCt6ZugCdyZLEGdgpJpDSX ewJHc8IhNZKKfTxqVEpeHlVephHYjjUTgAZfBZ8Q9FwMBhQiT38UjtLr7p3DWrvwAngV jTb3P9ggJJb5LrKeL3OiefKXn2LJL0ujHLP2IdalfefTu292vnQviklIB2qoN2pqReDG t5lYd0/7+RdANF1JzmDwHTLTR8BykMOE4yoOXLWOvc6zDxJrQG3O8GdC9ugwJm0RrCAg SPzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dOK6+5Ac; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id t12sor961595pje.16.2020.04.30.00.04.39 for (Google Transport Security); Thu, 30 Apr 2020 00:04:39 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:90a:cb86:: with SMTP id a6mr1306326pju.127.1588230278676; Thu, 30 Apr 2020 00:04:38 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:6514:3619:d1af:85f6]) by smtp.gmail.com with ESMTPSA id p64sm964143pjp.7.2020.04.30.00.04.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 00:04:37 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich Cc: patrick@blueri.se, sunil@amarulasolutions.com, u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 4/8] clk: rk3399: Enable/Disable the PCIEPHY clk Date: Thu, 30 Apr 2020 12:34:08 +0530 Message-Id: <20200430070412.12499-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200430070412.12499-1-jagan@amarulasolutions.com> References: <20200430070412.12499-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dOK6+5Ac; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , Enable/Disable the PCIEPHY clk for rk3399. CLK is clear in both enable and disable functionality. Signed-off-by: Jagan Teki --- Changes for v2: - clear the clk in enable drivers/clk/rockchip/clk_rk3399.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index df70e9fa88..7feba92f9e 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -1136,6 +1136,9 @@ static int rk3399_clk_enable(struct clk *clk) case HCLK_HOST1_ARB: rk_clrreg(&priv->cru->clksel_con[20], BIT(8)); break; + case SCLK_PCIEPHY_REF: + rk_clrreg(&priv->cru->clksel_con[18], BIT(10)); + break; default: debug("%s: unsupported clk %ld\n", __func__, clk->id); return -ENOENT; @@ -1209,6 +1212,9 @@ static int rk3399_clk_disable(struct clk *clk) case HCLK_HOST1_ARB: rk_setreg(&priv->cru->clksel_con[20], BIT(8)); break; + case SCLK_PCIEPHY_REF: + rk_clrreg(&priv->cru->clksel_con[18], BIT(10)); + break; default: debug("%s: unsupported clk %ld\n", __func__, clk->id); return -ENOENT;