diff options
Diffstat (limited to 'drivers/ata/pata_winbond.c')
-rw-r--r-- | drivers/ata/pata_winbond.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c index 553658bacce0..549cbbe9fd07 100644 --- a/drivers/ata/pata_winbond.c +++ b/drivers/ata/pata_winbond.c | |||
@@ -197,6 +197,7 @@ static __init int winbond_init_one(unsigned long port) | |||
197 | 197 | ||
198 | for (i = 0; i < 2 ; i ++) { | 198 | for (i = 0; i < 2 ; i ++) { |
199 | unsigned long cmd_port = 0x1F0 - (0x80 * i); | 199 | unsigned long cmd_port = 0x1F0 - (0x80 * i); |
200 | unsigned long ctl_port = cmd_port + 0x206; | ||
200 | struct ata_host *host; | 201 | struct ata_host *host; |
201 | struct ata_port *ap; | 202 | struct ata_port *ap; |
202 | void __iomem *cmd_addr, *ctl_addr; | 203 | void __iomem *cmd_addr, *ctl_addr; |
@@ -212,14 +213,16 @@ static __init int winbond_init_one(unsigned long port) | |||
212 | host = ata_host_alloc(&pdev->dev, 1); | 213 | host = ata_host_alloc(&pdev->dev, 1); |
213 | if (!host) | 214 | if (!host) |
214 | goto err_unregister; | 215 | goto err_unregister; |
216 | ap = host->ports[0]; | ||
215 | 217 | ||
216 | rc = -ENOMEM; | 218 | rc = -ENOMEM; |
217 | cmd_addr = devm_ioport_map(&pdev->dev, cmd_port, 8); | 219 | cmd_addr = devm_ioport_map(&pdev->dev, cmd_port, 8); |
218 | ctl_addr = devm_ioport_map(&pdev->dev, cmd_port + 0x0206, 1); | 220 | ctl_addr = devm_ioport_map(&pdev->dev, ctl_port, 1); |
219 | if (!cmd_addr || !ctl_addr) | 221 | if (!cmd_addr || !ctl_addr) |
220 | goto err_unregister; | 222 | goto err_unregister; |
221 | 223 | ||
222 | ap = host->ports[0]; | 224 | ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", cmd_port, ctl_port); |
225 | |||
223 | ap->ops = &winbond_port_ops; | 226 | ap->ops = &winbond_port_ops; |
224 | ap->pio_mask = 0x1F; | 227 | ap->pio_mask = 0x1F; |
225 | ap->flags |= ATA_FLAG_SLAVE_POSS; | 228 | ap->flags |= ATA_FLAG_SLAVE_POSS; |