summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/cpu-imx25.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2015-04-03 13:56:36 -0700
committerOlof Johansson <olof@lixom.net>2015-04-03 13:56:36 -0700
commitc4c14f393fe4991a423c21516511ff1011140143 (patch)
tree469dab463752b815968bb947ef6234a781decff5 /arch/arm/mach-imx/cpu-imx25.c
parent5602d12a861340e9ed2c17cdefc500fa12b52446 (diff)
parentdc98b0cb6175016f31c8ef1685dd0d69476aa495 (diff)
Merge tag 'imx-cleanup-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/cleanup
Merge "ARM: imx: cleanup for 4.1" from Shawn Guo: The i.MX cleanup for v4.1: - Convert i.MX25 to be a DT only platform and remove the code that is only used by non-DT support - A couple trivial cleanup on iomux-v3 code * tag 'imx-cleanup-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v4_v5_defconfig: Remove CONFIG_MACH_MX25_3DS ARM: mx25: Remove imxdi_rtc platform code ARM: mx25: Remove "mx25.h" header file ARM: mx25: Remove static memory mapping ARM: mx25: Retrieve IIM base from dt ARM: mx25: Remove mx25_clocks_init() ARM: mx25: Remove platform code support files ARM: mx25: Convert to a dt-only platform ARM: imx25: Remove eukrea mx25 board files ARM: mx25: Remove mach-mx25_3ds board file ARM: imx: Fix trivial typo in comments ARM: imx: Kconfig: Fix grammar in help text ARM: imx/iomux-v3: allow pad_list to be const Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-imx/cpu-imx25.c')
-rw-r--r--arch/arm/mach-imx/cpu-imx25.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/cpu-imx25.c b/arch/arm/mach-imx/cpu-imx25.c
index 96ec64b5ff7d..d0ad67e802d3 100644
--- a/arch/arm/mach-imx/cpu-imx25.c
+++ b/arch/arm/mach-imx/cpu-imx25.c
@@ -11,6 +11,8 @@
*/
#include <linux/module.h>
#include <linux/io.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
#include "iim.h"
#include "hardware.h"
@@ -20,8 +22,15 @@ static int mx25_cpu_rev = -1;
static int mx25_read_cpu_rev(void)
{
u32 rev;
+ void __iomem *iim_base;
+ struct device_node *np;
+
+ np = of_find_compatible_node(NULL, NULL, "fsl,imx25-iim");
+ iim_base = of_iomap(np, 0);
+ BUG_ON(!iim_base);
+ rev = readl(iim_base + MXC_IIMSREV);
+ iounmap(iim_base);
- rev = __raw_readl(MX25_IO_ADDRESS(MX25_IIM_BASE_ADDR + MXC_IIMSREV));
switch (rev) {
case 0x00:
return IMX_CHIP_REVISION_1_0;