From b7f2cd268b639c19f3aae09e57e60d3eb2ac2ed0 Mon Sep 17 00:00:00 2001 From: Green Wan <green.wan@sifive.com> Date: Thu, 1 Jul 2021 15:39:55 +0800 Subject: lib: utils: reset: unify naming of 'sifive_test' device Unify all the file and function names of 'sifive_test' device, to use the same prefix. This is also a preparatory patch for upcoming sifive reset device. Signed-off-by: Green Wan <green.wan@sifive.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anup Patel <anup.patel@wdc.com> --- lib/utils/reset/fdt_reset.c | 4 ++-- lib/utils/reset/fdt_reset_sifive.c | 36 --------------------------------- lib/utils/reset/fdt_reset_sifive_test.c | 36 +++++++++++++++++++++++++++++++++ lib/utils/reset/objects.mk | 2 +- 4 files changed, 39 insertions(+), 39 deletions(-) delete mode 100644 lib/utils/reset/fdt_reset_sifive.c create mode 100644 lib/utils/reset/fdt_reset_sifive_test.c (limited to 'lib') diff --git a/lib/utils/reset/fdt_reset.c b/lib/utils/reset/fdt_reset.c index 1d687dc..48a49fb 100644 --- a/lib/utils/reset/fdt_reset.c +++ b/lib/utils/reset/fdt_reset.c @@ -12,12 +12,12 @@ #include <sbi_utils/fdt/fdt_helper.h> #include <sbi_utils/reset/fdt_reset.h> -extern struct fdt_reset fdt_reset_sifive; +extern struct fdt_reset fdt_reset_sifive_test; extern struct fdt_reset fdt_reset_htif; extern struct fdt_reset fdt_reset_thead; static struct fdt_reset *reset_drivers[] = { - &fdt_reset_sifive, + &fdt_reset_sifive_test, &fdt_reset_htif, &fdt_reset_thead, }; diff --git a/lib/utils/reset/fdt_reset_sifive.c b/lib/utils/reset/fdt_reset_sifive.c deleted file mode 100644 index 928dee9..0000000 --- a/lib/utils/reset/fdt_reset_sifive.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2020 Western Digital Corporation or its affiliates. - * - * Authors: - * Anup Patel <anup.patel@wdc.com> - */ - -#include <sbi/sbi_scratch.h> -#include <sbi_utils/fdt/fdt_helper.h> -#include <sbi_utils/reset/fdt_reset.h> -#include <sbi_utils/sys/sifive_test.h> - -static int sifive_test_reset_init(void *fdt, int nodeoff, - const struct fdt_match *match) -{ - int rc; - unsigned long addr; - - rc = fdt_get_node_addr_size(fdt, nodeoff, &addr, NULL); - if (rc) - return rc; - - return sifive_test_init(addr); -} - -static const struct fdt_match sifive_test_reset_match[] = { - { .compatible = "sifive,test1" }, - { }, -}; - -struct fdt_reset fdt_reset_sifive = { - .match_table = sifive_test_reset_match, - .init = sifive_test_reset_init, -}; diff --git a/lib/utils/reset/fdt_reset_sifive_test.c b/lib/utils/reset/fdt_reset_sifive_test.c new file mode 100644 index 0000000..f98f03d --- /dev/null +++ b/lib/utils/reset/fdt_reset_sifive_test.c @@ -0,0 +1,36 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 Western Digital Corporation or its affiliates. + * + * Authors: + * Anup Patel <anup.patel@wdc.com> + */ + +#include <sbi/sbi_scratch.h> +#include <sbi_utils/fdt/fdt_helper.h> +#include <sbi_utils/reset/fdt_reset.h> +#include <sbi_utils/sys/sifive_test.h> + +static int sifive_test_reset_init(void *fdt, int nodeoff, + const struct fdt_match *match) +{ + int rc; + unsigned long addr; + + rc = fdt_get_node_addr_size(fdt, nodeoff, &addr, NULL); + if (rc) + return rc; + + return sifive_test_init(addr); +} + +static const struct fdt_match sifive_test_reset_match[] = { + { .compatible = "sifive,test1" }, + { }, +}; + +struct fdt_reset fdt_reset_sifive_test = { + .match_table = sifive_test_reset_match, + .init = sifive_test_reset_init, +}; diff --git a/lib/utils/reset/objects.mk b/lib/utils/reset/objects.mk index b6619f4..672aad9 100644 --- a/lib/utils/reset/objects.mk +++ b/lib/utils/reset/objects.mk @@ -9,6 +9,6 @@ libsbiutils-objs-y += reset/fdt_reset.o libsbiutils-objs-y += reset/fdt_reset_htif.o -libsbiutils-objs-y += reset/fdt_reset_sifive.o libsbiutils-objs-y += reset/fdt_reset_thead.o libsbiutils-objs-y += reset/fdt_reset_thead_asm.o +libsbiutils-objs-y += reset/fdt_reset_sifive_test.o -- cgit v1.2.3