diff options
author | Masahiro Yamada | 2015-12-17 17:47:42 +0900 |
---|---|---|
committer | Masahiro Yamada | 2015-12-23 00:08:40 +0900 |
commit | 6ba60fafdabc88f45088881d36cb776484394117 (patch) | |
tree | 34696fdf117d02028ef4980985118571bbbe5ba2 | |
parent | 2071f149e5d9376d392281689cf41cd165f7e19c (diff) |
ARM: uniphier: call uniphier_get_board_param() without FDT blob
Move "gd->fdt_blob" from the caller to the callee so that this
function can be used more easily.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r-- | arch/arm/mach-uniphier/boards.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/include/mach/init.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init/init.c | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/mach-uniphier/boards.c b/arch/arm/mach-uniphier/boards.c index 812c58ff965..f3281433c2b 100644 --- a/arch/arm/mach-uniphier/boards.c +++ b/arch/arm/mach-uniphier/boards.c @@ -4,10 +4,13 @@ * SPDX-License-Identifier: GPL-2.0+ */ +#include <common.h> #include <libfdt.h> #include <linux/kernel.h> #include <mach/init.h> +DECLARE_GLOBAL_DATA_PTR; + #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3) static const struct uniphier_board_data ph1_sld3_data = { .dram_ch0_base = 0x80000000, @@ -116,12 +119,12 @@ static const struct uniphier_board_id uniphier_boards[] = { #endif }; -const struct uniphier_board_data *uniphier_get_board_param(const void *fdt) +const struct uniphier_board_data *uniphier_get_board_param(void) { int i; for (i = 0; i < ARRAY_SIZE(uniphier_boards); i++) { - if (!fdt_node_check_compatible(fdt, 0, + if (!fdt_node_check_compatible(gd->fdt_blob, 0, uniphier_boards[i].compatible)) return uniphier_boards[i].param; } diff --git a/arch/arm/mach-uniphier/include/mach/init.h b/arch/arm/mach-uniphier/include/mach/init.h index 5108eddfc48..27ae27dc9f4 100644 --- a/arch/arm/mach-uniphier/include/mach/init.h +++ b/arch/arm/mach-uniphier/include/mach/init.h @@ -20,7 +20,7 @@ struct uniphier_board_data { unsigned int dram_freq; }; -const struct uniphier_board_data *uniphier_get_board_param(const void *fdt); +const struct uniphier_board_data *uniphier_get_board_param(void); int ph1_sld3_init(const struct uniphier_board_data *bd); int ph1_ld4_init(const struct uniphier_board_data *bd); diff --git a/arch/arm/mach-uniphier/init/init.c b/arch/arm/mach-uniphier/init/init.c index bbfc8e5e085..eda169e3740 100644 --- a/arch/arm/mach-uniphier/init/init.c +++ b/arch/arm/mach-uniphier/init/init.c @@ -9,13 +9,11 @@ #include <mach/init.h> #include <mach/soc_info.h> -DECLARE_GLOBAL_DATA_PTR; - void spl_board_init(void) { const struct uniphier_board_data *param; - param = uniphier_get_board_param(gd->fdt_blob); + param = uniphier_get_board_param(); if (!param) hang(); |