From patchwork Mon Oct 8 03:46:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: nand: gpmi-nand: Fix clock registration From: Fabio Estevam X-Patchwork-Id: 189884 Message-Id: To: Huang Shijie Cc: marex@denx.de, artem.bityutskiy@linux.intel.com, shawn.guo@linaro.org, linux-mtd@lists.infradead.org, Fabio Estevam Date: Mon, 8 Oct 2012 00:46:20 -0300 On Mon, Oct 8, 2012 at 12:31 AM, Fabio Estevam wrote: > On Mon, Oct 8, 2012 at 12:32 AM, Huang Shijie 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? --- 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;