From patchwork Tue Sep 26 00:09:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 9970797 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B9B12602CB for ; Tue, 26 Sep 2017 00:11:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD13F289F8 for ; Tue, 26 Sep 2017 00:11:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1F2028DB5; Tue, 26 Sep 2017 00:11:48 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 546C1289F8 for ; Tue, 26 Sep 2017 00:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966760AbdIZAKB (ORCPT ); Mon, 25 Sep 2017 20:10:01 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:37427 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966751AbdIZAKA (ORCPT ); Mon, 25 Sep 2017 20:10:00 -0400 Received: by mail-qk0-f196.google.com with SMTP id r66so5882427qke.4; Mon, 25 Sep 2017 17:09:59 -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:in-reply-to:references; bh=5CimLCyI6zcWqJ1vvuRZgX4xBpC/KQgw8hmNOTZ09nE=; b=cbwNOemeZsDQYDLyF3fXCqWfvCxShh3+LH5qveaMlyin59ME1867rJNUfitUzuF31u OQApVS1QaXSJ3psA0j9GrnMEfFuuYu6vuipCBfh68uRAHGbKhTgnfo7c8Vmb3uvCB0q2 6RDYKpyJYm/YWwQ0JKJ5eHM3l2FbzWg1yDc/OD+a8kbQQGHdW67BSaUh4O/y+v9VVbTC EAHATwTTMYz0bpkHSRE4wTxmYhvtBjW4O2rIQShM02ZetCa+bjC13CzOPa+7AWxWjSfS 10H/wHaibH/PAPSh0tQREbqB39t0SaZp+u0W5DYkFvXQLvL11r36KIIsSKUtjjkNTU/h hYUg== 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; bh=5CimLCyI6zcWqJ1vvuRZgX4xBpC/KQgw8hmNOTZ09nE=; b=R6C4ZVDVyicXNILFswmfkfaj4VQtY3PoCf+ccBzZhQdrc9dyAnovqVj87nW3njb8ky gtb/w0jzJQdUhuOQ5dTbXNVsiusPYt4uS4pof0yt+p1pvf6ybi97po62WT3OJnBb3Ts6 1JmqjN3lUtFVxJP8f6K5BRB2OyBDXkhmvpYegNunabiornoRdmjbi0wRahnRE/ycpUBE yW4miFIZDjKWIwqn1fhfPkqbMVsx91ZY0YsZUXOqR0PXi8bRo1ywjl9YouG0KVEZeqDt 3S20N+kJ2vwJlqBK5ESoxn2RfoS3ELIz2I3VG7syOu4oHw/lU5dHSToFa0ePiDPRItBU mxcA== X-Gm-Message-State: AHPjjUhYRTHTz00VrO2czpp4QHKazTF6OHWlvsjRcua5MExRMvcsS3Jm NFbWP3qYkAzunytKsXrV3to= X-Google-Smtp-Source: AOwi7QCgi4Q1mhLdPIXt4flGbPqsTX7dpGd04EBjHY/78hce489QV7mfZpTRG4eLkM79/m+bXR33gg== X-Received: by 10.55.104.140 with SMTP id d134mr13067699qkc.133.1506384599142; Mon, 25 Sep 2017 17:09:59 -0700 (PDT) Received: from stb-bld-02.irv.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id r28sm6014256qte.81.2017.09.25.17.09.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Sep 2017 17:09:57 -0700 (PDT) From: Florian Fainelli To: linux-arm-kernel@lists.infradead.org Cc: Florian Fainelli , Rob Herring , Mark Rutland , Ray Jui , Scott Branden , Jon Mason , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM IPROC ARM ARCHITECTURE), Michael Turquette , Stephen Boyd , Russell King , Arnd Bergmann , Olof Johansson , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list), linux-clk@vger.kernel.org (open list:COMMON CLK FRAMEWORK) Subject: [PATCH 05/10] clk: bcm: Add Broadcom Hurricane 2 clock support Date: Mon, 25 Sep 2017 17:09:26 -0700 Message-Id: <20170926000931.670-6-f.fainelli@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170926000931.670-1-f.fainelli@gmail.com> References: <20170926000931.670-1-f.fainelli@gmail.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for the Broadcom Hurricane 2 SoC clock controller. We can re-use the existing iProc clock library since the SoC's architecture is largely the same as its predecessors. Signed-off-by: Florian Fainelli --- drivers/clk/bcm/Kconfig | 9 +++++++++ drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-hr2.c | 27 +++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 drivers/clk/bcm/clk-hr2.c diff --git a/drivers/clk/bcm/Kconfig b/drivers/clk/bcm/Kconfig index 1d9187df167b..4c4bd85f707c 100644 --- a/drivers/clk/bcm/Kconfig +++ b/drivers/clk/bcm/Kconfig @@ -30,6 +30,15 @@ config CLK_BCM_CYGNUS help Enable common clock framework support for the Broadcom Cygnus SoC +config CLK_BCM_HR2 + bool "Broadcom Hurricane 2 clock support" + depends on ARCH_BCM_HR2 || COMPILE_TEST + select COMMON_CLK_IPROC + default ARCH_BCM_HR2 + help + Enable common clock framework support for the Broadcom Hurricane 2 + SoC + config CLK_BCM_NSP bool "Broadcom Northstar/Northstar Plus clock support" depends on ARCH_BCM_5301X || ARCH_BCM_NSP || COMPILE_TEST diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile index a0c14fa4aa1e..755144195541 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -8,6 +8,7 @@ obj-$(CONFIG_ARCH_BCM2835) += clk-bcm2835.o obj-$(CONFIG_ARCH_BCM2835) += clk-bcm2835-aux.o obj-$(CONFIG_ARCH_BCM_53573) += clk-bcm53573-ilp.o obj-$(CONFIG_CLK_BCM_CYGNUS) += clk-cygnus.o +obj-$(CONFIG_CLK_BCM_HR2) += clk-hr2.o obj-$(CONFIG_CLK_BCM_NSP) += clk-nsp.o obj-$(CONFIG_CLK_BCM_NS2) += clk-ns2.o obj-$(CONFIG_CLK_BCM_SR) += clk-sr.o diff --git a/drivers/clk/bcm/clk-hr2.c b/drivers/clk/bcm/clk-hr2.c new file mode 100644 index 000000000000..f7c5b7379475 --- /dev/null +++ b/drivers/clk/bcm/clk-hr2.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2017 Broadcom + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include + +#include "clk-iproc.h" + +static void __init hr2_armpll_init(struct device_node *node) +{ + iproc_armpll_setup(node); +} +CLK_OF_DECLARE(hr2_armpll, "brcm,hr2-armpll", hr2_armpll_init);