summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongjin Kim <tobetter@gmail.com>2019-08-13 06:20:08 +0300
committerDongjin Kim <tobetter@gmail.com>2019-08-13 06:22:19 +0300
commit7dd95889d965e5beba61e40f402770ac94af696f (patch)
treed6e37d6e43a2ed391750e39434e839addf2717e7
parent353ecfd5c818c5aab031f2df805b6395a47b7962 (diff)
downloadu-boot-7dd95889d965e5beba61e40f402770ac94af696f.tar.xz
ODROID-C3/N2: removing CONFIG_SYS_MEM_TOP_HIDE to free 128MB
Change-Id: Ibe487370494eca5c70f4dc5bc373794b7accee2c Signed-off-by: Dongjin Kim <tobetter@gmail.com>
-rw-r--r--drivers/usb/gadget/f_fastboot.c6
-rw-r--r--include/configs/odroid-g12-common.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 250d27dadc..ec0dc3bccb 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -147,7 +147,11 @@ unsigned int ddr_size_usable(unsigned int addr_start)
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
ddr_size += gd->bd->bi_dram[i].size;
- free_size = (ddr_size - DRAM_UBOOT_RESERVE - addr_start - CONFIG_SYS_MALLOC_LEN - CONFIG_SYS_MEM_TOP_HIDE);
+ free_size = (ddr_size - DRAM_UBOOT_RESERVE - addr_start - CONFIG_SYS_MALLOC_LEN);
+#if defined(CONFIG_SYS_MEM_TOP_HIDE)
+ free_size -= CONFIG_SYS_MEM_TOP_HIDE
+#endif
+
#if defined CONFIG_FASTBOOT_MAX_DOWN_SIZE
if (free_size > CONFIG_FASTBOOT_MAX_DOWN_SIZE)
free_size = CONFIG_FASTBOOT_MAX_DOWN_SIZE;
diff --git a/include/configs/odroid-g12-common.h b/include/configs/odroid-g12-common.h
index 9278411c4e..90181c8b89 100644
--- a/include/configs/odroid-g12-common.h
+++ b/include/configs/odroid-g12-common.h
@@ -542,7 +542,6 @@
#define CONFIG_CMD_MISC 1
#define CONFIG_CMD_ITEST 1
#define CONFIG_CMD_CPU_TEMP 1
-#define CONFIG_SYS_MEM_TOP_HIDE 0x08000000 /* hide 128MB for kernel reserve */
#define CONFIG_CMD_LOADB 1
#define CONFIG_SUPPORT_RAW_INITRD 1