Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 27th, 2012  |  syntax: None  |  size: 1.23 KB  |  views: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/firmware/target/arm/rk27xx/lcdif-rk27xx.c b/firmware/target/arm/rk27xx/lcdif-rk27xx.c
  2. index 01b1960..4194ae7 100644
  3. --- a/firmware/target/arm/rk27xx/lcdif-rk27xx.c
  4. +++ b/firmware/target/arm/rk27xx/lcdif-rk27xx.c
  5. @@ -113,7 +113,7 @@ static void lcdctrl_init(void)
  6.       * on second lcd_update call
  7.       */
  8.      for (i=0; i<2048; i++)
  9. -        *((uint32_t *)LCD_BUFF + i) = 0;
  10. +        *((volatile uint32_t *)LCD_BUFF + i) = 0;
  11.  
  12.      /* Setup buffered writes to lcd controler */
  13.      MCU_CTRL = MCU_CTRL_RS_HIGH|MCU_CTRL_BUFF_WRITE|MCU_CTRL_BUFF_START;
  14. @@ -142,7 +142,7 @@ static void dwdma_init(void)
  15.      DWDMA_DMA_CFG = 1;        /* global enable */
  16.  }
  17.  
  18. -static void llp_setup(void *src, void *dst, struct llp_t *llp, uint32_t size)
  19. +static void llp_setup(void *src, volatile void *dst, struct llp_t *llp, uint32_t size)
  20.  {
  21.      llp->sar = (uint32_t)src;
  22.      llp->dar = (uint32_t)dst;
  23. @@ -194,7 +194,7 @@ static void create_llp(void)
  24.      /* build LLPs */
  25.      for (i=0; i<LCD_HEIGHT; i++)
  26.          llp_setup((void *)FBADDR(0,i),
  27. -                  (void*)(LCD_BUFF+((i%4)*4*LCD_WIDTH/2)),
  28. +                  (LCD_BUFF+((i%4)*4*LCD_WIDTH/2)),
  29.                    &(scr_llp[i]),
  30.                    LCD_WIDTH/2);