summaryrefslogtreecommitdiffstats
path: root/drivers/ide/arm
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-20 00:32:32 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-20 00:32:32 +0200
commit86f3a492bb09eee5745b93af35f2212179c251fd (patch)
tree45d0f4725943fe0d0f16d44db3e643ce1f4d4553 /drivers/ide/arm
parent8f173b5bf460a85791c131e774dc992f8cd578c1 (diff)
downloadop-kernel-dev-86f3a492bb09eee5745b93af35f2212179c251fd.zip
op-kernel-dev-86f3a492bb09eee5745b93af35f2212179c251fd.tar.gz
icside: use ec->dma directly
* hwif->hwif_data contains pointer to struct expansion_card so use ec->dma directly instead of caching it in hwif->hw.dma. * Remove no longer needed hw_regs_t.dma and NO_DMA define. Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/arm')
-rw-r--r--drivers/ide/arm/icside.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index fda3f87..22fc46d 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -316,27 +316,29 @@ static int icside_dma_end(ide_drive_t *drive)
drive->waiting_for_dma = 0;
- disable_dma(hwif->hw.dma);
+ disable_dma(state->dev->dma);
/* Teardown mappings after DMA has completed. */
dma_unmap_sg(state->dev, hwif->sg_table, hwif->sg_nents,
hwif->sg_dma_direction);
- return get_dma_residue(hwif->hw.dma) != 0;
+ return get_dma_residue(state->dev->dma) != 0;
}
static void icside_dma_start(ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
+ struct icside_state *state = hwif->hwif_data;
/* We can not enable DMA on both channels simultaneously. */
- BUG_ON(dma_channel_active(hwif->hw.dma));
- enable_dma(hwif->hw.dma);
+ BUG_ON(dma_channel_active(state->dev->dma));
+ enable_dma(state->dev->dma);
}
static int icside_dma_setup(ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
+ struct icside_state *state = hwif->hwif_data;
struct request *rq = hwif->hwgroup->rq;
unsigned int dma_mode;
@@ -348,7 +350,7 @@ static int icside_dma_setup(ide_drive_t *drive)
/*
* We can not enable DMA on both channels.
*/
- BUG_ON(dma_channel_active(hwif->hw.dma));
+ BUG_ON(dma_channel_active(state->dev->dma));
icside_build_sglist(drive, rq);
@@ -365,14 +367,14 @@ static int icside_dma_setup(ide_drive_t *drive)
/*
* Select the correct timing for this drive.
*/
- set_dma_speed(hwif->hw.dma, drive->drive_data);
+ set_dma_speed(state->dev->dma, drive->drive_data);
/*
* Tell the DMA engine about the SG table and
* data direction.
*/
- set_dma_sg(hwif->hw.dma, hwif->sg_table, hwif->sg_nents);
- set_dma_mode(hwif->hw.dma, dma_mode);
+ set_dma_sg(state->dev->dma, hwif->sg_table, hwif->sg_nents);
+ set_dma_mode(state->dev->dma, dma_mode);
drive->waiting_for_dma = 1;
@@ -572,7 +574,6 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
hwif->serialized = 1;
hwif->config_data = (unsigned long)ioc_base;
hwif->select_data = sel;
- hwif->hw.dma = ec->dma;
mate->maskproc = icside_maskproc;
mate->channel = 1;
@@ -581,7 +582,6 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
mate->serialized = 1;
mate->config_data = (unsigned long)ioc_base;
mate->select_data = sel | 1;
- mate->hw.dma = ec->dma;
if (ec->dma != NO_DMA && !request_dma(ec->dma, hwif->name)) {
icside_dma_init(hwif);
OpenPOWER on IntegriCloud