]> err.no Git - linux-2.6/commitdiff
ide: remove ->dma_prdtable field from ide_hwif_t
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Mon, 28 Apr 2008 21:44:42 +0000 (23:44 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Mon, 28 Apr 2008 21:44:42 +0000 (23:44 +0200)
* Use 'hwif->dma_base + {4,8}' instead of hwif->dma_prdtable in
  {ide,scc}_dma_setup().

* Remove no longer needed ->dma_prdtable field from ide_hwif_t.

While at it:

* Use ATA_DMA_TABLE_OFS define.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-dma.c
drivers/ide/pci/scc_pata.c
include/linux/ide.h

index 767820db7caee95690c38feea6ae5ebceece65b3..653b1ade13d315950a5b22efc54d69244d203fe4 100644 (file)
@@ -464,9 +464,10 @@ int ide_dma_setup(ide_drive_t *drive)
 
        /* PRD table */
        if (hwif->mmio)
-               writel(hwif->dmatable_dma, (void __iomem *)hwif->dma_prdtable);
+               writel(hwif->dmatable_dma,
+                      (void __iomem *)(hwif->dma_base + ATA_DMA_TABLE_OFS));
        else
-               outl(hwif->dmatable_dma, hwif->dma_prdtable);
+               outl(hwif->dmatable_dma, hwif->dma_base + ATA_DMA_TABLE_OFS);
 
        /* specify r/w */
        hwif->OUTB(reading, hwif->dma_command);
@@ -860,8 +861,6 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
                hwif->dma_command       = hwif->dma_base + 0;
        if (!hwif->dma_status)
                hwif->dma_status        = hwif->dma_base + 2;
-       if (!hwif->dma_prdtable)
-               hwif->dma_prdtable      = hwif->dma_base + 4;
 
        hwif->dma_ops = &sff_dma_ops;
 }
index 1449381883250b9df5a3199407275ddd623ceaa7..910fb00deb71486e8d0e7da1a3b922fc5009d4b5 100644 (file)
@@ -304,7 +304,7 @@ static int scc_dma_setup(ide_drive_t *drive)
        }
 
        /* PRD table */
-       out_be32((void __iomem *)hwif->dma_prdtable, hwif->dmatable_dma);
+       out_be32((void __iomem *)(hwif->dma_base + 8), hwif->dmatable_dma);
 
        /* specify r/w */
        out_be32((void __iomem *)hwif->dma_command, reading);
@@ -838,7 +838,6 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif)
 
        hwif->dma_command = hwif->dma_base;
        hwif->dma_status = hwif->dma_base + 0x04;
-       hwif->dma_prdtable = hwif->dma_base + 0x08;
 
        /* PTERADD */
        out_be32((void __iomem *)(hwif->dma_base + 0x018), hwif->dmatable_dma);
index d1d0111e48aa1a772518458bfc7b253bff495373..b0135b0c3a0435777b379d8f47f817d18c73de67 100644 (file)
@@ -506,7 +506,6 @@ typedef struct hwif_s {
        unsigned long   dma_base;       /* base addr for dma ports */
        unsigned long   dma_command;    /* dma command register */
        unsigned long   dma_status;     /* dma status register */
-       unsigned long   dma_prdtable;   /* actual prd table address */
 
        unsigned long   config_data;    /* for use by chipset-specific code */
        unsigned long   select_data;    /* for use by chipset-specific code */