blob: dcb98937fcf58df7d9e5f7a60f1d9f63b6157949 [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001// SPDX-License-Identifier: GPL-2.0-only
Srinivas Kandagatla65ebcc12013-06-25 12:15:10 +01002/*
3 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
4 * Author(s): Srinivas Kandagatla <srinivas.kandagatla@st.com>
Srinivas Kandagatla65ebcc12013-06-25 12:15:10 +01005 */
6
Srinivas Kandagatla65ebcc12013-06-25 12:15:10 +01007#include <linux/irq.h>
Sebastian Hesselbarth28fbb1512013-08-27 15:23:07 +02008#include <linux/of_platform.h>
Srinivas Kandagatla65ebcc12013-06-25 12:15:10 +01009#include <asm/hardware/cache-l2x0.h>
10#include <asm/mach/arch.h>
11
12#include "smp.h"
13
Nicolas Pitre19c233b2015-07-27 18:27:52 -040014static const char *const stih41x_dt_match[] __initconst = {
Srinivas Kandagatla65ebcc12013-06-25 12:15:10 +010015 "st,stih415",
Srinivas Kandagatla15969b42013-06-25 12:15:23 +010016 "st,stih416",
Maxime Coquelinc6594022014-02-27 13:17:27 +010017 "st,stih407",
Fabrice GASNIER60b3c7e2015-03-05 16:53:54 +010018 "st,stih410",
Maxime COQUELINdd548cf2015-01-09 16:11:00 +010019 "st,stih418",
Srinivas Kandagatla65ebcc12013-06-25 12:15:10 +010020 NULL
21};
22
Patrice Chotard7b8e0182016-06-28 11:21:52 +020023static void sti_l2_write_sec(unsigned long val, unsigned reg)
24{
25 /*
26 * We can't write to secure registers as we are in non-secure
27 * mode, until we have some SMI service available.
28 */
29}
30
Peter Griffin50fdda72016-05-11 18:40:00 +020031DT_MACHINE_START(STM, "STi SoC with Flattened Device Tree")
Srinivas Kandagatla65ebcc12013-06-25 12:15:10 +010032 .dt_compat = stih41x_dt_match,
Russell King4d6229f2014-04-28 15:49:48 +010033 .l2c_aux_val = L2C_AUX_CTRL_SHARED_OVERRIDE |
34 L310_AUX_CTRL_DATA_PREFETCH |
35 L310_AUX_CTRL_INSTR_PREFETCH |
36 L2C_AUX_CTRL_WAY_SIZE(4),
37 .l2c_aux_mask = 0xc0000fff,
38 .smp = smp_ops(sti_smp_ops),
Patrice Chotard7b8e0182016-06-28 11:21:52 +020039 .l2c_write_sec = sti_l2_write_sec,
Srinivas Kandagatla65ebcc12013-06-25 12:15:10 +010040MACHINE_END