Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95089
b: refs/heads/master
c: 2ba162b
h: refs/heads/master
i:
  95087: 8dcc9a2
v: v3
  • Loading branch information
Eric Miao authored and Linus Torvalds committed Apr 30, 2008
1 parent 29e0cd7 commit 740ac20
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7535ba730e13db037bd22c79c3805690d0945a2
refs/heads/master: 2ba162b9335c6e3ba90c77637372fc9f078aae67
12 changes: 4 additions & 8 deletions trunk/drivers/video/pxafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <linux/dma-mapping.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/completion.h>

#include <asm/hardware.h>
#include <asm/io.h>
Expand Down Expand Up @@ -810,20 +811,14 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
{
uint32_t lccr0;

DECLARE_WAITQUEUE(wait, current);

set_current_state(TASK_UNINTERRUPTIBLE);
add_wait_queue(&fbi->ctrlr_wait, &wait);

/* Clear LCD Status Register */
lcd_writel(fbi, LCSR, 0xffffffff);

lccr0 = lcd_readl(fbi, LCCR0) & ~LCCR0_LDM;
lcd_writel(fbi, LCCR0, lccr0);
lcd_writel(fbi, LCCR0, lccr0 | LCCR0_DIS);

schedule_timeout(200 * HZ / 1000);
remove_wait_queue(&fbi->ctrlr_wait, &wait);
wait_for_completion_timeout(&fbi->disable_done, 200 * HZ / 1000);

/* disable LCD controller clock */
clk_disable(fbi->clk);
Expand All @@ -840,7 +835,7 @@ static irqreturn_t pxafb_handle_irq(int irq, void *dev_id)
if (lcsr & LCSR_LDD) {
lccr0 = lcd_readl(fbi, LCCR0);
lcd_writel(fbi, LCCR0, lccr0 | LCCR0_LDM);
wake_up(&fbi->ctrlr_wait);
complete(&fbi->disable_done);
}

lcd_writel(fbi, LCSR, lcsr);
Expand Down Expand Up @@ -1190,6 +1185,7 @@ static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev)
init_waitqueue_head(&fbi->ctrlr_wait);
INIT_WORK(&fbi->task, pxafb_task);
init_MUTEX(&fbi->ctrlr_sem);
init_completion(&fbi->disable_done);

return fbi;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/video/pxafb.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ struct pxafb_info {
wait_queue_head_t ctrlr_wait;
struct work_struct task;

struct completion disable_done;

#ifdef CONFIG_CPU_FREQ
struct notifier_block freq_transition;
struct notifier_block freq_policy;
Expand Down

0 comments on commit 740ac20

Please sign in to comment.