mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-31 19:41:46 +00:00
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 <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
69a2a4d9a5
commit
5fc564eda7
5 changed files with 38 additions and 0 deletions
|
@ -18,6 +18,10 @@
|
||||||
extern void swap_to(int device_id);
|
extern void swap_to(int device_id);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_VIDEO
|
||||||
|
extern void video_stop(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
static char *make_command_line(void)
|
static char *make_command_line(void)
|
||||||
{
|
{
|
||||||
char *dest = (char *)CONFIG_LINUX_CMDLINE_ADDR;
|
char *dest = (char *)CONFIG_LINUX_CMDLINE_ADDR;
|
||||||
|
@ -45,6 +49,11 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
|
||||||
swap_to(FLASH);
|
swap_to(FLASH);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_VIDEO
|
||||||
|
/* maybe this should be standardized and moved to bootm ... */
|
||||||
|
video_stop();
|
||||||
|
#endif
|
||||||
|
|
||||||
appl = (int (*)(char *))images->ep;
|
appl = (int (*)(char *))images->ep;
|
||||||
|
|
||||||
printf("Starting Kernel at = %p\n", appl);
|
printf("Starting Kernel at = %p\n", appl);
|
||||||
|
|
|
@ -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)
|
void video_putc(const char c)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,6 +150,12 @@ static void video_init(char *NTSCFrame)
|
||||||
bfin_write_PPI_CONTROL(0x0083);
|
bfin_write_PPI_CONTROL(0x0083);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void video_stop(void)
|
||||||
|
{
|
||||||
|
bfin_write_PPI_CONTROL(0);
|
||||||
|
bfin_write_DMA0_CONFIG(0);
|
||||||
|
}
|
||||||
|
|
||||||
int drv_video_init(void)
|
int drv_video_init(void)
|
||||||
{
|
{
|
||||||
struct stdio_dev videodev;
|
struct stdio_dev videodev;
|
||||||
|
|
|
@ -224,6 +224,12 @@ int video_init(void *dst)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void video_stop(void)
|
||||||
|
{
|
||||||
|
DisablePPI();
|
||||||
|
DisableDMA();
|
||||||
|
}
|
||||||
|
|
||||||
static void dma_bitblit(void *dst, fastimage_t *logo, int x, int y)
|
static void dma_bitblit(void *dst, fastimage_t *logo, int x, int y)
|
||||||
{
|
{
|
||||||
if (dcache_status())
|
if (dcache_status())
|
||||||
|
|
|
@ -225,6 +225,12 @@ int video_init(void *dst)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void video_stop(void)
|
||||||
|
{
|
||||||
|
DisablePPI();
|
||||||
|
DisableDMA();
|
||||||
|
}
|
||||||
|
|
||||||
static void dma_bitblit(void *dst, fastimage_t *logo, int x, int y)
|
static void dma_bitblit(void *dst, fastimage_t *logo, int x, int y)
|
||||||
{
|
{
|
||||||
if (dcache_status())
|
if (dcache_status())
|
||||||
|
|
Loading…
Add table
Reference in a new issue