diff options
author | Mark Lord <liml@rtr.ca> | 2008-05-02 02:10:56 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-06 11:37:40 -0400 |
commit | dd2890f60f8e15f14c8eb132779b2f15c49d1203 (patch) | |
tree | 3cac463b2838748db8507707731c75d1a180e731 /drivers/ata | |
parent | 3e4a139107e497a741c26f8a377a10f214d63ec1 (diff) |
sata_mv errata workaround for sata25 part 1
Part 1 of workaround for errata "sata#25" for the 60x1 series
(the second half of this errata workaround is still in development.
Bit22 of the GPIO port has to be set "on" when in NCQ mode.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/sata_mv.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 0545a4916100..fbccf215d501 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -1151,6 +1151,21 @@ static void mv_config_fbs(void __iomem *port_mmio, int enable_fbs) | |||
1151 | writelfl(new_ltmode, port_mmio + LTMODE_OFS); | 1151 | writelfl(new_ltmode, port_mmio + LTMODE_OFS); |
1152 | } | 1152 | } |
1153 | 1153 | ||
1154 | static void mv_60x1_errata_sata25(struct ata_port *ap, int want_ncq) | ||
1155 | { | ||
1156 | struct mv_host_priv *hpriv = ap->host->private_data; | ||
1157 | u32 old, new; | ||
1158 | |||
1159 | /* workaround for 88SX60x1 FEr SATA#25 (part 1) */ | ||
1160 | old = readl(hpriv->base + MV_GPIO_PORT_CTL_OFS); | ||
1161 | if (want_ncq) | ||
1162 | new = old | (1 << 22); | ||
1163 | else | ||
1164 | new = old & ~(1 << 22); | ||
1165 | if (new != old) | ||
1166 | writel(new, hpriv->base + MV_GPIO_PORT_CTL_OFS); | ||
1167 | } | ||
1168 | |||
1154 | static void mv_edma_cfg(struct ata_port *ap, int want_ncq) | 1169 | static void mv_edma_cfg(struct ata_port *ap, int want_ncq) |
1155 | { | 1170 | { |
1156 | u32 cfg; | 1171 | u32 cfg; |
@@ -1164,10 +1179,11 @@ static void mv_edma_cfg(struct ata_port *ap, int want_ncq) | |||
1164 | if (IS_GEN_I(hpriv)) | 1179 | if (IS_GEN_I(hpriv)) |
1165 | cfg |= (1 << 8); /* enab config burst size mask */ | 1180 | cfg |= (1 << 8); /* enab config burst size mask */ |
1166 | 1181 | ||
1167 | else if (IS_GEN_II(hpriv)) | 1182 | else if (IS_GEN_II(hpriv)) { |
1168 | cfg |= EDMA_CFG_RD_BRST_EXT | EDMA_CFG_WR_BUFF_LEN; | 1183 | cfg |= EDMA_CFG_RD_BRST_EXT | EDMA_CFG_WR_BUFF_LEN; |
1184 | mv_60x1_errata_sata25(ap, want_ncq); | ||
1169 | 1185 | ||
1170 | else if (IS_GEN_IIE(hpriv)) { | 1186 | } else if (IS_GEN_IIE(hpriv)) { |
1171 | cfg |= (1 << 23); /* do not mask PM field in rx'd FIS */ | 1187 | cfg |= (1 << 23); /* do not mask PM field in rx'd FIS */ |
1172 | cfg |= (1 << 22); /* enab 4-entry host queue cache */ | 1188 | cfg |= (1 << 22); /* enab 4-entry host queue cache */ |
1173 | if (HAS_PCI(ap->host)) | 1189 | if (HAS_PCI(ap->host)) |