]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/ata/pata_ninja32.c
Merge branches 'release', 'bugzilla-9916', 'bugzilla-9982', 'bugzilla-9989', 'misc...
[mv-sheeva.git] / drivers / ata / pata_ninja32.c
index 04acd3f86120f8631a06c1c7ec12196fe5b3f507..15dd649f89eed472c22fa838fbb259c95b4af503 100644 (file)
@@ -17,6 +17,7 @@
  *     Base + 0x00 IRQ Status
  *     Base + 0x01 IRQ control
  *     Base + 0x02 Chipset control
+ *     Base + 0x03 Unknown
  *     Base + 0x04 VDMA and reset control + wait bits
  *     Base + 0x08 BMIMBA
  *     Base + 0x0C DMA Length
@@ -61,7 +62,8 @@ static void ninja32_set_piomode(struct ata_port *ap, struct ata_device *adev)
        static u16 pio_timing[5] = {
                0xd6, 0x85, 0x44, 0x33, 0x13
        };
-       iowrite8(pio_timing[adev->pio_mode - XFER_PIO_0], ap->ioaddr.bmdma_addr + 0x1f);
+       iowrite8(pio_timing[adev->pio_mode - XFER_PIO_0],
+                ap->ioaddr.bmdma_addr + 0x1f);
        ap->private_data = adev;
 }
 
@@ -173,15 +175,20 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
        ata_std_ports(&ap->ioaddr);
 
        iowrite8(0x05, base + 0x01);    /* Enable interrupt lines */
-       iowrite8(0xB3, base + 0x02);    /* Burst, ?? setup */
-       iowrite8(0x00, base + 0x04);    /* WAIT0 ? */
+       iowrite8(0xBE, base + 0x02);    /* Burst, ?? setup */
+       iowrite8(0x01, base + 0x03);    /* Unknown */
+       iowrite8(0x20, base + 0x04);    /* WAIT0 */
+       iowrite8(0x8f, base + 0x05);    /* Unknown */
+       iowrite8(0xa4, base + 0x1c);    /* Unknown */
+       iowrite8(0x83, base + 0x1d);    /* BMDMA control: WAIT0 */
        /* FIXME: Should we disable them at remove ? */
-       return ata_host_activate(host, dev->irq, ata_interrupt, IRQF_SHARED, &ninja32_sht);
+       return ata_host_activate(host, dev->irq, ata_interrupt,
+                                IRQF_SHARED, &ninja32_sht);
 }
 
 static const struct pci_device_id ninja32[] = {
-       { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
-       { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { },
 };