0001
0002 #include <linux/of.h>
0003 #include <linux/of_address.h>
0004 #include <asm/mach/arch.h>
0005
0006 #include "vexpress.h"
0007
0008 #define SYS_FLAGSSET 0x030
0009 #define SYS_FLAGSCLR 0x034
0010
0011 void vexpress_flags_set(u32 data)
0012 {
0013 static void __iomem *base;
0014
0015 if (!base) {
0016 struct device_node *node = of_find_compatible_node(NULL, NULL,
0017 "arm,vexpress-sysreg");
0018
0019 base = of_iomap(node, 0);
0020 }
0021
0022 if (WARN_ON(!base))
0023 return;
0024
0025 writel(~0, base + SYS_FLAGSCLR);
0026 writel(data, base + SYS_FLAGSSET);
0027 }
0028
0029 static const char * const v2m_dt_match[] __initconst = {
0030 "arm,vexpress",
0031 NULL,
0032 };
0033
0034 DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
0035 .dt_compat = v2m_dt_match,
0036 .l2c_aux_val = 0x00400000,
0037 .l2c_aux_mask = 0xfe0fffff,
0038 .smp = smp_ops(vexpress_smp_dt_ops),
0039 .smp_init = smp_init_ops(vexpress_smp_init_ops),
0040 MACHINE_END