diff options
author | Mark Haverkamp <markh@osdl.org> | 2006-09-19 12:00:02 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-09-23 21:09:42 -0400 |
commit | 76a7f8fdc0c2381ae1ba55ef71837712223ecb3c (patch) | |
tree | b6672be9f0c94d36841e56e6cf8a8636028268c5 /drivers/scsi/aacraid/aacraid.h | |
parent | 653ba58d55feb708c6f97e6f3e84901b3a03c9c0 (diff) |
[SCSI] aacraid: merge rx and rkt code
Received from Mark Salyzyn:
The only real difference between the rkt and rx platform modules is the
offset of the message registers. This patch recognizes this similarity
and simplifies the driver to reduce it's code footprint and to improve
maintainability by reducing the code duplication.
Visibly, the 'rkt.c' portion of this patch looks more complicated than
it really is. View it as retaining the rkt-only specifics of the
interface.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/aacraid.h')
-rw-r--r-- | drivers/scsi/aacraid/aacraid.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index e5f7be6f3cd6..eb3ed91bac79 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h | |||
@@ -494,6 +494,7 @@ struct adapter_ops | |||
494 | int (*adapter_sync_cmd)(struct aac_dev *dev, u32 command, u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6, u32 *status, u32 *r1, u32 *r2, u32 *r3, u32 *r4); | 494 | int (*adapter_sync_cmd)(struct aac_dev *dev, u32 command, u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6, u32 *status, u32 *r1, u32 *r2, u32 *r3, u32 *r4); |
495 | int (*adapter_check_health)(struct aac_dev *dev); | 495 | int (*adapter_check_health)(struct aac_dev *dev); |
496 | int (*adapter_send)(struct fib * fib); | 496 | int (*adapter_send)(struct fib * fib); |
497 | int (*adapter_ioremap)(struct aac_dev * dev, u32 size); | ||
497 | }; | 498 | }; |
498 | 499 | ||
499 | /* | 500 | /* |
@@ -682,14 +683,6 @@ struct rx_inbound { | |||
682 | __le32 Mailbox[8]; | 683 | __le32 Mailbox[8]; |
683 | }; | 684 | }; |
684 | 685 | ||
685 | #define InboundMailbox0 IndexRegs.Mailbox[0] | ||
686 | #define InboundMailbox1 IndexRegs.Mailbox[1] | ||
687 | #define InboundMailbox2 IndexRegs.Mailbox[2] | ||
688 | #define InboundMailbox3 IndexRegs.Mailbox[3] | ||
689 | #define InboundMailbox4 IndexRegs.Mailbox[4] | ||
690 | #define InboundMailbox5 IndexRegs.Mailbox[5] | ||
691 | #define InboundMailbox6 IndexRegs.Mailbox[6] | ||
692 | |||
693 | #define INBOUNDDOORBELL_0 0x00000001 | 686 | #define INBOUNDDOORBELL_0 0x00000001 |
694 | #define INBOUNDDOORBELL_1 0x00000002 | 687 | #define INBOUNDDOORBELL_1 0x00000002 |
695 | #define INBOUNDDOORBELL_2 0x00000004 | 688 | #define INBOUNDDOORBELL_2 0x00000004 |
@@ -1010,6 +1003,8 @@ struct aac_dev | |||
1010 | struct rx_registers __iomem *rx; | 1003 | struct rx_registers __iomem *rx; |
1011 | struct rkt_registers __iomem *rkt; | 1004 | struct rkt_registers __iomem *rkt; |
1012 | } regs; | 1005 | } regs; |
1006 | volatile void __iomem *base; | ||
1007 | volatile struct rx_inbound __iomem *IndexRegs; | ||
1013 | u32 OIMR; /* Mask Register Cache */ | 1008 | u32 OIMR; /* Mask Register Cache */ |
1014 | /* | 1009 | /* |
1015 | * AIF thread states | 1010 | * AIF thread states |
@@ -1050,6 +1045,9 @@ struct aac_dev | |||
1050 | #define aac_adapter_send(fib) \ | 1045 | #define aac_adapter_send(fib) \ |
1051 | ((fib)->dev)->a_ops.adapter_send(fib) | 1046 | ((fib)->dev)->a_ops.adapter_send(fib) |
1052 | 1047 | ||
1048 | #define aac_adapter_ioremap(dev, size) \ | ||
1049 | (dev)->a_ops.adapter_ioremap(dev, size) | ||
1050 | |||
1053 | #define FIB_CONTEXT_FLAG_TIMED_OUT (0x00000001) | 1051 | #define FIB_CONTEXT_FLAG_TIMED_OUT (0x00000001) |
1054 | 1052 | ||
1055 | /* | 1053 | /* |