diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-04-15 19:06:14 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-17 12:04:37 -0400 |
commit | 6ddc4b07a2669bdb8b90e3e12fb1ccfb6dc4a99c (patch) | |
tree | 0e1db580eb31c2f1bd705ad3c84c6926b5976ad0 /arch/arm | |
parent | c63fc13f806b11576e8c41969d4b1598dd261d80 (diff) |
[ARM] 4984/1: S3C24XX: Do not assert nRSTOUT on BAST over suspend.
Change GPA21 to output over reset so that nRSTOUT is not
asserted whilst suspended.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 66175471fff3..b45fb65889d2 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/sysdev.h> | ||
19 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
21 | #include <linux/dm9000.h> | 22 | #include <linux/dm9000.h> |
@@ -236,6 +237,36 @@ static struct platform_device bast_device_nor = { | |||
236 | 237 | ||
237 | /* NAND Flash on BAST board */ | 238 | /* NAND Flash on BAST board */ |
238 | 239 | ||
240 | #ifdef CONFIG_PM | ||
241 | static int bast_pm_suspend(struct sys_device *sd, pm_message_t state) | ||
242 | { | ||
243 | /* ensure that an nRESET is not generated on resume. */ | ||
244 | s3c2410_gpio_setpin(S3C2410_GPA21, 1); | ||
245 | s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_OUT); | ||
246 | |||
247 | return 0; | ||
248 | } | ||
249 | |||
250 | static int bast_pm_resume(struct sys_device *sd) | ||
251 | { | ||
252 | s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_nRSTOUT); | ||
253 | return 0; | ||
254 | } | ||
255 | |||
256 | #else | ||
257 | #define bast_pm_suspend NULL | ||
258 | #define bast_pm_resume NULL | ||
259 | #endif | ||
260 | |||
261 | static struct sysdev_class bast_pm_sysclass = { | ||
262 | set_kset_name("mach-bast"), | ||
263 | .suspend = bast_pm_suspend, | ||
264 | .resume = bast_pm_resume, | ||
265 | }; | ||
266 | |||
267 | static struct sys_device bast_pm_sysdev = { | ||
268 | .cls = &bast_pm_sysclass, | ||
269 | }; | ||
239 | 270 | ||
240 | static int smartmedia_map[] = { 0 }; | 271 | static int smartmedia_map[] = { 0 }; |
241 | static int chip0_map[] = { 1 }; | 272 | static int chip0_map[] = { 1 }; |
@@ -586,6 +617,9 @@ static void __init bast_map_io(void) | |||
586 | 617 | ||
587 | static void __init bast_init(void) | 618 | static void __init bast_init(void) |
588 | { | 619 | { |
620 | sysdev_class_register(&bast_pm_sysclass); | ||
621 | sysdev_register(&bast_pm_sysdev); | ||
622 | |||
589 | s3c24xx_fb_set_platdata(&bast_fb_info); | 623 | s3c24xx_fb_set_platdata(&bast_fb_info); |
590 | platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); | 624 | platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); |
591 | } | 625 | } |