aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorThibaut VARENE <T-Bone@parisc-linux.org>2006-02-03 03:03:48 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-03 08:32:01 -0800
commitd237bf49261ed812a17f7123fea9b80ef673ca0f (patch)
treee0ac0c126e5705cc7f9116211994195bfca2d652 /drivers/ide
parent[PATCH] Fix compilation errors in maps/dc21285.c (diff)
downloadlinux-dev-d237bf49261ed812a17f7123fea9b80ef673ca0f.tar.xz
linux-dev-d237bf49261ed812a17f7123fea9b80ef673ca0f.zip
[PATCH] ide: restore support for AEC6280M cards in aec62xx.c
This patch adds missing initialization sequence, necessary to get the "Macintosh" version of AEC6280 cards to work in Linux. Without this patch, the driver hangs for several minutes trying to initialize the card and the kernel is left in an unstable state. This patch has been tested fine on ppc and i386. Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org> Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/pci/aec62xx.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
index a21b1e11eef4..c743e68c33aa 100644
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -262,6 +262,21 @@ static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev, const ch
else
pci_set_drvdata(dev, (void *) aec6xxx_34_base);
+ /* These are necessary to get AEC6280 Macintosh cards to work */
+ if ((dev->device == PCI_DEVICE_ID_ARTOP_ATP865) ||
+ (dev->device == PCI_DEVICE_ID_ARTOP_ATP865R)) {
+ u8 reg49h = 0, reg4ah = 0;
+ /* Clear reset and test bits. */
+ pci_read_config_byte(dev, 0x49, &reg49h);
+ pci_write_config_byte(dev, 0x49, reg49h & ~0x30);
+ /* Enable chip interrupt output. */
+ pci_read_config_byte(dev, 0x4a, &reg4ah);
+ pci_write_config_byte(dev, 0x4a, reg4ah & ~0x01);
+ /* Enable burst mode. */
+ pci_read_config_byte(dev, 0x4a, &reg4ah);
+ pci_write_config_byte(dev, 0x4a, reg4ah | 0x80);
+ }
+
return dev->irq;
}