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

Marek Vasut marex at denx.de
Sun Oct 7 23:52:20 EDT 2012


Dear Fabio Estevam,

> On Mon, Oct 8, 2012 at 12:31 AM, Fabio Estevam <festevam at gmail.com> wrote:
> > On Mon, Oct 8, 2012 at 12:32 AM, Huang Shijie <b32955 at freescale.com> wrote:
> >> This patch is really not needed.
> >> 
> >> The clk_get() can get the right clock in the mx23/mx28. I tested them.
> > 
> > Please test it on linux-next.
> > 
> > gpmi nand can not event be probed.
> 
> What about this?

I don't like this one ... such condition shouldn't be in the driver.

> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -495,7 +495,11 @@ 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");
> +       if (GPMI_IS_MX6Q(this))
> +               r->clock[0] = clk_get(this->dev, "gpmi_io");
> +       else
> +               r->clock[0] = clk_get(this->dev, NULL);
> +
>         if (IS_ERR(r->clock[0]))
>                 goto err_clock;

Best regards,
Marek Vasut



More information about the linux-mtd mailing list