diff options
author | Tejun Heo <htejun@gmail.com> | 2007-08-06 05:36:23 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-12 14:55:30 -0400 |
commit | 936fd7328657884d5a69a55666c74a55aa83ca27 (patch) | |
tree | 83a78a02d2c65ce835fe33882dfe5043d3240bff /drivers/ata/sata_mv.c | |
parent | f58229f8060055b08b34008ea08f31de1e2f003c (diff) |
libata-link: linkify PHY-related functions
Make the following PHY-related functions to deal with ata_link instead
of ata_port.
* sata_print_link_status()
* sata_down_spd_limit()
* ata_set_sata_spd_limit() and friends
* sata_link_debounce/resume()
* sata_scr_valid/read/write/write_flush()
* ata_link_on/offline()
This patch introduces no behavior change.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r-- | drivers/ata/sata_mv.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 246e7c5fdce8..8e63c60adaff 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -1423,8 +1423,8 @@ static void mv_err_intr(struct ata_port *ap, struct ata_queued_cmd *qc) | |||
1423 | /* just a guess: do we need to do this? should we | 1423 | /* just a guess: do we need to do this? should we |
1424 | * expand this, and do it in all cases? | 1424 | * expand this, and do it in all cases? |
1425 | */ | 1425 | */ |
1426 | sata_scr_read(ap, SCR_ERROR, &serr); | 1426 | sata_scr_read(&ap->link, SCR_ERROR, &serr); |
1427 | sata_scr_write_flush(ap, SCR_ERROR, serr); | 1427 | sata_scr_write_flush(&ap->link, SCR_ERROR, serr); |
1428 | } | 1428 | } |
1429 | 1429 | ||
1430 | edma_err_cause = readl(port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); | 1430 | edma_err_cause = readl(port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); |
@@ -1468,8 +1468,8 @@ static void mv_err_intr(struct ata_port *ap, struct ata_queued_cmd *qc) | |||
1468 | } | 1468 | } |
1469 | 1469 | ||
1470 | if (edma_err_cause & EDMA_ERR_SERR) { | 1470 | if (edma_err_cause & EDMA_ERR_SERR) { |
1471 | sata_scr_read(ap, SCR_ERROR, &serr); | 1471 | sata_scr_read(&ap->link, SCR_ERROR, &serr); |
1472 | sata_scr_write_flush(ap, SCR_ERROR, serr); | 1472 | sata_scr_write_flush(&ap->link, SCR_ERROR, serr); |
1473 | err_mask = AC_ERR_ATA_BUS; | 1473 | err_mask = AC_ERR_ATA_BUS; |
1474 | action |= ATA_EH_HARDRESET; | 1474 | action |= ATA_EH_HARDRESET; |
1475 | } | 1475 | } |
@@ -1687,7 +1687,7 @@ static void mv_pci_error(struct ata_host *host, void __iomem *mmio) | |||
1687 | 1687 | ||
1688 | for (i = 0; i < host->n_ports; i++) { | 1688 | for (i = 0; i < host->n_ports; i++) { |
1689 | ap = host->ports[i]; | 1689 | ap = host->ports[i]; |
1690 | if (!ata_port_offline(ap)) { | 1690 | if (!ata_link_offline(&ap->link)) { |
1691 | ehi = &ap->link.eh_info; | 1691 | ehi = &ap->link.eh_info; |
1692 | ata_ehi_clear_desc(ehi); | 1692 | ata_ehi_clear_desc(ehi); |
1693 | if (!printed++) | 1693 | if (!printed++) |
@@ -2198,14 +2198,14 @@ static void mv_phy_reset(struct ata_port *ap, unsigned int *class, | |||
2198 | 2198 | ||
2199 | /* Issue COMRESET via SControl */ | 2199 | /* Issue COMRESET via SControl */ |
2200 | comreset_retry: | 2200 | comreset_retry: |
2201 | sata_scr_write_flush(ap, SCR_CONTROL, 0x301); | 2201 | sata_scr_write_flush(&ap->link, SCR_CONTROL, 0x301); |
2202 | msleep(1); | 2202 | msleep(1); |
2203 | 2203 | ||
2204 | sata_scr_write_flush(ap, SCR_CONTROL, 0x300); | 2204 | sata_scr_write_flush(&ap->link, SCR_CONTROL, 0x300); |
2205 | msleep(20); | 2205 | msleep(20); |
2206 | 2206 | ||
2207 | do { | 2207 | do { |
2208 | sata_scr_read(ap, SCR_STATUS, &sstatus); | 2208 | sata_scr_read(&ap->link, SCR_STATUS, &sstatus); |
2209 | if (((sstatus & 0x3) == 3) || ((sstatus & 0x3) == 0)) | 2209 | if (((sstatus & 0x3) == 3) || ((sstatus & 0x3) == 0)) |
2210 | break; | 2210 | break; |
2211 | 2211 | ||
@@ -2230,7 +2230,7 @@ comreset_retry: | |||
2230 | } | 2230 | } |
2231 | #endif | 2231 | #endif |
2232 | 2232 | ||
2233 | if (ata_port_offline(ap)) { | 2233 | if (ata_link_offline(&ap->link)) { |
2234 | *class = ATA_DEV_NONE; | 2234 | *class = ATA_DEV_NONE; |
2235 | return; | 2235 | return; |
2236 | } | 2236 | } |
@@ -2285,7 +2285,7 @@ static int mv_prereset(struct ata_port *ap, unsigned long deadline) | |||
2285 | if (ehc->i.action & ATA_EH_HARDRESET) | 2285 | if (ehc->i.action & ATA_EH_HARDRESET) |
2286 | return 0; | 2286 | return 0; |
2287 | 2287 | ||
2288 | if (ata_port_online(ap)) | 2288 | if (ata_link_online(&ap->link)) |
2289 | rc = ata_wait_ready(ap, deadline); | 2289 | rc = ata_wait_ready(ap, deadline); |
2290 | else | 2290 | else |
2291 | rc = -ENODEV; | 2291 | rc = -ENODEV; |
@@ -2313,11 +2313,11 @@ static void mv_postreset(struct ata_port *ap, unsigned int *classes) | |||
2313 | u32 serr; | 2313 | u32 serr; |
2314 | 2314 | ||
2315 | /* print link status */ | 2315 | /* print link status */ |
2316 | sata_print_link_status(ap); | 2316 | sata_print_link_status(&ap->link); |
2317 | 2317 | ||
2318 | /* clear SError */ | 2318 | /* clear SError */ |
2319 | sata_scr_read(ap, SCR_ERROR, &serr); | 2319 | sata_scr_read(&ap->link, SCR_ERROR, &serr); |
2320 | sata_scr_write_flush(ap, SCR_ERROR, serr); | 2320 | sata_scr_write_flush(&ap->link, SCR_ERROR, serr); |
2321 | 2321 | ||
2322 | /* bail out if no device is present */ | 2322 | /* bail out if no device is present */ |
2323 | if (classes[0] == ATA_DEV_NONE && classes[1] == ATA_DEV_NONE) { | 2323 | if (classes[0] == ATA_DEV_NONE && classes[1] == ATA_DEV_NONE) { |