From: Ondrej Zary <linux@rainbow-software.org>
To: linux-scsi@vger.kernel.org
Subject: [PATCH 09/13] aha1542: Use BIT() macro
Date: Mon, 19 Jan 2015 23:37:53 +0100 [thread overview]
Message-ID: <1421707077-25291-10-git-send-email-linux@rainbow-software.org> (raw)
In-Reply-To: <1421707077-25291-1-git-send-email-linux@rainbow-software.org>
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
drivers/scsi/aha1542.h | 37 +++++++++++++++++++------------------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/drivers/scsi/aha1542.h b/drivers/scsi/aha1542.h
index f0b862b..1333a23 100644
--- a/drivers/scsi/aha1542.h
+++ b/drivers/scsi/aha1542.h
@@ -36,29 +36,30 @@
/* I/O Port interface 4.2 */
/* READ */
#define STATUS(base) base
-#define STST 0x80 /* Self Test in Progress */
-#define DIAGF 0x40 /* Internal Diagnostic Failure */
-#define INIT 0x20 /* Mailbox Initialization Required */
-#define IDLE 0x10 /* SCSI Host Adapter Idle */
-#define CDF 0x08 /* Command/Data Out Port Full */
-#define DF 0x04 /* Data In Port Full */
-#define INVDCMD 0x01 /* Invalid H A Command */
-#define STATMASK 0xfd /* 0x02 is reserved */
+#define STST BIT(7) /* Self Test in Progress */
+#define DIAGF BIT(6) /* Internal Diagnostic Failure */
+#define INIT BIT(5) /* Mailbox Initialization Required */
+#define IDLE BIT(4) /* SCSI Host Adapter Idle */
+#define CDF BIT(3) /* Command/Data Out Port Full */
+#define DF BIT(2) /* Data In Port Full */
+/* BIT(1) is reserved */
+#define INVDCMD BIT(0) /* Invalid H A Command */
+#define STATMASK (STST | DIAGF | INIT | IDLE | CDF | DF | INVDCMD)
#define INTRFLAGS(base) (STATUS(base)+2)
-#define ANYINTR 0x80 /* Any Interrupt */
-#define SCRD 0x08 /* SCSI Reset Detected */
-#define HACC 0x04 /* HA Command Complete */
-#define MBOA 0x02 /* MBO Empty */
-#define MBIF 0x01 /* MBI Full */
-#define INTRMASK 0x8f
+#define ANYINTR BIT(7) /* Any Interrupt */
+#define SCRD BIT(3) /* SCSI Reset Detected */
+#define HACC BIT(2) /* HA Command Complete */
+#define MBOA BIT(1) /* MBO Empty */
+#define MBIF BIT(0) /* MBI Full */
+#define INTRMASK (ANYINTR | SCRD | HACC | MBOA | MBIF)
/* WRITE */
#define CONTROL(base) STATUS(base)
-#define HRST 0x80 /* Hard Reset */
-#define SRST 0x40 /* Soft Reset */
-#define IRST 0x20 /* Interrupt Reset */
-#define SCRST 0x10 /* SCSI Bus Reset */
+#define HRST BIT(7) /* Hard Reset */
+#define SRST BIT(6) /* Soft Reset */
+#define IRST BIT(5) /* Interrupt Reset */
+#define SCRST BIT(4) /* SCSI Bus Reset */
/* READ/WRITE */
#define DATA(base) (STATUS(base)+1)
--
Ondrej Zary
next prev parent reply other threads:[~2015-01-19 22:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 22:37 [RFC PATCH 0/13] aha1542: Various improvements Ondrej Zary
2015-01-19 22:37 ` [PATCH 01/13] aha1542: Stop using scsi_module.c Ondrej Zary
2015-01-19 22:37 ` [PATCH 02/13] aha1542: remove dead code Ondrej Zary
2015-01-19 22:37 ` [PATCH 03/13] aha1542: Remove SCSI_BUF_PA, SCSI_SG_PA, AHA1542_SCATTER and AHA1542_CMDLUN Ondrej Zary
2015-01-19 22:37 ` [PATCH 04/13] aha1542: Remove HOSTDATA macro Ondrej Zary
2015-01-19 22:37 ` [PATCH 05/13] aha1542: Convert aha1542_intr_reset to function Ondrej Zary
2015-01-19 22:37 ` [PATCH 06/13] aha1542: Use u8 instead of unchar Ondrej Zary
2015-01-19 22:37 ` [PATCH 07/13] aha1542: Reorder functions to remove forward declarations Ondrej Zary
2015-01-19 22:37 ` [PATCH 08/13] aha1542: remove empty aha1542_stat Ondrej Zary
2015-01-19 22:37 ` Ondrej Zary [this message]
2015-01-19 22:37 ` [PATCH 10/13] aha1542: Remove WAIT and WAITd macros Ondrej Zary
2015-01-19 22:37 ` [PATCH 11/13] aha1542: Unify aha1542_in and aha1542_in1 Ondrej Zary
2015-01-19 22:37 ` [PATCH 12/13] aha1542: Split aha1542_out Ondrej Zary
2015-01-19 22:37 ` [PATCH 13/13] aha1542: Remove unneeded gotos Ondrej Zary
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421707077-25291-10-git-send-email-linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.