|
@@ -18,14 +18,17 @@
|
|
*/
|
|
*/
|
|
|
|
|
|
#include <linux/ahci_platform.h>
|
|
#include <linux/ahci_platform.h>
|
|
-#include <linux/reset.h>
|
|
|
|
#include <linux/errno.h>
|
|
#include <linux/errno.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
#include <linux/of_device.h>
|
|
#include <linux/of_device.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/regulator/consumer.h>
|
|
#include <linux/regulator/consumer.h>
|
|
|
|
+#include <linux/reset.h>
|
|
|
|
+
|
|
|
|
+#include <soc/tegra/fuse.h>
|
|
#include <soc/tegra/pmc.h>
|
|
#include <soc/tegra/pmc.h>
|
|
|
|
+
|
|
#include "ahci.h"
|
|
#include "ahci.h"
|
|
|
|
|
|
#define SATA_CONFIGURATION_0 0x180
|
|
#define SATA_CONFIGURATION_0 0x180
|
|
@@ -180,9 +183,12 @@ static int tegra_ahci_controller_init(struct ahci_host_priv *hpriv)
|
|
|
|
|
|
/* Pad calibration */
|
|
/* Pad calibration */
|
|
|
|
|
|
- /* FIXME Always use calibration 0. Change this to read the calibration
|
|
|
|
- * fuse once the fuse driver has landed. */
|
|
|
|
- val = 0;
|
|
|
|
|
|
+ ret = tegra_fuse_readl(FUSE_SATA_CALIB, &val);
|
|
|
|
+ if (ret) {
|
|
|
|
+ dev_err(&tegra->pdev->dev,
|
|
|
|
+ "failed to read calibration fuse: %d\n", ret);
|
|
|
|
+ return ret;
|
|
|
|
+ }
|
|
|
|
|
|
calib = tegra124_pad_calibration[val & FUSE_SATA_CALIB_MASK];
|
|
calib = tegra124_pad_calibration[val & FUSE_SATA_CALIB_MASK];
|
|
|
|
|