*/
#include <common.h>
-#include <malloc.h>
+#include <memalign.h>
#include <video_fb.h>
#include <linux/list.h>
#include <linux/fb.h>
da8xx_lcd_cfg->bpp);
size = sizeof(struct fb_info) + sizeof(struct da8xx_fb_par);
- da8xx_fb_info = malloc(size);
+ da8xx_fb_info = malloc_cache_aligned(size);
debug("da8xx_fb_info at %x\n", (unsigned int)da8xx_fb_info);
if (!da8xx_fb_info) {
da8xx_lcd_cfg->bpp;
par->vram_size = par->vram_size * LCD_NUM_BUFFERS / 8;
- par->vram_virt = malloc(par->vram_size);
+ par->vram_virt = malloc_cache_aligned(par->vram_size);
par->vram_phys = (dma_addr_t) par->vram_virt;
debug("Requesting 0x%x bytes for framebuffer at 0x%x\n",
da8xx_fb_fix.line_length - 1;
/* allocate palette buffer */
- par->v_palette_base = malloc(PALETTE_SIZE);
+ par->v_palette_base = malloc_cache_aligned(PALETTE_SIZE);
if (!par->v_palette_base) {
printf("GLCD: malloc for palette buffer failed\n");
goto err_release_fb_mem;