diff options
Diffstat (limited to 'drivers/ata/pata_ixp4xx_cf.c')
-rw-r--r-- | drivers/ata/pata_ixp4xx_cf.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index 7b0d2fc57484..fcd532afbf2e 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c | |||
@@ -131,8 +131,12 @@ static struct ata_port_operations ixp4xx_port_ops = { | |||
131 | }; | 131 | }; |
132 | 132 | ||
133 | static void ixp4xx_setup_port(struct ata_ioports *ioaddr, | 133 | static void ixp4xx_setup_port(struct ata_ioports *ioaddr, |
134 | struct ixp4xx_pata_data *data) | 134 | struct ixp4xx_pata_data *data, |
135 | unsigned long raw_cs0, unsigned long raw_cs1) | ||
135 | { | 136 | { |
137 | unsigned long raw_cmd = raw_cs0; | ||
138 | unsigned long raw_ctl = raw_cs1 + 0x06; | ||
139 | |||
136 | ioaddr->cmd_addr = data->cs0; | 140 | ioaddr->cmd_addr = data->cs0; |
137 | ioaddr->altstatus_addr = data->cs1 + 0x06; | 141 | ioaddr->altstatus_addr = data->cs1 + 0x06; |
138 | ioaddr->ctl_addr = data->cs1 + 0x06; | 142 | ioaddr->ctl_addr = data->cs1 + 0x06; |
@@ -158,7 +162,12 @@ static void ixp4xx_setup_port(struct ata_ioports *ioaddr, | |||
158 | *(unsigned long *)&ioaddr->device_addr ^= 0x03; | 162 | *(unsigned long *)&ioaddr->device_addr ^= 0x03; |
159 | *(unsigned long *)&ioaddr->status_addr ^= 0x03; | 163 | *(unsigned long *)&ioaddr->status_addr ^= 0x03; |
160 | *(unsigned long *)&ioaddr->command_addr ^= 0x03; | 164 | *(unsigned long *)&ioaddr->command_addr ^= 0x03; |
165 | |||
166 | raw_cmd ^= 0x03; | ||
167 | raw_ctl ^= 0x03; | ||
161 | #endif | 168 | #endif |
169 | |||
170 | ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", raw_cmd, raw_ctl); | ||
162 | } | 171 | } |
163 | 172 | ||
164 | static __devinit int ixp4xx_pata_probe(struct platform_device *pdev) | 173 | static __devinit int ixp4xx_pata_probe(struct platform_device *pdev) |
@@ -203,7 +212,7 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev) | |||
203 | ap->pio_mask = 0x1f; /* PIO4 */ | 212 | ap->pio_mask = 0x1f; /* PIO4 */ |
204 | ap->flags |= ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY | ATA_FLAG_NO_ATAPI; | 213 | ap->flags |= ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY | ATA_FLAG_NO_ATAPI; |
205 | 214 | ||
206 | ixp4xx_setup_port(&ap->ioaddr, data); | 215 | ixp4xx_setup_port(ap, data, cs0->start, cs1->start); |
207 | 216 | ||
208 | dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n"); | 217 | dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n"); |
209 | 218 | ||