From c6c2c85e4b980cba54b34a55399f9b82ae2787ea Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Thu, 25 Oct 2018 17:23:02 +0800 Subject: sunxi: disable Pine A64 model detection code on other boards The Pine A64 Plus/non-Plus model detection code is now built on all 64-bit ARM SoCs, even if the code cannot be triggered when H5/H6 is in use. Disable them when the board is Pine A64 by adding a Kconfig option that is only selected on Pine A64. On GCC 7.3.1 this makes the size of the function reduces 184 bytes, and saves a 104 byte strstr() function, then makes SPL on H6 succeed to build. Signed-off-by: Icenowy Zheng Reviewed-by: Andre Przywara Acked-by: Maxime Ripard Reviewed-by: Jagan Teki --- board/sunxi/board.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'board/sunxi') diff --git a/board/sunxi/board.c b/board/sunxi/board.c index d1d7f9f..e075c13 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -820,6 +820,7 @@ int board_fit_config_name_match(const char *name) #endif }; +#ifdef CONFIG_PINE64_DT_SELECTION /* Differentiate the two Pine64 board DTs by their DRAM size. */ if (strstr(name, "-pine64") && strstr(cmp_str, "-pine64")) { if ((gd->ram_size > 512 * 1024 * 1024)) @@ -829,5 +830,7 @@ int board_fit_config_name_match(const char *name) } else { return strcmp(name, cmp_str); } +#endif + return strcmp(name, cmp_str); } #endif -- cgit v1.1