Skip to content

Commit

Permalink
ide: remove ->dma_vendor{1,3} fields from ide_hwif_t
Browse files Browse the repository at this point in the history
* Use 'hwif->dma_base + {1,3}' instead of hwif->dma_vendor{1,3} in
  pdc202xx_new host driver.

* Remove no longer needed ->dma_vendor{1,3} fields from ide_hwif_t.

Acked-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
  • Loading branch information
bzolnier committed Apr 28, 2008
1 parent 669185e commit 41051a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 0 additions & 4 deletions drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,12 +858,8 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)

if (!hwif->dma_command)
hwif->dma_command = hwif->dma_base + 0;
if (!hwif->dma_vendor1)
hwif->dma_vendor1 = hwif->dma_base + 1;
if (!hwif->dma_status)
hwif->dma_status = hwif->dma_base + 2;
if (!hwif->dma_vendor3)
hwif->dma_vendor3 = hwif->dma_base + 3;
if (!hwif->dma_prdtable)
hwif->dma_prdtable = hwif->dma_base + 4;

Expand Down
8 changes: 4 additions & 4 deletions drivers/ide/pci/pdc202xx_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ static u8 get_indexed_reg(ide_hwif_t *hwif, u8 index)
{
u8 value;

outb(index, hwif->dma_vendor1);
value = inb(hwif->dma_vendor3);
outb(index, hwif->dma_base + 1);
value = inb(hwif->dma_base + 3);

DBG("index[%02X] value[%02X]\n", index, value);
return value;
Expand All @@ -97,8 +97,8 @@ static u8 get_indexed_reg(ide_hwif_t *hwif, u8 index)
*/
static void set_indexed_reg(ide_hwif_t *hwif, u8 index, u8 value)
{
outb(index, hwif->dma_vendor1);
outb(value, hwif->dma_vendor3);
outb(index, hwif->dma_base + 1);
outb(value, hwif->dma_base + 3);
DBG("index[%02X] value[%02X]\n", index, value);
}

Expand Down
2 changes: 0 additions & 2 deletions include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,7 @@ typedef struct hwif_s {

unsigned long dma_base; /* base addr for dma ports */
unsigned long dma_command; /* dma command register */
unsigned long dma_vendor1; /* dma vendor 1 register */
unsigned long dma_status; /* dma status register */
unsigned long dma_vendor3; /* dma vendor 3 register */
unsigned long dma_prdtable; /* actual prd table address */

unsigned long config_data; /* for use by chipset-specific code */
Expand Down

0 comments on commit 41051a1

Please sign in to comment.