#include <asm/gpio.h>
#define DRV_NAME "pata-rb153-cf"
-#define DRV_VERSION "0.2"
+#define DRV_VERSION "0.2.2"
#define DRV_DESC "PATA driver for RouterBOARD 153 Compact Flash"
#define RB153_CF_MAXPORTS 1
{
struct rb153_cf_info *info = ah->private_data;
struct ata_port *ap;
- struct ata_ioports *iop;
ap = ah->ports[0];
- iop = &ap->ioaddr;
ap->ops = &rb153_pata_port_ops;
ap->pio_mask = 0x1f; /* PIO4 */
- ap->flags |= ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY;
+ ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO;
- iop->cmd_addr = info->iobase + RB153_CF_REG_CMD;
- iop->ctl_addr = info->iobase + RB153_CF_REG_CTRL;
- iop->altstatus_addr = info->iobase + RB153_CF_REG_CTRL;
- iop->data_addr = info->iobase + RB153_CF_REG_DATA;
+ ap->ioaddr.cmd_addr = info->iobase + RB153_CF_REG_CMD;
+ ap->ioaddr.ctl_addr = info->iobase + RB153_CF_REG_CTRL;
+ ap->ioaddr.altstatus_addr = info->iobase + RB153_CF_REG_CTRL;
- ata_std_ports(iop);
+ ata_std_ports(&ap->ioaddr);
+
+ ap->ioaddr.data_addr = info->iobase + RB153_CF_REG_DATA;
}
static __devinit int rb153_pata_driver_probe(struct platform_device *pdev)
return -ENOMEM;
ah->private_data = info;
+ info->gpio_line = gpio;
info->iobase = devm_ioremap_nocache(&pdev->dev, res->start,
res->end - res->start + 1);
rb153_pata_setup_ports(ah);
ret = ata_host_activate(ah, irq, rb153_pata_irq_handler,
- IRQF_TRIGGER_HIGH, &rb153_pata_sht);
+ IRQF_TRIGGER_LOW, &rb153_pata_sht);
if (ret)
goto err_free_gpio;