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.
9 #include <linux/amba/bus.h>
10 #include <linux/clocksource.h>
11 #include <linux/dma-mapping.h>
13 #include <linux/irqchip.h>
14 #include <linux/irqchip/arm-gic.h>
15 #include <linux/mfd/syscon.h>
16 #include <linux/of_platform.h>
18 #include <linux/of_address.h>
19 #include <linux/clk-provider.h>
20 #include <linux/regmap.h>
21 #include <linux/smp.h>
22 #include <asm/smp_scu.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach/map.h>
26 #include <linux/arm-smccc.h>
29 #define ARTPEC6_DMACFG_REGNUM 0x10
30 #define ARTPEC6_DMACFG_UARTS_BURST 0xff
32 #define SECURE_OP_L2C_WRITEREG 0xb4000001
34 static void __init
artpec6_init_machine(void)
36 struct regmap
*regmap
;
38 regmap
= syscon_regmap_lookup_by_compatible("axis,artpec6-syscon");
40 if (!IS_ERR(regmap
)) {
41 /* Use PL011 DMA Burst Request signal instead of DMA
44 regmap_write(regmap
, ARTPEC6_DMACFG_REGNUM
,
45 ARTPEC6_DMACFG_UARTS_BURST
);
48 of_platform_populate(NULL
, of_default_bus_match_table
, NULL
, NULL
);
51 static void artpec6_l2c310_write_sec(unsigned long val
, unsigned reg
)
53 struct arm_smccc_res res
;
55 arm_smccc_smc(SECURE_OP_L2C_WRITEREG
, reg
, val
, 0,
61 static const char * const artpec6_dt_match
[] = {
66 DT_MACHINE_START(ARTPEC6
, "Axis ARTPEC-6 Platform")
67 .l2c_aux_val
= 0x0C000000,
68 .l2c_aux_mask
= 0xF3FFFFFF,
69 .l2c_write_sec
= artpec6_l2c310_write_sec
,
70 .init_machine
= artpec6_init_machine
,
71 .dt_compat
= artpec6_dt_match
,