[linux-sunxi] Re: [PATCH v4 6/9] clk: sunxi-ng: Add A64 clocks

2016-10-24 Thread Maxime Ripard
Hi Stephen,

On Thu, Oct 20, 2016 at 11:46:01AM -0700, Stephen Boyd wrote:
> 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 ..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(>dev, res);
> > +   if (IS_ERR(reg)) {
> > +   dev_err(>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, _a64_ccu_desc);
> > +}
> > +
> > +static const struct of_device_id sun50i_a64_ccu_ids[] = {
> > +   { .compatible = "allwinner,sun50i-a64-ccu" },
> > +   { },
> 
> Nitpick: drop the comma

Thanks for your comments, it's fixed.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


[linux-sunxi] Re: [PATCH v4 6/9] clk: sunxi-ng: Add A64 clocks

2016-10-20 Thread Stephen Boyd
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 ..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(>dev, res);
> + if (IS_ERR(reg)) {
> + dev_err(>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, _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

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.