diff options
author | Mika Westerberg <mika.westerberg@iki.fi> | 2010-03-27 14:05:14 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-04-14 14:19:24 +0400 |
commit | 99e6a23adfadc2da2006f3715c4332c3bf502c07 (patch) | |
tree | 5e97ad3f9e7935c7afa885cb8b09913d20097a11 /arch/arm/mach-ep93xx/core.c | |
parent | b370e082e7c4bd47195b2ec117ceeadd9286d8c0 (diff) | |
download | linux-99e6a23adfadc2da2006f3715c4332c3bf502c07.tar.xz |
ARM: 5998/1: ep93xx: added chip revision reading function
Added a new function: ep93xx_chip_revision() which reads chip revision
from the sysconfig register.
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ep93xx/core.c')
-rw-r--r-- | arch/arm/mach-ep93xx/core.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 5b1d836c2f05..8d3f77e9fa86 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -222,6 +222,20 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits) } EXPORT_SYMBOL(ep93xx_devcfg_set_clear); +/** + * ep93xx_chip_revision() - returns the EP93xx chip revision + * + * See <mach/platform.h> for more information. + */ +unsigned int ep93xx_chip_revision(void) +{ + unsigned int v; + + v = __raw_readl(EP93XX_SYSCON_SYSCFG); + v &= EP93XX_SYSCON_SYSCFG_REV_MASK; + v >>= EP93XX_SYSCON_SYSCFG_REV_SHIFT; + return v; +} /************************************************************************* * EP93xx peripheral handling |