From 5fc564eda7cc99a37fa485b452fdcc1260ee2d4f Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Fri, 7 Aug 2009 02:47:54 +0000 Subject: Blackfin: shutdown video DMA when booting Linux In case there is no frame buffer driver present in Linux to hand over the PPI LCD DMA upon boot, the DMA initiated by u-boot to display the splash screen runs unattended. Therefore always stop the video driver in u-boot before starting Linux. If people don't want this behavior, then they can simply stub out the video_stop() function in their board video driver. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger --- board/bf527-ezkit/video.c | 11 +++++++++++ board/bf533-stamp/video.c | 6 ++++++ board/bf548-ezkit/video.c | 6 ++++++ board/cm-bf548/video.c | 6 ++++++ 4 files changed, 29 insertions(+) (limited to 'board') diff --git a/board/bf527-ezkit/video.c b/board/bf527-ezkit/video.c index 891070b575..51bdf02041 100644 --- a/board/bf527-ezkit/video.c +++ b/board/bf527-ezkit/video.c @@ -378,6 +378,17 @@ static void dma_bitblit(void *dst, fastimage_t *logo, int x, int y) } +void video_stop(void) +{ + DisablePPI(); + DisableDMA(); + DisableTIMER0(); + DisableTIMER1(); +#ifdef CONFIG_MK_BF527_EZKIT_REV_2_1 + lq035q1_control(LQ035_SHUT_CTL, LQ035_SHUT); +#endif +} + void video_putc(const char c) { } diff --git a/board/bf533-stamp/video.c b/board/bf533-stamp/video.c index 939bd35a03..75b8adca15 100644 --- a/board/bf533-stamp/video.c +++ b/board/bf533-stamp/video.c @@ -150,6 +150,12 @@ static void video_init(char *NTSCFrame) bfin_write_PPI_CONTROL(0x0083); } +void video_stop(void) +{ + bfin_write_PPI_CONTROL(0); + bfin_write_DMA0_CONFIG(0); +} + int drv_video_init(void) { struct stdio_dev videodev; diff --git a/board/bf548-ezkit/video.c b/board/bf548-ezkit/video.c index af3d58bdd3..cde877aa0c 100644 --- a/board/bf548-ezkit/video.c +++ b/board/bf548-ezkit/video.c @@ -224,6 +224,12 @@ int video_init(void *dst) return 0; } +void video_stop(void) +{ + DisablePPI(); + DisableDMA(); +} + static void dma_bitblit(void *dst, fastimage_t *logo, int x, int y) { if (dcache_status()) diff --git a/board/cm-bf548/video.c b/board/cm-bf548/video.c index d43f5a1dfc..c501697404 100644 --- a/board/cm-bf548/video.c +++ b/board/cm-bf548/video.c @@ -225,6 +225,12 @@ int video_init(void *dst) return 0; } +void video_stop(void) +{ + DisablePPI(); + DisableDMA(); +} + static void dma_bitblit(void *dst, fastimage_t *logo, int x, int y) { if (dcache_status()) -- cgit v1.2.3