diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-03-22 04:14:17 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-22 04:14:17 +0100 |
commit | 55cca65e1995ad604ee87e22c76c17d5cbceb9d0 (patch) | |
tree | 0a691ff7c1b9320e942e78f6f46bf65df5570d9f /drivers/scsi/sata_svw.c | |
parent | [libata] sata_vsc: fix inconsistent NULL checking (diff) | |
download | linux-55cca65e1995ad604ee87e22c76c17d5cbceb9d0.tar.xz linux-55cca65e1995ad604ee87e22c76c17d5cbceb9d0.zip |
[libata sata_vsc, sata_svw] Convert #define'd constants to enums
Also, bump sata_vsc version.
Diffstat (limited to 'drivers/scsi/sata_svw.c')
-rw-r--r-- | drivers/scsi/sata_svw.c | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index 4aaccd53e736..b023b6958487 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c @@ -56,33 +56,35 @@ #define DRV_NAME "sata_svw" #define DRV_VERSION "1.07" -/* Taskfile registers offsets */ -#define K2_SATA_TF_CMD_OFFSET 0x00 -#define K2_SATA_TF_DATA_OFFSET 0x00 -#define K2_SATA_TF_ERROR_OFFSET 0x04 -#define K2_SATA_TF_NSECT_OFFSET 0x08 -#define K2_SATA_TF_LBAL_OFFSET 0x0c -#define K2_SATA_TF_LBAM_OFFSET 0x10 -#define K2_SATA_TF_LBAH_OFFSET 0x14 -#define K2_SATA_TF_DEVICE_OFFSET 0x18 -#define K2_SATA_TF_CMDSTAT_OFFSET 0x1c -#define K2_SATA_TF_CTL_OFFSET 0x20 - -/* DMA base */ -#define K2_SATA_DMA_CMD_OFFSET 0x30 - -/* SCRs base */ -#define K2_SATA_SCR_STATUS_OFFSET 0x40 -#define K2_SATA_SCR_ERROR_OFFSET 0x44 -#define K2_SATA_SCR_CONTROL_OFFSET 0x48 - -/* Others */ -#define K2_SATA_SICR1_OFFSET 0x80 -#define K2_SATA_SICR2_OFFSET 0x84 -#define K2_SATA_SIM_OFFSET 0x88 - -/* Port stride */ -#define K2_SATA_PORT_OFFSET 0x100 +enum { + /* Taskfile registers offsets */ + K2_SATA_TF_CMD_OFFSET = 0x00, + K2_SATA_TF_DATA_OFFSET = 0x00, + K2_SATA_TF_ERROR_OFFSET = 0x04, + K2_SATA_TF_NSECT_OFFSET = 0x08, + K2_SATA_TF_LBAL_OFFSET = 0x0c, + K2_SATA_TF_LBAM_OFFSET = 0x10, + K2_SATA_TF_LBAH_OFFSET = 0x14, + K2_SATA_TF_DEVICE_OFFSET = 0x18, + K2_SATA_TF_CMDSTAT_OFFSET = 0x1c, + K2_SATA_TF_CTL_OFFSET = 0x20, + + /* DMA base */ + K2_SATA_DMA_CMD_OFFSET = 0x30, + + /* SCRs base */ + K2_SATA_SCR_STATUS_OFFSET = 0x40, + K2_SATA_SCR_ERROR_OFFSET = 0x44, + K2_SATA_SCR_CONTROL_OFFSET = 0x48, + + /* Others */ + K2_SATA_SICR1_OFFSET = 0x80, + K2_SATA_SICR2_OFFSET = 0x84, + K2_SATA_SIM_OFFSET = 0x88, + + /* Port stride */ + K2_SATA_PORT_OFFSET = 0x100, +}; static u8 k2_stat_check_status(struct ata_port *ap); |