git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git]
/
drivers
/
video
/
s3c2410fb.c
diff --git
a/drivers/video/s3c2410fb.c
b/drivers/video/s3c2410fb.c
index
9451932
..
ad3bdd6
100644
(file)
--- a/
drivers/video/s3c2410fb.c
+++ b/
drivers/video/s3c2410fb.c
@@
-76,7
+76,6
@@
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
-#include <linux/tty.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/fb.h>
@@
-641,6
+640,7
@@
static int __init s3c2410fb_probe(struct platform_device *pdev)
int ret;
int irq;
int i;
int ret;
int irq;
int i;
+ u32 lcdcon1;
mach_info = pdev->dev.platform_data;
if (mach_info == NULL) {
mach_info = pdev->dev.platform_data;
if (mach_info == NULL) {
@@
-672,6
+672,11
@@
static int __init s3c2410fb_probe(struct platform_device *pdev)
memcpy(&info->regs, &mach_info->regs, sizeof(info->regs));
memcpy(&info->regs, &mach_info->regs, sizeof(info->regs));
+ /* Stop the video and unset ENVID if set */
+ info->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID;
+ lcdcon1 = readl(S3C2410_LCDCON1);
+ writel(lcdcon1 & ~S3C2410_LCDCON1_ENVID, S3C2410_LCDCON1);
+
info->mach_info = pdev->dev.platform_data;
fbinfo->fix.type = FB_TYPE_PACKED_PIXELS;
info->mach_info = pdev->dev.platform_data;
fbinfo->fix.type = FB_TYPE_PACKED_PIXELS;
@@
-729,7
+734,7
@@
static int __init s3c2410fb_probe(struct platform_device *pdev)
dprintk("got LCD region\n");
dprintk("got LCD region\n");
- ret = request_irq(irq, s3c2410fb_irq,
SA_INTERRUPT
, pdev->name, info);
+ ret = request_irq(irq, s3c2410fb_irq,
IRQF_DISABLED
, pdev->name, info);
if (ret) {
dev_err(&pdev->dev, "cannot get irq %d - err %d\n", irq, ret);
ret = -EBUSY;
if (ret) {
dev_err(&pdev->dev, "cannot get irq %d - err %d\n", irq, ret);
ret = -EBUSY;
@@
-794,15
+799,14
@@
dealloc_fb:
* shutdown the lcd controller
*/
* shutdown the lcd controller
*/
-static void s3c2410fb_stop_lcd(
void
)
+static void s3c2410fb_stop_lcd(
struct s3c2410fb_info *fbi
)
{
unsigned long flags;
{
unsigned long flags;
- unsigned long tmp;
local_irq_save(flags);
local_irq_save(flags);
-
tmp = readl(S3C2410_LCDCON1)
;
- writel(
tmp & ~S3C2410_LCDCON1_ENVID
, S3C2410_LCDCON1);
+
fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID
;
+ writel(
fbi->regs.lcdcon1
, S3C2410_LCDCON1);
local_irq_restore(flags);
}
local_irq_restore(flags);
}
@@
-816,7
+820,7
@@
static int s3c2410fb_remove(struct platform_device *pdev)
struct s3c2410fb_info *info = fbinfo->par;
int irq;
struct s3c2410fb_info *info = fbinfo->par;
int irq;
- s3c2410fb_stop_lcd();
+ s3c2410fb_stop_lcd(
info
);
msleep(1);
s3c2410fb_unmap_video_memory(info);
msleep(1);
s3c2410fb_unmap_video_memory(info);
@@
-844,7
+848,7
@@
static int s3c2410fb_suspend(struct platform_device *dev, pm_message_t state)
struct fb_info *fbinfo = platform_get_drvdata(dev);
struct s3c2410fb_info *info = fbinfo->par;
struct fb_info *fbinfo = platform_get_drvdata(dev);
struct s3c2410fb_info *info = fbinfo->par;
- s3c2410fb_stop_lcd();
+ s3c2410fb_stop_lcd(
info
);
/* sleep before disabling the clock, we need to ensure
* the LCD DMA engine is not going to get back on the bus
/* sleep before disabling the clock, we need to ensure
* the LCD DMA engine is not going to get back on the bus