diff options
Diffstat (limited to 'drivers/ata/pata_winbond.c')
-rw-r--r-- | drivers/ata/pata_winbond.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c index 83abfeca4057..549cbbe9fd07 100644 --- a/drivers/ata/pata_winbond.c +++ b/drivers/ata/pata_winbond.c | |||
@@ -94,7 +94,7 @@ static void winbond_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
94 | 94 | ||
95 | static void winbond_data_xfer(struct ata_device *adev, unsigned char *buf, unsigned int buflen, int write_data) | 95 | static void winbond_data_xfer(struct ata_device *adev, unsigned char *buf, unsigned int buflen, int write_data) |
96 | { | 96 | { |
97 | struct ata_port *ap = adev->ap; | 97 | struct ata_port *ap = adev->link->ap; |
98 | int slop = buflen & 3; | 98 | int slop = buflen & 3; |
99 | 99 | ||
100 | if (ata_id_has_dword_io(adev->id)) { | 100 | if (ata_id_has_dword_io(adev->id)) { |
@@ -138,7 +138,6 @@ static struct scsi_host_template winbond_sht = { | |||
138 | }; | 138 | }; |
139 | 139 | ||
140 | static struct ata_port_operations winbond_port_ops = { | 140 | static struct ata_port_operations winbond_port_ops = { |
141 | .port_disable = ata_port_disable, | ||
142 | .set_piomode = winbond_set_piomode, | 141 | .set_piomode = winbond_set_piomode, |
143 | 142 | ||
144 | .tf_load = ata_tf_load, | 143 | .tf_load = ata_tf_load, |
@@ -160,9 +159,8 @@ static struct ata_port_operations winbond_port_ops = { | |||
160 | 159 | ||
161 | .irq_clear = ata_bmdma_irq_clear, | 160 | .irq_clear = ata_bmdma_irq_clear, |
162 | .irq_on = ata_irq_on, | 161 | .irq_on = ata_irq_on, |
163 | .irq_ack = ata_irq_ack, | ||
164 | 162 | ||
165 | .port_start = ata_port_start, | 163 | .port_start = ata_sff_port_start, |
166 | }; | 164 | }; |
167 | 165 | ||
168 | /** | 166 | /** |
@@ -199,6 +197,7 @@ static __init int winbond_init_one(unsigned long port) | |||
199 | 197 | ||
200 | for (i = 0; i < 2 ; i ++) { | 198 | for (i = 0; i < 2 ; i ++) { |
201 | unsigned long cmd_port = 0x1F0 - (0x80 * i); | 199 | unsigned long cmd_port = 0x1F0 - (0x80 * i); |
200 | unsigned long ctl_port = cmd_port + 0x206; | ||
202 | struct ata_host *host; | 201 | struct ata_host *host; |
203 | struct ata_port *ap; | 202 | struct ata_port *ap; |
204 | void __iomem *cmd_addr, *ctl_addr; | 203 | void __iomem *cmd_addr, *ctl_addr; |
@@ -214,14 +213,16 @@ static __init int winbond_init_one(unsigned long port) | |||
214 | host = ata_host_alloc(&pdev->dev, 1); | 213 | host = ata_host_alloc(&pdev->dev, 1); |
215 | if (!host) | 214 | if (!host) |
216 | goto err_unregister; | 215 | goto err_unregister; |
216 | ap = host->ports[0]; | ||
217 | 217 | ||
218 | rc = -ENOMEM; | 218 | rc = -ENOMEM; |
219 | cmd_addr = devm_ioport_map(&pdev->dev, cmd_port, 8); | 219 | cmd_addr = devm_ioport_map(&pdev->dev, cmd_port, 8); |
220 | ctl_addr = devm_ioport_map(&pdev->dev, cmd_port + 0x0206, 1); | 220 | ctl_addr = devm_ioport_map(&pdev->dev, ctl_port, 1); |
221 | if (!cmd_addr || !ctl_addr) | 221 | if (!cmd_addr || !ctl_addr) |
222 | goto err_unregister; | 222 | goto err_unregister; |
223 | 223 | ||
224 | ap = host->ports[0]; | 224 | ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", cmd_port, ctl_port); |
225 | |||
225 | ap->ops = &winbond_port_ops; | 226 | ap->ops = &winbond_port_ops; |
226 | ap->pio_mask = 0x1F; | 227 | ap->pio_mask = 0x1F; |
227 | ap->flags |= ATA_FLAG_SLAVE_POSS; | 228 | ap->flags |= ATA_FLAG_SLAVE_POSS; |