aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuriy Kolerov <yuriy.kolerov@synopsys.com>2017-01-31 06:45:21 -0500
committerVineet Gupta <vgupta@synopsys.com>2017-02-06 12:37:57 -0500
commite98a7bf0b094dea1ceed3a4d52584dcd59af0980 (patch)
treedcfb53cf1a28c03b9453c206d9ab638ea8e72c4c
parentcf16bf7779a68bc572c57ab0cb40054e1754223a (diff)
ARCv2: intc: Use ARC_REG_STATUS32 for addressing STATUS32 reg
It is better to use it instead of magic numbers. Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r--arch/arc/include/asm/arcregs.h3
-rw-r--r--arch/arc/kernel/intc-arcv2.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h
index f659942744de..ba8e802dba80 100644
--- a/arch/arc/include/asm/arcregs.h
+++ b/arch/arc/include/asm/arcregs.h
@@ -38,6 +38,9 @@
38#define ARC_REG_CLUSTER_BCR 0xcf 38#define ARC_REG_CLUSTER_BCR 0xcf
39#define ARC_REG_AUX_ICCM 0x208 /* ICCM Base Addr (ARCv2) */ 39#define ARC_REG_AUX_ICCM 0x208 /* ICCM Base Addr (ARCv2) */
40 40
41/* Common for ARCompact and ARCv2 status register */
42#define ARC_REG_STATUS32 0x0A
43
41/* status32 Bits Positions */ 44/* status32 Bits Positions */
42#define STATUS_AE_BIT 5 /* Exception active */ 45#define STATUS_AE_BIT 5 /* Exception active */
43#define STATUS_DE_BIT 6 /* PC is in delay slot */ 46#define STATUS_DE_BIT 6 /* PC is in delay slot */
diff --git a/arch/arc/kernel/intc-arcv2.c b/arch/arc/kernel/intc-arcv2.c
index ecef0fb0b66c..6ba2a84ab709 100644
--- a/arch/arc/kernel/intc-arcv2.c
+++ b/arch/arc/kernel/intc-arcv2.c
@@ -69,7 +69,7 @@ void arc_init_IRQ(void)
69 irq_bcr.firq ? " FIRQ (not used)":""); 69 irq_bcr.firq ? " FIRQ (not used)":"");
70 70
71 /* setup status32, don't enable intr yet as kernel doesn't want */ 71 /* setup status32, don't enable intr yet as kernel doesn't want */
72 tmp = read_aux_reg(0xa); 72 tmp = read_aux_reg(ARC_REG_STATUS32);
73 tmp |= STATUS_AD_MASK | (ARCV2_IRQ_DEF_PRIO << 1); 73 tmp |= STATUS_AD_MASK | (ARCV2_IRQ_DEF_PRIO << 1);
74 tmp &= ~STATUS_IE_MASK; 74 tmp &= ~STATUS_IE_MASK;
75 asm volatile("kflag %0 \n"::"r"(tmp)); 75 asm volatile("kflag %0 \n"::"r"(tmp));