diff options
author | SRICHARAN R <r.sricharan@ti.com> | 2012-03-12 02:25:43 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-05-15 08:31:24 +0200 |
commit | c1fa3c37af7b99ba80f232a84f6b84e90f481f06 (patch) | |
tree | b780b18e75564ebf674abbddd91aad4d308724c8 /arch/arm/cpu/armv7 | |
parent | 002a2c0c66d2e1757b89ad6824b4a472dcef1076 (diff) |
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 <r.sricharan@ti.com>
Diffstat (limited to 'arch/arm/cpu/armv7')
-rw-r--r-- | arch/arm/cpu/armv7/omap-common/hwinit-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c index ab46bff5af..10e7669805 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; } /* |