diff options
Diffstat (limited to 'drivers/mtd/nand/s3c2410.c')
-rw-r--r-- | drivers/mtd/nand/s3c2410.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index f3fa1be22ddf..8557c68dbb42 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c | |||
@@ -119,8 +119,7 @@ struct s3c2410_nand_info { | |||
119 | void __iomem *sel_reg; | 119 | void __iomem *sel_reg; |
120 | int sel_bit; | 120 | int sel_bit; |
121 | int mtd_count; | 121 | int mtd_count; |
122 | 122 | unsigned long save_sel; | |
123 | unsigned long save_nfconf; | ||
124 | 123 | ||
125 | enum s3c_cpu_type cpu_type; | 124 | enum s3c_cpu_type cpu_type; |
126 | }; | 125 | }; |
@@ -810,15 +809,14 @@ static int s3c24xx_nand_suspend(struct platform_device *dev, pm_message_t pm) | |||
810 | struct s3c2410_nand_info *info = platform_get_drvdata(dev); | 809 | struct s3c2410_nand_info *info = platform_get_drvdata(dev); |
811 | 810 | ||
812 | if (info) { | 811 | if (info) { |
813 | info->save_nfconf = readl(info->regs + S3C2410_NFCONF); | 812 | info->save_sel = readl(info->sel_reg); |
814 | 813 | ||
815 | /* For the moment, we must ensure nFCE is high during | 814 | /* For the moment, we must ensure nFCE is high during |
816 | * the time we are suspended. This really should be | 815 | * the time we are suspended. This really should be |
817 | * handled by suspending the MTDs we are using, but | 816 | * handled by suspending the MTDs we are using, but |
818 | * that is currently not the case. */ | 817 | * that is currently not the case. */ |
819 | 818 | ||
820 | writel(info->save_nfconf | info->sel_bit, | 819 | writel(info->save_sel | info->sel_bit, info->sel_reg); |
821 | info->regs + S3C2410_NFCONF); | ||
822 | 820 | ||
823 | if (!allow_clk_stop(info)) | 821 | if (!allow_clk_stop(info)) |
824 | clk_disable(info->clk); | 822 | clk_disable(info->clk); |
@@ -830,7 +828,7 @@ static int s3c24xx_nand_suspend(struct platform_device *dev, pm_message_t pm) | |||
830 | static int s3c24xx_nand_resume(struct platform_device *dev) | 828 | static int s3c24xx_nand_resume(struct platform_device *dev) |
831 | { | 829 | { |
832 | struct s3c2410_nand_info *info = platform_get_drvdata(dev); | 830 | struct s3c2410_nand_info *info = platform_get_drvdata(dev); |
833 | unsigned long nfconf; | 831 | unsigned long sel; |
834 | 832 | ||
835 | if (info) { | 833 | if (info) { |
836 | clk_enable(info->clk); | 834 | clk_enable(info->clk); |
@@ -838,10 +836,10 @@ static int s3c24xx_nand_resume(struct platform_device *dev) | |||
838 | 836 | ||
839 | /* Restore the state of the nFCE line. */ | 837 | /* Restore the state of the nFCE line. */ |
840 | 838 | ||
841 | nfconf = readl(info->regs + S3C2410_NFCONF); | 839 | sel = readl(info->sel_reg); |
842 | nfconf &= ~info->sel_bit; | 840 | sel &= ~info->sel_bit; |
843 | nfconf |= info->save_nfconf & info->sel_bit; | 841 | sel |= info->save_sel & info->sel_bit; |
844 | writel(nfconf, info->regs + S3C2410_NFCONF); | 842 | writel(sel, info->sel_reg); |
845 | 843 | ||
846 | if (allow_clk_stop(info)) | 844 | if (allow_clk_stop(info)) |
847 | clk_disable(info->clk); | 845 | clk_disable(info->clk); |