Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / arm / mach-vexpress / v2m.c
blobffe7c7a85ae9adb331678866cf5adcad39e0fd1c
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/of.h>
3 #include <linux/of_address.h>
4 #include <asm/mach/arch.h>
6 #include "core.h"
8 #define SYS_FLAGSSET 0x030
9 #define SYS_FLAGSCLR 0x034
11 void vexpress_flags_set(u32 data)
13 static void __iomem *base;
15 if (!base) {
16 struct device_node *node = of_find_compatible_node(NULL, NULL,
17 "arm,vexpress-sysreg");
19 base = of_iomap(node, 0);
22 if (WARN_ON(!base))
23 return;
25 writel(~0, base + SYS_FLAGSCLR);
26 writel(data, base + SYS_FLAGSSET);
29 static const char * const v2m_dt_match[] __initconst = {
30 "arm,vexpress",
31 NULL,
34 DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
35 .dt_compat = v2m_dt_match,
36 .l2c_aux_val = 0x00400000,
37 .l2c_aux_mask = 0xfe0fffff,
38 .smp = smp_ops(vexpress_smp_dt_ops),
39 .smp_init = smp_init_ops(vexpress_smp_init_ops),
40 MACHINE_END