X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fmach-s3c2410%2Fmach-bast.c;h=27f63d5d3a7b84e391aab59e26a82931bc2e4868;hb=fd2c17e1777d46cff14c25ea774a4d17459d188a;hp=587864fe25fb09f169b519dcc16d54dbb13c773d;hpb=95b00786f3b8fa99f53931361beeb4c10504ad87;p=linux-2.6 diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 587864fe25..27f63d5d3a 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 }; @@ -343,7 +374,7 @@ static struct resource bast_dm9k_resource[] = { [2] = { .start = IRQ_DM9000, .end = IRQ_DM9000, - .flags = IORESOURCE_IRQ, + .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, } }; @@ -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)); }