[U-Boot] [PATCH 07/10] sunxi: Fix end of kernel memory alignment for A33

Hans de Goede hdegoede at redhat.com
Tue Apr 14 18:06:58 CEST 2015


For unknown reasons the A33 needs the end of the memory we report to the
kernel to be aligned to a multiple of 4 MiB. Without this things will hang
when we hand over control to the kernel.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 drivers/video/sunxi_display.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/video/sunxi_display.c b/drivers/video/sunxi_display.c
index e132b75..7a63094 100644
--- a/drivers/video/sunxi_display.c
+++ b/drivers/video/sunxi_display.c
@@ -1275,6 +1275,15 @@ int sunxi_simplefb_setup(void *blob)
 	 */
 	start = gd->bd->bi_dram[0].start;
 	size = gd->bd->bi_dram[0].size - sunxi_display.fb_size;
+	/*
+	 * For unknown reasons the A33 needs the end of the memory we report to
+	 * the kernel to be aligned to a multiple of 4 MiB. Without this things
+	 * will hang when we hand over control to the kernel.
+	 */
+#ifdef CONFIG_MACH_SUN8I_A33
+	size &= ~(4 * 1024 * 1024 - 1);
+#endif
+
 	ret = fdt_fixup_memory_banks(blob, &start, &size, 1);
 	if (ret) {
 		eprintf("Cannot setup simplefb: Error reserving memory\n");
-- 
2.3.4



More information about the U-Boot mailing list