From patchwork Fri Apr 6 17:12:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 10327309 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 3988260208 for ; Fri, 6 Apr 2018 17:12:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29A2328402 for ; Fri, 6 Apr 2018 17:12:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E5B1286C5; Fri, 6 Apr 2018 17:12:45 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI 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 BB31728402 for ; Fri, 6 Apr 2018 17:12:44 +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:Date:Subject:Message-ID:References: In-Reply-To:From:To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=B+5A3hkbL4gVxqatBCBVsNtXiwjXBJSgpEb/W0WPXG4=; b=POTG1eg3fIbIxN +hxnjOUJsTtNMpbhvq1EB4bRSSG8YQGg15qLFEb/HjW3Te/Dd2pBN0DI8phA7/FaOmxrO3OT53pM7 Y0klaSucPtNo/4TJ9CvUOCWtakHMOi9EPGXvWOWscEUCSw+EfprZY0ldqLczr7XYddvwMoqBk2A7C wF5iHmv8uIRMm6xwThUq8D9ZeM5zNQZu4jQwDutP9VTsWnCJjpRFgd569PeXZPCefvMsJRI7Hoi0r 9U/x23rhduDNHzrQNlAT3B194Ijoy/attMvBNHjEvryscnps9JxzEvfdj3aipNnOm6a8MrORDuDWN gGH9MpJeMF++1UcIrLHA==; 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 1f4Uuo-0003Gu-6L; Fri, 06 Apr 2018 17:12:42 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f4Uul-0003Ex-0t for linux-arm-kernel@lists.infradead.org; Fri, 06 Apr 2018 17:12:40 +0000 Received: from localhost (unknown [104.132.1.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9DFE120B80; Fri, 6 Apr 2018 17:12:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DFE120B80 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=sboyd@kernel.org MIME-Version: 1.0 To: Dinh Nguyen From: Stephen Boyd In-Reply-To: <1521642012-9770-3-git-send-email-dinguyen@kernel.org> References: <1521642012-9770-1-git-send-email-dinguyen@kernel.org> <1521642012-9770-3-git-send-email-dinguyen@kernel.org> Message-ID: <152303474801.143116.12893988829541761898@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCHv7 3/3] clk: socfpga: stratix10: add clock driver for Stratix10 platform Date: Fri, 06 Apr 2018 10:12:28 -0700 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180406_101239_126392_D3ED4C3A X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, catalin.marinas@arm.com, mturquette@baylibre.com, will.deacon@arm.com, dinguyen@kernel.org, robh+dt@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Quoting Dinh Nguyen (2018-03-21 07:20:12) > Add a clock driver for the Stratix10 SoC. The driver is similar to the > Cyclone5/Arria10 platforms, with the exception that this driver only uses > one single clock binding. > > Signed-off-by: Dinh Nguyen > --- Applied to clk-next but I made some fixes. Also, it would be nice if you could follow up with using the platform driver APIs to map memory and also make sure to implement a driver remove path or block it with the suppress attribute. diff --git a/drivers/clk/socfpga/clk-gate-s10.c b/drivers/clk/socfpga/clk-gate-s10.c index 71ca3c045a42..eee2d48ab656 100644 --- a/drivers/clk/socfpga/clk-gate-s10.c +++ b/drivers/clk/socfpga/clk-gate-s10.c @@ -4,6 +4,7 @@ */ #include #include +#include "stratix10-clk.h" #include "clk.h" #define SOCFPGA_CS_PDBG_CLK "cs_pdbg_clk" @@ -63,7 +64,7 @@ static const struct clk_ops dbgclk_ops = { .get_parent = socfpga_gate_get_parent, }; -struct clk *s10_register_gate(char *name, const char *parent_name, +struct clk *s10_register_gate(const char *name, const char *parent_name, const char * const *parent_names, u8 num_parents, unsigned long flags, void __iomem *regbase, unsigned long gate_reg, diff --git a/drivers/clk/socfpga/clk-periph-s10.c b/drivers/clk/socfpga/clk-periph-s10.c index 6021ac1b0667..568f59b58ddf 100644 --- a/drivers/clk/socfpga/clk-periph-s10.c +++ b/drivers/clk/socfpga/clk-periph-s10.c @@ -5,6 +5,7 @@ #include #include +#include "stratix10-clk.h" #include "clk.h" #define CLK_MGR_FREE_SHIFT 16 @@ -71,7 +72,7 @@ static const struct clk_ops peri_cnt_clk_ops = { .get_parent = clk_periclk_get_parent, }; -struct clk *s10_register_periph(char *name, const char *parent_name, +struct clk *s10_register_periph(const char *name, const char *parent_name, const char * const *parent_names, u8 num_parents, unsigned long flags, void __iomem *reg, unsigned long offset) @@ -103,7 +104,7 @@ struct clk *s10_register_periph(char *name, const char *parent_name, return clk; } -struct clk *s10_register_cnt_periph(char *name, const char *parent_name, +struct clk *s10_register_cnt_periph(const char *name, const char *parent_name, const char * const *parent_names, u8 num_parents, unsigned long flags, void __iomem *regbase, unsigned long offset, diff --git a/drivers/clk/socfpga/clk-pll-s10.c b/drivers/clk/socfpga/clk-pll-s10.c index ef24ca7a0cc4..2d5d8b43727e 100644 --- a/drivers/clk/socfpga/clk-pll-s10.c +++ b/drivers/clk/socfpga/clk-pll-s10.c @@ -5,6 +5,7 @@ #include #include +#include "stratix10-clk.h" #include "clk.h" /* Clock Manager offsets */ diff --git a/drivers/clk/socfpga/clk-s10.c b/drivers/clk/socfpga/clk-s10.c index 27a08b3b30e6..3a11c382a663 100644 --- a/drivers/clk/socfpga/clk-s10.c +++ b/drivers/clk/socfpga/clk-s10.c @@ -48,11 +48,11 @@ static const struct stratix10_pll_clock s10_pll_clks[] = { }; static const struct stratix10_perip_c_clock s10_main_perip_c_clks[] = { - { STRATIX10_MAIN_MPU_BASE_CLK, "main_mpu_base_clk", "main_pll", 0, 1, 0, 0x84}, - { STRATIX10_MAIN_NOC_BASE_CLK, "main_noc_base_clk", "main_pll", 0, 1, 0, 0x88}, - { STRATIX10_PERI_MPU_BASE_CLK, "peri_mpu_base_clk", "periph_pll", 0, 1, 0, + { STRATIX10_MAIN_MPU_BASE_CLK, "main_mpu_base_clk", "main_pll", NULL, 1, 0, 0x84}, + { STRATIX10_MAIN_NOC_BASE_CLK, "main_noc_base_clk", "main_pll", NULL, 1, 0, 0x88}, + { STRATIX10_PERI_MPU_BASE_CLK, "peri_mpu_base_clk", "periph_pll", NULL, 1, 0, 0xF4}, - { STRATIX10_PERI_NOC_BASE_CLK, "peri_noc_base_clk", "periph_pll", 0, 1, 0, + { STRATIX10_PERI_NOC_BASE_CLK, "peri_noc_base_clk", "periph_pll", NULL, 1, 0, 0xF8}, }; diff --git a/drivers/clk/socfpga/stratix10-clk.h b/drivers/clk/socfpga/stratix10-clk.h index f6c9291ed315..e8e121907952 100644 --- a/drivers/clk/socfpga/stratix10-clk.h +++ b/drivers/clk/socfpga/stratix10-clk.h @@ -76,5 +76,5 @@ struct clk *s10_register_gate(const char *, const char *, unsigned long, void __iomem *, unsigned long, unsigned long, unsigned long, unsigned long, u8, - unsigned long, unsigned long, u8); + unsigned long, u8, u8);