* [PATCH v2] ata: ahci_tegra: Read calibration fuse
@ 2014-08-26 9:00 Mikko Perttunen
2014-08-26 11:11 ` Thierry Reding
2014-08-26 14:50 ` Tejun Heo
0 siblings, 2 replies; 3+ messages in thread
From: Mikko Perttunen @ 2014-08-26 9:00 UTC (permalink / raw)
To: tj, swarren, thierry.reding
Cc: linux-ide, linux-tegra, linux-kernel, Mikko Perttunen
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: Mikko Perttunen <mperttunen@nvidia.com>
---
v2: reordered and separated includes
drivers/ata/ahci_tegra.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
index f1fef74..0329044 100644
--- a/drivers/ata/ahci_tegra.c
+++ b/drivers/ata/ahci_tegra.c
@@ -18,14 +18,17 @@
*/
#include <linux/ahci_platform.h>
-#include <linux/reset.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
+#include <linux/reset.h>
+
+#include <soc/tegra/fuse.h>
#include <soc/tegra/pmc.h>
+
#include "ahci.h"
#define SATA_CONFIGURATION_0 0x180
@@ -180,9 +183,12 @@ static int tegra_ahci_controller_init(struct ahci_host_priv *hpriv)
/* 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];
--
1.8.1.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ata: ahci_tegra: Read calibration fuse
2014-08-26 9:00 [PATCH v2] ata: ahci_tegra: Read calibration fuse Mikko Perttunen
@ 2014-08-26 11:11 ` Thierry Reding
2014-08-26 14:50 ` Tejun Heo
1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2014-08-26 11:11 UTC (permalink / raw)
To: Mikko Perttunen; +Cc: tj, swarren, linux-ide, linux-tegra, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 629 bytes --]
On Tue, Aug 26, 2014 at 12:00:30PM +0300, Mikko Perttunen wrote:
> 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: Mikko Perttunen <mperttunen@nvidia.com>
> ---
> v2: reordered and separated includes
>
> drivers/ata/ahci_tegra.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ata: ahci_tegra: Read calibration fuse
2014-08-26 9:00 [PATCH v2] ata: ahci_tegra: Read calibration fuse Mikko Perttunen
2014-08-26 11:11 ` Thierry Reding
@ 2014-08-26 14:50 ` Tejun Heo
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2014-08-26 14:50 UTC (permalink / raw)
To: Mikko Perttunen
Cc: swarren, thierry.reding, linux-ide, linux-tegra, linux-kernel
On Tue, Aug 26, 2014 at 12:00:30PM +0300, Mikko Perttunen wrote:
> 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: Mikko Perttunen <mperttunen@nvidia.com>
Applied to libata/for-3.17-fixes. One comment below.
> #include <linux/ahci_platform.h>
> -#include <linux/reset.h>
> #include <linux/errno.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/regulator/consumer.h>
> +#include <linux/reset.h>
You moved the include of reset.h w/o any explanation in the patch
description. The description doesn't have to be super verbose on
trivial stuff but it at least has to cover all changes included in the
patch w/ their rationales, however trivial they may be.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-26 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-26 9:00 [PATCH v2] ata: ahci_tegra: Read calibration fuse Mikko Perttunen
2014-08-26 11:11 ` Thierry Reding
2014-08-26 14:50 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).