aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci_sunxi.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c
index e44d675a30ec..b5aedca5ea3c 100644
--- a/drivers/ata/ahci_sunxi.c
+++ b/drivers/ata/ahci_sunxi.c
@@ -27,6 +27,12 @@
27#include <linux/regulator/consumer.h> 27#include <linux/regulator/consumer.h>
28#include "ahci.h" 28#include "ahci.h"
29 29
30/* Insmod parameters */
31static bool enable_pmp;
32module_param(enable_pmp, bool, 0);
33MODULE_PARM_DESC(enable_pmp,
34 "Enable support for sata port multipliers, only use if you use a pmp!");
35
30#define AHCI_BISTAFR 0x00a0 36#define AHCI_BISTAFR 0x00a0
31#define AHCI_BISTCR 0x00a4 37#define AHCI_BISTCR 0x00a4
32#define AHCI_BISTFCTR 0x00a8 38#define AHCI_BISTFCTR 0x00a8
@@ -184,7 +190,15 @@ static int ahci_sunxi_probe(struct platform_device *pdev)
184 goto disable_resources; 190 goto disable_resources;
185 191
186 hpriv->flags = AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI | 192 hpriv->flags = AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI |
187 AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ; 193 AHCI_HFLAG_YES_NCQ;
194
195 /*
196 * The sunxi sata controller seems to be unable to successfully do a
197 * soft reset if no pmp is attached, so disable pmp use unless
198 * requested, otherwise directly attached disks do not work.
199 */
200 if (!enable_pmp)
201 hpriv->flags |= AHCI_HFLAG_NO_PMP;
188 202
189 rc = ahci_platform_init_host(pdev, hpriv, &ahci_sunxi_port_info); 203 rc = ahci_platform_init_host(pdev, hpriv, &ahci_sunxi_port_info);
190 if (rc) 204 if (rc)