Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84205
b: refs/heads/master
c: 03680b1
h: refs/heads/master
i:
  84203: 339ea99
v: v3
  • Loading branch information
Ben Dooks authored and David Woodhouse committed Nov 28, 2007
1 parent 442c0e6 commit 6784248
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73061e4c2dcfba17c6a0137a1199d3e00d03b14c
refs/heads/master: 03680b1e00d146df718c8a4eac34438566b70c85
20 changes: 20 additions & 0 deletions trunk/drivers/mtd/nand/s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ struct s3c2410_nand_info {
int sel_bit;
int mtd_count;

unsigned long save_nfconf;

enum s3c_cpu_type cpu_type;
};

Expand Down Expand Up @@ -810,6 +812,16 @@ static int s3c24xx_nand_suspend(struct platform_device *dev, pm_message_t pm)
struct s3c2410_nand_info *info = platform_get_drvdata(dev);

if (info) {
info->save_nfconf = readl(info->regs + S3C2410_NFCONF);

/* For the moment, we must ensure nFCE is high during
* the time we are suspended. This really should be
* handled by suspending the MTDs we are using, but
* that is currently not the case. */

writel(info->save_nfconf | info->sel_bit,
info->regs + S3C2410_NFCONF);

if (!allow_clk_stop(info))
clk_disable(info->clk);
}
Expand All @@ -820,11 +832,19 @@ static int s3c24xx_nand_suspend(struct platform_device *dev, pm_message_t pm)
static int s3c24xx_nand_resume(struct platform_device *dev)
{
struct s3c2410_nand_info *info = platform_get_drvdata(dev);
unsigned long nfconf;

if (info) {
clk_enable(info->clk);
s3c2410_nand_inithw(info, dev);

/* Restore the state of the nFCE line. */

nfconf = readl(info->regs + S3C2410_NFCONF);
nfconf &= ~info->sel_bit;
nfconf |= info->save_nfconf & info->sel_bit;
writel(nfconf, info->regs + S3C2410_NFCONF);

if (allow_clk_stop(info))
clk_disable(info->clk);
}
Expand Down

0 comments on commit 6784248

Please sign in to comment.