]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blobdiff - drivers/ata/ahci-tegra.c
ata: ahci: increase L2P FIFO Depth
[sojka/nv-tegra/linux-3.10.git] / drivers / ata / ahci-tegra.c
index e9ad38e5861cf6480c44090b2f9996c79684bb8d..08cccf357584dbf555440470e06e3aa6670a3510 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ahci-tegra.c - AHCI SATA support for TEGRA AHCI device
  *
- * Copyright (c) 2011-2014, NVIDIA Corporation.  All rights reserved.
+ * Copyright (c) 2011-2015, NVIDIA Corporation.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -310,6 +310,11 @@ static u32 tegra_ahci_idle_time = TEGRA_AHCI_DEFAULT_IDLE_TIME;
 #define T_SATA0_NVOOB_SQUELCH_FILTER_LENGTH_SHIFT      26
 #define T_SATA0_NVOOB_SQUELCH_FILTER_LENGTH_MASK       (3 << 26)
 
+#define T_SATA0_FIFO_0                         0x170
+#define T_SATA0_FIFO_0_L2P_FIFO_DEPTH          (0x7 << 12)
+#define T_SATA0_FIFO_0_L2P_FIFO_DEPTH_MASK     (0xf << 12)
+
+
 #define PXSSTS_DEVICE_DETECTED                 (1 << 0)
 
 #ifdef CONFIG_TEGRA_SATA_IDLE_POWERGATE
@@ -1107,6 +1112,11 @@ static int tegra_ahci_controller_init(struct tegra_ahci_host_priv *tegra_hpriv,
        val |= (3 << T_SATA0_NVOOB_SQUELCH_FILTER_LENGTH_SHIFT);
        scfg_writel(val, T_SATA0_NVOOB);
 
+       val = scfg_readl(T_SATA0_FIFO_0);
+       val = (val & ~T_SATA0_FIFO_0_L2P_FIFO_DEPTH_MASK) |
+                       T_SATA0_FIFO_0_L2P_FIFO_DEPTH;
+       scfg_writel(val, T_SATA0_FIFO_0);
+
        /*
         * WAR: Before enabling SATA PLL shutdown, lockdet needs to be ignored.
         *      To ignore lockdet, T_SATA0_DBG0_OFFSET register bit 10 needs to