From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhou Wang Subject: Re: [PATCH v4 1/2] mtd: hisilicon: add a new NAND controller driver for hisilicon hip04 Soc Date: Mon, 01 Dec 2014 21:08:25 +0800 Message-ID: <547C6849.7060804@gmail.com> References: <1415105221-7732-1-git-send-email-wangzhou.bry@gmail.com> <1415105221-7732-2-git-send-email-wangzhou.bry@gmail.com> <20141201092529.GM29070@brian-ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20141201092529.GM29070@brian-ubuntu> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Brian Norris Cc: David Woodhouse , linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, caizhiyong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org, haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, xuwei5-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org, wangzhou1-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@vger.kernel.org On 2014=E5=B9=B412=E6=9C=8801=E6=97=A5 17:25, Brian Norris wrote: > I forgot to mention these comments: > > On Tue, Nov 04, 2014 at 08:47:00PM +0800, Zhou Wang wrote: >> +static int hisi_nfc_remove(struct platform_device *pdev) >> +{ >> + struct hinfc_host *host =3D platform_get_drvdata(pdev); >> + struct mtd_info *mtd =3D &host->mtd; >> + >> + nand_release(mtd); >> + dma_free_coherent(&pdev->dev, mtd->writesize + mtd->oobsize, >> + host->buffer, host->dma_buffer); >> + >> + return 0; >> +} >> + >> +#ifdef CONFIG_PM_SLEEP >> +static int hisi_nfc_suspend(struct platform_device *pdev, >> + pm_message_t state) > > This is the wrong prototype. See struct dev_pm_ops. > My mistake here, will modify this, thanks a lot!! >> +{ >> + struct hinfc_host *host =3D platform_get_drvdata(pdev); >> + >> + while ((hinfc_read(host, HINFC504_STATUS) & 0x1) =3D=3D 0x0) >> + ; >> + >> + while ((hinfc_read(host, HINFC504_DMA_CTRL)) >> + & HINFC504_DMA_CTRL_DMA_START) >> + _cond_resched(); >> + >> + return 0; >> +} >> + >> +static int hisi_nfc_resume(struct platform_device *pdev) > > Same here. > >> +{ >> + int cs; >> + struct hinfc_host *host =3D platform_get_drvdata(pdev); >> + struct nand_chip *chip =3D &host->chip; >> + >> + for (cs =3D 0; cs < chip->numchips; cs++) >> + hisi_nfc_send_cmd_reset(host, cs); >> + hinfc_write(host, SET_HINFC504_PWIDTH(HINFC504_W_LATCH, >> + HINFC504_R_LATCH, HINFC504_RW_LATCH), HINFC504_PWIDTH); >> + >> + return 0; >> +} >> +#endif >> +static SIMPLE_DEV_PM_OPS(hisi_nfc_pm_ops, hisi_nfc_suspend, hisi_nf= c_resume); > > Brian > Thanks, Zhou Wang -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html