From patchwork Wed Jun 5 23:57:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leonidas P. Papadakos" X-Patchwork-Id: 10978131 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 544D81398 for ; Wed, 5 Jun 2019 23:57:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44A92212BE for ; Wed, 5 Jun 2019 23:57:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38B5C286DB; Wed, 5 Jun 2019 23:57:44 +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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham 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 D1920212BE for ; Wed, 5 Jun 2019 23:57:43 +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: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:In-Reply-To:References: List-Owner; bh=TTqWTZPl2CTCiu3VqHG7FfDdT8NnZ1qYqm0Znyw5YWg=; b=VkeOprJOqHd5E9 VWWNUxcjasNgoKwOHGmh8B9mTMyrMJUUCo3KE1bgPcG8/We4grEHmh6vBBy4eK/BSVtdGuzcfH6iG nD8wx5n/RXXxXz0LWXXlkIdDY4xs4W/SGOIMXHk+jAY/cz497YH+YjSqCVGz8nXYVrJ7vJ0sqAACl gvp9RX4V261RJHMxSO38w0Lk71UYoZorWd0ol1yYU1jBMeqgFOhiXRSdF6c9vEsQhX++s9JKWu5FL SQrJZ5l/SlUa+qnJnJhYq2bS977xbDa1MqiVeZ8X2M+iFmjJNNygelnJtxfGtmEwqDQodfECLGwnE C7zjjsn53XbgE29ryx9Q==; 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 1hYfmk-0008Gz-Cg; Wed, 05 Jun 2019 23:57:38 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYfmc-0008Am-SY; Wed, 05 Jun 2019 23:57:32 +0000 Received: by mail-wm1-x341.google.com with SMTP id w9so647585wmd.1; Wed, 05 Jun 2019 16:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CoEKt3CyAM8pXZNIOFLtJ4NXiqc8XDf8/zgh2kIleYE=; b=ttD0EcZdokG+eHCPuoKzaxTh1/e9jppmuGOG9Bx7wn2M+XZ/MzL4+73QYIgcSOlF98 Wwrmkd9J3VNehRzye7Kbqk7O1XJUqKO8zNxx0yoHZ3cKwl1IIKYgREu5zmc5APYT/6h/ Ke5faRmuunUoqwM3bk52rYrH3bm/MytLpIew8Nk2h0oVNleTVbzqPn2XiOWRd55CYBvM +1iHfw1DAvWlcOSjBB+nHK0QvHrvPzX/N2U/jb7iyiZQwQbtRui/tPOEOjs+sLyg60rC j9orX4xyMYpUC2jKnVN++F8VXkZuu11O797s1ZyL53s0lhpvJdpBF0h7CbFEQGxO2+DS s3lQ== 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:mime-version :content-transfer-encoding; bh=CoEKt3CyAM8pXZNIOFLtJ4NXiqc8XDf8/zgh2kIleYE=; b=kcX9wK/ZznZQcwxSTgWe96oqkfCmhuDlH9LfJA9ZCjROfN4rIBN/h8W0I4wYRA/DDc H87z6hAC0ejtbXqAK8gTuawV6BzjdmhF/djX0s3ILc5tgkPj1zUpiMTKuMDC13pry+6e qcypjHMBKbgd/MUZOKPxR3oELNDgpVNumd0coUDlZ3h472kRIdt+RI0p9TUYWq9QBSk9 UHqOLRei7efUXtWJFTVQBX97mq8nKzIC0igVjluJmrVipq5C52FyJTBsOrefPStSrIn7 qjKfw/c5q5ZIvRIq07dPMVHkiswQceaSLetbsa1HB8hvAoxVFmICx0whqg0godaVsaaN YlZw== X-Gm-Message-State: APjAAAV1Kw6AE0MK1/nn3xt00xop9iKRIMyHW0sgR3Ef3cMWuBraHF19 r6Ec4ZwS5yXdxBWu9ZftXcM= X-Google-Smtp-Source: APXvYqwNXvyVrYJ/+XP8N6e1Hk1Le0wEopGarZqZ89V6cCoDAPq+dq0qX6FmIYJZdMYXIYqWTGNRIA== X-Received: by 2002:a1c:f70f:: with SMTP id v15mr23841079wmh.102.1559779048577; Wed, 05 Jun 2019 16:57:28 -0700 (PDT) Received: from X555LD.home ([2a02:85f:1501:7500:4991:f471:d726:d8ee]) by smtp.gmail.com with ESMTPSA id q15sm245915wrr.19.2019.06.05.16.57.26 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 05 Jun 2019 16:57:27 -0700 (PDT) From: "Leonidas P. Papadakos" To: Rob Herring , Heiko Stuebner Subject: [PATCH 1/2] clk: rockchip: add clock for the watchdog pclk on rk3328 Date: Thu, 6 Jun 2019 02:57:13 +0300 Message-Id: <20190605235714.22432-1-papadakospan@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190605_165730_925491_D96B986F X-CRM114-Status: GOOD ( 11.69 ) 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: Mark Rutland , devicetree@vger.kernel.org, Stephen Boyd , Michael Turquette , linux-rockchip@lists.infradead.org, "Leonidas P. Papadakos" , 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 From: Following the discussion here: https://github.com/rockchip-linux/kernel/issues/123 it can be seen that these are the changes needed to enable the use of the hardware watchdog in the rk3328 SoC. This is in line with past changes for the rk3288: http://lists.infradead.org/pipermail/linux-rockchip/2015-January/002314.html Signed-off-by: Leonidas P. Papadakos --- drivers/clk/rockchip/clk-rk3328.c | 9 +++++++++ include/dt-bindings/clock/rk3328-cru.h | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/clk/rockchip/clk-rk3328.c b/drivers/clk/rockchip/clk-rk3328.c index 076b9777a..546ee0ab7 100644 --- a/drivers/clk/rockchip/clk-rk3328.c +++ b/drivers/clk/rockchip/clk-rk3328.c @@ -876,6 +876,8 @@ static const char *const rk3328_critical_clocks[] __initconst = { static void __init rk3328_clk_init(struct device_node *np) { + struct clk *clk; + struct rockchip_clk_provider *ctx; void __iomem *reg_base; @@ -892,6 +894,13 @@ static void __init rk3328_clk_init(struct device_node *np) return; } + clk = clk_register_fixed_factor(NULL, "pclk_wdt", "pclk_bus", 0, 1, 1); + if (IS_ERR(clk)) + pr_warn("%s: could not register clock pclk_wdt: %ld\n", + __func__, PTR_ERR(clk)); + else + rockchip_clk_add_lookup(ctx, clk, PCLK_WDT); + rockchip_clk_register_plls(ctx, rk3328_pll_clks, ARRAY_SIZE(rk3328_pll_clks), RK3328_GRF_SOC_STATUS0); diff --git a/include/dt-bindings/clock/rk3328-cru.h b/include/dt-bindings/clock/rk3328-cru.h index afb811340..555b4ff66 100644 --- a/include/dt-bindings/clock/rk3328-cru.h +++ b/include/dt-bindings/clock/rk3328-cru.h @@ -164,6 +164,7 @@ #define PCLK_DCF 233 #define PCLK_SARADC 234 #define PCLK_ACODECPHY 235 +#define PCLK_WDT 236 /* hclk gates */ #define HCLK_PERI 308