From patchwork Tue Apr 9 20:47:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 10892421 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB12B13B5 for ; Tue, 9 Apr 2019 20:48:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1BE0288A9 for ; Tue, 9 Apr 2019 20:48:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A560128942; Tue, 9 Apr 2019 20:48:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 55C95288A9 for ; Tue, 9 Apr 2019 20:48:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AVhtMxG1Hg7XBmCBt6QcclO1PPZmu7Nj70+OAep/kA8=; b=GtLtoB5UK8Mn5/ tNOmcE7oCReEEUr+qFKShZBZ2cybvhBsh9Muc3hPpfsrGN6rGKZNeP6VKB5Phn49M89w0+w4jF6S0 oRAWr01CreM/8RSjGJQpZy2qWLCH3RGQGr3k7/sHuOebFFF2NSujvzxQqYSGHAh7PBSKe4TYahDXN SnP8iu/IUreI4zzkpibaDAbmop32L6MVLef36jhNZ4RnoGtYh/az6eDUBiddqLbMDQiUQDH4r1cey SpDaJxftQDU0e0Q5FrF0h+7Prv1D3EsDnKfzwTC488ZBsC1fcNE6cj/JSCpo6nfHQMrq9xm6XMJm7 AnrgVxZqApeWiOWCRB4A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDxfB-0002Vk-MJ; Tue, 09 Apr 2019 20:48:13 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDxeW-0001YC-AO for linux-rockchip@lists.infradead.org; Tue, 09 Apr 2019 20:47:34 +0000 Received: by mail-pg1-x543.google.com with SMTP id y3so57925pgk.12 for ; Tue, 09 Apr 2019 13:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NZvMGT2vfAQYfdlzg+GPO1Jl5l+p2xxq8Y02i9suNv4=; b=VvmlfWfbAGZAwlcFFCzvKHbiJZNzkEPIK+l3Op/Rr2tQzR9BozgerFoRoaa3DKpaOt FlNZxz8uPX60+V+i4M+S7CuC6JNiMRL6xBGLdZo74MNyubswd4kG/99A1f534JHP+Vu/ 7StW/EFi1i2aQHzCsTj2lNOl/7iolEmwNsf2Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NZvMGT2vfAQYfdlzg+GPO1Jl5l+p2xxq8Y02i9suNv4=; b=qXzuxVdvZnGwwphtgfDpoNpfEEl4t9B6r/1HU680M1+xYf9OhMu4kVi5jVAcRToF+k 9YiHa0uAuBzSpAPpvNoQjpEiPTMkjgbDqi/1fcFXVLvZ1LQD9XgCuC2/58Hqh0vF5CSq DfFoUPSM6lmBjVj3NkzOoMFiUA9IlrqPtqJccQUd9uKSFD4LRWqFtKgpvRyWYPcleji9 +W3S0khQPgBRC5vKQx7W1Vtza8YAXyKIKYobe09D3KT7xZme5vPBYqzIhBy7R71C1Mj+ Dw60OO1tjKdQszVq493PoN7IIEwnjP5ux5z16e8sVa5m2FU8ngIVCcOn2UVxVt0B10CD kPTw== X-Gm-Message-State: APjAAAXY7+NJiMKvNmDL7+8em9dPeJ3v1BLbVMZzEaLt1c2jHbYMdyas eBS7K1J5aZ8cwCX/eyJqt5bEkA== X-Google-Smtp-Source: APXvYqybYD8fp801Ommhq+URoVUCZuUBVLC79tf/S8zjAur5ioWJhD5IFIC1+LbwIoz2ywM12DbwpQ== X-Received: by 2002:a62:1f92:: with SMTP id l18mr39635668pfj.180.1554842849784; Tue, 09 Apr 2019 13:47:29 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id x28sm35014016pgl.38.2019.04.09.13.47.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Apr 2019 13:47:29 -0700 (PDT) From: Douglas Anderson To: Heiko Stuebner Subject: [PATCH 2/3] clk: rockchip: Make rkpwm a critical clock on rk3288 Date: Tue, 9 Apr 2019 13:47:06 -0700 Message-Id: <20190409204707.150347-3-dianders@chromium.org> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog In-Reply-To: <20190409204707.150347-1-dianders@chromium.org> References: <20190409204707.150347-1-dianders@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190409_134732_359975_4121C2C6 X-CRM114-Status: GOOD ( 12.35 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Boyd , Michael Turquette , Elaine Zhang , Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, mka@chromium.org, ryandcase@chromium.org, Caesar Wang , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Most rk3288-based boards are derived from the EVB and thus use a PWM regulator for the logic rail. However, most rk3288-based boards don't specify the PWM regulator in their device tree. We'll deal with that by making it critical. NOTE: it's important to make it critical and not just IGNORE_UNUSED because all PWMs in the system share the same clock. We don't want another PWM user to turn the clock on and off and kill the logic rail. This change is in preparation for actually having the PWMs in the rk3288 device tree actually point to the proper PWM clock. Up until now they've all pointed to the clock for the old IP block and they've all worked due to the fact that rkpwm was IGNORE_UNUSED and that the clock rates for both clocks were the same. Signed-off-by: Douglas Anderson --- drivers/clk/rockchip/clk-rk3288.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c index 06287810474e..c3321eade23e 100644 --- a/drivers/clk/rockchip/clk-rk3288.c +++ b/drivers/clk/rockchip/clk-rk3288.c @@ -697,7 +697,7 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = { GATE(PCLK_TZPC, "pclk_tzpc", "pclk_cpu", 0, RK3288_CLKGATE_CON(11), 3, GFLAGS), GATE(PCLK_UART2, "pclk_uart2", "pclk_cpu", 0, RK3288_CLKGATE_CON(11), 9, GFLAGS), GATE(PCLK_EFUSE256, "pclk_efuse_256", "pclk_cpu", 0, RK3288_CLKGATE_CON(11), 10, GFLAGS), - GATE(PCLK_RKPWM, "pclk_rkpwm", "pclk_cpu", CLK_IGNORE_UNUSED, RK3288_CLKGATE_CON(11), 11, GFLAGS), + GATE(PCLK_RKPWM, "pclk_rkpwm", "pclk_cpu", 0, RK3288_CLKGATE_CON(11), 11, GFLAGS), /* ddrctrl [DDR Controller PHY clock] gates */ GATE(0, "nclk_ddrupctl0", "ddrphy", CLK_IGNORE_UNUSED, RK3288_CLKGATE_CON(11), 4, GFLAGS), @@ -837,6 +837,7 @@ static const char *const rk3288_critical_clocks[] __initconst = { "pclk_alive_niu", "pclk_pd_pmu", "pclk_pmu_niu", + "pclk_rkpwm", }; static void __iomem *rk3288_cru_base;