Commit 4d4423ca authored by Maciej W. Rozycki's avatar Maciej W. Rozycki Committed by Bartlomiej Zolnierkiewicz

SWARM IDE: Fix up following changes to ide_hwif_t

 Following recent changes to ide_hwif_t update the SWARM IDE driver to use 
hw_regs_t to initialize port mapping.  Plus minor layout adjustments along 
the lines of other drivers.
Signed-off-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent fc99824c
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Author: Manish Lachwani, mlachwani@mvista.com * Author: Manish Lachwani, mlachwani@mvista.com
* Copyright (C) 2004 MIPS Technologies, Inc. All rights reserved. * Copyright (C) 2004 MIPS Technologies, Inc. All rights reserved.
* Author: Maciej W. Rozycki <macro@mips.com> * Author: Maciej W. Rozycki <macro@mips.com>
* Copyright (c) 2006 Maciej W. Rozycki * Copyright (c) 2006, 2008 Maciej W. Rozycki
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -70,8 +70,9 @@ static int __devinit swarm_ide_probe(struct device *dev) ...@@ -70,8 +70,9 @@ static int __devinit swarm_ide_probe(struct device *dev)
ide_hwif_t *hwif; ide_hwif_t *hwif;
u8 __iomem *base; u8 __iomem *base;
phys_t offset, size; phys_t offset, size;
hw_regs_t hw;
int i; int i;
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; u8 idx[] = { 0xff, 0xff, 0xff, 0xff };
if (!SIBYTE_HAVE_IDE) if (!SIBYTE_HAVE_IDE)
return -ENODEV; return -ENODEV;
...@@ -112,14 +113,15 @@ static int __devinit swarm_ide_probe(struct device *dev) ...@@ -112,14 +113,15 @@ static int __devinit swarm_ide_probe(struct device *dev)
hwif->host_flags = IDE_HFLAG_MMIO; hwif->host_flags = IDE_HFLAG_MMIO;
default_hwif_mmiops(hwif); default_hwif_mmiops(hwif);
hwif->chipset = ide_generic;
for (i = 0; i <= 7; i++) for (i = 0; i <= 7; i++)
hwif->io_ports_array[i] = hw.io_ports_array[i] =
(unsigned long)(base + ((0x1f0 + i) << 5)); (unsigned long)(base + ((0x1f0 + i) << 5));
hwif->io_ports.ctl_addr = hw.io_ports.ctl_addr =
(unsigned long)(base + (0x3f6 << 5)); (unsigned long)(base + (0x3f6 << 5));
hwif->irq = K_INT_GB_IDE; hw.irq = K_INT_GB_IDE;
hw.chipset = ide_generic;
ide_init_port_hw(hwif, &hw);
idx[0] = hwif->index; idx[0] = hwif->index;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment