diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2008-08-20 17:09:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-20 18:40:31 -0400 |
commit | 141d87e7debe3334018e46859c7565c44cebda65 (patch) | |
tree | 6dc54cd1847b7025b02dfe7549574c9f9857624d /drivers/video/bf54x-lq043fb.c | |
parent | 481ebd0d76b501c5772f702ae31e55350c0858a3 (diff) |
Video/Framebuffer: add fuctional power management support to Blackfin BF54x LQ043 framebuffer driver
Fix bug: does nor properply resume after suspend mem
Fix for PM_SUSPEND_MEM: Save and restore peripheral base and DMA registers
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/bf54x-lq043fb.c')
-rw-r--r-- | drivers/video/bf54x-lq043fb.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c index 940467aed13f..6d5aa806777e 100644 --- a/drivers/video/bf54x-lq043fb.c +++ b/drivers/video/bf54x-lq043fb.c | |||
@@ -733,7 +733,6 @@ static int bfin_bf54x_remove(struct platform_device *pdev) | |||
733 | static int bfin_bf54x_suspend(struct platform_device *pdev, pm_message_t state) | 733 | static int bfin_bf54x_suspend(struct platform_device *pdev, pm_message_t state) |
734 | { | 734 | { |
735 | struct fb_info *fbinfo = platform_get_drvdata(pdev); | 735 | struct fb_info *fbinfo = platform_get_drvdata(pdev); |
736 | struct bfin_bf54xfb_info *info = fbinfo->par; | ||
737 | 736 | ||
738 | bfin_write_EPPI0_CONTROL(bfin_read_EPPI0_CONTROL() & ~EPPI_EN); | 737 | bfin_write_EPPI0_CONTROL(bfin_read_EPPI0_CONTROL() & ~EPPI_EN); |
739 | disable_dma(CH_EPPI0); | 738 | disable_dma(CH_EPPI0); |
@@ -747,8 +746,18 @@ static int bfin_bf54x_resume(struct platform_device *pdev) | |||
747 | struct fb_info *fbinfo = platform_get_drvdata(pdev); | 746 | struct fb_info *fbinfo = platform_get_drvdata(pdev); |
748 | struct bfin_bf54xfb_info *info = fbinfo->par; | 747 | struct bfin_bf54xfb_info *info = fbinfo->par; |
749 | 748 | ||
750 | enable_dma(CH_EPPI0); | 749 | if (info->lq043_open_cnt) { |
751 | bfin_write_EPPI0_CONTROL(bfin_read_EPPI0_CONTROL() | EPPI_EN); | 750 | |
751 | bfin_write_EPPI0_CONTROL(0); | ||
752 | SSYNC(); | ||
753 | |||
754 | config_dma(info); | ||
755 | config_ppi(info); | ||
756 | |||
757 | /* start dma */ | ||
758 | enable_dma(CH_EPPI0); | ||
759 | bfin_write_EPPI0_CONTROL(bfin_read_EPPI0_CONTROL() | EPPI_EN); | ||
760 | } | ||
752 | 761 | ||
753 | return 0; | 762 | return 0; |
754 | } | 763 | } |