diff options
| -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 | } |
