Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/shark/shark Add () around "1 << n' in #define's, wi...
details: https://anonhg.NetBSD.org/src/rev/0c982fa7dbbf
branches: trunk
changeset: 355937:0c982fa7dbbf
user: kre <kre%NetBSD.org@localhost>
date: Tue Aug 22 21:23:58 2017 +0000
description:
Add () around "1 << n' in #define's, without it ~NAME is "~1 << n" which is
not what is wanted at all (and which caused the << of a negative number issue.)
Making the values unsigned is harmless (perhaps even better) so those that
were changed are still that way.
diffstat:
sys/arch/shark/shark/sequoia.h | 1908 ++++++++++++++++++++--------------------
1 files changed, 954 insertions(+), 954 deletions(-)
diffs (truncated from 3420 to 300 lines):
diff -r 3f2be1dcc31a -r 0c982fa7dbbf sys/arch/shark/shark/sequoia.h
--- a/sys/arch/shark/shark/sequoia.h Tue Aug 22 18:35:09 2017 +0000
+++ b/sys/arch/shark/shark/sequoia.h Tue Aug 22 21:23:58 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sequoia.h,v 1.3 2017/08/22 12:52:24 joerg Exp $ */
+/* $NetBSD: sequoia.h,v 1.4 2017/08/22 21:23:58 kre Exp $ */
/*
* Copyright 1997
@@ -109,39 +109,39 @@
#define PMC_CCR_REG 0x000
#define PMC_CCR_INIT 0x000
#define CCR_V_CNCLKSEL 0
-#define CCR_M_CNCLKSEL 0x7 << CCR_V_CNCLKSEL
+#define CCR_M_CNCLKSEL (0x7 << CCR_V_CNCLKSEL)
#define CCR_V_CNCLKSEL0 0
-#define CCR_M_CNCLKSEL0 1 << CCR_V_CNCLKSEL0
+#define CCR_M_CNCLKSEL0 (1 << CCR_V_CNCLKSEL0)
#define CCR_V_CNCLKSEL1 1
-#define CCR_M_CNCLKSEL1 1 << CCR_V_CNCLKSEL1
+#define CCR_M_CNCLKSEL1 (1 << CCR_V_CNCLKSEL1)
#define CCR_V_CNCLKSEL2 2
-#define CCR_M_CNCLKSEL2 1 << CCR_V_CNCLKSEL2
+#define CCR_M_CNCLKSEL2 (1 << CCR_V_CNCLKSEL2)
#define CCR_V_CNSRVEN 3
-#define CCR_M_CNSRVEN 1 << CCR_V_CNSRVEN
+#define CCR_M_CNSRVEN (1 << CCR_V_CNSRVEN)
#define CCR_V_SLCLKSEL 4
-#define CCR_M_SLCLKSEL 0x7 << CCR_V_SLCLKSEL
+#define CCR_M_SLCLKSEL (0x7 << CCR_V_SLCLKSEL)
#define CCR_V_SLCLKSEL0 4
-#define CCR_M_SLCLKSEL0 1 << CCR_V_SLCLKSEL0
+#define CCR_M_SLCLKSEL0 (1 << CCR_V_SLCLKSEL0)
#define CCR_V_SLCLKSEL1 5
-#define CCR_M_SLCLKSEL1 1 << CCR_V_SLCLKSEL1
+#define CCR_M_SLCLKSEL1 (1 << CCR_V_SLCLKSEL1)
#define CCR_V_SLCLKSEL2 6
-#define CCR_M_SLCLKSEL2 1 << CCR_V_SLCLKSEL2
+#define CCR_M_SLCLKSEL2 (1 << CCR_V_SLCLKSEL2)
#define CCR_V_SLWCLKEN 7
-#define CCR_M_SLWCLKEN 1 << CCR_V_SLWCLKEN
+#define CCR_M_SLWCLKEN (1 << CCR_V_SLWCLKEN)
#define CCR_V_SLPSLWEN 8
-#define CCR_M_SLPSLWEN 1 << CCR_V_SLPSLWEN
+#define CCR_M_SLPSLWEN (1 << CCR_V_SLPSLWEN)
#define CCR_V_DZSLWEN 9
-#define CCR_M_DZSLWEN 1 << CCR_V_DZSLWEN
+#define CCR_M_DZSLWEN (1 << CCR_V_DZSLWEN)
#define CCR_V_SPNDSLWEN 10
-#define CCR_M_SPNDSLWEN 1 << CCR_V_SPNDSLWEN
+#define CCR_M_SPNDSLWEN (1 << CCR_V_SPNDSLWEN)
#define CCR_V_LBSLWEN 11
-#define CCR_M_LBSLWEN 1 << CCR_V_LBSLWEN
+#define CCR_M_LBSLWEN (1 << CCR_V_LBSLWEN)
#define CCR_V_DZONHALT 12
-#define CCR_M_DZONHALT 1 << CCR_V_DZONHALT
+#define CCR_M_DZONHALT (1 << CCR_V_DZONHALT)
#define CCR_V_LBST 14
-#define CCR_M_LBST 1 << CCR_V_LBST
+#define CCR_M_LBST (1 << CCR_V_LBST)
#define CCR_V_VLBST 15
-#define CCR_M_VLBST 1 << CCR_V_VLBST
+#define CCR_M_VLBST (1 << CCR_V_VLBST)
/*
** Conserve Clock Selects
@@ -193,41 +193,41 @@
#define PMC_PMSR_REG 0x001
#define PMC_PMSR_INIT ( PMSR_M_WAKESRC | PMSR_M_PMISRC | PMMD_ON )
#define PMSR_V_WAKESRC 0
-#define PMSR_M_WAKESRC 0x7 << PMSR_V_WAKESRC
+#define PMSR_M_WAKESRC (0x7 << PMSR_V_WAKESRC)
#define PMSR_V_WAKESRC0 0
-#define PMSR_M_WAKESRC0 1 << PMSR_V_WAKESRC0
+#define PMSR_M_WAKESRC0 (1 << PMSR_V_WAKESRC0)
#define PMSR_V_WAKESRC1 1
-#define PMSR_M_WAKESRC1 1 << PMSR_V_WAKESRC1
+#define PMSR_M_WAKESRC1 (1 << PMSR_V_WAKESRC1)
#define PMSR_V_WAKESRC2 2
-#define PMSR_M_WAKESRC2 1 << PMSR_V_WAKESRC2
+#define PMSR_M_WAKESRC2 (1 << PMSR_V_WAKESRC2)
#define PMSR_V_ACPWR 3
-#define PMSR_M_ACPWR 1 << PMSR_V_ACPWR
+#define PMSR_M_ACPWR (1 << PMSR_V_ACPWR)
#define PMSR_V_PMISRC 4
-#define PMSR_M_PMISRC 0x1F << PMSR_V_PMISRC
+#define PMSR_M_PMISRC (0x1F << PMSR_V_PMISRC)
#define PMSR_V_PMISRC0 4
-#define PMSR_M_PMISRC0 1 << PMSR_V_PMISRC0
+#define PMSR_M_PMISRC0 (1 << PMSR_V_PMISRC0)
#define PMSR_V_PMISRC1 5
-#define PMSR_M_PMISRC1 1 << PMSR_V_PMISRC1
+#define PMSR_M_PMISRC1 (1 << PMSR_V_PMISRC1)
#define PMSR_V_PMISRC2 6
-#define PMSR_M_PMISRC2 1 << PMSR_V_PMISRC2
+#define PMSR_M_PMISRC2 (1 << PMSR_V_PMISRC2)
#define PMSR_V_PMISRC3 7
-#define PMSR_M_PMISRC3 1 << PMSR_V_PMISRC3
+#define PMSR_M_PMISRC3 (1 << PMSR_V_PMISRC3)
#define PMSR_V_PMISRC4 8
-#define PMSR_M_PMISRC4 1 << PMSR_V_PMISRC4
+#define PMSR_M_PMISRC4 (1 << PMSR_V_PMISRC4)
#define PMSR_V_RESUME 9
-#define PMSR_M_RESUME 1 << PMSR_V_RESUME
+#define PMSR_M_RESUME (1 << PMSR_V_RESUME)
#define PMSR_V_WAKE0STATUS 10
-#define PMSR_M_WAKE0STATUS 1 << PMSR_V_WAKE0STATUS
+#define PMSR_M_WAKE0STATUS (1 << PMSR_V_WAKE0STATUS)
#define PMSR_V_WAKE1STATUS 11
-#define PMSR_M_WAKE1STATUS 1 << PMSR_V_WAKE1STATUS
+#define PMSR_M_WAKE1STATUS (1 << PMSR_V_WAKE1STATUS)
#define PMSR_V_PMMD 13
-#define PMSR_M_PMMD 0x7 << PMSR_V_PMMD
+#define PMSR_M_PMMD (0x7 << PMSR_V_PMMD)
#define PMSR_V_PMMD0 13
-#define PMSR_M_PMMD0 1 << PMSR_V_PMMD0
+#define PMSR_M_PMMD0 (1 << PMSR_V_PMMD0)
#define PMSR_V_PMMD1 14
-#define PMSR_M_PMMD1 1 << PMSR_V_PMMD1
+#define PMSR_M_PMMD1 (1 << PMSR_V_PMMD1)
#define PMSR_V_PMMD2 15
-#define PMSR_M_PMMD2 1 << PMSR_V_PMMD2
+#define PMSR_M_PMMD2 (1 << PMSR_V_PMMD2)
/*
** Wake-up Source
@@ -300,33 +300,33 @@
#define PMC_ASR_REG 0x002
#define PMC_ASR_INIT 0x0000
#define ASR_V_VIDACTV 0
-#define ASR_M_VIDACTV 1 << ASR_V_VIDACTV
+#define ASR_M_VIDACTV (1 << ASR_V_VIDACTV)
#define ASR_V_HDACTV 1
-#define ASR_M_HDACTV 1 << ASR_V_HDACTV
+#define ASR_M_HDACTV (1 << ASR_V_HDACTV)
#define ASR_V_FLPACTV 2
-#define ASR_M_FLPACTV 1 << ASR_V_FLPACTV
+#define ASR_M_FLPACTV (1 << ASR_V_FLPACTV)
#define ASR_V_KBDACTV 3
-#define ASR_M_KBDACTV 1 << ASR_V_KBDACTV
+#define ASR_M_KBDACTV (1 << ASR_V_KBDACTV)
#define ASR_V_SIOACTV 4
-#define ASR_M_SIOACTV 1 << ASR_V_SIOACTV
+#define ASR_M_SIOACTV (1 << ASR_V_SIOACTV)
#define ASR_V_PIOACTV 5
-#define ASR_M_PIOACTV 1 << ASR_V_PIOACTV
+#define ASR_M_PIOACTV (1 << ASR_V_PIOACTV)
#define ASR_V_PROG0ACTV 6
-#define ASR_M_PROG0ACTV 1 << ASR_V_PROG0ACTV
+#define ASR_M_PROG0ACTV (1 << ASR_V_PROG0ACTV)
#define ASR_V_PROG1ACTV 7
-#define ASR_M_PROG1ACTV 1 << ASR_V_PROG1ACTV
+#define ASR_M_PROG1ACTV (1 << ASR_V_PROG1ACTV)
#define ASR_V_PROG2ACTV 8
-#define ASR_M_PROG2ACTV 1 << ASR_V_PROG2ACTV
+#define ASR_M_PROG2ACTV (1 << ASR_V_PROG2ACTV)
#define ASR_V_PROG3ACTV 9
-#define ASR_M_PROG3ACTV 1 << ASR_V_PROG3ACTV
+#define ASR_M_PROG3ACTV (1 << ASR_V_PROG3ACTV)
#define ASR_V_EXT0ACTV 12
-#define ASR_M_EXT0ACTV 1 << ASR_V_EXT0ACTV
+#define ASR_M_EXT0ACTV (1 << ASR_V_EXT0ACTV)
#define ASR_V_EXT1ACTV 13
-#define ASR_M_EXT1ACTV 1 << ASR_V_EXT1ACTV
+#define ASR_M_EXT1ACTV (1 << ASR_V_EXT1ACTV)
#define ASR_V_EXT2ACTV 14
-#define ASR_M_EXT2ACTV 1 << ASR_V_EXT2ACTV
+#define ASR_M_EXT2ACTV (1 << ASR_V_EXT2ACTV)
#define ASR_V_EXT3ACTV 15
-#define ASR_M_EXT3ACTV 1 << ASR_V_EXT3ACTV
+#define ASR_M_EXT3ACTV (1 << ASR_V_EXT3ACTV)
/*
**
@@ -354,33 +354,33 @@
#define PMC_PAMR_REG 0x003
#define PMC_PAMR_INIT 0x0000
#define PAMR_V_PAMSKVID 0
-#define PAMR_M_PAMSKVID 1 << PAMR_V_PAMSKVID
+#define PAMR_M_PAMSKVID (1 << PAMR_V_PAMSKVID)
#define PAMR_V_PAMSKHD 1
-#define PAMR_M_PAMSKHD 1 << PAMR_V_PAMSKHD
+#define PAMR_M_PAMSKHD (1 << PAMR_V_PAMSKHD)
#define PAMR_V_PAMSKFLP 2
-#define PAMR_M_PAMSKFLP 1 << PAMR_V_PAMSKFLP
+#define PAMR_M_PAMSKFLP (1 << PAMR_V_PAMSKFLP)
#define PAMR_V_PAMSKKDB 3
-#define PAMR_M_PAMSKKDB 1 << PAMR_V_PAMSKKDB
+#define PAMR_M_PAMSKKDB (1 << PAMR_V_PAMSKKDB)
#define PAMR_V_PAMSKSIO 4
-#define PAMR_M_PAMSKSIO 1 << PAMR_V_PAMSKSIO
+#define PAMR_M_PAMSKSIO (1 << PAMR_V_PAMSKSIO)
#define PAMR_V_PAMSKPIO 5
-#define PAMR_M_PAMSKPIO 1 << PAMR_V_PAMSKPIO
+#define PAMR_M_PAMSKPIO (1 << PAMR_V_PAMSKPIO)
#define PAMR_V_PAMSKPROG0 6
-#define PAMR_M_PAMSKPROG0 1 << PAMR_V_PAMSKPROG0
+#define PAMR_M_PAMSKPROG0 (1 << PAMR_V_PAMSKPROG0)
#define PAMR_V_PAMSKPROG1 7
-#define PAMR_M_PAMSKPROG1 1 << PAMR_V_PAMSKPROG1
+#define PAMR_M_PAMSKPROG1 (1 << PAMR_V_PAMSKPROG1)
#define PAMR_V_PAMSKPROG2 8
-#define PAMR_M_PAMSKPROG2 1 << PAMR_V_PAMSKPROG2
+#define PAMR_M_PAMSKPROG2 (1 << PAMR_V_PAMSKPROG2)
#define PAMR_V_PAMSKPROG3 9
-#define PAMR_M_PAMSKPROG3 1 << PAMR_V_PAMSKPROG3
+#define PAMR_M_PAMSKPROG3 (1 << PAMR_V_PAMSKPROG3)
#define PAMR_V_PAMSKEACT0 12
-#define PAMR_M_PAMSKEACT0 1 << PAMR_V_PAMSKEACT0
+#define PAMR_M_PAMSKEACT0 (1 << PAMR_V_PAMSKEACT0)
#define PAMR_V_PAMSKEACT1 13
-#define PAMR_M_PAMSKEACT1 1 << PAMR_V_PAMSKEACT1
+#define PAMR_M_PAMSKEACT1 (1 << PAMR_V_PAMSKEACT1)
#define PAMR_V_PAMSKEACT2 14
-#define PAMR_M_PAMSKEACT2 1 << PAMR_V_PAMSKEACT2
+#define PAMR_M_PAMSKEACT2 (1 << PAMR_V_PAMSKEACT2)
#define PAMR_V_PAMSKEACT3 15
-#define PAMR_M_PAMSKEACT3 1 << PAMR_V_PAMSKEACT3
+#define PAMR_M_PAMSKEACT3 (1 << PAMR_V_PAMSKEACT3)
/*
**
@@ -414,33 +414,33 @@
PMIMR_M_IMSKEACT0 | PMIMR_M_IMSKEACT1 | \
PMIMR_M_IMSKEACT2 | PMIMR_M_IMSKEACT3 )
#define PMIMR_V_IMSKVID 0
-#define PMIMR_M_IMSKVID 1 << PMIMR_V_IMSKVID
+#define PMIMR_M_IMSKVID (1 << PMIMR_V_IMSKVID)
#define PMIMR_V_IMSKHD 1
-#define PMIMR_M_IMSKHD 1 << PMIMR_V_IMSKHD
+#define PMIMR_M_IMSKHD (1 << PMIMR_V_IMSKHD)
#define PMIMR_V_IMSKFLP 2
-#define PMIMR_M_IMSKFLP 1 << PMIMR_V_IMSKFLP
+#define PMIMR_M_IMSKFLP (1 << PMIMR_V_IMSKFLP)
#define PMIMR_V_IMSKKDB 3
-#define PMIMR_M_IMSKKDB 1 << PMIMR_V_IMSKKDB
+#define PMIMR_M_IMSKKDB (1 << PMIMR_V_IMSKKDB)
#define PMIMR_V_IMSKSIO 4
-#define PMIMR_M_IMSKSIO 1 << PMIMR_V_IMSKSIO
+#define PMIMR_M_IMSKSIO (1 << PMIMR_V_IMSKSIO)
#define PMIMR_V_IMSKPIO 5
-#define PMIMR_M_IMSKPIO 1 << PMIMR_V_IMSKPIO
+#define PMIMR_M_IMSKPIO (1 << PMIMR_V_IMSKPIO)
#define PMIMR_V_IMSKPROG0 6
-#define PMIMR_M_IMSKPROG0 1 << PMIMR_V_IMSKPROG0
+#define PMIMR_M_IMSKPROG0 (1 << PMIMR_V_IMSKPROG0)
#define PMIMR_V_IMSKPROG1 7
-#define PMIMR_M_IMSKPROG1 1 << PMIMR_V_IMSKPROG1
+#define PMIMR_M_IMSKPROG1 (1 << PMIMR_V_IMSKPROG1)
#define PMIMR_V_IMSKPROG2 8
-#define PMIMR_M_IMSKPROG2 1 << PMIMR_V_IMSKPROG2
+#define PMIMR_M_IMSKPROG2 (1 << PMIMR_V_IMSKPROG2)
#define PMIMR_V_IMSKPROG3 9
-#define PMIMR_M_IMSKPROG3 1 << PMIMR_V_IMSKPROG3
+#define PMIMR_M_IMSKPROG3 (1 << PMIMR_V_IMSKPROG3)
#define PMIMR_V_IMSKEACT0 12
-#define PMIMR_M_IMSKEACT0 1 << PMIMR_V_IMSKEACT0
+#define PMIMR_M_IMSKEACT0 (1 << PMIMR_V_IMSKEACT0)
#define PMIMR_V_IMSKEACT1 13
-#define PMIMR_M_IMSKEACT1 1 << PMIMR_V_IMSKEACT1
+#define PMIMR_M_IMSKEACT1 (1 << PMIMR_V_IMSKEACT1)
#define PMIMR_V_IMSKEACT2 14
-#define PMIMR_M_IMSKEACT2 1 << PMIMR_V_IMSKEACT2
+#define PMIMR_M_IMSKEACT2 (1 << PMIMR_V_IMSKEACT2)
#define PMIMR_V_IMSKEACT3 15
-#define PMIMR_M_IMSKEACT3 1 << PMIMR_V_IMSKEACT3
+#define PMIMR_M_IMSKEACT3 (1 << PMIMR_V_IMSKEACT3)
/*
**
@@ -464,29 +464,29 @@
#define PMC_HRCR_REG 0x005
#define PMC_HRCR_INIT 0x0000
#define HRCR_V_HTRGDLY 0
-#define HRCR_M_HTRGDLY 0x7 << HRCR_V_HTRGDLY
+#define HRCR_M_HTRGDLY (0x7 << HRCR_V_HTRGDLY)
#define HRCR_V_HTRGDLY0 0
-#define HRCR_M_HTRGDLY0 1 << HRCR_V_HTRGDLY0
+#define HRCR_M_HTRGDLY0 (1 << HRCR_V_HTRGDLY0)
#define HRCR_V_HTRGDLY1 1
-#define HRCR_M_HTRGDLY1 1 << HRCR_V_HTRGDLY1
+#define HRCR_M_HTRGDLY1 (1 << HRCR_V_HTRGDLY1)
#define HRCR_V_HTRGDLY2 2
-#define HRCR_M_HTRGDLY2 1 << HRCR_V_HTRGDLY2
+#define HRCR_M_HTRGDLY2 (1 << HRCR_V_HTRGDLY2)
#define HRCR_V_HTRGRAT 3
-#define HRCR_M_HTRGRAT 0x7 << HRCR_V_HTRGRAT
+#define HRCR_M_HTRGRAT (0x7 << HRCR_V_HTRGRAT)
#define HRCR_V_HTRGRAT0 3
-#define HRCR_M_HTRGRAT0 1 << HRCR_V_HTRGRAT0
+#define HRCR_M_HTRGRAT0 (1 << HRCR_V_HTRGRAT0)
#define HRCR_V_HTRGRAT1 4
-#define HRCR_M_HTRGRAT1 1 << HRCR_V_HTRGRAT1
+#define HRCR_M_HTRGRAT1 (1 << HRCR_V_HTRGRAT1)
#define HRCR_V_HTRGRAT2 5
-#define HRCR_M_HTRGRAT2 1 << HRCR_V_HTRGRAT2
+#define HRCR_M_HTRGRAT2 (1 << HRCR_V_HTRGRAT2)
#define HRCR_V_HTRGEN 6
-#define HRCR_M_HTRGEN 1 << HRCR_V_HTRGEN
+#define HRCR_M_HTRGEN (1 << HRCR_V_HTRGEN)
Home |
Main Index |
Thread Index |
Old Index