diff options
author | Jerry Huang <Chang-Ming.Huang@freescale.com> | 2011-12-20 01:50:27 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-01-17 20:49:07 -0500 |
commit | 93272b132a72450dfc16f13d32223fe47aaf5061 (patch) | |
tree | d23e8fc226170ecbcdb6fcf7487beeadd5ca8748 /drivers/ata | |
parent | 966f1212e1ac5fe3ddf04479d21488ddb36a2608 (diff) |
[libata] sata_fsl: fix the controller operating mode
Configure the FSL SATA controller to the preferred, enterprise mode.
Signed-off-by: Yutaka Ando <r46913@freescale.com>
Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
CC: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/sata_fsl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 5a2c95ba050a..0120b0d1e9a5 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
@@ -140,6 +140,7 @@ enum { | |||
140 | */ | 140 | */ |
141 | HCONTROL_ONLINE_PHY_RST = (1 << 31), | 141 | HCONTROL_ONLINE_PHY_RST = (1 << 31), |
142 | HCONTROL_FORCE_OFFLINE = (1 << 30), | 142 | HCONTROL_FORCE_OFFLINE = (1 << 30), |
143 | HCONTROL_LEGACY = (1 << 28), | ||
143 | HCONTROL_PARITY_PROT_MOD = (1 << 14), | 144 | HCONTROL_PARITY_PROT_MOD = (1 << 14), |
144 | HCONTROL_DPATH_PARITY = (1 << 12), | 145 | HCONTROL_DPATH_PARITY = (1 << 12), |
145 | HCONTROL_SNOOP_ENABLE = (1 << 10), | 146 | HCONTROL_SNOOP_ENABLE = (1 << 10), |
@@ -1223,6 +1224,10 @@ static int sata_fsl_init_controller(struct ata_host *host) | |||
1223 | * part of the port_start() callback | 1224 | * part of the port_start() callback |
1224 | */ | 1225 | */ |
1225 | 1226 | ||
1227 | /* sata controller to operate in enterprise mode */ | ||
1228 | temp = ioread32(hcr_base + HCONTROL); | ||
1229 | iowrite32(temp & ~HCONTROL_LEGACY, hcr_base + HCONTROL); | ||
1230 | |||
1226 | /* ack. any pending IRQs for this controller/port */ | 1231 | /* ack. any pending IRQs for this controller/port */ |
1227 | temp = ioread32(hcr_base + HSTATUS); | 1232 | temp = ioread32(hcr_base + HSTATUS); |
1228 | if (temp & 0x3F) | 1233 | if (temp & 0x3F) |
@@ -1421,6 +1426,12 @@ static int sata_fsl_resume(struct platform_device *op) | |||
1421 | /* Recovery the CHBA register in host controller cmd register set */ | 1426 | /* Recovery the CHBA register in host controller cmd register set */ |
1422 | iowrite32(pp->cmdslot_paddr & 0xffffffff, hcr_base + CHBA); | 1427 | iowrite32(pp->cmdslot_paddr & 0xffffffff, hcr_base + CHBA); |
1423 | 1428 | ||
1429 | iowrite32((ioread32(hcr_base + HCONTROL) | ||
1430 | | HCONTROL_ONLINE_PHY_RST | ||
1431 | | HCONTROL_SNOOP_ENABLE | ||
1432 | | HCONTROL_PMP_ATTACHED), | ||
1433 | hcr_base + HCONTROL); | ||
1434 | |||
1424 | ata_host_resume(host); | 1435 | ata_host_resume(host); |
1425 | return 0; | 1436 | return 0; |
1426 | } | 1437 | } |