From b0c2581bfab411d6b714d127bf563a928e2d1fc7 Mon Sep 17 00:00:00 2001 From: Kent McLeod Date: Tue, 30 May 2023 17:02:41 +1000 Subject: [PATCH] elfloader: Replace calls to reset_cntvoff These calls can now be implemented via binding the /timer driver in the elfloader's device tree configuration (located in the kernel's platform directory). Signed-off-by: Kent McLeod --- .../src/plat/apq8064/platform_init.c | 21 ------------------ .../src/plat/bcm2711/platform_init.c | 21 ------------------ .../src/plat/bcm2837/platform_init.c | 21 ------------------ .../src/plat/exynos5/platform_init.c | 11 ---------- elfloader-tool/src/plat/fvp/platform_init.c | 9 -------- elfloader-tool/src/plat/hikey/platform_init.c | 21 ------------------ elfloader-tool/src/plat/imx7/platform_init.c | 21 ------------------ .../src/plat/imx8m-evk/platform_init.c | 21 ------------------ .../src/plat/maaxboard/platform_init.c | 22 ------------------- .../src/plat/odroidc2/platform_init.c | 21 ------------------ .../src/plat/odroidc4/platform_init.c | 21 ------------------ .../src/plat/qemu-arm-virt/platform_init.c | 21 ------------------ .../src/plat/quartz64/platform_init.c | 21 ------------------ .../src/plat/rockpro64/platform_init.c | 21 ------------------ elfloader-tool/src/plat/tk1/platform_init.c | 9 -------- .../src/plat/tqma8xqp1gb/platform_init.c | 21 ------------------ elfloader-tool/src/plat/tx1/platform_init.c | 21 ------------------ elfloader-tool/src/plat/tx2/platform_init.c | 11 ---------- .../src/plat/zynqmp/platform_init.c | 21 ------------------ 19 files changed, 356 deletions(-) delete mode 100644 elfloader-tool/src/plat/apq8064/platform_init.c delete mode 100644 elfloader-tool/src/plat/bcm2711/platform_init.c delete mode 100644 elfloader-tool/src/plat/bcm2837/platform_init.c delete mode 100644 elfloader-tool/src/plat/hikey/platform_init.c delete mode 100644 elfloader-tool/src/plat/imx7/platform_init.c delete mode 100644 elfloader-tool/src/plat/imx8m-evk/platform_init.c delete mode 100644 elfloader-tool/src/plat/maaxboard/platform_init.c delete mode 100644 elfloader-tool/src/plat/odroidc2/platform_init.c delete mode 100644 elfloader-tool/src/plat/odroidc4/platform_init.c delete mode 100644 elfloader-tool/src/plat/qemu-arm-virt/platform_init.c delete mode 100644 elfloader-tool/src/plat/quartz64/platform_init.c delete mode 100644 elfloader-tool/src/plat/rockpro64/platform_init.c delete mode 100644 elfloader-tool/src/plat/tqma8xqp1gb/platform_init.c delete mode 100644 elfloader-tool/src/plat/tx1/platform_init.c delete mode 100644 elfloader-tool/src/plat/zynqmp/platform_init.c diff --git a/elfloader-tool/src/plat/apq8064/platform_init.c b/elfloader-tool/src/plat/apq8064/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/apq8064/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/bcm2711/platform_init.c b/elfloader-tool/src/plat/bcm2711/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/bcm2711/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/bcm2837/platform_init.c b/elfloader-tool/src/plat/bcm2837/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/bcm2837/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/exynos5/platform_init.c b/elfloader-tool/src/plat/exynos5/platform_init.c index 4ae24903..82b993c9 100644 --- a/elfloader-tool/src/plat/exynos5/platform_init.c +++ b/elfloader-tool/src/plat/exynos5/platform_init.c @@ -92,15 +92,4 @@ void platform_init(void) nsscode->cpu1_boot_reg = 0; smc(SMC_DISABLE_TRUSTZONE, 0, 0, 0); } - - /* Reset the virtual offset for the platform timer to 0 */ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - /* Reset the virtual offset for the platform timer to 0 */ - reset_cntvoff(); } -#endif diff --git a/elfloader-tool/src/plat/fvp/platform_init.c b/elfloader-tool/src/plat/fvp/platform_init.c index 161c994b..aed6dc44 100644 --- a/elfloader-tool/src/plat/fvp/platform_init.c +++ b/elfloader-tool/src/plat/fvp/platform_init.c @@ -21,14 +21,5 @@ void platform_init(void) "msr tpidr_el0, x0\n" ::: "x0"); - /* Reset the virtual offset for the platform timer to 0 */ - reset_cntvoff(); } -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - /* Reset the virtual offset for the platform timer to 0 */ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/hikey/platform_init.c b/elfloader-tool/src/plat/hikey/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/hikey/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/imx7/platform_init.c b/elfloader-tool/src/plat/imx7/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/imx7/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/imx8m-evk/platform_init.c b/elfloader-tool/src/plat/imx8m-evk/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/imx8m-evk/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/maaxboard/platform_init.c b/elfloader-tool/src/plat/maaxboard/platform_init.c deleted file mode 100644 index 78302edf..00000000 --- a/elfloader-tool/src/plat/maaxboard/platform_init.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * Copyright 2022, Capgemini Engineering - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/odroidc2/platform_init.c b/elfloader-tool/src/plat/odroidc2/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/odroidc2/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/odroidc4/platform_init.c b/elfloader-tool/src/plat/odroidc4/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/odroidc4/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/qemu-arm-virt/platform_init.c b/elfloader-tool/src/plat/qemu-arm-virt/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/qemu-arm-virt/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/quartz64/platform_init.c b/elfloader-tool/src/plat/quartz64/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/quartz64/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/rockpro64/platform_init.c b/elfloader-tool/src/plat/rockpro64/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/rockpro64/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/tk1/platform_init.c b/elfloader-tool/src/plat/tk1/platform_init.c index 4ea6da26..a811fd2a 100644 --- a/elfloader-tool/src/plat/tk1/platform_init.c +++ b/elfloader-tool/src/plat/tk1/platform_init.c @@ -309,14 +309,5 @@ void platform_init(void) switch_to_mon_mode(); #endif - /* Reset the virtual offset for the platform timer to 0 */ - reset_cntvoff(); } -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - /* Reset the virtual offset for the platform timer to 0 */ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/tqma8xqp1gb/platform_init.c b/elfloader-tool/src/plat/tqma8xqp1gb/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/tqma8xqp1gb/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/tx1/platform_init.c b/elfloader-tool/src/plat/tx1/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/tx1/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif diff --git a/elfloader-tool/src/plat/tx2/platform_init.c b/elfloader-tool/src/plat/tx2/platform_init.c index d6432094..9a2eeb5b 100644 --- a/elfloader-tool/src/plat/tx2/platform_init.c +++ b/elfloader-tool/src/plat/tx2/platform_init.c @@ -84,15 +84,4 @@ static void enable_serr(void) void platform_init(void) { enable_serr(); - - /* Reset the virtual offset for the platform timer to 0 */ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - /* Reset the virtual offset for the platform timer to 0 */ - reset_cntvoff(); } -#endif diff --git a/elfloader-tool/src/plat/zynqmp/platform_init.c b/elfloader-tool/src/plat/zynqmp/platform_init.c deleted file mode 100644 index 42dabfa0..00000000 --- a/elfloader-tool/src/plat/zynqmp/platform_init.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) - * - * SPDX-License-Identifier: GPL-2.0-only - */ - -#include -#include - -/* Reset the virtual offset for the platform timer to 0 */ -void platform_init(void) -{ - reset_cntvoff(); -} - -#if CONFIG_MAX_NUM_NODES > 1 -void non_boot_init(void) -{ - reset_cntvoff(); -} -#endif