lkml.org 
[lkml]   [2015]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/7] mtd: pxa3xx_nand: add a non mandatory ECC clock
Date
Antoine Tenart <antoine.tenart@free-electrons.com> writes:

> Some controllers (as the coming Berlin nand controller) need to enable
> an ECC clock. Add support for this clock in the pxa3xx nand driver, and
> leave it as non mandatory.
> - info->clk = devm_clk_get(&pdev->dev, NULL);
> + info->clk = devm_clk_get(&pdev->dev, "nfc");
> if (IS_ERR(info->clk)) {
> - dev_err(&pdev->dev, "failed to get nand clock\n");
> - return PTR_ERR(info->clk);
> + info->clk = devm_clk_get(&pdev->dev, NULL);
> +
> + if (IS_ERR(info->clk)) {
> + dev_err(&pdev->dev, "failed to get nand clock\n");
> + return PTR_ERR(info->clk);
> + }
I suppose this is done to keep the compatibility with existing pxa3xx/berlin
clock code, which was defined without a con_id. More specifically I'm thinking
of the function clk_find().

Now maybe it would be cleaner to keep you "nfc" change, remove the failback plan
with NULL as an con_id, and change the clock providers. I cannot speak for
berlin/others, but for pxa3xx, this is one 3 hunks change in :
- drivers/clk/pxa/clk-pxa3xx.c

Cheers.

--
Robert


\
 
 \ /
  Last update: 2015-06-03 21:41    [W:0.070 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site