From b31e38ce376b506130b1792f413fb49809fa191d Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 31 Mar 2018 21:52:00 -0600 Subject: [PATCH 3/3] Set board name for Pine64 Signed-off-by: Kevin Mihelich --- board/sunxi/board.c | 9 +++++++++ include/configs/sunxi-common.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/board/sunxi/board.c b/board/sunxi/board.c index e08e22f30c..a222d5c4c2 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -254,6 +254,15 @@ int board_init(void) return soft_i2c_board_init(); } +int board_late_init(void) +{ + if (gd->ram_size > 512 * 1024 * 1024) + env_set("board_name", "pine64-plus"); + else + env_set("board_name", "pine64"); + return 0; +} + int dram_init(void) { gd->ram_size = get_ram_size((long *)PHYS_SDRAM_0, PHYS_SDRAM_0_SIZE); diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index e4e7c22778..8d1200b8f4 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -527,4 +527,6 @@ extern int soft_i2c_gpio_scl; #define CONFIG_EXTRA_ENV_SETTINGS #endif +#define CONFIG_BOARD_LATE_INIT + #endif /* _SUNXI_COMMON_CONFIG_H */ -- 2.16.3