From c1fa3c37af7b99ba80f232a84f6b84e90f481f06 Mon Sep 17 00:00:00 2001 From: SRICHARAN R Date: Mon, 12 Mar 2012 02:25:43 +0000 Subject: OMAP4/5: device: Add support to get the device type. Add support to identify the device as GP/EMU/HS. Signed-off-by: R Sricharan --- arch/arm/cpu/armv7/omap-common/hwinit-common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'arch/arm/cpu/armv7/omap-common/hwinit-common.c') diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c index ab46bff..10e7669 100644 --- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c @@ -217,7 +217,11 @@ int arch_cpu_init(void) */ u32 get_device_type(void) { - return 0; + struct omap_sys_ctrl_regs *ctrl = + (struct omap_sys_ctrl_regs *) SYSCTRL_GENERAL_CORE_BASE; + + return (readl(&ctrl->control_status) & + (DEVICE_TYPE_MASK)) >> DEVICE_TYPE_SHIFT; } /* -- cgit v1.1