aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci_tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/ahci_tegra.c')
-rw-r--r--drivers/ata/ahci_tegra.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
index f1fef74e503c..032904402c95 100644
--- a/drivers/ata/ahci_tegra.c
+++ b/drivers/ata/ahci_tegra.c
@@ -18,14 +18,17 @@
18 */ 18 */
19 19
20#include <linux/ahci_platform.h> 20#include <linux/ahci_platform.h>
21#include <linux/reset.h>
22#include <linux/errno.h> 21#include <linux/errno.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/of_device.h> 24#include <linux/of_device.h>
26#include <linux/platform_device.h> 25#include <linux/platform_device.h>
27#include <linux/regulator/consumer.h> 26#include <linux/regulator/consumer.h>
27#include <linux/reset.h>
28
29#include <soc/tegra/fuse.h>
28#include <soc/tegra/pmc.h> 30#include <soc/tegra/pmc.h>
31
29#include "ahci.h" 32#include "ahci.h"
30 33
31#define SATA_CONFIGURATION_0 0x180 34#define SATA_CONFIGURATION_0 0x180
@@ -180,9 +183,12 @@ static int tegra_ahci_controller_init(struct ahci_host_priv *hpriv)
180 183
181 /* Pad calibration */ 184 /* Pad calibration */
182 185
183 /* FIXME Always use calibration 0. Change this to read the calibration 186 ret = tegra_fuse_readl(FUSE_SATA_CALIB, &val);
184 * fuse once the fuse driver has landed. */ 187 if (ret) {
185 val = 0; 188 dev_err(&tegra->pdev->dev,
189 "failed to read calibration fuse: %d\n", ret);
190 return ret;
191 }
186 192
187 calib = tegra124_pad_calibration[val & FUSE_SATA_CALIB_MASK]; 193 calib = tegra124_pad_calibration[val & FUSE_SATA_CALIB_MASK];
188 194