Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93660
b: refs/heads/master
c: b552a2c
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Apr 26, 2008
1 parent e40d80d commit 2956c2f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 04216fa1befbf8c737b7bf3bcc636009723f40d9
refs/heads/master: b552a2c1dd01ab2380ea9429899591aa743f02e7
23 changes: 17 additions & 6 deletions trunk/drivers/ide/arm/palm_bk3710.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,31 @@ static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif)
return ATA_CBL_PATA80;
}

static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif,
const struct ide_port_info *d)
{
unsigned long base =
hwif->io_ports[IDE_DATA_OFFSET] - IDE_PALM_ATA_PRI_REG_OFFSET;

printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name);

if (ide_allocate_dma_engine(hwif))
return -1;

ide_setup_dma(hwif, base);

return 0;
}

static const struct ide_port_ops palm_bk3710_ports_ops = {
.set_pio_mode = palm_bk3710_set_pio_mode,
.set_dma_mode = palm_bk3710_set_dma_mode,
.cable_detect = palm_bk3710_cable_detect,
};

static const struct ide_port_info __devinitdata palm_bk3710_port_info = {
.init_dma = palm_bk3710_init_dma,
.port_ops = &palm_bk3710_ports_ops,
.host_flags = IDE_HFLAG_NO_DMA, /* hack (no PCI) */
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA4, /* (input clk 99MHz) */
.mwdma_mask = ATA_MWDMA2,
Expand Down Expand Up @@ -392,11 +408,6 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
hwif->mmio = 1;
default_hwif_mmiops(hwif);

printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name);

if (ide_allocate_dma_engine(hwif) == 0)
ide_setup_dma(hwif, mem->start);

idx[0] = i;

ide_device_add(idx, &palm_bk3710_port_info);
Expand Down

0 comments on commit 2956c2f

Please sign in to comment.