Re: [PATCH] nand: gpmi-nand: Fix clock registration

Huang Shijie
2012-10-08T02:42:54Z

于 2012年09月24日 02:31, Fabio Estevam 写道:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> On a mx28 board the following error happens since commit 638064e56c
> (mtd: gpmi: change the code for clocks):
>
> gpmi-nand: probe of 8000c000.gpmi-nand failed with error -12
>
> Acquire the clock using "NULL" as it was done previously, so that the driver
> can register on mx23/mx28 as well.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> index c46be6c..1f23cb4 100644
> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -492,7 +492,7 @@ static int __devinit gpmi_get_clks(struct gpmi_nand_data *this)
> int i;
>
> /* The main clock is stored in the first. */
> - r->clock[0] = clk_get(this->dev, "gpmi_io");
> + r->clock[0] = clk_get(this->dev, NULL);
Please do not change this line.

The gpmi_io is for mx6q.
If you replace it with `NULL`. The mx6q can not find the proper clock.

thanks
Huang Shijie
> if (IS_ERR(r->clock[0]))
> goto err_clock;
>