diff options
-rw-r--r-- | drivers/video/s3c2410fb.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index ee4c0df217f7..77f34c614c86 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -26,8 +26,8 @@ | |||
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
28 | #include <linux/cpufreq.h> | 28 | #include <linux/cpufreq.h> |
29 | #include <linux/io.h> | ||
29 | 30 | ||
30 | #include <asm/io.h> | ||
31 | #include <asm/div64.h> | 31 | #include <asm/div64.h> |
32 | 32 | ||
33 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
@@ -45,10 +45,10 @@ | |||
45 | #ifdef CONFIG_FB_S3C2410_DEBUG | 45 | #ifdef CONFIG_FB_S3C2410_DEBUG |
46 | static int debug = 1; | 46 | static int debug = 1; |
47 | #else | 47 | #else |
48 | static int debug = 0; | 48 | static int debug; |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #define dprintk(msg...) if (debug) { printk(KERN_DEBUG "s3c2410fb: " msg); } | 51 | #define dprintk(msg...) if (debug) printk(KERN_DEBUG "s3c2410fb: " msg); |
52 | 52 | ||
53 | /* useful functions */ | 53 | /* useful functions */ |
54 | 54 | ||
@@ -567,11 +567,10 @@ static int s3c2410fb_blank(int blank_mode, struct fb_info *info) | |||
567 | 567 | ||
568 | tpal_reg += is_s3c2412(fbi) ? S3C2412_TPAL : S3C2410_TPAL; | 568 | tpal_reg += is_s3c2412(fbi) ? S3C2412_TPAL : S3C2410_TPAL; |
569 | 569 | ||
570 | if (blank_mode == FB_BLANK_POWERDOWN) { | 570 | if (blank_mode == FB_BLANK_POWERDOWN) |
571 | s3c2410fb_lcd_enable(fbi, 0); | 571 | s3c2410fb_lcd_enable(fbi, 0); |
572 | } else { | 572 | else |
573 | s3c2410fb_lcd_enable(fbi, 1); | 573 | s3c2410fb_lcd_enable(fbi, 1); |
574 | } | ||
575 | 574 | ||
576 | if (blank_mode == FB_BLANK_UNBLANK) | 575 | if (blank_mode == FB_BLANK_UNBLANK) |
577 | writel(0x0, tpal_reg); | 576 | writel(0x0, tpal_reg); |
@@ -812,7 +811,7 @@ static inline void s3c2410fb_cpufreq_deregister(struct s3c2410fb_info *info) | |||
812 | #endif | 811 | #endif |
813 | 812 | ||
814 | 813 | ||
815 | static char driver_name[] = "s3c2410fb"; | 814 | static const char driver_name[] = "s3c2410fb"; |
816 | 815 | ||
817 | static int __devinit s3c24xxfb_probe(struct platform_device *pdev, | 816 | static int __devinit s3c24xxfb_probe(struct platform_device *pdev, |
818 | enum s3c_drv_type drv_type) | 817 | enum s3c_drv_type drv_type) |
@@ -881,7 +880,10 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, | |||
881 | goto release_mem; | 880 | goto release_mem; |
882 | } | 881 | } |
883 | 882 | ||
884 | info->irq_base = info->io + ((drv_type == DRV_S3C2412) ? S3C2412_LCDINTBASE : S3C2410_LCDINTBASE); | 883 | if (drv_type == DRV_S3C2412) |
884 | info->irq_base = info->io + S3C2412_LCDINTBASE; | ||
885 | else | ||
886 | info->irq_base = info->io + S3C2410_LCDINTBASE; | ||
885 | 887 | ||
886 | dprintk("devinit\n"); | 888 | dprintk("devinit\n"); |
887 | 889 | ||
@@ -927,7 +929,7 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, | |||
927 | clk_enable(info->clk); | 929 | clk_enable(info->clk); |
928 | dprintk("got and enabled clock\n"); | 930 | dprintk("got and enabled clock\n"); |
929 | 931 | ||
930 | msleep(1); | 932 | usleep_range(1000, 1000); |
931 | 933 | ||
932 | info->clk_rate = clk_get_rate(info->clk); | 934 | info->clk_rate = clk_get_rate(info->clk); |
933 | 935 | ||
@@ -975,9 +977,8 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev, | |||
975 | 977 | ||
976 | /* create device files */ | 978 | /* create device files */ |
977 | ret = device_create_file(&pdev->dev, &dev_attr_debug); | 979 | ret = device_create_file(&pdev->dev, &dev_attr_debug); |
978 | if (ret) { | 980 | if (ret) |
979 | printk(KERN_ERR "failed to add debug attribute\n"); | 981 | printk(KERN_ERR "failed to add debug attribute\n"); |
980 | } | ||
981 | 982 | ||
982 | printk(KERN_INFO "fb%d: %s frame buffer device\n", | 983 | printk(KERN_INFO "fb%d: %s frame buffer device\n", |
983 | fbinfo->node, fbinfo->fix.id); | 984 | fbinfo->node, fbinfo->fix.id); |
@@ -1027,7 +1028,7 @@ static int __devexit s3c2410fb_remove(struct platform_device *pdev) | |||
1027 | s3c2410fb_cpufreq_deregister(info); | 1028 | s3c2410fb_cpufreq_deregister(info); |
1028 | 1029 | ||
1029 | s3c2410fb_lcd_enable(info, 0); | 1030 | s3c2410fb_lcd_enable(info, 0); |
1030 | msleep(1); | 1031 | usleep_range(1000, 1000); |
1031 | 1032 | ||
1032 | s3c2410fb_unmap_video_memory(fbinfo); | 1033 | s3c2410fb_unmap_video_memory(fbinfo); |
1033 | 1034 | ||
@@ -1064,7 +1065,7 @@ static int s3c2410fb_suspend(struct platform_device *dev, pm_message_t state) | |||
1064 | * the LCD DMA engine is not going to get back on the bus | 1065 | * the LCD DMA engine is not going to get back on the bus |
1065 | * before the clock goes off again (bjd) */ | 1066 | * before the clock goes off again (bjd) */ |
1066 | 1067 | ||
1067 | msleep(1); | 1068 | usleep_range(1000, 1000); |
1068 | clk_disable(info->clk); | 1069 | clk_disable(info->clk); |
1069 | 1070 | ||
1070 | return 0; | 1071 | return 0; |
@@ -1076,7 +1077,7 @@ static int s3c2410fb_resume(struct platform_device *dev) | |||
1076 | struct s3c2410fb_info *info = fbinfo->par; | 1077 | struct s3c2410fb_info *info = fbinfo->par; |
1077 | 1078 | ||
1078 | clk_enable(info->clk); | 1079 | clk_enable(info->clk); |
1079 | msleep(1); | 1080 | usleep_range(1000, 1000); |
1080 | 1081 | ||
1081 | s3c2410fb_init_registers(fbinfo); | 1082 | s3c2410fb_init_registers(fbinfo); |
1082 | 1083 | ||