Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934710AbcJTSqF (ORCPT ); Thu, 20 Oct 2016 14:46:05 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:60190 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934225AbcJTSqD (ORCPT ); Thu, 20 Oct 2016 14:46:03 -0400 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 0516C61B34 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, 20 Oct 2016 11:46:01 -0700 From: Stephen Boyd To: Maxime Ripard Cc: Mike Turquette , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-sunxi@googlegroups.com, Andre Przywara Subject: Re: [PATCH v4 6/9] clk: sunxi-ng: Add A64 clocks Message-ID: <20161020184601.GB26139@codeaurora.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1519 Lines: 53 On 10/11, Maxime Ripard wrote: > diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c > new file mode 100644 > index 000000000000..c0e96bf6d104 > --- /dev/null > +++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c > + > +static int sun50i_a64_ccu_probe(struct platform_device *pdev) > +{ > + struct resource *res; > + void __iomem *reg; > + u32 val; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + reg = devm_ioremap_resource(&pdev->dev, res); > + if (IS_ERR(reg)) { > + dev_err(&pdev->dev, "Could not map the clock registers\n"); devm_ioremap_resource() should already spit out an error. > + return PTR_ERR(reg); > + } > + > + /* Force the PLL-Audio-1x divider to 4 */ > + val = readl(reg + SUN50I_A64_PLL_AUDIO_REG); > + val &= ~GENMASK(19, 16); > + writel(val | (3 << 16), reg + SUN50I_A64_PLL_AUDIO_REG); > + > + writel(0x515, reg + SUN50I_A64_PLL_MIPI_REG); > + > + return sunxi_ccu_probe(pdev->dev.of_node, reg, &sun50i_a64_ccu_desc); > +} > + > +static const struct of_device_id sun50i_a64_ccu_ids[] = { > + { .compatible = "allwinner,sun50i-a64-ccu" }, > + { }, Nitpick: drop the comma > +}; > + > +static struct platform_driver sun50i_a64_ccu_driver = { > + .probe = sun50i_a64_ccu_probe, > + .driver = { > + .name = "sun50i-a64-ccu", > + .of_match_table = sun50i_a64_ccu_ids, > + }, > +}; > +builtin_platform_driver(sun50i_a64_ccu_driver); -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project