Received: by 10.213.65.68 with SMTP id h4csp75637imn; Mon, 19 Mar 2018 20:13:01 -0700 (PDT) X-Google-Smtp-Source: AG47ELvAJMnXkqxlI0Yp97iq1p2avfBx8Ihb+us10jNLkNnYdrMHMn8gLRNtey88/NFg/fpMuyIq X-Received: by 10.99.127.72 with SMTP id p8mr11109044pgn.52.1521515580960; Mon, 19 Mar 2018 20:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521515580; cv=none; d=google.com; s=arc-20160816; b=Tz0JzihMcvcm72eolQWttKR17UIGxLc3VtyHJYCTy3W/3wMjQOqpRGmUUSpNN4ZTzA R+QJYE/XzyLkF3GaDmEebEp57BgMZAdyMDT5Ye0gbfqhTWoU469Mb/OFHnnn/QGHl2VZ +sNC+c2yvERCABtqHdF7uCx3So4WNaXe50xDDwCODt26wPPJAfeA7Iei+XRfTpM3Ynui /EX1xszRScQFdHsdp1Llt97sb4DdvAqxHOV0UD777ywGnD8rcjxmkCslSdxtN5GUaPg2 NzRMpSE/9njFWG58MNdUqXhJZyAqCpP9H1MeuxCyzesP5Rb9wiuJDHFSzI70H5FSQSYr EJQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=SFGORCTqJVdQL1WCRUfDU2xmdHaBEz2+sBB2E3HotZ4=; b=O6y+6KWQ/Z/i3xpW128gZHOVwSrmkdekFOWvM1r7rsLxRCdQpMlvMzWcdTTwThtjYo rx3zyMu2N/L8v53RRGs9ZHKn7V6TRyx2rvA7IQ0DClbro0y/BDrqKNQ+PmIsQqbHUvob IHMZXIizS5Ekl+vDSsmWUpNJluL8b1omzoiDCG+RvFPbLajvOJgn7p1IJRahFP6K7P6t wJkjYv9KjtY0dtNQHlsqNb41huGee+by+9dy3Fd1Wb8iXp77vGEExIB7LVKmzO5VvzTO 8+wUY9hG6IAIo13m+2ZluQBIubxwDPqh/YeiGPyhnkjL0pW2acULuqRfUsHX4DU//5pr Fuog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t65si525653pgc.343.2018.03.19.20.12.46; Mon, 19 Mar 2018 20:13:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751790AbeCTDLJ (ORCPT + 99 others); Mon, 19 Mar 2018 23:11:09 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:54753 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751343AbeCTDLF (ORCPT ); Mon, 19 Mar 2018 23:11:05 -0400 Received: by mail-wm0-f65.google.com with SMTP id h76so613361wme.4; Mon, 19 Mar 2018 20:11:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SFGORCTqJVdQL1WCRUfDU2xmdHaBEz2+sBB2E3HotZ4=; b=Lse0jY5oAKL8OBhXG3pHAveLzyyQggA1/CI+2U6aBG9JxpwSeCWBX9y/YkQ91B5wN5 1KU7kRn941s28wqc13S7g3bWRp3A6Xsg2g5skr4OOPkN9y7YhYIDHB0nGsI9DR8fILKC FpVzDUTW3XgwKQ36DaJpnbS3Q6Y7wiY5iiTCXILN9UghrEByk5HldbbELjHREda71LO/ wDm5T8ei0lgyTBFeTm1bwp1xvctmewM1GBSvSUO5U0dP5ZQ69womxcGYS6oJ7U2Mz8Og f/e9qtasv54fyp0mhK3s/w4IFIR1agEyHJB7gl7d5yIwLyw1qQWsaA70I4NYtrfpHHMt tzAg== X-Gm-Message-State: AElRT7E6yx17jCloc3xmfceNv5ZJq4sfZ0U8ojdAE2V6eZ8H19xMJJnF hdf/bv7S+KHaIWqr9VTD+j3fy+un X-Received: by 10.80.129.167 with SMTP id 36mr15199915ede.13.1521515463752; Mon, 19 Mar 2018 20:11:03 -0700 (PDT) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com. [74.125.82.45]) by smtp.gmail.com with ESMTPSA id y19sm66499edi.54.2018.03.19.20.11.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Mar 2018 20:11:03 -0700 (PDT) Received: by mail-wm0-f45.google.com with SMTP id h21so628483wmd.1; Mon, 19 Mar 2018 20:11:03 -0700 (PDT) X-Received: by 10.28.43.4 with SMTP id r4mr748338wmr.143.1521515463001; Mon, 19 Mar 2018 20:11:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.164.129 with HTTP; Mon, 19 Mar 2018 20:10:42 -0700 (PDT) In-Reply-To: <20180303222716.26640-109-alexander.levin@microsoft.com> References: <20180303222716.26640-1-alexander.levin@microsoft.com> <20180303222716.26640-109-alexander.levin@microsoft.com> From: Chen-Yu Tsai Date: Tue, 20 Mar 2018 11:10:42 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH AUTOSEL for 4.9 109/219] clk: sunxi-ng: a33: Add offset and minimum value for DDR1 PLL N factor To: Sasha Levin Cc: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Maxime Ripard Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sun, Mar 4, 2018 at 6:28 AM, Sasha Levin wrote: > From: Chen-Yu Tsai > > [ Upstream commit 68f37d862403e8f95337b2eca90af15d0b8cd5d7 ] > > The DDR1 PLL on the A33 is an oddball amongst the A33 CCU clocks. > It is a clock multiplier, with the effective multiplier in the > range of 12 ~ 255 and no offset between the multiplier value and > the value programmed into the register. > > Implement the zero offset and minimum value of 12 for this clock. > > Fixes: d05c748bd730 ("clk: sunxi-ng: Add A33 CCU support") > Signed-off-by: Chen-Yu Tsai > Signed-off-by: Maxime Ripard > Signed-off-by: Sasha Levin > --- > drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 18 +++++++++++------- > 1 file changed, 11 insertions(+), 7 deletions(-) > > diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-a33.c b/drivers/clk/sunxi-ng/ccu-sun8i-a33.c > index e1dc4e5b34e1..bdbaf26f551f 100644 > --- a/drivers/clk/sunxi-ng/ccu-sun8i-a33.c > +++ b/drivers/clk/sunxi-ng/ccu-sun8i-a33.c > @@ -159,13 +159,17 @@ static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_de_clk, "pll-de", > BIT(28), /* lock */ > CLK_SET_RATE_UNGATE); > > -/* TODO: Fix N */ > -static SUNXI_CCU_N_WITH_GATE_LOCK(pll_ddr1_clk, "pll-ddr1", > - "osc24M", 0x04c, > - 8, 6, /* N */ > - BIT(31), /* gate */ > - BIT(28), /* lock */ > - CLK_SET_RATE_UNGATE); > +static struct ccu_mult pll_ddr1_clk = { > + .enable = BIT(31), > + .lock = BIT(28), As you undoubtedly noticed, this does not build. It needs commit cf719012b232 ("clk: sunxi-ng: mult: Support PLL lock detection") to be applied first. They were part of the same series. Incidentally, how can we note these kinds of dependencies to make life easier for stable kernel maintainers? Thanks ChenYu > + .mult = _SUNXI_CCU_MULT_OFFSET_MIN_MAX(8, 6, 0, 12, 0), > + .common = { > + .reg = 0x04c, > + .hw.init = CLK_HW_INIT("pll-ddr1", "osc24M", > + &ccu_mult_ops, > + CLK_SET_RATE_UNGATE), > + }, > +}; > > static const char * const cpux_parents[] = { "osc32k", "osc24M", > "pll-cpux" , "pll-cpux" }; > -- > 2.14.1