Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102118
b: refs/heads/master
c: cb8ea09
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 16, 2008
1 parent c66f29c commit e7994c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 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: 67717e224181527987cce800fa2ddb5c8c1e9315
refs/heads/master: cb8ea0929c9cb899d61c4e155aace0b34d8cffe3
18 changes: 11 additions & 7 deletions trunk/drivers/ide/mips/swarm.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ static int __devinit swarm_ide_probe(struct device *dev)
if (!SIBYTE_HAVE_IDE)
return -ENODEV;

hwif = ide_find_port_slot(&swarm_port_info);
if (hwif == NULL)
return -ENOMEM;

base = ioremap(A_IO_EXT_BASE, 0x800);
offset = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_START_ADDR, IDE_CS));
size = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_MULT_SIZE, IDE_CS));
Expand All @@ -112,9 +108,6 @@ static int __devinit swarm_ide_probe(struct device *dev)

base = ioremap(offset, size);

/* Setup MMIO ops. */
default_hwif_mmiops(hwif);

for (i = 0; i <= 7; i++)
hw.io_ports_array[i] =
(unsigned long)(base + ((0x1f0 + i) << 5));
Expand All @@ -123,15 +116,26 @@ static int __devinit swarm_ide_probe(struct device *dev)
hw.irq = K_INT_GB_IDE;
hw.chipset = ide_generic;

hwif = ide_find_port_slot(&swarm_port_info);
if (hwif == NULL)
goto err;

ide_init_port_hw(hwif, &hw);

/* Setup MMIO ops. */
default_hwif_mmiops(hwif);

idx[0] = hwif->index;

ide_device_add(idx, &swarm_port_info);

dev_set_drvdata(dev, hwif);

return 0;
err:
release_resource(&swarm_ide_resource);
iounmap(base);
return -ENOMEM;
}

static struct device_driver swarm_ide_driver = {
Expand Down

0 comments on commit e7994c4

Please sign in to comment.