x86/unwinder: Handle stack overflows more gracefully
[linux/fpc-iii.git] / arch / arm / mach-artpec / board-artpec6.c
bloba0b1979c2c2c3cba9587d1b6bfd96fd16ec100ab
1 /*
2 * ARTPEC-6 device support.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
9 #include <linux/amba/bus.h>
10 #include <linux/clocksource.h>
11 #include <linux/dma-mapping.h>
12 #include <linux/io.h>
13 #include <linux/irqchip.h>
14 #include <linux/irqchip/arm-gic.h>
15 #include <linux/mfd/syscon.h>
16 #include <linux/of.h>
17 #include <linux/of_address.h>
18 #include <linux/clk-provider.h>
19 #include <linux/regmap.h>
20 #include <linux/smp.h>
21 #include <asm/smp_scu.h>
22 #include <asm/mach/arch.h>
23 #include <asm/mach/map.h>
24 #include <asm/psci.h>
25 #include <linux/arm-smccc.h>
28 #define ARTPEC6_DMACFG_REGNUM 0x10
29 #define ARTPEC6_DMACFG_UARTS_BURST 0xff
31 #define SECURE_OP_L2C_WRITEREG 0xb4000001
33 static void __init artpec6_init_machine(void)
35 struct regmap *regmap;
37 regmap = syscon_regmap_lookup_by_compatible("axis,artpec6-syscon");
39 if (!IS_ERR(regmap)) {
40 /* Use PL011 DMA Burst Request signal instead of DMA
41 * Single Request
43 regmap_write(regmap, ARTPEC6_DMACFG_REGNUM,
44 ARTPEC6_DMACFG_UARTS_BURST);
48 static void artpec6_l2c310_write_sec(unsigned long val, unsigned reg)
50 struct arm_smccc_res res;
52 arm_smccc_smc(SECURE_OP_L2C_WRITEREG, reg, val, 0,
53 0, 0, 0, 0, &res);
55 WARN_ON(res.a0);
58 static const char * const artpec6_dt_match[] = {
59 "axis,artpec6",
60 NULL
63 DT_MACHINE_START(ARTPEC6, "Axis ARTPEC-6 Platform")
64 .l2c_aux_val = 0x0C000000,
65 .l2c_aux_mask = 0xF3FFFFFF,
66 .l2c_write_sec = artpec6_l2c310_write_sec,
67 .init_machine = artpec6_init_machine,
68 .dt_compat = artpec6_dt_match,
69 MACHINE_END