forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/arch/arc/include/asm/arcregs.h
....@@ -1,9 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
3
- *
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.
74 */
85
96 #ifndef _ASM_ARC_ARCREGS_H
....@@ -42,6 +39,8 @@
4239 #define ARC_REG_CLUSTER_BCR 0xcf
4340 #define ARC_REG_AUX_ICCM 0x208 /* ICCM Base Addr (ARCv2) */
4441 #define ARC_REG_LPB_CTRL 0x488 /* ARCv2 Loop Buffer control */
42
+#define ARC_REG_FPU_CTRL 0x300
43
+#define ARC_REG_FPU_STATUS 0x301
4544
4645 /* Common for ARCompact and ARCv2 status register */
4746 #define ARC_REG_STATUS32 0x0A
....@@ -82,6 +81,7 @@
8281 #define ECR_V_DTLB_MISS 0x05
8382 #define ECR_V_PROTV 0x06
8483 #define ECR_V_TRAP 0x09
84
+#define ECR_V_MISALIGN 0x0d
8585 #endif
8686
8787 /* DTLB Miss and Protection Violation Cause Codes */
....@@ -117,6 +117,32 @@
117117 #define ARC_AUX_DPFP_2L 0x303
118118 #define ARC_AUX_DPFP_2H 0x304
119119 #define ARC_AUX_DPFP_STAT 0x305
120
+
121
+/*
122
+ * DSP-related registers
123
+ * Registers names must correspond to dsp_callee_regs structure fields names
124
+ * for automatic offset calculation in DSP_AUX_SAVE_RESTORE macros.
125
+ */
126
+#define ARC_AUX_DSP_BUILD 0x7A
127
+#define ARC_AUX_ACC0_LO 0x580
128
+#define ARC_AUX_ACC0_GLO 0x581
129
+#define ARC_AUX_ACC0_HI 0x582
130
+#define ARC_AUX_ACC0_GHI 0x583
131
+#define ARC_AUX_DSP_BFLY0 0x598
132
+#define ARC_AUX_DSP_CTRL 0x59F
133
+#define ARC_AUX_DSP_FFT_CTRL 0x59E
134
+
135
+#define ARC_AUX_AGU_BUILD 0xCC
136
+#define ARC_AUX_AGU_AP0 0x5C0
137
+#define ARC_AUX_AGU_AP1 0x5C1
138
+#define ARC_AUX_AGU_AP2 0x5C2
139
+#define ARC_AUX_AGU_AP3 0x5C3
140
+#define ARC_AUX_AGU_OS0 0x5D0
141
+#define ARC_AUX_AGU_OS1 0x5D1
142
+#define ARC_AUX_AGU_MOD0 0x5E0
143
+#define ARC_AUX_AGU_MOD1 0x5E1
144
+#define ARC_AUX_AGU_MOD2 0x5E2
145
+#define ARC_AUX_AGU_MOD3 0x5E3
120146
121147 #ifndef __ASSEMBLY__
122148
....@@ -167,14 +193,6 @@
167193 #endif
168194 };
169195
170
-struct bcr_extn_xymem {
171
-#ifdef CONFIG_CPU_BIG_ENDIAN
172
- unsigned int ram_org:2, num_banks:4, bank_sz:4, ver:8;
173
-#else
174
- unsigned int ver:8, bank_sz:4, num_banks:4, ram_org:2;
175
-#endif
176
-};
177
-
178196 struct bcr_iccm_arcompact {
179197 #ifdef CONFIG_CPU_BIG_ENDIAN
180198 unsigned int base:16, pad:5, sz:3, ver:8;
....@@ -221,6 +239,14 @@
221239 unsigned int pad2:15, dp:1, pad1:7, sp:1, ver:8;
222240 #else
223241 unsigned int ver:8, sp:1, pad1:7, dp:1, pad2:15;
242
+#endif
243
+};
244
+
245
+struct bcr_actionpoint {
246
+#ifdef CONFIG_CPU_BIG_ENDIAN
247
+ unsigned int pad:21, min:1, num:2, ver:8;
248
+#else
249
+ unsigned int ver:8, num:2, min:1, pad:21;
224250 #endif
225251 };
226252
....@@ -291,7 +317,7 @@
291317 };
292318
293319 struct cpuinfo_arc_bpu {
294
- unsigned int ver, full, num_cache, num_pred;
320
+ unsigned int ver, full, num_cache, num_pred, ret_stk;
295321 };
296322
297323 struct cpuinfo_arc_ccm {
....@@ -304,17 +330,16 @@
304330 struct cpuinfo_arc_bpu bpu;
305331 struct bcr_identity core;
306332 struct bcr_isa_arcv2 isa;
307
- const char *details, *name;
333
+ const char *release, *name;
308334 unsigned int vec_base;
309335 struct cpuinfo_arc_ccm iccm, dccm;
310336 struct {
311337 unsigned int swap:1, norm:1, minmax:1, barrel:1, crc:1, swape:1, pad1:2,
312338 fpu_sp:1, fpu_dp:1, dual:1, dual_enb:1, pad2:4,
313
- debug:1, ap:1, smart:1, rtt:1, pad3:4,
339
+ ap_num:4, ap_full:1, smart:1, rtt:1, pad3:1,
314340 timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4;
315341 } extn;
316342 struct bcr_mpy extn_mpy;
317
- struct bcr_extn_xymem extn_xymem;
318343 };
319344
320345 extern struct cpuinfo_arc cpuinfo_arc700[];