LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [PATCH 5/5] ide: remove ->dma_prdtable field from ide_hwif_t
2008-04-12 19:05 [PATCH 5/5] ide: remove ->dma_prdtable field from ide_hwif_t Bartlomiej Zolnierkiewicz
@ 2008-04-12 18:56 ` Sergei Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2008-04-12 18:56 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel
Bartlomiej Zolnierkiewicz wrote:
> * 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.
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
MBR, Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 5/5] ide: remove ->dma_prdtable field from ide_hwif_t
@ 2008-04-12 19:05 Bartlomiej Zolnierkiewicz
2008-04-12 18:56 ` Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-04-12 19:05 UTC (permalink / raw)
To: linux-ide; +Cc: linux-kernel
* 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.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-dma.c | 7 +++----
drivers/ide/pci/scc_pata.c | 3 +--
include/linux/ide.h | 1 -
3 files changed, 4 insertions(+), 7 deletions(-)
Index: b/drivers/ide/ide-dma.c
===================================================================
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -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, uns
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: b/drivers/ide/pci/scc_pata.c
===================================================================
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -304,7 +304,7 @@ static int scc_dma_setup(ide_drive_t *dr
}
/* 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);
@@ -804,7 +804,6 @@ static void __devinit init_hwif_scc(ide_
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: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -511,7 +511,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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-12 18:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-12 19:05 [PATCH 5/5] ide: remove ->dma_prdtable field from ide_hwif_t Bartlomiej Zolnierkiewicz
2008-04-12 18:56 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).