From: Hans de Goede Date: Tue, 14 Apr 2015 18:06:58 +0200 Subject: [U-Boot] [PATCH 07/10] sunxi: Fix end of kernel memory alignment for A33 In-Reply-To: <1429027621-19252-1-git-send-email-hdegoede@redhat.com> References: <1429027621-19252-1-git-send-email-hdegoede@redhat.com> Message-ID: <1429027621-19252-7-git-send-email-hdegoede@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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