Received: by 2002:a05:6520:3645:b029:c0:f950:43e0 with SMTP id l5csp6261331lki; Thu, 4 Mar 2021 08:41:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3pdO8qJT8e0yF/rHNJD33+KZcNvEYyhVGOXaKN0xYgb9GyWPxm+TV5CklKKUHeXJ9Lu1T X-Received: by 2002:a17:907:1b06:: with SMTP id mp6mr5280302ejc.408.1614876062670; Thu, 04 Mar 2021 08:41:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614876062; cv=none; d=google.com; s=arc-20160816; b=BifUXyq6Q03p1AOFAciH9UXz7QlMoeiimS1jTAuX5aq8CYRx8uWomMoJ63miCnepu1 kJfVeOpn7NQftekaBvadWXH6QfPx7s24MMBlgm/a31aNpOsb2HHTSN/uay/4dOnj/35S lKNtJoQHW0AM6+YVudAnlbp8LrkafpozbM47rC0ylXI+n+x0XPvpQTUBTwyS1716/e51 u6j5qrhCi1tNz9Il3gzNsZH5HNy89WD8OknfKuW6vF/WqlI5v7Cn0MUM2+4t6RHg9QaU JmAxN8cwaaiIAzUBld9/0iwyzyLFn/6N0YWozLpldejTyfkXd8cWB0QGEmBUS7oGy/vb Zc1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id; bh=fO37U/BB7yYBfFmDjNvg/1hz+/r9xrPsUN58L6MHNBE=; b=J1qI/gIPk8HkCMmWk8lSqxVOSaRdaY7aWmFoUub7NEacUfM4nvL8FuRPrZ9WQe8nB/ V2Tk6aBGE/H7wNCqThLjTw5A/75pz8R06t1akhKSChJAdvF+z4HpA9vsgeyg/IS72n12 TXbvMvbRiA/bQjx+wyV8igPztPCYTwNqMmdUcRqh/FXtfRVlFBpXh+vKMCm/kKHaWoHD dIMqITImg/FK7ZS4wN9VlPWPBOGiGwQz7R+Fm4JqLm+rI3UQoLATxaIZ1qr8ChhD1baA v3RqDuRaARfVpU9hOMq5m7SE0TLrjrWta68KiiuJ0krO7n8M5n+6R95pc5Mxf9Y4e7CK 826w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c21si17256345edt.47.2021.03.04.08.40.39; Thu, 04 Mar 2021 08:41:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239684AbhCDMAS convert rfc822-to-8bit (ORCPT + 99 others); Thu, 4 Mar 2021 07:00:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239682AbhCDL7r (ORCPT ); Thu, 4 Mar 2021 06:59:47 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCD7BC061761 for ; Thu, 4 Mar 2021 03:59:06 -0800 (PST) Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHmcz-0002LK-IC; Thu, 04 Mar 2021 12:58:49 +0100 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1lHmct-0005HU-9M; Thu, 04 Mar 2021 12:58:43 +0100 Message-ID: <81c45bf40b397b57343f159baae896528fa32d89.camel@pengutronix.de> Subject: Re: [RFC PATCH 2/6] clk: sifive: Use reset-simple in prci driver for PCIe driver From: Philipp Zabel To: Greentime Hu , paul.walmsley@sifive.com, hes@sifive.com, erik.danie@sifive.com, zong.li@sifive.com, bhelgaas@google.com, robh+dt@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, mturquette@baylibre.com, sboyd@kernel.org, lorenzo.pieralisi@arm.com, alex.dewar90@gmail.com, khilman@baylibre.com, hayashi.kunihiko@socionext.com, vidyas@nvidia.com, jh80.chung@samsung.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Date: Thu, 04 Mar 2021 12:58:43 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-03-02 at 18:59 +0800, Greentime Hu wrote: > We use reset-simple in this patch so that pcie driver can use > devm_reset_control_get() to get this reset data structure and use > reset_control_deassert() to deassert pcie_power_up_rst_n. > > Signed-off-by: Greentime Hu > --- > drivers/clk/sifive/Kconfig | 2 ++ > drivers/clk/sifive/sifive-prci.c | 14 ++++++++++++++ > drivers/clk/sifive/sifive-prci.h | 4 ++++ > drivers/reset/Kconfig | 3 ++- > 4 files changed, 22 insertions(+), 1 deletion(-) > > diff --git a/drivers/clk/sifive/Kconfig b/drivers/clk/sifive/Kconfig > index 1c14eb20c066..9132c3c4aa86 100644 > --- a/drivers/clk/sifive/Kconfig > +++ b/drivers/clk/sifive/Kconfig > @@ -10,6 +10,8 @@ if CLK_SIFIVE > > config CLK_SIFIVE_PRCI > bool "PRCI driver for SiFive SoCs" > + select RESET_CONTROLLER > + select RESET_SIMPLE > select CLK_ANALOGBITS_WRPLL_CLN28HPC > help > Supports the Power Reset Clock interface (PRCI) IP block found in > diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c > index baf7313dac92..925affc6de55 100644 > --- a/drivers/clk/sifive/sifive-prci.c > +++ b/drivers/clk/sifive/sifive-prci.c > @@ -583,7 +583,21 @@ static int sifive_prci_probe(struct platform_device *pdev) > if (IS_ERR(pd->va)) > return PTR_ERR(pd->va); > > + pd->reset.rcdev.owner = THIS_MODULE; > + pd->reset.rcdev.nr_resets = PRCI_RST_NR; > + pd->reset.rcdev.ops = &reset_simple_ops; > + pd->reset.rcdev.of_node = pdev->dev.of_node; > + pd->reset.active_low = true; > + pd->reset.membase = pd->va + PRCI_DEVICESRESETREG_OFFSET; > + spin_lock_init(&pd->reset.lock); > + > + r = devm_reset_controller_register(&pdev->dev, &pd->reset.rcdev); > + if (r) { > + dev_err(dev, "could not register reset controller: %d\n", r); > + return r; > + } > r = __prci_register_clocks(dev, pd, desc); > + Accidental whitespace? Otherwise, Reviewed-by: Philipp Zabel regards Philipp