diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 23:31:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 23:31:25 -0400 |
commit | 16ee792e45cf0c97ce061fce03c36cab5551ec72 (patch) | |
tree | dc68af705fbac4b5d71325aa972730199bb187dd /arch/arm/mach-imx/cpu-imx25.c | |
parent | f906fb1d70e016726fccfb0d978c5d425503db9d (diff) | |
parent | efa62e1355f0495f37f1296754b8880947c8da72 (diff) |
Merge branch 'next/devel' of git://git.linaro.org/people/arnd/arm-soc
* 'next/devel' of git://git.linaro.org/people/arnd/arm-soc: (50 commits)
ARM: tegra: update defconfig
arm/tegra: Harmony: Configure PMC for low-level interrupts
arm/tegra: device tree support for ventana board
arm/tegra: add support for ventana pinmuxing
arm/tegra: prepare Seaboard pinmux code for derived boards
arm/tegra: pinmux: ioremap registers
gpio/tegra: Convert to a platform device
arm/tegra: Convert pinmux driver to a platform device
arm/dt: Tegra: Add pinmux node to tegra20.dtsi
arm/tegra: Prep boards for gpio/pinmux conversion to pdevs
ARM: mx5: fix clock usage for suspend
ARM i.MX entry-macro.S: remove now unused code
ARM i.MX boards: use CONFIG_MULTI_IRQ_HANDLER
ARM i.MX tzic: add handle_irq function
ARM i.MX avic: add handle_irq function
ARM: mx25: Add the missing IIM base definition
ARM i.MX avic: convert to use generic irq chip
mx31moboard: Add poweroff support
ARM: mach-qong: Add watchdog support
ARM: davinci: AM18x: Add wl1271/wlan support
...
Fix up conflicts in:
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-mx5/devices-imx53.h
arch/arm/plat-mxc/include/mach/memory.h
Diffstat (limited to 'arch/arm/mach-imx/cpu-imx25.c')
-rw-r--r-- | arch/arm/mach-imx/cpu-imx25.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/cpu-imx25.c b/arch/arm/mach-imx/cpu-imx25.c new file mode 100644 index 000000000000..6914bcbf84e4 --- /dev/null +++ b/arch/arm/mach-imx/cpu-imx25.c | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * MX25 CPU type detection | ||
3 | * | ||
4 | * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> | ||
5 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <mach/hardware.h> | ||
15 | #include <mach/iim.h> | ||
16 | |||
17 | static int mx25_cpu_rev = -1; | ||
18 | |||
19 | static int mx25_read_cpu_rev(void) | ||
20 | { | ||
21 | u32 rev; | ||
22 | |||
23 | rev = __raw_readl(MX25_IO_ADDRESS(MX25_IIM_BASE_ADDR + MXC_IIMSREV)); | ||
24 | switch (rev) { | ||
25 | case 0x00: | ||
26 | return IMX_CHIP_REVISION_1_0; | ||
27 | case 0x01: | ||
28 | return IMX_CHIP_REVISION_1_1; | ||
29 | default: | ||
30 | return IMX_CHIP_REVISION_UNKNOWN; | ||
31 | } | ||
32 | } | ||
33 | |||
34 | int mx25_revision(void) | ||
35 | { | ||
36 | if (mx25_cpu_rev == -1) | ||
37 | mx25_cpu_rev = mx25_read_cpu_rev(); | ||
38 | |||
39 | return mx25_cpu_rev; | ||
40 | } | ||
41 | EXPORT_SYMBOL(mx25_revision); | ||