Merge tag 'pm+acpi-3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[deliverable/linux.git] / arch / arm / mach-imx / cpu.c
CommitLineData
198016e1
SH
1
2#include <linux/module.h>
bb07d751 3#include <linux/io.h>
50f2de61
SG
4
5#include "hardware.h"
e7feaaa7 6#include "common.h"
198016e1
SH
7
8unsigned int __mxc_cpu_type;
9EXPORT_SYMBOL(__mxc_cpu_type);
10
11void mxc_set_cpu_type(unsigned int type)
12{
13 __mxc_cpu_type = type;
14}
15
059e58f6
FE
16void imx_print_silicon_rev(const char *cpu, int srev)
17{
18 if (srev == IMX_CHIP_REVISION_UNKNOWN)
19 pr_info("CPU identified as %s, unknown revision\n", cpu);
20 else
21 pr_info("CPU identified as %s, silicon rev %d.%d\n",
22 cpu, (srev >> 4) & 0xf, srev & 0xf);
23}
bb07d751
FE
24
25void __init imx_set_aips(void __iomem *base)
26{
27 unsigned int reg;
28/*
29 * Set all MPROTx to be non-bufferable, trusted for R/W,
30 * not forced to user-mode.
31 */
32 __raw_writel(0x77777777, base + 0x0);
33 __raw_writel(0x77777777, base + 0x4);
34
35/*
36 * Set all OPACRx to be non-bufferable, to not require
37 * supervisor privilege level for access, allow for
38 * write access and untrusted master access.
39 */
40 __raw_writel(0x0, base + 0x40);
41 __raw_writel(0x0, base + 0x44);
42 __raw_writel(0x0, base + 0x48);
43 __raw_writel(0x0, base + 0x4C);
44 reg = __raw_readl(base + 0x50) & 0x00FFFFFF;
45 __raw_writel(reg, base + 0x50);
46}
This page took 0.260595 seconds and 5 git commands to generate.