From feb423a3a3d34ed7903d6eb833ddd0593a410474 Mon Sep 17 00:00:00 2001 From: Sughosh Ganu Date: Fri, 25 Oct 2024 22:57:23 +0530 Subject: common: memtop: add logic to detect ram_top Add generic logic to determine the ram_top value for boards. Earlier, this was achieved in an indirect manner through a set of LMB API's. That has since changed so that the LMB code is available only after relocation. Replace those LMB calls with a single call to get_mem_top() to determine the value of ram_top. Signed-off-by: Sughosh Ganu Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20241025172724.195093-2-sughosh.ganu@linaro.org Signed-off-by: Michal Simek --- include/memtop.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/memtop.h (limited to 'include') diff --git a/include/memtop.h b/include/memtop.h new file mode 100644 index 00000000000..28f62e24ea7 --- /dev/null +++ b/include/memtop.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (c) 2024, Linaro Limited + */ + +/** + * get_mem_top() - Compute the value of ram_top + * @ram_start: Start of RAM + * @ram_size: RAM size + * @size: Minimum RAM size requested + * @fdt: FDT blob + * + * The function computes the top address of RAM memory that can be + * used by U-Boot. This is being done by going through the list of + * reserved memory regions specified in the devicetree blob passed + * to the function. The logic used here is derived from the lmb + * allocation function. + * + * Return: address of ram top on success, 0 on failure + */ +phys_addr_t get_mem_top(phys_addr_t ram_start, phys_size_t ram_size, + phys_size_t size, void *fdt); -- cgit v1.2.3 From 57066053b6f6b60a72fa82138ae92a44511cc9d4 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Fri, 15 Nov 2024 09:38:55 +0100 Subject: microblaze: Disable JFFS2 support JFFS2 is not maintained for quite a long time and none should be using it. Please use other filesystems for flashes like UBIFS instead. Also remove jffs to MTD map but MTD map is for example that's why it won't affect anything. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/a8239acee8886229fdbff66142c46d522e3fe851.1731659933.git.michal.simek@amd.com --- include/configs/microblaze-generic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 6740ab2be3e..3bcc4c48dc8 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -82,7 +82,7 @@ "nor0=flash-0\0"\ "mtdparts=mtdparts=flash-0:"\ "256k(u-boot),256k(env),3m(kernel),"\ - "1m(romfs),1m(cramfs),-(jffs2)\0"\ + "1m(romfs),1m(cramfs),-(fs)\0"\ "nc=setenv stdout nc;"\ "setenv stdin nc\0" \ "serial=setenv stdout serial;"\ -- cgit v1.2.3