Merge branch 'master' of git://git.denx.de/u-boot-samsung
[platform/kernel/u-boot.git] / arch / arm / mach-omap2 / sysinfo-common.c
1 /*
2  * System information routines for all OMAP based boards.
3  *
4  * (C) Copyright 2017 Linaro Ltd.
5  * Sam Protsenko <semen.protsenko@linaro.org>
6  *
7  * SPDX-License-Identifier:     GPL-2.0+
8  */
9
10 #include <asm/arch/omap.h>
11 #include <asm/io.h>
12 #include <asm/omap_common.h>
13
14 /**
15  * Tell if device is GP/HS/EMU/TST.
16  */
17 u32 get_device_type(void)
18 {
19         return (readl((*ctrl)->control_status) & DEVICE_TYPE_MASK) >>
20                 DEVICE_TYPE_SHIFT;
21 }