X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fmach-s3c2410%2Fmach-bast.c;h=661a2358ac222a9ac10c59a7a9e2cebd08b2aac0;hb=85b375a613085b78531ec86369a51c2f3b922f95;hp=587864fe25fb09f169b519dcc16d54dbb13c773d;hpb=c4ec20717313daafba59225f812db89595952b83;p=linux-2.6-omap-h63xx.git diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 587864fe25f..661a2358ac2 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -236,6 +237,36 @@ static struct platform_device bast_device_nor = { /* NAND Flash on BAST board */ +#ifdef CONFIG_PM +static int bast_pm_suspend(struct sys_device *sd, pm_message_t state) +{ + /* ensure that an nRESET is not generated on resume. */ + s3c2410_gpio_setpin(S3C2410_GPA21, 1); + s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_OUT); + + return 0; +} + +static int bast_pm_resume(struct sys_device *sd) +{ + s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_nRSTOUT); + return 0; +} + +#else +#define bast_pm_suspend NULL +#define bast_pm_resume NULL +#endif + +static struct sysdev_class bast_pm_sysclass = { + .name = "mach-bast", + .suspend = bast_pm_suspend, + .resume = bast_pm_resume, +}; + +static struct sys_device bast_pm_sysdev = { + .cls = &bast_pm_sysclass, +}; static int smartmedia_map[] = { 0 }; static int chip0_map[] = { 1 }; @@ -530,7 +561,7 @@ static struct s3c2410fb_mach_info __initdata bast_fb_info = { .displays = bast_lcd_info, .num_displays = ARRAY_SIZE(bast_lcd_info), - .default_display = 4, + .default_display = 1, }; /* Standard BAST devices */ @@ -540,7 +571,6 @@ static struct platform_device *bast_devices[] __initdata = { &s3c_device_lcd, &s3c_device_wdt, &s3c_device_i2c, - &s3c_device_iis, &s3c_device_rtc, &s3c_device_nand, &bast_device_nor, @@ -562,10 +592,10 @@ static void __init bast_map_io(void) { /* initialise the clocks */ - s3c24xx_dclk0.parent = NULL; + s3c24xx_dclk0.parent = &clk_upll; s3c24xx_dclk0.rate = 12*1000*1000; - s3c24xx_dclk1.parent = NULL; + s3c24xx_dclk1.parent = &clk_upll; s3c24xx_dclk1.rate = 24*1000*1000; s3c24xx_clkout0.parent = &s3c24xx_dclk0; @@ -587,6 +617,9 @@ static void __init bast_map_io(void) static void __init bast_init(void) { + sysdev_class_register(&bast_pm_sysclass); + sysdev_register(&bast_pm_sysdev); + s3c24xx_fb_set_platdata(&bast_fb_info); platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); }