X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fata%2Fpata_ns87415.c;h=e0aa7eaaee0a4bf86b9174c8ee05b16e8bbff9fa;hb=fbd05c8213e7cddca3041c280e5fca5eff0956f9;hp=38d86a262dbb85eed220e3d3135acd0fba433b4f;hpb=029cfd6b74fc5c517865fad78cf4a3ea8d9b664a;p=linux-2.6-omap-h63xx.git diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c index 38d86a262db..e0aa7eaaee0 100644 --- a/drivers/ata/pata_ns87415.c +++ b/drivers/ata/pata_ns87415.c @@ -66,8 +66,8 @@ static void ns87415_set_mode(struct ata_port *ap, struct ata_device *adev, u8 mo ata_timing_compute(adev, adev->pio_mode, &t, T, 0); - clocking = 17 - FIT(t.active, 2, 17); - clocking |= (16 - FIT(t.recover, 1, 16)) << 4; + clocking = 17 - clamp_val(t.active, 2, 17); + clocking |= (16 - clamp_val(t.recover, 1, 16)) << 4; /* Use the same timing for read and write bytes */ clocking |= (clocking << 8); pci_write_config_word(dev, timing, clocking); @@ -138,7 +138,7 @@ static void ns87415_bmdma_setup(struct ata_queued_cmd *qc) dmactl |= ATA_DMA_WR; iowrite8(dmactl, ap->ioaddr.bmdma_addr + ATA_DMA_CMD); /* issue r/w command */ - ap->ops->exec_command(ap, &qc->tf); + ap->ops->sff_exec_command(ap, &qc->tf); } /** @@ -172,14 +172,14 @@ static void ns87415_bmdma_stop(struct ata_queued_cmd *qc) } /** - * ns87415_bmdma_irq_clear - Clear interrupt + * ns87415_irq_clear - Clear interrupt * @ap: Channel to clear * * Erratum: Due to a chip bug regisers 02 and 0A bit 1 and 2 (the * error bits) are reset by writing to register 00 or 08. */ -static void ns87415_bmdma_irq_clear(struct ata_port *ap) +static void ns87415_irq_clear(struct ata_port *ap) { void __iomem *mmio = ap->ioaddr.bmdma_addr; @@ -306,7 +306,7 @@ static struct ata_port_operations ns87415_pata_ops = { .bmdma_setup = ns87415_bmdma_setup, .bmdma_start = ns87415_bmdma_start, .bmdma_stop = ns87415_bmdma_stop, - .irq_clear = ns87415_bmdma_irq_clear, + .sff_irq_clear = ns87415_irq_clear, .cable_detect = ata_cable_40wire, .set_piomode = ns87415_set_piomode, @@ -315,8 +315,8 @@ static struct ata_port_operations ns87415_pata_ops = { #if defined(CONFIG_SUPERIO) static struct ata_port_operations ns87560_pata_ops = { .inherits = &ns87415_pata_ops, - .tf_read = ns87560_tf_read, - .check_status = ns87560_check_status, + .sff_tf_read = ns87560_tf_read, + .sff_check_status = ns87560_check_status, .bmdma_status = ns87560_bmdma_status, }; #endif @@ -345,7 +345,6 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e { static int printed_version; static const struct ata_port_info info = { - .sht = &ns87415_sht, .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ @@ -355,7 +354,6 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e int rc; #if defined(CONFIG_SUPERIO) static const struct ata_port_info info87560 = { - .sht = &ns87415_sht, .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ @@ -377,7 +375,7 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e pci_write_config_byte(pdev, 0x55, 0xEE); /* Select PIO0 8bit clocking */ pci_write_config_byte(pdev, 0x54, 0xB7); - return ata_pci_init_one(pdev, ppi); + return ata_pci_sff_init_one(pdev, ppi, &ns87415_sht, NULL); } static const struct pci_device_id ns87415_pci_tbl[] = {