lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 06 Jun 2012 16:38:41 +0300
From: Artem Bityutskiy <dedekind1@...il.com>
To: Roland Stigge <stigge@...com.de>
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, devicetree-discuss@...ts.ozlabs.org,
dwmw2@...radead.org, kevin.wells@....com, srinivas.bakki@....com,
linux-arm-kernel@...ts.infradead.org, hechtb@...glemail.com,
lars@...afoo.de, b32955@...escale.com, leiwen@...vell.com,
linux@....linux.org.uk
Subject: Re: [PATCH v6] MTD: LPC32xx SLC NAND driver
On Wed, 2012-06-06 at 11:20 +0200, Roland Stigge wrote:
> +#ifdef CONFIG_PM
> +static int lpc32xx_nand_resume(struct platform_device *pdev)
> +{
> + struct lpc32xx_nand_host *host = platform_get_drvdata(pdev);
> +
> + /* Re-enable NAND clock */
> + clk_enable(host->clk);
> +
> + /* Fresh init of NAND controller */
> + lpc32xx_nand_setup(host);
> +
> + /* Disable write protect */
> + lpc32xx_wp_disable(host);
> +
> + return 0;
> +}
> +
> +static int lpc32xx_nand_suspend(struct platform_device *pdev, pm_message_t pm)
> +{
> + u32 tmp;
> + struct lpc32xx_nand_host *host = platform_get_drvdata(pdev);
> +
> + /* Force CE high */
> + tmp = readl(SLC_CTRL(host->io_base));
> + tmp &= ~SLCCFG_CE_LOW;
> + writel(tmp, SLC_CTRL(host->io_base));
> +
> + /* Enable write protect for safety */
> + lpc32xx_wp_enable(host);
> +
> + /* Disable clock */
> + clk_disable(host->clk);
> +
> + return 0;
> +}
> +
> +#else
> +#define lpc32xx_nand_resume NULL
> +#define lpc32xx_nand_suspend NULL
> +#endif
0, not NULL.
--
Best Regards,
Artem Bityutskiy
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists