Commit 9f14786e authored by Phil Sutter's avatar Phil Sutter Committed by Jeff Garzik

[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: default avatarPhil Sutter <n0-1@freewrt.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 1eedb4a9
...@@ -39,9 +39,11 @@ ...@@ -39,9 +39,11 @@
#define RB500_CF_MAXPORTS 1 #define RB500_CF_MAXPORTS 1
#define RB500_CF_IO_DELAY 400 #define RB500_CF_IO_DELAY 400
#define RB500_CF_REG_CMD 0x0800 #define RB500_CF_REG_BASE 0x0800
#define RB500_CF_REG_ERR 0x080D
#define RB500_CF_REG_CTRL 0x080E #define RB500_CF_REG_CTRL 0x080E
#define RB500_CF_REG_DATA 0x0C00 /* 32bit buffered data register offset */
#define RB500_CF_REG_DBUF32 0x0C00
struct rb532_cf_info { struct rb532_cf_info {
void __iomem *iobase; void __iomem *iobase;
...@@ -146,13 +148,14 @@ static void rb532_pata_setup_ports(struct ata_host *ah) ...@@ -146,13 +148,14 @@ static void rb532_pata_setup_ports(struct ata_host *ah)
ap->pio_mask = 0x1f; /* PIO4 */ ap->pio_mask = 0x1f; /* PIO4 */
ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO; ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO;
ap->ioaddr.cmd_addr = info->iobase + RB500_CF_REG_CMD; ap->ioaddr.cmd_addr = info->iobase + RB500_CF_REG_BASE;
ap->ioaddr.ctl_addr = info->iobase + RB500_CF_REG_CTRL; ap->ioaddr.ctl_addr = info->iobase + RB500_CF_REG_CTRL;
ap->ioaddr.altstatus_addr = info->iobase + RB500_CF_REG_CTRL; ap->ioaddr.altstatus_addr = info->iobase + RB500_CF_REG_CTRL;
ata_sff_std_ports(&ap->ioaddr); ata_sff_std_ports(&ap->ioaddr);
ap->ioaddr.data_addr = info->iobase + RB500_CF_REG_DATA; ap->ioaddr.data_addr = info->iobase + RB500_CF_REG_DBUF32;
ap->ioaddr.error_addr = info->iobase + RB500_CF_REG_ERR;
} }
static __devinit int rb532_pata_driver_probe(struct platform_device *pdev) static __devinit int rb532_pata_driver_probe(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment