public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] video: atmel_hlcdfb: Fix misaligned cache operation warning
@ 2017-06-02  3:29 Wenyou Yang
  2017-06-06 21:08 ` Simon Glass
  2017-06-09 13:36 ` Anatolij Gustschin
  0 siblings, 2 replies; 3+ messages in thread
From: Wenyou Yang @ 2017-06-02  3:29 UTC (permalink / raw)
  To: u-boot

Fix the warning,
 ---8<---
CACHE: Misaligned operation at range [3fdffff0, 3fdffffc]
 ---<8---

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---

 drivers/video/atmel_hlcdfb.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 47078fdaae..f77da2ec97 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -426,7 +426,9 @@ static void atmel_hlcdc_init(struct udevice *dev)
 	writel(~0UL, &regs->lcdc_baseidr);
 
 	/* 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;
 
@@ -436,7 +438,9 @@ static void atmel_hlcdc_init(struct udevice *dev)
 	desc->next = (u32)desc;
 
 	/* 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, &regs->lcdc_baseaddr);
 	writel(desc->control, &regs->lcdc_basectrl);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] video: atmel_hlcdfb: Fix misaligned cache operation warning
  2017-06-02  3:29 [U-Boot] [PATCH] video: atmel_hlcdfb: Fix misaligned cache operation warning Wenyou Yang
@ 2017-06-06 21:08 ` Simon Glass
  2017-06-09 13:36 ` Anatolij Gustschin
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2017-06-06 21:08 UTC (permalink / raw)
  To: u-boot

On 1 June 2017 at 21:29, Wenyou Yang <wenyou.yang@atmel.com> wrote:
> Fix the warning,
>  ---8<---
> CACHE: Misaligned operation at range [3fdffff0, 3fdffffc]
>  ---<8---
>
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> ---
>
>  drivers/video/atmel_hlcdfb.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] video: atmel_hlcdfb: Fix misaligned cache operation warning
  2017-06-02  3:29 [U-Boot] [PATCH] video: atmel_hlcdfb: Fix misaligned cache operation warning Wenyou Yang
  2017-06-06 21:08 ` Simon Glass
@ 2017-06-09 13:36 ` Anatolij Gustschin
  1 sibling, 0 replies; 3+ messages in thread
From: Anatolij Gustschin @ 2017-06-09 13:36 UTC (permalink / raw)
  To: u-boot

On Fri, 2 Jun 2017 11:29:04 +0800
Wenyou Yang wenyou.yang at atmel.com wrote:

> Fix the warning,
>  ---8<---
> CACHE: Misaligned operation at range [3fdffff0, 3fdffffc]
>  ---<8---
> 
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> ---
> 
>  drivers/video/atmel_hlcdfb.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

applied to u-boot-video/master, thanks!

--
Anatolij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-09 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-02  3:29 [U-Boot] [PATCH] video: atmel_hlcdfb: Fix misaligned cache operation warning Wenyou Yang
2017-06-06 21:08 ` Simon Glass
2017-06-09 13:36 ` Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox