1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2019 Marvell International Ltd.
5 * https://spdx.org/licenses
13 #include <asm/arch/soc.h>
14 #include <asm/arch/board.h>
16 int read_platform(void)
18 int plat = PLATFORM_HW;
20 const char *model = fdt_get_board_model();
22 if (model && !strncmp(model, "ASIM-", 5))
24 if (model && !strncmp(model, "EMUL-", 5))
25 plat = PLATFORM_EMULATOR;
29 static inline u64 read_midr(void)
33 asm ("mrs %[rd],MIDR_EL1" : [rd] "=r" (result));
39 return ((read_midr() >> 4) & 0xFF);
42 const char *read_board_name(void)
44 return fdt_get_board_model();
47 bool read_alt_pkg(void)