From patchwork Thu Sep 28 23:14:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 9976857 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 4D94660365 for ; Thu, 28 Sep 2017 23:16:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40C8227D4A for ; Thu, 28 Sep 2017 23:16:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3597B29774; Thu, 28 Sep 2017 23:16:41 +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=ham 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 CAF6B27D4A for ; Thu, 28 Sep 2017 23:16:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbdI1XP3 (ORCPT ); Thu, 28 Sep 2017 19:15:29 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:37364 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751046AbdI1XPY (ORCPT ); Thu, 28 Sep 2017 19:15:24 -0400 Received: by mail-qk0-f195.google.com with SMTP id z143so1854131qkb.4; Thu, 28 Sep 2017 16:15:23 -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=wPvLpIUHldg/b9U9PxE6iIXD1KOGEMlk+WYZC57krHs=; b=Q70/eg8fpDIPQxcPKPPrqPF9i/vzBN2LF5xZjt0RMQlAAXk9s0AptH9l0Ez9ewW4Um 88fXw8jZ0Ge7AlVZ60OaSRUnigh1I3UhN87tRhpuJx3RYB/OomA51IytNF7pXY9d0obD ncb8wER7qKJF/+1Vs4Vvyraku20gdbeqaKp4uI6uf+W3BYZcNsxGz0dwYd9d2Wi/lCy/ pQjxBOq14L5tJGOd16A3zpwXLLF2H59SbXrbk0rgWUVowH38+0YNoUWmkb3S08lQ34eY 5IQuDLdt78Wxv7h69mBV++kwlZH1NK6muTjhZYFVF3dmaJY4XVxN1Pk69ooUaHa9X0pU kHqA== 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=wPvLpIUHldg/b9U9PxE6iIXD1KOGEMlk+WYZC57krHs=; b=ujN9PMB4Lwu5nCcpBxR4JYktmO57xqUZWDDN2aoDmDDisxwh284B6E+K+AnslfOWxy p474VjGw0vxbk7RGbfHdndS7YA4FsMJXz45IOqesOrXKTpbEcu1YRh/zW6TL3Y+dbEMa oNxZMBxPp3hXZfdQbRwtnVUl4u3d/+B6DtYJEPWb67hbo3LXcReNQ1LVMt0Z99fg0Wqc +oAOnT7rJjnEL0TfdQUQHkGs4yrUV9YKJH/BZgqpJxGjF9s2khG2J/WGt8KRkLzwe7M5 5rg6DY3N17sDuFZDfB73VEIRBa+IBvSM5xJEbeTDoikV9uFBGapz9H89mRJ4uUNVEfC0 EzMw== X-Gm-Message-State: AMCzsaWUs6sak+3Ane5vpu0FOruNFSy5AZjm34gyF6LZHZEWYzBpgP21 kmAdIuYy2F97W6Bh3s0oPzI= X-Google-Smtp-Source: AOwi7QD1TmvXH7MhT5XB4KDmvFx6hqllrt9HYaMktTjIjPcoXQFUMykZykT5A/ruiMNo1XXQ5TVC7g== X-Received: by 10.55.191.134 with SMTP id p128mr802933qkf.294.1506640523321; Thu, 28 Sep 2017 16:15:23 -0700 (PDT) Received: from stb-bld-02.irv.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id s90sm1792815qkl.81.2017.09.28.16.15.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Sep 2017 16:15:22 -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 v2 05/10] clk: bcm: Add Broadcom Hurricane 2 clock support Date: Thu, 28 Sep 2017 16:14:57 -0700 Message-Id: <20170928231502.27069-6-f.fainelli@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170928231502.27069-1-f.fainelli@gmail.com> References: <20170928231502.27069-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. For now, we just initialize the iProc ARM PLL. Acked-by: Jon Mason Signed-off-by: Florian Fainelli Acked-by: Stephen Boyd --- 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);