[libata] pata_rb532_cf: fix and rename register definitions

The original standalone driver uses a custom address for the error
register. Use it in pata_rb532_cf, too.

Rename two register definitions:
- The address offset 0x0800 in fact is the ATA base, not ATA command
address.
- The offset 0x0C00 is not a regular ATA data address, but a buffered one
allowing 4-byte IO.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by Phil Sutter and committed by Jeff Garzik 9f14786e 1eedb4a9

+7 -4
+7 -4
drivers/ata/pata_rb532_cf.c
··· 39 #define RB500_CF_MAXPORTS 1 40 #define RB500_CF_IO_DELAY 400 41 42 - #define RB500_CF_REG_CMD 0x0800 43 #define RB500_CF_REG_CTRL 0x080E 44 - #define RB500_CF_REG_DATA 0x0C00 45 46 struct rb532_cf_info { 47 void __iomem *iobase; ··· 148 ap->pio_mask = 0x1f; /* PIO4 */ 149 ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO; 150 151 - ap->ioaddr.cmd_addr = info->iobase + RB500_CF_REG_CMD; 152 ap->ioaddr.ctl_addr = info->iobase + RB500_CF_REG_CTRL; 153 ap->ioaddr.altstatus_addr = info->iobase + RB500_CF_REG_CTRL; 154 155 ata_sff_std_ports(&ap->ioaddr); 156 157 - ap->ioaddr.data_addr = info->iobase + RB500_CF_REG_DATA; 158 } 159 160 static __devinit int rb532_pata_driver_probe(struct platform_device *pdev)
··· 39 #define RB500_CF_MAXPORTS 1 40 #define RB500_CF_IO_DELAY 400 41 42 + #define RB500_CF_REG_BASE 0x0800 43 + #define RB500_CF_REG_ERR 0x080D 44 #define RB500_CF_REG_CTRL 0x080E 45 + /* 32bit buffered data register offset */ 46 + #define RB500_CF_REG_DBUF32 0x0C00 47 48 struct rb532_cf_info { 49 void __iomem *iobase; ··· 146 ap->pio_mask = 0x1f; /* PIO4 */ 147 ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO; 148 149 + ap->ioaddr.cmd_addr = info->iobase + RB500_CF_REG_BASE; 150 ap->ioaddr.ctl_addr = info->iobase + RB500_CF_REG_CTRL; 151 ap->ioaddr.altstatus_addr = info->iobase + RB500_CF_REG_CTRL; 152 153 ata_sff_std_ports(&ap->ioaddr); 154 155 + ap->ioaddr.data_addr = info->iobase + RB500_CF_REG_DBUF32; 156 + ap->ioaddr.error_addr = info->iobase + RB500_CF_REG_ERR; 157 } 158 159 static __devinit int rb532_pata_driver_probe(struct platform_device *pdev)