]> err.no Git - linux-2.6/blobdiff - arch/arm/mach-s3c2410/mach-bast.c
Merge branch 'irq-cleanups-upstream' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6] / arch / arm / mach-s3c2410 / mach-bast.c
index 103fc5724735f0a1a76c8fe32645545246a6329a..661a2358ac222a9ac10c59a7a9e2cebd08b2aac0 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/sysdev.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
 #include <linux/dm9000.h>
@@ -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 };
@@ -484,7 +515,6 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
                .lower_margin   = 32,
                .vsync_len      = 3,
 
-               .lcdcon1        = 0x00000176,
                .lcdcon5        = 0x00014b02,
        },
        {
@@ -503,7 +533,6 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
                .lower_margin   = 32,
                .vsync_len      = 3,
 
-               .lcdcon1        = 0x00000176,
                .lcdcon5        = 0x00014b02,
        },
        {
@@ -522,7 +551,6 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
                .lower_margin   = 32,
                .vsync_len      = 3,
 
-               .lcdcon1        = 0x00000176,
                .lcdcon5        = 0x00014b02,
        },
 };
@@ -533,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 */
@@ -543,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,
@@ -565,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;
@@ -590,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));
 }