Commit 7f2b1116 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Jeff Garzik

[PATCH] remove IDE_*_OFFSET_HOB and IDE_*_REG_HOB defines

They are identical to non _HOB versions (except IDE_CONTROL_OFFSET_HOB).
parent 94088a7a
...@@ -706,11 +706,11 @@ static ide_startstop_t lba_48_rw_disk (ide_drive_t *drive, struct request *rq, u ...@@ -706,11 +706,11 @@ static ide_startstop_t lba_48_rw_disk (ide_drive_t *drive, struct request *rq, u
if (blk_rq_tagged(rq)) { if (blk_rq_tagged(rq)) {
args.tfRegister[IDE_FEATURE_OFFSET] = sectors; args.tfRegister[IDE_FEATURE_OFFSET] = sectors;
args.tfRegister[IDE_NSECTOR_OFFSET] = rq->tag << 3; args.tfRegister[IDE_NSECTOR_OFFSET] = rq->tag << 3;
args.hobRegister[IDE_FEATURE_OFFSET_HOB] = sectors >> 8; args.hobRegister[IDE_FEATURE_OFFSET] = sectors >> 8;
args.hobRegister[IDE_NSECTOR_OFFSET_HOB] = 0; args.hobRegister[IDE_NSECTOR_OFFSET] = 0;
} else { } else {
args.tfRegister[IDE_NSECTOR_OFFSET] = sectors; args.tfRegister[IDE_NSECTOR_OFFSET] = sectors;
args.hobRegister[IDE_NSECTOR_OFFSET_HOB] = sectors >> 8; args.hobRegister[IDE_NSECTOR_OFFSET] = sectors >> 8;
} }
args.tfRegister[IDE_SECTOR_OFFSET] = block; /* low lba */ args.tfRegister[IDE_SECTOR_OFFSET] = block; /* low lba */
...@@ -718,10 +718,10 @@ static ide_startstop_t lba_48_rw_disk (ide_drive_t *drive, struct request *rq, u ...@@ -718,10 +718,10 @@ static ide_startstop_t lba_48_rw_disk (ide_drive_t *drive, struct request *rq, u
args.tfRegister[IDE_HCYL_OFFSET] = (block>>=8); /* hi lba */ args.tfRegister[IDE_HCYL_OFFSET] = (block>>=8); /* hi lba */
args.tfRegister[IDE_SELECT_OFFSET] = drive->select.all; args.tfRegister[IDE_SELECT_OFFSET] = drive->select.all;
args.tfRegister[IDE_COMMAND_OFFSET] = get_command(drive, rq_data_dir(rq), &args); args.tfRegister[IDE_COMMAND_OFFSET] = get_command(drive, rq_data_dir(rq), &args);
args.hobRegister[IDE_SECTOR_OFFSET_HOB] = (block>>=8); /* low lba */ args.hobRegister[IDE_SECTOR_OFFSET] = (block>>=8); /* low lba */
args.hobRegister[IDE_LCYL_OFFSET_HOB] = (block>>=8); /* mid lba */ args.hobRegister[IDE_LCYL_OFFSET] = (block>>=8); /* mid lba */
args.hobRegister[IDE_HCYL_OFFSET_HOB] = (block>>=8); /* hi lba */ args.hobRegister[IDE_HCYL_OFFSET] = (block>>=8); /* hi lba */
args.hobRegister[IDE_SELECT_OFFSET_HOB] = drive->select.all; args.hobRegister[IDE_SELECT_OFFSET] = drive->select.all;
args.hobRegister[IDE_CONTROL_OFFSET_HOB]= (drive->ctl|0x80); args.hobRegister[IDE_CONTROL_OFFSET_HOB]= (drive->ctl|0x80);
args.rq = (struct request *) rq; args.rq = (struct request *) rq;
rq->special = (ide_task_t *)&args; rq->special = (ide_task_t *)&args;
...@@ -963,9 +963,9 @@ static unsigned long long idedisk_read_native_max_address_ext(ide_drive_t *drive ...@@ -963,9 +963,9 @@ static unsigned long long idedisk_read_native_max_address_ext(ide_drive_t *drive
/* if OK, compute maximum address value */ /* if OK, compute maximum address value */
if ((args.tfRegister[IDE_STATUS_OFFSET] & 0x01) == 0) { if ((args.tfRegister[IDE_STATUS_OFFSET] & 0x01) == 0) {
u32 high = ((args.hobRegister[IDE_HCYL_OFFSET_HOB])<<16) | u32 high = (args.hobRegister[IDE_HCYL_OFFSET] << 16) |
((args.hobRegister[IDE_LCYL_OFFSET_HOB])<<8) | (args.hobRegister[IDE_LCYL_OFFSET] << 8) |
(args.hobRegister[IDE_SECTOR_OFFSET_HOB]); args.hobRegister[IDE_SECTOR_OFFSET];
u32 low = ((args.tfRegister[IDE_HCYL_OFFSET])<<16) | u32 low = ((args.tfRegister[IDE_HCYL_OFFSET])<<16) |
((args.tfRegister[IDE_LCYL_OFFSET])<<8) | ((args.tfRegister[IDE_LCYL_OFFSET])<<8) |
(args.tfRegister[IDE_SECTOR_OFFSET]); (args.tfRegister[IDE_SECTOR_OFFSET]);
...@@ -1021,10 +1021,10 @@ static unsigned long long idedisk_set_max_address_ext(ide_drive_t *drive, unsign ...@@ -1021,10 +1021,10 @@ static unsigned long long idedisk_set_max_address_ext(ide_drive_t *drive, unsign
args.tfRegister[IDE_HCYL_OFFSET] = ((addr_req >>= 8) & 0xff); args.tfRegister[IDE_HCYL_OFFSET] = ((addr_req >>= 8) & 0xff);
args.tfRegister[IDE_SELECT_OFFSET] = 0x40; args.tfRegister[IDE_SELECT_OFFSET] = 0x40;
args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SET_MAX_EXT; args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SET_MAX_EXT;
args.hobRegister[IDE_SECTOR_OFFSET_HOB] = ((addr_req >>= 8) & 0xff); args.hobRegister[IDE_SECTOR_OFFSET] = (addr_req >>= 8) & 0xff;
args.hobRegister[IDE_LCYL_OFFSET_HOB] = ((addr_req >>= 8) & 0xff); args.hobRegister[IDE_LCYL_OFFSET] = (addr_req >>= 8) & 0xff;
args.hobRegister[IDE_HCYL_OFFSET_HOB] = ((addr_req >>= 8) & 0xff); args.hobRegister[IDE_HCYL_OFFSET] = (addr_req >>= 8) & 0xff;
args.hobRegister[IDE_SELECT_OFFSET_HOB] = 0x40; args.hobRegister[IDE_SELECT_OFFSET] = 0x40;
args.hobRegister[IDE_CONTROL_OFFSET_HOB]= (drive->ctl|0x80); args.hobRegister[IDE_CONTROL_OFFSET_HOB]= (drive->ctl|0x80);
args.command_type = IDE_DRIVE_TASK_NO_DATA; args.command_type = IDE_DRIVE_TASK_NO_DATA;
args.handler = &task_no_data_intr; args.handler = &task_no_data_intr;
...@@ -1032,9 +1032,9 @@ static unsigned long long idedisk_set_max_address_ext(ide_drive_t *drive, unsign ...@@ -1032,9 +1032,9 @@ static unsigned long long idedisk_set_max_address_ext(ide_drive_t *drive, unsign
ide_raw_taskfile(drive, &args, NULL); ide_raw_taskfile(drive, &args, NULL);
/* if OK, compute maximum address value */ /* if OK, compute maximum address value */
if ((args.tfRegister[IDE_STATUS_OFFSET] & 0x01) == 0) { if ((args.tfRegister[IDE_STATUS_OFFSET] & 0x01) == 0) {
u32 high = ((args.hobRegister[IDE_HCYL_OFFSET_HOB])<<16) | u32 high = (args.hobRegister[IDE_HCYL_OFFSET] << 16) |
((args.hobRegister[IDE_LCYL_OFFSET_HOB])<<8) | (args.hobRegister[IDE_LCYL_OFFSET] << 8) |
(args.hobRegister[IDE_SECTOR_OFFSET_HOB]); args.hobRegister[IDE_SECTOR_OFFSET];
u32 low = ((args.tfRegister[IDE_HCYL_OFFSET])<<16) | u32 low = ((args.tfRegister[IDE_HCYL_OFFSET])<<16) |
((args.tfRegister[IDE_LCYL_OFFSET])<<8) | ((args.tfRegister[IDE_LCYL_OFFSET])<<8) |
(args.tfRegister[IDE_SECTOR_OFFSET]); (args.tfRegister[IDE_SECTOR_OFFSET]);
......
...@@ -197,7 +197,7 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) ...@@ -197,7 +197,7 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
if (args->tf_in_flags.b.data) { if (args->tf_in_flags.b.data) {
u16 data = hwif->INW(IDE_DATA_REG); u16 data = hwif->INW(IDE_DATA_REG);
args->tfRegister[IDE_DATA_OFFSET] = (data) & 0xFF; args->tfRegister[IDE_DATA_OFFSET] = (data) & 0xFF;
args->hobRegister[IDE_DATA_OFFSET_HOB] = (data >> 8) & 0xFF; args->hobRegister[IDE_DATA_OFFSET] = (data >> 8) & 0xFF;
} }
args->tfRegister[IDE_ERROR_OFFSET] = err; args->tfRegister[IDE_ERROR_OFFSET] = err;
args->tfRegister[IDE_NSECTOR_OFFSET] = hwif->INB(IDE_NSECTOR_REG); args->tfRegister[IDE_NSECTOR_OFFSET] = hwif->INB(IDE_NSECTOR_REG);
...@@ -208,12 +208,12 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) ...@@ -208,12 +208,12 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
args->tfRegister[IDE_STATUS_OFFSET] = stat; args->tfRegister[IDE_STATUS_OFFSET] = stat;
if (drive->addressing == 1) { if (drive->addressing == 1) {
hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG_HOB); hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG);
args->hobRegister[IDE_FEATURE_OFFSET_HOB] = hwif->INB(IDE_FEATURE_REG); args->hobRegister[IDE_FEATURE_OFFSET] = hwif->INB(IDE_FEATURE_REG);
args->hobRegister[IDE_NSECTOR_OFFSET_HOB] = hwif->INB(IDE_NSECTOR_REG); args->hobRegister[IDE_NSECTOR_OFFSET] = hwif->INB(IDE_NSECTOR_REG);
args->hobRegister[IDE_SECTOR_OFFSET_HOB] = hwif->INB(IDE_SECTOR_REG); args->hobRegister[IDE_SECTOR_OFFSET] = hwif->INB(IDE_SECTOR_REG);
args->hobRegister[IDE_LCYL_OFFSET_HOB] = hwif->INB(IDE_LCYL_REG); args->hobRegister[IDE_LCYL_OFFSET] = hwif->INB(IDE_LCYL_REG);
args->hobRegister[IDE_HCYL_OFFSET_HOB] = hwif->INB(IDE_HCYL_REG); args->hobRegister[IDE_HCYL_OFFSET] = hwif->INB(IDE_HCYL_REG);
} }
} }
} else if (blk_pm_request(rq)) { } else if (blk_pm_request(rq)) {
......
...@@ -121,13 +121,13 @@ void debug_taskfile (ide_drive_t *drive, ide_task_t *args) ...@@ -121,13 +121,13 @@ void debug_taskfile (ide_drive_t *drive, ide_task_t *args)
printk("TF.6=x%02x ", args->tfRegister[IDE_SELECT_OFFSET]); printk("TF.6=x%02x ", args->tfRegister[IDE_SELECT_OFFSET]);
printk("TF.7=x%02x\n", args->tfRegister[IDE_COMMAND_OFFSET]); printk("TF.7=x%02x\n", args->tfRegister[IDE_COMMAND_OFFSET]);
printk(KERN_INFO "%s: ", drive->name); printk(KERN_INFO "%s: ", drive->name);
// printk("HTF.0=x%02x ", args->hobRegister[IDE_DATA_OFFSET_HOB]); // printk("HTF.0=x%02x ", args->hobRegister[IDE_DATA_OFFSET]);
printk("HTF.1=x%02x ", args->hobRegister[IDE_FEATURE_OFFSET_HOB]); printk("HTF.1=x%02x ", args->hobRegister[IDE_FEATURE_OFFSET]);
printk("HTF.2=x%02x ", args->hobRegister[IDE_NSECTOR_OFFSET_HOB]); printk("HTF.2=x%02x ", args->hobRegister[IDE_NSECTOR_OFFSET]);
printk("HTF.3=x%02x ", args->hobRegister[IDE_SECTOR_OFFSET_HOB]); printk("HTF.3=x%02x ", args->hobRegister[IDE_SECTOR_OFFSET]);
printk("HTF.4=x%02x ", args->hobRegister[IDE_LCYL_OFFSET_HOB]); printk("HTF.4=x%02x ", args->hobRegister[IDE_LCYL_OFFSET]);
printk("HTF.5=x%02x ", args->hobRegister[IDE_HCYL_OFFSET_HOB]); printk("HTF.5=x%02x ", args->hobRegister[IDE_HCYL_OFFSET]);
printk("HTF.6=x%02x ", args->hobRegister[IDE_SELECT_OFFSET_HOB]); printk("HTF.6=x%02x ", args->hobRegister[IDE_SELECT_OFFSET]);
printk("HTF.7=x%02x\n", args->hobRegister[IDE_CONTROL_OFFSET_HOB]); printk("HTF.7=x%02x\n", args->hobRegister[IDE_CONTROL_OFFSET_HOB]);
} }
#endif /* CONFIG_IDE_TASK_IOCTL_DEBUG */ #endif /* CONFIG_IDE_TASK_IOCTL_DEBUG */
...@@ -1018,7 +1018,7 @@ int ide_diag_taskfile (ide_drive_t *drive, ide_task_t *args, unsigned long data_ ...@@ -1018,7 +1018,7 @@ int ide_diag_taskfile (ide_drive_t *drive, ide_task_t *args, unsigned long data_
*/ */
if (args->command_type != IDE_DRIVE_TASK_NO_DATA) { if (args->command_type != IDE_DRIVE_TASK_NO_DATA) {
if (data_size == 0) if (data_size == 0)
rq.nr_sectors = (args->hobRegister[IDE_NSECTOR_OFFSET_HOB] << 8) | args->tfRegister[IDE_NSECTOR_OFFSET]; rq.nr_sectors = (args->hobRegister[IDE_NSECTOR_OFFSET] << 8) | args->tfRegister[IDE_NSECTOR_OFFSET];
else else
rq.nr_sectors = data_size / SECTOR_SIZE; rq.nr_sectors = data_size / SECTOR_SIZE;
......
...@@ -143,17 +143,8 @@ typedef unsigned char byte; /* used everywhere */ ...@@ -143,17 +143,8 @@ typedef unsigned char byte; /* used everywhere */
#define IDE_FEATURE_OFFSET IDE_ERROR_OFFSET #define IDE_FEATURE_OFFSET IDE_ERROR_OFFSET
#define IDE_COMMAND_OFFSET IDE_STATUS_OFFSET #define IDE_COMMAND_OFFSET IDE_STATUS_OFFSET
#define IDE_DATA_OFFSET_HOB (0)
#define IDE_ERROR_OFFSET_HOB (1)
#define IDE_NSECTOR_OFFSET_HOB (2)
#define IDE_SECTOR_OFFSET_HOB (3)
#define IDE_LCYL_OFFSET_HOB (4)
#define IDE_HCYL_OFFSET_HOB (5)
#define IDE_SELECT_OFFSET_HOB (6)
#define IDE_CONTROL_OFFSET_HOB (7) #define IDE_CONTROL_OFFSET_HOB (7)
#define IDE_FEATURE_OFFSET_HOB IDE_ERROR_OFFSET_HOB
#define IDE_DATA_REG (HWIF(drive)->io_ports[IDE_DATA_OFFSET]) #define IDE_DATA_REG (HWIF(drive)->io_ports[IDE_DATA_OFFSET])
#define IDE_ERROR_REG (HWIF(drive)->io_ports[IDE_ERROR_OFFSET]) #define IDE_ERROR_REG (HWIF(drive)->io_ports[IDE_ERROR_OFFSET])
#define IDE_NSECTOR_REG (HWIF(drive)->io_ports[IDE_NSECTOR_OFFSET]) #define IDE_NSECTOR_REG (HWIF(drive)->io_ports[IDE_NSECTOR_OFFSET])
...@@ -165,16 +156,6 @@ typedef unsigned char byte; /* used everywhere */ ...@@ -165,16 +156,6 @@ typedef unsigned char byte; /* used everywhere */
#define IDE_CONTROL_REG (HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]) #define IDE_CONTROL_REG (HWIF(drive)->io_ports[IDE_CONTROL_OFFSET])
#define IDE_IRQ_REG (HWIF(drive)->io_ports[IDE_IRQ_OFFSET]) #define IDE_IRQ_REG (HWIF(drive)->io_ports[IDE_IRQ_OFFSET])
#define IDE_DATA_REG_HOB (HWIF(drive)->io_ports[IDE_DATA_OFFSET])
#define IDE_ERROR_REG_HOB (HWIF(drive)->io_ports[IDE_ERROR_OFFSET])
#define IDE_NSECTOR_REG_HOB (HWIF(drive)->io_ports[IDE_NSECTOR_OFFSET])
#define IDE_SECTOR_REG_HOB (HWIF(drive)->io_ports[IDE_SECTOR_OFFSET])
#define IDE_LCYL_REG_HOB (HWIF(drive)->io_ports[IDE_LCYL_OFFSET])
#define IDE_HCYL_REG_HOB (HWIF(drive)->io_ports[IDE_HCYL_OFFSET])
#define IDE_SELECT_REG_HOB (HWIF(drive)->io_ports[IDE_SELECT_OFFSET])
#define IDE_STATUS_REG_HOB (HWIF(drive)->io_ports[IDE_STATUS_OFFSET])
#define IDE_CONTROL_REG_HOB (HWIF(drive)->io_ports[IDE_CONTROL_OFFSET])
#define IDE_FEATURE_REG IDE_ERROR_REG #define IDE_FEATURE_REG IDE_ERROR_REG
#define IDE_COMMAND_REG IDE_STATUS_REG #define IDE_COMMAND_REG IDE_STATUS_REG
#define IDE_ALTSTATUS_REG IDE_CONTROL_REG #define IDE_ALTSTATUS_REG IDE_CONTROL_REG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment