From patchwork Fri Dec 9 00:31:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9467313 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 BE0F9607D4 for ; Fri, 9 Dec 2016 00:33:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B573A2855A for ; Fri, 9 Dec 2016 00:33:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA0D428633; Fri, 9 Dec 2016 00:33:58 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3619128616 for ; Fri, 9 Dec 2016 00:33:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cF96n-00024F-7J; Fri, 09 Dec 2016 00:32:17 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cF96h-0001vs-7h for linux-arm-kernel@lists.infradead.org; Fri, 09 Dec 2016 00:32:12 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id DC86B616A0; Fri, 9 Dec 2016 00:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1481243510; bh=Z4MfIgIR/9N/ehxDXnYxNoAUZKuuDY6I27LQxS0TiI4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R7agVZH3SIiGdU4B/PRoAd/7ZLL/nqn45/tIn/kmKdhKvYsLfM9f3jd2W9mA+Fde0 Q2T3cAfbQv5MTWJgB5PrEbqCmX8LWrv6hxSkPC+QTEypzfmXWmMWU8jp/7xW+M3BXu 8mr/mkr7txbSONnghYCkbWQsU37cAj4MJyqmm8lQ= Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 295B9613B9; Fri, 9 Dec 2016 00:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1481243510; bh=Z4MfIgIR/9N/ehxDXnYxNoAUZKuuDY6I27LQxS0TiI4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R7agVZH3SIiGdU4B/PRoAd/7ZLL/nqn45/tIn/kmKdhKvYsLfM9f3jd2W9mA+Fde0 Q2T3cAfbQv5MTWJgB5PrEbqCmX8LWrv6hxSkPC+QTEypzfmXWmMWU8jp/7xW+M3BXu 8mr/mkr7txbSONnghYCkbWQsU37cAj4MJyqmm8lQ= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 295B9613B9 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=sboyd@codeaurora.org Date: Thu, 8 Dec 2016 16:31:49 -0800 From: "sboyd@codeaurora.org" To: Scott Wood Subject: Re: [PATCH v3] clk: qoriq: added ls1012a clock configuration Message-ID: <20161209003149.GF5423@codeaurora.org> References: <1479955015-37514-1-git-send-email-yuantian.tang@nxp.com> <20161208231010.GV5423@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161208_163211_436909_8A814511 X-CRM114-Status: GOOD ( 18.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Y.T. Tang" , "mturquette@baylibre.com" , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.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 On 12/08, Scott Wood wrote: > On 12/08/2016 05:10 PM, sboyd@codeaurora.org wrote: > > On 11/25, Y.T. Tang wrote: > >> Hi Scott, > >> > >>> -----Original Message----- > >>> From: Scott Wood > >>> Sent: Thursday, November 24, 2016 4:21 PM > >>> To: Y.T. Tang ; mturquette@baylibre.com > >>> Cc: sboyd@codeaurora.org; linux-clk@vger.kernel.org; linux- > >>> kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org > >>> Subject: Re: [PATCH v3] clk: qoriq: added ls1012a clock configuration > >>> > >>> On 11/23/2016 08:50 PM, yuantian.tang@nxp.com wrote: > >>>> From: Tang Yuantian > >>>> > >>>> Signed-off-by: Tang Yuantian > >>>> --- > >>>> v3: > >>>> - rebased to latest kernel and re-sorted the code > >>> [snip] > >>>> @@ -1316,6 +1334,7 @@ CLK_OF_DECLARE(qoriq_clockgen_2, > >>>> "fsl,qoriq-clockgen-2.0", clockgen_init); > >>>> CLK_OF_DECLARE(qoriq_clockgen_ls1021a, "fsl,ls1021a-clockgen", > >>>> clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_ls1043a, > >>>> "fsl,ls1043a-clockgen", clockgen_init); > >>>> CLK_OF_DECLARE(qoriq_clockgen_ls1046a, "fsl,ls1046a-clockgen", > >>>> clockgen_init); > >>>> +CLK_OF_DECLARE(qoriq_clockgen_ls1012a, "fsl,ls1012a-clockgen", > >>>> +clockgen_init); > >>>> CLK_OF_DECLARE(qoriq_clockgen_ls2080a, "fsl,ls2080a-clockgen", > >>>> clockgen_init); > >>> > >>> You need a better sorting algorithm. :-P > >>> > >> I don't think so. This time, each code snip goes right after ls1046a. > >> The sorting 'algorithm' is best ever. :) > >> > > > > I will sort it and apply it? Ack Scott? > > > > Acked-by: Scott Wood > Thanks. Applied this to clk-next: ---8<---- From: Tang Yuantian Subject: [PATCH] clk: qoriq: added ls1012a clock configuration Acked-by: Scott Wood Signed-off-by: Tang Yuantian [sboyd@codeaurora.org: Sorted list] Signed-off-by: Stephen Boyd --- drivers/clk/clk-qoriq.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c index 7dd4351efdd6..d0bf8b1c67de 100644 --- a/drivers/clk/clk-qoriq.c +++ b/drivers/clk/clk-qoriq.c @@ -291,6 +291,14 @@ static const struct clockgen_muxinfo ls1046a_hwa2 = { }, }; +static const struct clockgen_muxinfo ls1012a_cmux = { + { + [0] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 }, + {}, + [2] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 }, + } +}; + static const struct clockgen_muxinfo t1023_hwa1 = { { {}, @@ -529,6 +537,16 @@ static const struct clockgen_chipinfo chipinfo[] = { .flags = CG_PLL_8BIT, }, { + .compat = "fsl,ls1012a-clockgen", + .cmux_groups = { + &ls1012a_cmux + }, + .cmux_to_group = { + 0, -1 + }, + .pll_mask = 0x03, + }, + { .compat = "fsl,ls2080a-clockgen", .cmux_groups = { &clockgen2_cmux_cga12, &clockgen2_cmux_cgb @@ -1313,6 +1331,7 @@ static void __init clockgen_init(struct device_node *np) CLK_OF_DECLARE(qoriq_clockgen_1, "fsl,qoriq-clockgen-1.0", clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_2, "fsl,qoriq-clockgen-2.0", clockgen_init); +CLK_OF_DECLARE(qoriq_clockgen_ls1012a, "fsl,ls1012a-clockgen", clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_ls1021a, "fsl,ls1021a-clockgen", clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_ls1043a, "fsl,ls1043a-clockgen", clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_ls1046a, "fsl,ls1046a-clockgen", clockgen_init);