mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
video: atmel_hlcdfb: Fix misaligned cache operation warning
Fix the warning, ---8<--- CACHE: Misaligned operation at range [3fdffff0, 3fdffffc] ---<8--- Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:

committed by
Anatolij Gustschin

parent
b98efa1db3
commit
31e5c892b3
@ -426,7 +426,9 @@ static void atmel_hlcdc_init(struct udevice *dev)
|
|||||||
writel(~0UL, ®s->lcdc_baseidr);
|
writel(~0UL, ®s->lcdc_baseidr);
|
||||||
|
|
||||||
/* Setup the DMA descriptor, this descriptor will loop to itself */
|
/* Setup the DMA descriptor, this descriptor will loop to itself */
|
||||||
desc = (struct lcd_dma_desc *)(uc_plat->base - 16);
|
desc = memalign(CONFIG_SYS_CACHELINE_SIZE, sizeof(*desc));
|
||||||
|
if (!desc)
|
||||||
|
return;
|
||||||
|
|
||||||
desc->address = (u32)uc_plat->base;
|
desc->address = (u32)uc_plat->base;
|
||||||
|
|
||||||
@ -436,7 +438,9 @@ static void atmel_hlcdc_init(struct udevice *dev)
|
|||||||
desc->next = (u32)desc;
|
desc->next = (u32)desc;
|
||||||
|
|
||||||
/* Flush the DMA descriptor if we enabled dcache */
|
/* Flush the DMA descriptor if we enabled dcache */
|
||||||
flush_dcache_range((u32)desc, (u32)desc + sizeof(*desc));
|
flush_dcache_range((u32)desc,
|
||||||
|
ALIGN(((u32)desc + sizeof(*desc)),
|
||||||
|
CONFIG_SYS_CACHELINE_SIZE));
|
||||||
|
|
||||||
writel(desc->address, ®s->lcdc_baseaddr);
|
writel(desc->address, ®s->lcdc_baseaddr);
|
||||||
writel(desc->control, ®s->lcdc_basectrl);
|
writel(desc->control, ®s->lcdc_basectrl);
|
||||||
|
Reference in New Issue
Block a user