Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ide: remove ->dma_prdtable field from ide_hwif_t

* 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>

+4 -7
+3 -4
drivers/ide/ide-dma.c
··· 464 464 465 465 /* PRD table */ 466 466 if (hwif->mmio) 467 - writel(hwif->dmatable_dma, (void __iomem *)hwif->dma_prdtable); 467 + writel(hwif->dmatable_dma, 468 + (void __iomem *)(hwif->dma_base + ATA_DMA_TABLE_OFS)); 468 469 else 469 - outl(hwif->dmatable_dma, hwif->dma_prdtable); 470 + outl(hwif->dmatable_dma, hwif->dma_base + ATA_DMA_TABLE_OFS); 470 471 471 472 /* specify r/w */ 472 473 hwif->OUTB(reading, hwif->dma_command); ··· 861 860 hwif->dma_command = hwif->dma_base + 0; 862 861 if (!hwif->dma_status) 863 862 hwif->dma_status = hwif->dma_base + 2; 864 - if (!hwif->dma_prdtable) 865 - hwif->dma_prdtable = hwif->dma_base + 4; 866 863 867 864 hwif->dma_ops = &sff_dma_ops; 868 865 }
+1 -2
drivers/ide/pci/scc_pata.c
··· 304 304 } 305 305 306 306 /* PRD table */ 307 - out_be32((void __iomem *)hwif->dma_prdtable, hwif->dmatable_dma); 307 + out_be32((void __iomem *)(hwif->dma_base + 8), hwif->dmatable_dma); 308 308 309 309 /* specify r/w */ 310 310 out_be32((void __iomem *)hwif->dma_command, reading); ··· 838 838 839 839 hwif->dma_command = hwif->dma_base; 840 840 hwif->dma_status = hwif->dma_base + 0x04; 841 - hwif->dma_prdtable = hwif->dma_base + 0x08; 842 841 843 842 /* PTERADD */ 844 843 out_be32((void __iomem *)(hwif->dma_base + 0x018), hwif->dmatable_dma);
-1
include/linux/ide.h
··· 506 506 unsigned long dma_base; /* base addr for dma ports */ 507 507 unsigned long dma_command; /* dma command register */ 508 508 unsigned long dma_status; /* dma status register */ 509 - unsigned long dma_prdtable; /* actual prd table address */ 510 509 511 510 unsigned long config_data; /* for use by chipset-specific code */ 512 511 unsigned long select_data; /* for use by chipset-specific code */