From 2e5e4e251a0948438cc4d6a4316603cb2938291d Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 29 Jan 2025 18:04:29 +0100 Subject: ARM: renesas: Rename common/common.c to common/rcar64-common.c The common.c content is specific to 64-bit R-Car SoCs, rename the file to rcar64-common.c and remove R-Car 64-bit ifdeffery in the file. No functional change. Reviewed-by: Quentin Schulz Signed-off-by: Marek Vasut --- board/beacon/beacon-rzg2m/Makefile | 2 +- board/hoperun/hihope-rzg2/Makefile | 2 +- board/renesas/common/Makefile | 2 +- board/renesas/common/common.c | 67 ------------------------------------ board/renesas/common/rcar64-common.c | 67 ++++++++++++++++++++++++++++++++++++ board/silinux/ek874/Makefile | 2 +- 6 files changed, 71 insertions(+), 71 deletions(-) delete mode 100644 board/renesas/common/common.c create mode 100644 board/renesas/common/rcar64-common.c diff --git a/board/beacon/beacon-rzg2m/Makefile b/board/beacon/beacon-rzg2m/Makefile index 6a6ae94def8..10b7a7fbfa9 100644 --- a/board/beacon/beacon-rzg2m/Makefile +++ b/board/beacon/beacon-rzg2m/Makefile @@ -6,4 +6,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y := beacon-rzg2m.o ../../renesas/common/gen3-common.o ../../renesas/common/common.o +obj-y := beacon-rzg2m.o ../../renesas/common/gen3-common.o ../../renesas/common/rcar64-common.o diff --git a/board/hoperun/hihope-rzg2/Makefile b/board/hoperun/hihope-rzg2/Makefile index a42c55b9d00..299769c9cb6 100644 --- a/board/hoperun/hihope-rzg2/Makefile +++ b/board/hoperun/hihope-rzg2/Makefile @@ -6,4 +6,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y := hihope-rzg2.o ../../renesas/common/gen3-common.o ../../renesas/common/common.o +obj-y := hihope-rzg2.o ../../renesas/common/gen3-common.o ../../renesas/common/rcar64-common.o diff --git a/board/renesas/common/Makefile b/board/renesas/common/Makefile index c531738b22e..8c26c0afd90 100644 --- a/board/renesas/common/Makefile +++ b/board/renesas/common/Makefile @@ -18,7 +18,7 @@ endif # 64 bit SoCs ifdef CONFIG_RCAR_64 ifndef CONFIG_XPL_BUILD -obj-y += common.o +obj-y += rcar64-common.o endif ifdef CONFIG_RCAR_GEN3 diff --git a/board/renesas/common/common.c b/board/renesas/common/common.c deleted file mode 100644 index 74ec0a46e6f..00000000000 --- a/board/renesas/common/common.c +++ /dev/null @@ -1,67 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * board/renesas/common/common.c - * - * Copyright (C) 2013 Renesas Electronics Corporation - * Copyright (C) 2013 Nobuhiro Iwamatsu - * Copyright (C) 2015 Nobuhiro Iwamatsu - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -DECLARE_GLOBAL_DATA_PTR; - -int dram_init(void) -{ - int ret = fdtdec_setup_mem_size_base(); - - if (current_el() == 3 && gd->ram_base == 0x48000000) { - /* - * If this U-Boot runs in EL3, make the bottom 128 MiB - * available for loading of follow up firmware blobs. - */ - gd->ram_base -= 0x8000000; - gd->ram_size += 0x8000000; - } - - return ret; -} - -int dram_init_banksize(void) -{ - int bank; - - fdtdec_setup_memory_banksize(); - - if (current_el() != 3) - return 0; - - for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) { - if (gd->bd->bi_dram[bank].start != 0x48000000) - continue; - - /* - * If this U-Boot runs in EL3, make the bottom 128 MiB - * available for loading of follow up firmware blobs. - */ - gd->bd->bi_dram[bank].start -= 0x8000000; - gd->bd->bi_dram[bank].size += 0x8000000; - break; - } - - return 0; -} - -int __weak board_init(void) -{ - return 0; -} diff --git a/board/renesas/common/rcar64-common.c b/board/renesas/common/rcar64-common.c new file mode 100644 index 00000000000..74ec0a46e6f --- /dev/null +++ b/board/renesas/common/rcar64-common.c @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * board/renesas/common/common.c + * + * Copyright (C) 2013 Renesas Electronics Corporation + * Copyright (C) 2013 Nobuhiro Iwamatsu + * Copyright (C) 2015 Nobuhiro Iwamatsu + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +int dram_init(void) +{ + int ret = fdtdec_setup_mem_size_base(); + + if (current_el() == 3 && gd->ram_base == 0x48000000) { + /* + * If this U-Boot runs in EL3, make the bottom 128 MiB + * available for loading of follow up firmware blobs. + */ + gd->ram_base -= 0x8000000; + gd->ram_size += 0x8000000; + } + + return ret; +} + +int dram_init_banksize(void) +{ + int bank; + + fdtdec_setup_memory_banksize(); + + if (current_el() != 3) + return 0; + + for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) { + if (gd->bd->bi_dram[bank].start != 0x48000000) + continue; + + /* + * If this U-Boot runs in EL3, make the bottom 128 MiB + * available for loading of follow up firmware blobs. + */ + gd->bd->bi_dram[bank].start -= 0x8000000; + gd->bd->bi_dram[bank].size += 0x8000000; + break; + } + + return 0; +} + +int __weak board_init(void) +{ + return 0; +} diff --git a/board/silinux/ek874/Makefile b/board/silinux/ek874/Makefile index c1cab6fa788..0beda63d115 100644 --- a/board/silinux/ek874/Makefile +++ b/board/silinux/ek874/Makefile @@ -9,5 +9,5 @@ ifdef CONFIG_XPL_BUILD obj-y := ../../renesas/common/gen3-spl.o else -obj-y := ek874.o ../../renesas/common/gen3-common.o ../../renesas/common/common.o +obj-y := ek874.o ../../renesas/common/gen3-common.o ../../renesas/common/rcar64-common.o endif -- cgit v1.3.1