提交 e327f115 编写于 作者: M Mikko Perttunen 提交者: Tejun Heo

ata: ahci_tegra: Read calibration fuse

The original version of the driver did not read the SATA calibration
fuse to remove the dependency to the fuse driver. The fuse driver
is now merged, so add this functionality.

The calibration fuse contains a 2-bit value used to pick a set
of calibration values for the SATA pad.
Signed-off-by: NMikko Perttunen <mperttunen@nvidia.com>
Acked-by: NThierry Reding <treding@nvidia.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 2a13772a
...@@ -18,14 +18,17 @@ ...@@ -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) ...@@ -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 ret = tegra_fuse_readl(FUSE_SATA_CALIB, &val);
* fuse once the fuse driver has landed. */ if (ret) {
val = 0; 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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册