9
0
Fork 0

Merge branch 'for-next/ahci'

This commit is contained in:
Sascha Hauer 2013-03-04 09:21:36 +01:00
commit 4c246afad3
1 changed files with 18 additions and 2 deletions

View File

@ -385,14 +385,21 @@ static int ahci_init_port(struct ahci_port *ahci_port)
ahci_port_info(ahci_port, "Spinning up device...\n");
ret = wait_on_timeout(WAIT_SPINUP,
(readl(port_mmio + PORT_TFDATA) &
(ATA_STATUS_BUSY | ATA_STATUS_DRQ)) == 0);
((readl(port_mmio + PORT_TFDATA) &
(ATA_STATUS_BUSY | ATA_STATUS_DRQ)) == 0)
|| !((readl(port_mmio + PORT_SCR_STAT) & 0xf) == 1));
if (ret) {
ahci_port_info(ahci_port, "timeout.\n");
ret = -ENODEV;
goto err_init;
}
if ((readl(port_mmio + PORT_SCR_STAT) & 0xf) == 1) {
ahci_port_info(ahci_port, "down.\n");
ret = -ENODEV;
goto err_init;
}
ahci_port_info(ahci_port, "ok.\n");
val = ahci_port_read(ahci_port, PORT_SCR_ERR);
@ -664,10 +671,19 @@ static int ahci_probe(struct device_d *dev)
return ret;
}
static __maybe_unused struct of_device_id ahci_dt_ids[] = {
{
.compatible = "calxeda,hb-ahci",
}, {
/* sentinel */
}
};
static struct driver_d ahci_driver = {
.name = "ahci",
.probe = ahci_probe,
.info = ahci_info,
.of_compatible = DRV_OF_COMPAT(ahci_dt_ids),
};
static int ahci_init(void)