diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-04-19 12:17:34 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-19 12:17:34 -0400 |
commit | cf816ecb533ab96b883dfdc0db174598b5b5c4d2 (patch) | |
tree | 1b7705db288ae2917105e624b01fdf81e0882bf1 /drivers/ata/pata_ninja32.c | |
parent | adf6d34e460387ee3e8f1e1875d52bff51212c7d (diff) | |
parent | 15f7d677ccff6f0f5de8a1ee43a792567e9f9de9 (diff) |
Merge branch 'merge-fixes' into devel
Diffstat (limited to 'drivers/ata/pata_ninja32.c')
-rw-r--r-- | drivers/ata/pata_ninja32.c | 54 |
1 files changed, 7 insertions, 47 deletions
diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c index 15dd649f89ee..565e67cd13fa 100644 --- a/drivers/ata/pata_ninja32.c +++ b/drivers/ata/pata_ninja32.c | |||
@@ -73,60 +73,20 @@ static void ninja32_dev_select(struct ata_port *ap, unsigned int device) | |||
73 | struct ata_device *adev = &ap->link.device[device]; | 73 | struct ata_device *adev = &ap->link.device[device]; |
74 | if (ap->private_data != adev) { | 74 | if (ap->private_data != adev) { |
75 | iowrite8(0xd6, ap->ioaddr.bmdma_addr + 0x1f); | 75 | iowrite8(0xd6, ap->ioaddr.bmdma_addr + 0x1f); |
76 | ata_std_dev_select(ap, device); | 76 | ata_sff_dev_select(ap, device); |
77 | ninja32_set_piomode(ap, adev); | 77 | ninja32_set_piomode(ap, adev); |
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | static struct scsi_host_template ninja32_sht = { | 81 | static struct scsi_host_template ninja32_sht = { |
82 | .module = THIS_MODULE, | 82 | ATA_BMDMA_SHT(DRV_NAME), |
83 | .name = DRV_NAME, | ||
84 | .ioctl = ata_scsi_ioctl, | ||
85 | .queuecommand = ata_scsi_queuecmd, | ||
86 | .can_queue = ATA_DEF_QUEUE, | ||
87 | .this_id = ATA_SHT_THIS_ID, | ||
88 | .sg_tablesize = LIBATA_MAX_PRD, | ||
89 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | ||
90 | .emulated = ATA_SHT_EMULATED, | ||
91 | .use_clustering = ATA_SHT_USE_CLUSTERING, | ||
92 | .proc_name = DRV_NAME, | ||
93 | .dma_boundary = ATA_DMA_BOUNDARY, | ||
94 | .slave_configure = ata_scsi_slave_config, | ||
95 | .slave_destroy = ata_scsi_slave_destroy, | ||
96 | .bios_param = ata_std_bios_param, | ||
97 | }; | 83 | }; |
98 | 84 | ||
99 | static struct ata_port_operations ninja32_port_ops = { | 85 | static struct ata_port_operations ninja32_port_ops = { |
100 | .set_piomode = ninja32_set_piomode, | 86 | .inherits = &ata_bmdma_port_ops, |
101 | .mode_filter = ata_pci_default_filter, | 87 | .sff_dev_select = ninja32_dev_select, |
102 | |||
103 | .tf_load = ata_tf_load, | ||
104 | .tf_read = ata_tf_read, | ||
105 | .check_status = ata_check_status, | ||
106 | .exec_command = ata_exec_command, | ||
107 | .dev_select = ninja32_dev_select, | ||
108 | |||
109 | .freeze = ata_bmdma_freeze, | ||
110 | .thaw = ata_bmdma_thaw, | ||
111 | .error_handler = ata_bmdma_error_handler, | ||
112 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
113 | .cable_detect = ata_cable_40wire, | 88 | .cable_detect = ata_cable_40wire, |
114 | 89 | .set_piomode = ninja32_set_piomode, | |
115 | .bmdma_setup = ata_bmdma_setup, | ||
116 | .bmdma_start = ata_bmdma_start, | ||
117 | .bmdma_stop = ata_bmdma_stop, | ||
118 | .bmdma_status = ata_bmdma_status, | ||
119 | |||
120 | .qc_prep = ata_qc_prep, | ||
121 | .qc_issue = ata_qc_issue_prot, | ||
122 | |||
123 | .data_xfer = ata_data_xfer, | ||
124 | |||
125 | .irq_handler = ata_interrupt, | ||
126 | .irq_clear = ata_bmdma_irq_clear, | ||
127 | .irq_on = ata_irq_on, | ||
128 | |||
129 | .port_start = ata_sff_port_start, | ||
130 | }; | 90 | }; |
131 | 91 | ||
132 | static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 92 | static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
@@ -172,7 +132,7 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
172 | ap->ioaddr.ctl_addr = base + 0x1E; | 132 | ap->ioaddr.ctl_addr = base + 0x1E; |
173 | ap->ioaddr.altstatus_addr = base + 0x1E; | 133 | ap->ioaddr.altstatus_addr = base + 0x1E; |
174 | ap->ioaddr.bmdma_addr = base; | 134 | ap->ioaddr.bmdma_addr = base; |
175 | ata_std_ports(&ap->ioaddr); | 135 | ata_sff_std_ports(&ap->ioaddr); |
176 | 136 | ||
177 | iowrite8(0x05, base + 0x01); /* Enable interrupt lines */ | 137 | iowrite8(0x05, base + 0x01); /* Enable interrupt lines */ |
178 | iowrite8(0xBE, base + 0x02); /* Burst, ?? setup */ | 138 | iowrite8(0xBE, base + 0x02); /* Burst, ?? setup */ |
@@ -182,7 +142,7 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
182 | iowrite8(0xa4, base + 0x1c); /* Unknown */ | 142 | iowrite8(0xa4, base + 0x1c); /* Unknown */ |
183 | iowrite8(0x83, base + 0x1d); /* BMDMA control: WAIT0 */ | 143 | iowrite8(0x83, base + 0x1d); /* BMDMA control: WAIT0 */ |
184 | /* FIXME: Should we disable them at remove ? */ | 144 | /* FIXME: Should we disable them at remove ? */ |
185 | return ata_host_activate(host, dev->irq, ata_interrupt, | 145 | return ata_host_activate(host, dev->irq, ata_sff_interrupt, |
186 | IRQF_SHARED, &ninja32_sht); | 146 | IRQF_SHARED, &ninja32_sht); |
187 | } | 147 | } |
188 | 148 | ||