aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2015-02-06 17:11:30 -0500
committerJames Bottomley <JBottomley@Odin.com>2015-04-09 21:06:58 -0400
commit6d9ffe6a01be435dae0984d94f92e2e85e3e5195 (patch)
treeb625b488cdbd876eb92a4851c152d2f7910ca691
parentf232d538017ec0da1df66cf22dc5a5842077b0e6 (diff)
aha1542: Use BIT() macro
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
-rw-r--r--drivers/scsi/aha1542.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/drivers/scsi/aha1542.h b/drivers/scsi/aha1542.h
index f0b862b6d56a..1333a23c1e09 100644
--- a/drivers/scsi/aha1542.h
+++ b/drivers/scsi/aha1542.h
@@ -36,29 +36,30 @@
36/* I/O Port interface 4.2 */ 36/* I/O Port interface 4.2 */
37/* READ */ 37/* READ */
38#define STATUS(base) base 38#define STATUS(base) base
39#define STST 0x80 /* Self Test in Progress */ 39#define STST BIT(7) /* Self Test in Progress */
40#define DIAGF 0x40 /* Internal Diagnostic Failure */ 40#define DIAGF BIT(6) /* Internal Diagnostic Failure */
41#define INIT 0x20 /* Mailbox Initialization Required */ 41#define INIT BIT(5) /* Mailbox Initialization Required */
42#define IDLE 0x10 /* SCSI Host Adapter Idle */ 42#define IDLE BIT(4) /* SCSI Host Adapter Idle */
43#define CDF 0x08 /* Command/Data Out Port Full */ 43#define CDF BIT(3) /* Command/Data Out Port Full */
44#define DF 0x04 /* Data In Port Full */ 44#define DF BIT(2) /* Data In Port Full */
45#define INVDCMD 0x01 /* Invalid H A Command */ 45/* BIT(1) is reserved */
46#define STATMASK 0xfd /* 0x02 is reserved */ 46#define INVDCMD BIT(0) /* Invalid H A Command */
47#define STATMASK (STST | DIAGF | INIT | IDLE | CDF | DF | INVDCMD)
47 48
48#define INTRFLAGS(base) (STATUS(base)+2) 49#define INTRFLAGS(base) (STATUS(base)+2)
49#define ANYINTR 0x80 /* Any Interrupt */ 50#define ANYINTR BIT(7) /* Any Interrupt */
50#define SCRD 0x08 /* SCSI Reset Detected */ 51#define SCRD BIT(3) /* SCSI Reset Detected */
51#define HACC 0x04 /* HA Command Complete */ 52#define HACC BIT(2) /* HA Command Complete */
52#define MBOA 0x02 /* MBO Empty */ 53#define MBOA BIT(1) /* MBO Empty */
53#define MBIF 0x01 /* MBI Full */ 54#define MBIF BIT(0) /* MBI Full */
54#define INTRMASK 0x8f 55#define INTRMASK (ANYINTR | SCRD | HACC | MBOA | MBIF)
55 56
56/* WRITE */ 57/* WRITE */
57#define CONTROL(base) STATUS(base) 58#define CONTROL(base) STATUS(base)
58#define HRST 0x80 /* Hard Reset */ 59#define HRST BIT(7) /* Hard Reset */
59#define SRST 0x40 /* Soft Reset */ 60#define SRST BIT(6) /* Soft Reset */
60#define IRST 0x20 /* Interrupt Reset */ 61#define IRST BIT(5) /* Interrupt Reset */
61#define SCRST 0x10 /* SCSI Bus Reset */ 62#define SCRST BIT(4) /* SCSI Bus Reset */
62 63
63/* READ/WRITE */ 64/* READ/WRITE */
64#define DATA(base) (STATUS(base)+1) 65#define DATA(base) (STATUS(base)+1)