1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2018 Stefan Roese <sr@denx.de>
9 #include <linux/sizes.h>
11 DECLARE_GLOBAL_DATA_PTR;
15 #ifdef CONFIG_SKIP_LOWLEVEL_INIT
16 gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE, SZ_256M);
22 int last_stage_init(void)
29 printf("Can't allocate buffer for cache cleanup copy!\n");
34 * It has been noticed, that sometimes the d-cache is not in a
35 * "clean-state" when U-Boot is running on MT7688. This was
36 * detected when using the ethernet driver (which uses d-cache)
37 * and a TFTP command does not complete. Copying an area of 64KiB
38 * in DDR at a very late bootup time in U-Boot, directly before
39 * calling into the prompt, seems to fix this issue.
41 memcpy(dst, src, SZ_64K);